quote:
Originally posted by sphr:
<STRONG>1) Was wondering if there is another way to tell these entities apart from the other races?</STRONG>
I don't know the exact solution, but it seems like the 0xE4 creature flags might be used for this.
quote:
<STRONG>2) Also, how can one distinguish the Child and babies?</STRONG>
I think they've got separate professions. If you look in raw\graphics\graphics_example.txt, it lists all the profession tokens. Two of the last tokens are CHILD and BABY.
quote:
<STRONG>3) How can one retrieve the last name and the active profession?</STRONG>
For the profession, I suspect that's what's referred to as "Type ID" / "Dwarf Type" in the memory hacking table. It's at offset 0x8A in the creature data.
In the 2D version, last name was encoded in 4 contiguous fields in the creature data, not too far from the first name and nickname fields. The fields were word 1 index, word 1 subtype, word 2 index, and word 2 subtype, in that order. I forget the exact sizes of the fields, but the word index was probably a short or a long, and the subtype was almost certainly just a single byte.
Anyway, the index value corresponded to the position of the "WORD:" tag in raw\objects\language_words.txt. The subindex referred to the specific part of speech for that word. 0 and 1 referred to the two NOUN values, 2 was ADJ, 3 was PREFIX, and 4-8 were the VERB values. Not every word had every defined part of speech.
I wrote a simple surname decoder for 23a -- it doesn't do any looking into the process memory. It just reads the words out of the raw directory and decodes whatever values you feed to it. But it might help for getting an idea of how things are set up: http://angband.org/~erasmus/df/surname.c