Jump to content

CRE sex & Gender


Recommended Posts

I've been curious as to what the effect of 0x237 (labeled "Gender") and 0x275 (also labeled Gender). 0x275 is the byte which is used for Trigger GENDER; I'm not sure what 0x237 is used for.

Of course, the Gender has nothing to do with the displayed avatar.

Link to comment

0x237 is better described as 'sex', as it only takes male, female, both, or neither as values. Gender has broader application. For example, the summoning cap limit of 5 only counts creatures of gender summoned (6) against the cap. One other and less important factor is that it also controls which 'casting voice' sounds are used--neither (4) means no voice, female (2) is female, and any other value uses male.


Incidentally this is why summoned dryads and nymphs sound like men when they cast spells, and also why it can't be fixed--they need to remain gender summoned so that scripting and spells targeting summons still work.

Link to comment

0x237 is the sex value. You can check it with the SEX stat (see stats.ids). It has no effect on anything. Ever.


0x275 is gender, and Cam covered its worthwhile effects. If the gender is not female (2), then if the gender is neither (4), no spellcasting voice is used, else the male casting voice is used. Only if the gender is female (2) will the female spellcasting voice be used.


Gender is largely irrelevant except for hard-coded mechanics. If the gender is summoned, the engine treats this a summoned creature, and it counts toward the summoning cap. If the gender is one of the EXTRA* values, then the engine automatically decrements an area variable named "EXTRACOUNTn" (where "n" is the gender suffix digit) when the creature dies (so when an EXTRA2 creature dies, for example, an EXTRACOUNT2 variable for the current area is decremented by 1). I think the decrement also occurs when a creature is removed via DestroySelf(), but I can't remember if I ever tested that.

Link to comment

Some of the creatures had funky sex values in the TotSC expansion (the unsigned equivalent of -98 or something), but it didn't appear to be for any reason (I don't know how BioWare could have done it accidentally, though).


You can do anything you want with sex. I've not seen a single instance where the engine cares at all what value is there.

Link to comment
GemRB will break compatibility here. It uses the real gender value in place of the sex stat.

And completely ignores the original sex stat.

Better would be to use gender as it is now, except for choice of sound set - and use sex for that, right? Then you can solve the bug of Summoned female creatures useing male casting sound set.

Link to comment


This topic is now archived and is closed to further replies.

  • Create New...