Funny values stored in 0xbb effect entries of CRE files
Taylan
Member Posts: 76
This is all mostly out of curiosity:
Looking around in the embedded CRE files of characters I exported, I found out that weapon proficiencies as well as the custom AI script options (attack enemies on sight, prefer melee weapon, etc.) are stored as "effect" entries (last section of a CRE file). So even after stripping a character of all effects (from items etc.), these entries remain.
The AI script options are saved in effects with an effect code (opcode) of 0xbb.
What drew my attention is that, even if I set all AI options the same between two characters, some of the values in the related 0xbb effect entries differ. This is question 1: why do they have different values when the AI script options are 100% the same / what do the values mean?
Question 2 is: in a character with which I'm at the end-game, I noticed an additional 0xbb effect entry which holds the string "OHSMLOC" in the 'Variable' field of the entry. (For AI script entries, this field holds strings like "BDAI_ATTACK_MODE", "BDAI_DISABLE_ATTACK", etc.) What's the meaning of this mysteries OHSMLOC entry that doesn't appear in a newly created character?
References:
CRE creature format (embedded in exportet .chr files):
http://gibberlings3.net/iesdp/file_formats/ie_formats/cre_v1.htm
EFF effect format (embedded at the end of the CRE format):
http://gibberlings3.net/iesdp/file_formats/ie_formats/eff_v2.htm
Effect codes AKA opcodes and their descriptions:
http://gibberlings3.net/iesdp/opcodes/bgee.htm
(Note: the page erroneously mixes up hex and dec in the code names, so the opcode 0xbb is listed as 0x187 in this page.)
[Edit: 0xbb not 0x66.]
Looking around in the embedded CRE files of characters I exported, I found out that weapon proficiencies as well as the custom AI script options (attack enemies on sight, prefer melee weapon, etc.) are stored as "effect" entries (last section of a CRE file). So even after stripping a character of all effects (from items etc.), these entries remain.
The AI script options are saved in effects with an effect code (opcode) of 0xbb.
What drew my attention is that, even if I set all AI options the same between two characters, some of the values in the related 0xbb effect entries differ. This is question 1: why do they have different values when the AI script options are 100% the same / what do the values mean?
Question 2 is: in a character with which I'm at the end-game, I noticed an additional 0xbb effect entry which holds the string "OHSMLOC" in the 'Variable' field of the entry. (For AI script entries, this field holds strings like "BDAI_ATTACK_MODE", "BDAI_DISABLE_ATTACK", etc.) What's the meaning of this mysteries OHSMLOC entry that doesn't appear in a newly created character?
References:
CRE creature format (embedded in exportet .chr files):
http://gibberlings3.net/iesdp/file_formats/ie_formats/cre_v1.htm
EFF effect format (embedded at the end of the CRE format):
http://gibberlings3.net/iesdp/file_formats/ie_formats/eff_v2.htm
Effect codes AKA opcodes and their descriptions:
http://gibberlings3.net/iesdp/opcodes/bgee.htm
(Note: the page erroneously mixes up hex and dec in the code names, so the opcode 0xbb is listed as 0x187 in this page.)
[Edit: 0xbb not 0x66.]
Post edited by Taylan on
0
Comments
Is there a documentation of all the possible 0x66 effect entries?
There isn't much reason to document them, as most are applied and altered by the Advanced and Control AI scripts available to the player. If you want to change their values, its best to do so in-game through their respective script. Deleting the effects will just cause the script to reapply them when it is next run using its default values. They don't have any impact if you aren't using the script that set them, or if Party AI is off.
Also note: its 0xbb, not 0x66.
What are Story Mode Immunities? I tested what happens when I enable Story Mode in the gameplay options, but that gives a bunch of other effects, most having OHSMODE1 in their Variable field.
Anyway, if 0xbb effects are all "volatile" so to say, then I guess I can ignore differences relating to such effects among two characters.
(Background: I was trying to create a clone of a character, just with a few key differences.)
Any idea what the various values in weapon proficiency effects mean though? (Other than the obvious ones like which weapon/style it is and how many points are given.) My best guess is that it may just be the effect of not zero-initializing allocated memory, so unused fields end up having random values in them... Can't imagine what extra data weapon proficiencies could otherwise have.
If the proficiency effect was applied through other means(spells, items), it could be anything depending on the source of the effect.