Skip to content

General mod Questions thread

1414244464770

Comments

  • [Deleted User][Deleted User] Posts: 0
    edited February 2019
    The user and all related content has been deleted.
  • RaduzielRaduziel Member Posts: 4,714
    edited February 2019
    @subtledoctor The code above is chocking here:

    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.
    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.
    Post edited by Raduziel on
  • RaduzielRaduziel Member Posts: 4,714
    Ok, the code above is patching every single entry at the column, making all the classes and kits get the description of the string I'm adding.

    Damn.
  • [Deleted User][Deleted User] Posts: 0
    edited February 2019
    The user and all related content has been deleted.
  • RaduzielRaduziel Member Posts: 4,714
    That solved the issue. Thanks!
  • RaduzielRaduziel Member Posts: 4,714
    Hi.

    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!
  • [Deleted User][Deleted User] Posts: 0
    edited February 2019
    The user and all related content has been deleted.
  •  TheArtisan TheArtisan Member Posts: 3,277
    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.
  • RaduzielRaduziel Member Posts: 4,714
    edited February 2019
    AionZ wrote: »
    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.

    Can you translate this to stupid?
  • The user and all related content has been deleted.
  • GoidaGoida Member Posts: 118
    A question about giving item ability descriptions in tooltip.2da. Is it possible to assign more names if the item has over 3 abilities?
  • kjeronkjeron Member Posts: 2,367
    Goida wrote: »
    A question about giving item ability descriptions in tooltip.2da. Is it possible to assign more names if the item has over 3 abilities?
    Yes, just add more columns to tooltip.2da.
  • RaduzielRaduziel Member Posts: 4,714
    In which file is a NPC Bio stored?

    I'm trying to alter an NPC Bio, but avoiding to use String_Set.

    Thanks!
  • kjeronkjeron Member Posts: 2,367
    The text itself is in dialog.tlk.
    The reference is "Sound: BIO" at offset 0x1cc of the CRE file.
  • ArdanisArdanis Member Posts: 1,736
    edited February 2019
    Goida wrote: »
    A question about giving item ability descriptions in tooltip.2da. Is it possible to assign more names if the item has over 3 abilities?
    There's a macro to do this automatically https://github.com/Gibberlings3/ItemRevisions/blob/master/item_rev/lib/tooltip_macro.tpa
    Note that 4th and further abilities will share their charge count with the first header, though.
  • GoidaGoida Member Posts: 118
    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.
  • kjeronkjeron Member Posts: 2,367
    Goida wrote: »
    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).
  • GoidaGoida Member Posts: 118
    You are helpful as always. Now, since I'm going to have to credit you for this mod too anyway... :wink: 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.

    sqryfu9xjwgv.jpg

    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.
  • BubbBubb Member Posts: 1,001
    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?
  • kjeronkjeron Member Posts: 2,367
    Goida wrote: »
    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).
  • kjeronkjeron Member Posts: 2,367
    Bubb wrote: »
    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.
  • ArdanisArdanis Member Posts: 1,736
    edited February 2019
    kjeron wrote: »
    Bubb wrote: »
    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.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited February 2019
    kjeron wrote: »
    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')?
  • The user and all related content has been deleted.
  • kjeronkjeron Member Posts: 2,367
    Luke93 wrote: »
    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.
  • GoidaGoida Member Posts: 118
    kjeron wrote: »
    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?

  • kjeronkjeron Member Posts: 2,367
    Goida wrote: »
    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.
  • The user and all related content has been deleted.
  • kjeronkjeron Member Posts: 2,367
    Can someone remind me what you have to set in the 'summon creature' .EFF file to prevent an invisible helper from generating the puff of smoke?
    Resource2 / offset 0x70
    Set to an invalid reference (not empty, not existing BAM/VVC filename).
  • RaduzielRaduziel Member Posts: 4,714
    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.

    I've tried -50 too with the exact same result.

    Thanks!
Sign In or Register to comment.