Edit: I got this (by rever-engineering Might and Guile)
For you, my dear modder from the future who found this thread while searching for answers, this is how the code looks like.
ACTION_IF (FILE_EXISTS_IN_GAME ~clastext.2da~) BEGIN
COPY_EXISTING ~clastext.2da~ ~override~
COUNT_2DA_COLS cols
READ_2DA_ENTRIES_NOW rows cols
FOR (row = 1; row < rows; ++row) BEGIN
READ_2DA_ENTRY_FORMER rows row 0 ~text~
PATCH_IF ((~%text%~ STRING_EQUAL_CASE ~UNDEAD_HUNTER~) AND (!GAME_IS ~iwdee~)) BEGIN
SET patch_row = %row%
SET_2DA_ENTRY (%patch_row%) 4 cols RESOLVE_STR_REF (@401)
END ELSE BEGIN
SET patch_row = %row%
SET_2DA_ENTRY (%patch_row%) 4 cols RESOLVE_STR_REF (@402)
END
END
BUT_ONLY
END
ACTION_IF (FILE_EXISTS_IN_GAME ~sodcltxt.2da~) BEGIN
COPY_EXISTING ~sodcltxt.2da~ ~override~
COUNT_2DA_COLS cols
READ_2DA_ENTRIES_NOW rows cols
FOR (row = 1; row < rows; ++row) BEGIN
READ_2DA_ENTRY_FORMER rows row 0 ~text~
PATCH_IF ((~%text%~ STRING_EQUAL_CASE ~UNDEAD_HUNTER~) AND (!GAME_IS ~iwdee~)) BEGIN
SET patch_row = %row%
SET_2DA_ENTRY (%patch_row%) 4 cols RESOLVE_STR_REF (@401)
END ELSE BEGIN
SET patch_row = %row%
SET_2DA_ENTRY (%patch_row%) 4 cols RESOLVE_STR_REF (@402)
END
END
BUT_ONLY
END
ACTION_IF (FILE_EXISTS_IN_GAME ~kitlist.2da~) BEGIN
COPY_EXISTING ~kitlist.2da~ ~override~
COUNT_2DA_COLS cols
READ_2DA_ENTRIES_NOW rows cols
FOR (row = 1; row < rows; ++row) BEGIN
READ_2DA_ENTRY_FORMER rows row 1 ~text~
PATCH_IF ((~%text%~ STRING_EQUAL_CASE ~UNDEAD_HUNTER~) AND (!GAME_IS ~iwdee~)) BEGIN
SET patch_row = %row%
SET_2DA_ENTRY (%patch_row%) 4 cols RESOLVE_STR_REF (@401)
END ELSE BEGIN
SET patch_row = %row%
SET_2DA_ENTRY (%patch_row%) 4 cols RESOLVE_STR_REF (@402)
END
END
BUT_ONLY
END
There are two entries, one for IWDEE, other for non-IWDEE. I did that because the features for the class are different on each game, so it demanded different texts.
Shadow Magic doesn’t. You have to go through a redundant spell selection in chargen then a script changes the fake kit chosen in chargen with normal Mage usability to the proper kit with exclusion from all schools. I wish spell selection could be disabled individually per kit.
Shadow Magic doesn’t. You have to go through a redundant spell selection in chargen then a script changes the fake kit chosen in chargen with normal Mage usability to the proper kit with exclusion from all schools. I wish spell selection could be disabled individually per kit.
Thank you all. Another question: is it possible to have an AOE projectile timed to explode after one round, instead of on approach of creatures like Skull Trap? And which PRO flags would I need? Their descriptions in Near Infinity are repetitive and counter-intuitive.
Their descriptions in Near Infinity are repetitive and counter-intuitive.
That's mostly because each field has numerous functions depending on a variety of other flags in the file. The description usually refers to the most common or originally discovered function.
Set flags "Delayed Trigger (3)" and "Skip First Condition (14)", in the "Area Flags" section at offset 0x200. The delay uses the same field as the frequency, at offset 0x210, in frames (1/15s).
You are helpful as always. Now, since I'm going to have to credit you for this mod too anyway... do you mind also telling me how to add a simple animation for fragments? This is an explosion PRO, and the only option there is for fragments is TRAP_SKULL. I want to edit the BAM there somewhat and use for my explosion. Nothing fancy, just smaller blacker pieces of cast iron when this grenade blows the next round. I've looked in Weidu documentation, but this stuff probably comes to you more readily than I could dig up in three days.
By the way, the G3 guide for PRO files gets the boxes wrong:
bit 12: Affect objects through wall, mountain, building, and off-area
bit 13: Check triggers from animation frame 30 (req. bit 0)
bit 14: Delayed explosion
bit 15: Affect only one target
"Delayed explosion" should be 13. In case someone is here keeping that guide updated.
What the heck does it mean for a spell to have a level of 0, (offset 0x34), and what special treatment does the engine give to these level-less spells?
do you mind also telling me how to add a simple animation for fragments? This is an explosion PRO, and the only option there is for fragments is TRAP_SKULL. I want to edit the BAM there somewhat and use for my explosion. Nothing fancy, just smaller blacker pieces of cast iron when this grenade blows the next round.
Where are you seeing TRAP_SKULL as the only option?
Fragment animations use the same animation index as creature animations, and are created in the same manner, by default occupying slots below 0x1000.
Including those listed in ANIMATE.IDS, the following slots are also already in use by the base game:
0x0002, 0x0003, 0x0004, 0x0520, 0x0910, 0x0A10, 0x0A11, 0x0A12, 0x0A23, 0x0A24, 0x0B01, 0x0B03, 0x0B04, 0x0C10.
If you would like a quick example, copy "0410.ini" as "0411.ini".
Change these lines (from 1 to 0, to make it darker/blacker):
brightest=0
light_source=0
multiply_blend=0
and this line:
resref=GLPHWRDH
to reference whatever BAM file you would like to use, omitting the .BAM extension.
Enable "Fragments (5)" and set the fragments field(0x212) in the .pro file to 0x0410 (or 1041).
What the heck does it mean for a spell to have a level of 0, (offset 0x34), and what special treatment does the engine give to these level-less spells?
I believe at one time it used to crash if you attempt to cast or learn them.
Currently, you can't learn wizard/priest spells of level 0, just as you can't learn them of level 10+ (8+ for priest spells).
Innates of level 0 can be gained, however, the HaveSpell() triggers cannot detect spells of level 0, and the Spell() actions (those that actually check for memorization) cannot cast them.
Power level 0 effects are a different matter - able to bypass and ignore certain deflection/removal opcodes.
What the heck does it mean for a spell to have a level of 0, (offset 0x34), and what special treatment does the engine give to these level-less spells?
I believe at one time it used to crash if you attempt to cast or learn them.
Currently, you can't learn wizard/priest spells of level 0, just as you can't learn them of level 10+ (8+ for priest spells).
Innates of level 0 can be gained, however, the HaveSpell() triggers cannot detect spells of level 0, and the Spell() actions (those that actually check for memorization) cannot cast them.
IIRC the engine used the spell level as offset counter without sanity checks, sometimes with very mindblowing results.
There was a case when Spell Revisions forgot to change innate's level to 1, and when another mod used HasSpell() on it, the game would crash if the character had an item in particular slot equipped. And changing the level made a different paperdoll slot crash the game.
Loading the game with an equipped opcode #72 was another situation that can make the change permanent.
There's another issue to consider - if your character gets killed, any delayed effect to revert their GENERAL will be removed, leaving them UNDEAD permanently after you raise them.
Fun fact: if you set param2 to 3 (i.e., change CLASS), then the change is not permanent: your CLASS/KIT are reverted to their proper values both upon casting Shapeshift: Natural Form and upon resurrection (after being killed while polymorphed). There's just a minor issue: you need to select the CRE in question in order to update its action bar.
So, my question is: is this intended (i.e., is it intended that 'change CLASS' behaves differently from 'change GENERAL')?
Fun fact: if you set param2 to 3 (i.e., change CLASS), then the change is not permanent: your CLASS/KIT are reverted to their proper values both upon casting Shapeshift: Natural Form and upon resurrection (after being killed while polymorphed). There's just a minor issue: you need to select the CRE in question in order to update its action bar.
So, my question is: is this intended (i.e., is it intended that 'change CLASS' behaves differently from 'change GENERAL')?
CLASS can be made permanent just like any of the others, it all depends on the order and/or how the effects are applied.
Where are you seeing TRAP_SKULL as the only option?
I mean the only option that's appropriate - the only fragments choice we have. I know it's possible to use for fragments any others, even ghouls flying around and dropping all over the place... The TRAP_SKULL animation doesn't have an INI. Maybe it doesn't do anything that's so special so it doesn't need one? So what would I need to do to add my own simple animation in the next free slot? Your suggestion with 0411 changes an existing slot, I take it. And the INI file needs a preset name in any case, yes?
I mean the only option that's appropriate - the only fragments choice we have. I know it's possible to use for fragments any others, even ghouls flying around and dropping all over the place... The TRAP_SKULL animation doesn't have an INI. Maybe it doesn't do anything that's so special so it doesn't need one? So what would I need to do to add my own simple animation in the next free slot? Your suggestion with 0411 changes an existing slot, I take it. And the INI file needs a preset name in any case, yes?
A lot of the [effect] animations are hardcoded, hence no INI file.
However, it would look almost identical to the file 0410.INI, just with the changes I mentioned (brightness, light_source, multiply_blend, resref).
The name of the INI file is the ANIMATE.IDS slot in hexadecimal, without the leading "0x".
0410.INI represents slot 0x0410 in ANIMATE.IDS. (TRAP_GLYPH)
Find a unoccupied slot in ANIMATE.IDS between 0x0000 and 0x0FFF, skipping those I listed above (they are used by the various hardcoded projectile explosions), as well as any slots that already have a corresponding INI file.
What are the correct parameters to halve a creature's movement rate using Opcode #126?
I've tried already p1 = 50, p2 = 2
IESDP says the check would be (Movement * 50)/100... the result should be 0,5 * Movement, and that is my target. But that doesn't slow down the target creature.
Comments
Thanks!
Edit: I got this (by rever-engineering Might and Guile)
For you, my dear modder from the future who found this thread while searching for answers, this is how the code looks like.
There are two entries, one for IWDEE, other for non-IWDEE. I did that because the features for the class are different on each game, so it demanded different texts.
Damn.
Champions never give up.
How do I prevent a Sorcerer kit from picking a spell at CharGen or Level Up?
Or
How do I make a spell disappear for a specific kit from the select spell screen?
Thanks!
Can you translate this to stupid?
I'm trying to alter an NPC Bio, but avoiding to use String_Set.
Thanks!
The reference is "Sound: BIO" at offset 0x1cc of the CRE file.
Note that 4th and further abilities will share their charge count with the first header, though.
Set flags "Delayed Trigger (3)" and "Skip First Condition (14)", in the "Area Flags" section at offset 0x200. The delay uses the same field as the frequency, at offset 0x210, in frames (1/15s).
By the way, the G3 guide for PRO files gets the boxes wrong:
bit 12: Affect objects through wall, mountain, building, and off-area
bit 13: Check triggers from animation frame 30 (req. bit 0)
bit 14: Delayed explosion
bit 15: Affect only one target
"Delayed explosion" should be 13. In case someone is here keeping that guide updated.
Fragment animations use the same animation index as creature animations, and are created in the same manner, by default occupying slots below 0x1000.
Including those listed in ANIMATE.IDS, the following slots are also already in use by the base game:
0x0002, 0x0003, 0x0004, 0x0520, 0x0910, 0x0A10, 0x0A11, 0x0A12, 0x0A23, 0x0A24, 0x0B01, 0x0B03, 0x0B04, 0x0C10.
If you would like a quick example, copy "0410.ini" as "0411.ini".
Change these lines (from 1 to 0, to make it darker/blacker): and this line: to reference whatever BAM file you would like to use, omitting the .BAM extension.
Enable "Fragments (5)" and set the fragments field(0x212) in the .pro file to 0x0410 (or 1041).
Currently, you can't learn wizard/priest spells of level 0, just as you can't learn them of level 10+ (8+ for priest spells).
Innates of level 0 can be gained, however, the HaveSpell() triggers cannot detect spells of level 0, and the Spell() actions (those that actually check for memorization) cannot cast them.
Power level 0 effects are a different matter - able to bypass and ignore certain deflection/removal opcodes.
There was a case when Spell Revisions forgot to change innate's level to 1, and when another mod used HasSpell() on it, the game would crash if the character had an item in particular slot equipped. And changing the level made a different paperdoll slot crash the game.
Fun fact: if you set param2 to 3 (i.e., change CLASS), then the change is not permanent: your CLASS/KIT are reverted to their proper values both upon casting Shapeshift: Natural Form and upon resurrection (after being killed while polymorphed). There's just a minor issue: you need to select the CRE in question in order to update its action bar.
So, my question is: is this intended (i.e., is it intended that 'change CLASS' behaves differently from 'change GENERAL')?
I mean the only option that's appropriate - the only fragments choice we have. I know it's possible to use for fragments any others, even ghouls flying around and dropping all over the place... The TRAP_SKULL animation doesn't have an INI. Maybe it doesn't do anything that's so special so it doesn't need one? So what would I need to do to add my own simple animation in the next free slot? Your suggestion with 0411 changes an existing slot, I take it. And the INI file needs a preset name in any case, yes?
However, it would look almost identical to the file 0410.INI, just with the changes I mentioned (brightness, light_source, multiply_blend, resref).
The name of the INI file is the ANIMATE.IDS slot in hexadecimal, without the leading "0x".
0410.INI represents slot 0x0410 in ANIMATE.IDS. (TRAP_GLYPH)
Find a unoccupied slot in ANIMATE.IDS between 0x0000 and 0x0FFF, skipping those I listed above (they are used by the various hardcoded projectile explosions), as well as any slots that already have a corresponding INI file.
Set to an invalid reference (not empty, not existing BAM/VVC filename).
I've tried already p1 = 50, p2 = 2
IESDP says the check would be (Movement * 50)/100... the result should be 0,5 * Movement, and that is my target. But that doesn't slow down the target creature.
I've tried -50 too with the exact same result.
Thanks!