Skip to content

Funny values stored in 0xbb effect entries of CRE files

TaylanTaylan Member Posts: 76
edited March 2017 in General Modding
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.]
Post edited by Taylan on

Comments

  • kjeronkjeron Member Posts: 2,368
    OHSMLOC is a Story Mode marker.
  • TaylanTaylan Member Posts: 76
    kjeron said:

    OHSMLOC is a Story Mode marker.

    Ah, that makes sense. Anybody know what purpose it serves?

    Is there a documentation of all the possible 0x66 effect entries?
  • kjeronkjeron Member Posts: 2,368
    Scripts detect them to determine which action they should execute, this one is detected to determine whether the creature still needs the Story Mode Immunities applied to it.
    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.
  • TaylanTaylan Member Posts: 76
    Oh, heh, I was tired after digging around in CRE files for hours so "bb" became "66" in my mind. :smiley:

    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.
  • kjeronkjeron Member Posts: 2,368
    edited March 2017
    Taylan said:

    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.

    For Proficiency Effects gained through the normal level-up process, you can leave them as is. One determines the effects duration(should be '9'), one determines the chance it original had to be applied to the creature(should be '100') - no longer relevant since the effect is already on the creature, 5 fields that default to values of (-1/0xffffffff) instead of zero, and one field that is always '1' in creature effects - I don't know its purpose.

    If the proficiency effect was applied through other means(spells, items), it could be anything depending on the source of the effect.
Sign In or Register to comment.