Jump to content

IWDification Returns with a Shiny New Beta


CamDawg

Recommended Posts

IWDification is a mod to bring some of the elements of Icewind Dale into the Baldur's Gate series of games. A lot of this project is based upon the work of the IWD-in-BG2 conversion project, which later formed the backbone of IWDEE. The mod adds various elements such as selectable bard songs, two-handed axes, and over 70 new spells into your BG2, Tutu, BGT, BGEE, or BG2EE game. Every component can be installed independently of one another.

Beta 4 is a major overhaul of the mod with a complete revamp of the new spells.

 

Beta 5 does the same for the bard songs and cleans up some other small bugs.

Beta 5 Changelog

  • Polymorph Self always listed boring beetle as an available form, even when it wasn't
  • Bard Songs were updated to their IWDEE counterparts, and several bugs cleaned up
  • New arcane spell scrolls are now available in the Black Pits, Black Pits II, and Siege of Dragonspear areas, as appropriate (thanks AstroBryGuy)
  • Cleaned up the tra files, and wrote a tool to assist translators
  • An internal 'Testing' component was erroneously included in Beta 4 and has been removed

Beta 4 Changelog

  • Completely rebuilt the spell components upon the work of IWDEE. As such, all spells work for the EE engine and were backported (again) to the vanilla engine, with a lot of bugfixes along the way. Several spells which were heretofore unavailable--such as Seven Eyes or Wall of Moonlight--now work for the EE engine.
  • Two-handed axes now use halberds for their description images
  • The icon for Battle Standard's ability is now properly transparent
  • Updated the code for Commoners Use Drab Colors to the more robust version from Tweaks Anthology
Edited by CamDawg
Link to comment

That's fantastic news. I remember how great was "Seven-Eyes" spell and can't wait to see how it's gonna work again.

 

EDIT: I think that "Commoners Use Drab Colors" component should be removed/moved to Tweaks Anthology. Spell-related mods are no place for such tweaks and there is no point in maintaining two codebases for the same thing.

Edited by ALIENQuake
Link to comment

, I think you should consider the idea of bringing the Evasion passive ability to Thieves....

That is an excellent idea. My mod already does it: it makes "Spell Evasion" (renamed to distinguish it from the BG2 HLA) into a feat. It also expands Spell Evasion to work against a few more spells (Magic Missile, Acid Arrow, stuff like that) because it can be justified and it gives thieves a bit more of an edge, which they need.

 

What I suggest is:

- I'll take the code I've already made, and make it portable so that it can be dropped into anyone's mod.

- And I'll make it recognize itself, so different mods can all use it without fear of overlap or overwriting.

- And I'll make the expanded list of spells that it works against into an optional choice.

 

Then I'll present it here for vetting.

 

My only question before getting started is, exactly which spells are "Evadable" in IWD? When I drew up the list I just eyeballed them and thought to myself "yeah, I could see a D&D thief dodging that." If snyone can post the official list, then I can work off that and make the other ones in the expanded list optional.

Link to comment

Can we not attach .zip files here? That's annoying. Okay:

 

Create a file called "spell_evasion.tpa" in IWDification/lib/ with the following contents:

 

 

 

//spell to set evasion state
//
COPY_EXISTING ~spcl221.spl~ ~override/d5evade.spl~
    SAY NAME1 ~ ~
    SAY UNIDENTIFIED_DESC ~ ~
    LPF DELETE_EFFECT INT_VAR match_probability1 = 100 END
    LPF ADD_SPELL_EFFECT INT_VAR opcode = 328 target = 1 parameter2 = 252 timing = 9 special = 1 END
BUT_ONLY
//___________________

//patch spells for evasion
//
ACTION_IF NOT FILE_EXISTS_IN_GAME ~d5_evasion.d5~ BEGIN
 ACTION_IF NOT GAME_IS ~iwdee~ BEGIN
  ACTION_DEFINE_ASSOCIATIVE_ARRAY evade_spells BEGIN        
    spcl722         => 1
    spdr301         => 1
    spin132         => 1
    spin169         => 1
    sppr302         => 1
    sppr304         => 1
    sppr313         => 1
    sppr314         => 1
    sppr323d         => 1
    sppr324         => 1
    sppr325         => 1
    sppr419         => 1
    sppr420b         => 1
    sppr426         => 1
    sppr427         => 1
    sppr503         => 1
    sppr519         => 1
    sppr603d         => 1
    sppr616         => 1
    sppr617         => 1
    sppr618         => 1
    sppr619         => 1
    sppr705         => 1
    sppr738         => 1
    spwi103         => 1
    spwi105         => 1
    spwi204         => 1
    spwi304         => 1
    spwi308         => 1
    spwi327         => 1
    spwi328         => 1
    spwi404         => 1
    spwi431         => 1
    spwi503         => 1
    spwi523         => 1
    spwi709         => 1
    spwi714         => 1
    spwi724         => 1
    spwi806         => 1
    spwi812         => 1
    spwish32         => 1
  END
  ACTION_PHP_EACH evade_spells AS evaded_spell => ind BEGIN
    ACTION_IF FILE_EXISTS_IN_GAME ~%evaded_spell%.spl~ BEGIN
      COPY_EXISTING ~%evaded_spell%.spl~ ~override~
        LPF DELETE_EFFECT INT_VAR match_opcode = 324 match_parameter2 = 63 END
        LPF DELETE_EFFECT INT_VAR match_opcode = 72 match_parameter1 = 4 match_duration = 0 END
        LPF ADD_SPELL_EFFECT INT_VAR opcode = 324 insert_point = 0 target = 2 parameter2 = 63 timing = 0 duration = 1 STR_VAR resource = EVAL ~%SOURCE_RES%~ END
        LPF ADD_SPELL_EFFECT INT_VAR opcode = 72 insert_point = 0 target = 2 parameter2 = 3 parameter1 = 4 timing = 0 duration = 0 END
      BUT_ONLY
    END
  END
 END
 ACTION_IF (optional_evade = 1) BEGIN
  ACTION_DEFINE_ASSOCIATIVE_ARRAY optional_evades BEGIN        
    abzaway         => 1
    balshld2         => 1
    bdbarbde         => 1
    bdbelblz         => 1
    bdbelinf         => 1
    bdbow05         => 1
    bdcaela4         => 1
    bddagg05         => 1
    bdmepwat         => 1
    bdpflame         => 1
    bdsha12a         => 1
    bdspl01         => 1
    bdunslgu         => 1
    bdvenoms         => 1
    bdwyrmb         => 1
    ohbdrag1         => 1
    ohbeflam         => 1
    ohbicew         => 1
    ohbwi304         => 1
    ohbwi308         => 1
    ohdmask         => 1
    spblun29         => 1
    spcl237d         => 1
    spctmd01         => 1
    spdd03          => 1
    spdr201         => 1
    spdr601         => 1
    spimix01         => 1
    spin134         => 1
    spin160         => 1
    spin175         => 1
    firau3d6         => 1
    spin935         => 1
    spogre01         => 1
    sppr105         => 1
    sppr698d         => 1
    sppr720         => 1
    sppr725d         => 1
    sppr901         => 1
    sppr984         => 1
    sppr985         => 1
    sppr987         => 1
    spwi001         => 1
    spwi002         => 1
    spwi017         => 1
    spwi021         => 1
    spwi025         => 1
    spwi026         => 1
    spwi027         => 1
    spwi033         => 1
    spwi034         => 1
    spwi101         => 1
    spwi112         => 1
    spwi211         => 1
    spwi215         => 1
    spwi299         => 1
    spwi308         => 1
    spwi313         => 1
    spwi327         => 1
    spwi399         => 1
    sppr951d         => 1
    sppr952d         => 1
    spwi430         => 1
    spwi524         => 1
    spwi615         => 1
    spwi628         => 1
    spwi712         => 1
    spwi818         => 1
    spwi911         => 1
    spwi918         => 1
    spwi922         => 1
    spwi925         => 1
  END
  ACTION_PHP_EACH optional_evades AS optional_evaded => ind BEGIN
    ACTION_IF FILE_EXISTS_IN_GAME ~%optional_evaded%.spl~ BEGIN
      COPY_EXISTING ~%optional_evaded%.spl~ ~override~
        LPF DELETE_EFFECT INT_VAR match_opcode = 324 match_parameter2 = 63 END
        LPF DELETE_EFFECT INT_VAR match_opcode = 72 match_parameter1 = 4 match_duration = 0 END
        LPF ADD_SPELL_EFFECT INT_VAR opcode = 324 insert_point = 0 target = 2 parameter2 = 63 timing = 0 duration = 1 STR_VAR resource = EVAL ~%SOURCE_RES%~ END
        LPF ADD_SPELL_EFFECT INT_VAR opcode = 72 insert_point = 0 target = 2 parameter2 = 3 parameter1 = 4 timing = 0 duration = 0 END
      BUT_ONLY
    END
  END
 END
END
//___________________

//COPY MARKER FILE
//
COPY_EXISTING ~sw1h04.itm~ ~override/d5_evasion.d5~
//___________________

 

 

 

Then, in the .tp2, create two new alternative components with code like this:

 

 

 

BEGIN ~Evasion for IWD spells~
SUBCOMPONENT ~Add Spell Evasion~

OUTER_SET optional_evade = 0

INCLUDE ~iwdification/lib/spell_evasion.tpa~

ACTION_IF FILE_EXISTS_IN_GAME ~clabth01.2da~ BEGIN
  COPY_EXISTING ~clabth01.2da~ ~override~
    APPEND ~clabth01.2da~ ~EVASION     ****        ****        ****        ****        ****        ****        AP_D5EVADE  ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        **** ~ UNLESS ~AP_D5EVADE~
  BUT_ONLY
END

COPY_EXISTING ~kitlist.2da~ ~override~
  COUNT_2DA_COLS cols
  READ_2DA_ENTRIES_NOW ~r2en_kitlist~ cols
  FOR (row = 2; row < r2en_kitlist; row += 1) BEGIN
    READ_2DA_ENTRY_FORMER ~r2en_kitlist~ row 5 class_ab
    READ_2DA_ENTRY_FORMER ~r2en_kitlist~ row 8 class_num
    PATCH_IF (class_num == 4) BEGIN // thieves
      INNER_ACTION BEGIN
        APPEND ~%class_ab%.2da~ ~EVASION     ****        ****        ****        ****        ****        ****        AP_D5EVADE  ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        **** ~ UNLESS ~AP_D5EVADE~
      END
    END
  END
BUT_ONLY


BEGIN ~Evasion for expanded spell list~
SUBCOMPONENT ~Add Spell Evasion~

OUTER_SET optional_evade = 1

INCLUDE ~iwdification/lib/spell_evasion.tpa~

ACTION_IF FILE_EXISTS_IN_GAME ~clabth01.2da~ BEGIN
  COPY_EXISTING ~clabth01.2da~ ~override~
    APPEND ~clabth01.2da~ ~EVASION     ****        ****        ****        ****        ****        ****        AP_D5EVADE  ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        **** ~ UNLESS ~AP_D5EVADE~
  BUT_ONLY
END

COPY_EXISTING ~kitlist.2da~ ~override~
  COUNT_2DA_COLS cols
  READ_2DA_ENTRIES_NOW ~r2en_kitlist~ cols
  FOR (row = 2; row < r2en_kitlist; row += 1) BEGIN
    READ_2DA_ENTRY_FORMER ~r2en_kitlist~ row 5 class_ab
    READ_2DA_ENTRY_FORMER ~r2en_kitlist~ row 8 class_num
    PATCH_IF (class_num == 4) BEGIN // thieves
      INNER_ACTION BEGIN
        APPEND ~%class_ab%.2da~ ~EVASION     ****        ****        ****        ****        ****        ****        AP_D5EVADE  ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        **** ~ UNLESS ~AP_D5EVADE~
      END
    END
  END
BUT_ONLY

 

 

Edited by subtledoctor
Link to comment

@subtledoctor I think additional feedback should be provided to players -> I suggest creating a new string for opcode 324 (i.e., attribute "Special" should not be set to 0). For example, *Spell evaded* or *Evasion: Success*..... We could take inspiration from NWN.....

 

EDIT: OK, never mind. Evasion has its own hardcoded feedback string that is displayed when it occurs, regardless of whether its used with opcode 318 or 324.

Edited by Luke
Link to comment

Hmm, now that I think about it, this patches all kit ability tables, so it would want to be installed later than IWDification is typically installed.

 

So either 1) it would be a component that is recommended to install separately from the rest of the mod (ugh); or 2) it should go into a different mod. Probably Tweaks Anthology or Scales of Balance.

Link to comment

Eh, I'm impatient, so I just implemented IWD Evasion in my own mod. :p

 

Cheers.

Well done!

I report here what I've already said on forums.beamdog.com:

 

1) you may wanna add an opcode 139 to D5EVADE.SPL in order to display "Gained Passive Ability: Evasion" or something like that...

2) TRAP_FIREBALL, TRAP_LIGHTNING_BOLT, MEPHIT_LIGHTNING_BOLT and the like should be evadable.

3) [PATCH_IF (level_1 > 7) OR (level_2 > 7) BEGIN] -> You may wanna replace ">" ("greater") with ">=" ("greater or equal").

4) In IWDEE there is no opcode 72 (Change AI type). What is it for? Moreover, I think it's currently useless since it has a duration of 0.....

Edited by Luke
Link to comment

4) In IWDEE there is no opcode 72 (Change AI type). What is it for? Moreover, I think it's currently useless since it has a duration of 0.....

Are you sure?? I'll check, but I have to imagine it works fine there, since IWDEE is based on the BG2 engine.

 

Opcode 72, in this case, is a zero-second class change. Now every evadable spell turns all of its targets into thieves, for zero seconds. It has no observable effect in-game (because the duration is zero), but it does register for purposes of the rest of the spell's effects... specifically, the opcode 324 Evasion effect.

 

The point if that is, Evasion is hard-coded to only work for thieves. With this effect, everybody briefly becomes a thief for the instant when the Evasion check happens. This way, you can apply d5evade.spl to a fighter or a cleric or whatever, if you want them to have Evasion as a kit ability.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...