Skip to content

Modding in Icewind Dale 2

semiticgoddesssemiticgoddess Member Posts: 14,903
This thread is to discuss the possibilities of modding Icewind Dale 2, the Infinity Engine game most notorious for having lots of hard-coded stuff that makes it difficult to mod. Since barely anyone mods this game, especially recently--the big mods for IWD2 are all very old--there's not a lot of information on how to do it. I wanted to share some of my findings and hopefully others in the community will be able to show their own insights.
«1

Comments

  • semiticgoddesssemiticgoddess Member Posts: 14,903
    By the way: I tried editing the feat spell files, but it had no effect on the actual feats. Apparently the feats don't actually point to a FEAT02.spl file or a 39332.spl file; those files are just the results of the GemRB people dissecting the engine and trying to un-hardcode the game. It does not appear to be possible to rig Dash to give +30% movement rate instead of +15%, or make the Toughness feat more useful.

    I also found a table on GemRB called FEATREQ.2da, which lists all of the requirements for every feat in the game. However, the table has no impact on gameplay; it seems to be a replication of a hard-coded system rather than an extracted table the game actually uses. It's unfortunate, because that table also contains the number of pips you can put in a feat. If it were possible to edit that system, you could take, say, Spirit of Flame or Scion of Storms multiple times, or take more than two Spell Focus: Enchantment feats, or reach more than three pips in a weapon proficiency.
  • semiticgoddesssemiticgoddess Member Posts: 14,903
    Note that bard songs cannot be leveled; they will always be cast as if they were level 1.

    About game balance: saving throws and save DCs vary dramatically. A goblin in Targos might have a +0 Will save, while a Hatemaster in the Severed Hand in Heart of Fury mode might have a +35 Will save. A mage with 18 Intelligence will cast Charm Person with a save DC of 15, while a maxed-out deep gnome Dreadmaster of Bane in Heart of Fury mode could cast Mass Dominate with a save DC of 37. This means that a save DC must scale dramatically to avoid being overpowered in the early game or useless in the late game (or even both!):

    Goblin: 25% chance of making its save against Charm Person
    Hatemaster: 95% chance of making its save against Charm Person
    Goblin: 5% chance of making its save against Mass Dominate
    Hatemaster: 90% chance of making its save against Mass Dominate

    A save DC starts at 10 by default. These are the things that modify a save DC:

    1. Casting stat (Intelligence, Wisdom, or Charisma), up to a theoretical +15 to save DC (more likely a +4 to +10 over the course of the game)
    2. Spell level (a level 1 spell has a +1 to the DC; a level 9 spell has a +9 to the save DC)
    3. Spell Focus feats (only available for Enchantment, Evocation, Necromancy, and Transmutation spells), up to +4 to save DC
    4. Malison, -2 to saving throws
    5. Recitation, -2 to saving throws
    6. Prayer, -1 to saving throws
    7. Bane, -1 to saving throws (Will save negates)
    8. Emotion: Despair, -2 to saving throws (Will save negates)
    9. Tyrant's Dictum, +1 to Will save DCs (only for clerics of Bane)
    10. Spell-specific modifiers, like Chaos' +4 to save DC or Horror's -3 to save DC

    The first three modifiers scale as the player gains levels, but items that offer saving throws, like a save against a poison effect, don't get any of those modifiers. This means that a mod-introduced sword that poisons the target will need a save DC commensurate to its place in the game.
  • The user and all related content has been deleted.
  • semiticgoddesssemiticgoddess Member Posts: 14,903
    @subtledoctor: I'm not that familiar with WeiDu, but I'm not sure that's possible in IWD2 regardless. IWD2 does have the Change AI Type opcode, which might be able to temporarily grant evasion by making somebody into a thief (or maybe a monk, since they get Evasion at level 1 instead of level 2). However, I don't think it's possible to give evasion only to rangers, and not to fighters and clerics and so forth.

    IWD2 has the use .eff file opcode, but no spell in the entire game uses that opcode; I'm not sure it even works properly (IWD2 has a lot of nonfunctional opcodes from BG2). You could try to rig it to apply to critters with the ranger class, but that would probably do one of two things even if it did work: apply only to single-classed rangers, or (more likely) apply the .eff to anyone who has even a single ranger level.

    Since rangers are woodsy fighters rather than dancy acrobats like thieves or monks, I wouldn't give them Evasion until higher levels, which would add a further layer of complexity. You could specify the opcode to only work on level 10+ characters, but it would also work on characters with 9 cleric levels and 1 ranger level.

    IWD2 also has the "Apply Effects List" opcode, but that only differentiates between critter types like undead or fire-dwelling and so forth; it doesn't specify class.
  • semiticgoddesssemiticgoddess Member Posts: 14,903
    More fun facts: some spells have their effects stored in their projectiles rather than the spell itself. For instance, Aganazzar's Scorcher has only one opcode: the pause effect on the caster. You can remove that opcode or add on other effects that apply to the caster, but you can't change the damage value or add any effects to the target, like a blindness effect to go with the fire.

    Symbol of Stun, Symbol of Death, and Power Word Kill work a little differently. They have the stun and death magic opcodes listed in the spell itself, but the projectile manipulates which critters get affected; the projectile calculates the enemies' HP and then applies the opcodes accordingly. You can, however, change the projectile and prevent that from happening. If you rig Symbol of Death to use the same projectile as Symbol of Hopelessness, there will be no maximum HP of critters the spell can affect.

    I don't see any means of editing the projectiles. No .pro files show up in Near Infinity, nor can they be accessed through the spell files that use them.

    More good news: we have confirmation about the LISTSPLL.2da table! You can rig any spell in the game to be usable by any spellcaster class at any level and it will work just fine. I've tested out level 8 Call Lightning spells and level 4 Suffocation spells from sorcerers and level 2 Ray of Enfeeblement and Death Armor spells from clerics. They're all completely functional.

    Also, there are tables that give innate spells to certain races:

    SPCD_GR.2da: innate spells for gray dwarves
    SPCE_D.2da: innate spells for drow elves
    SPCG_D.2da: innate spells for deep gnomes
    SPCH_A.2da: innate spells for aasimar
    SPCH_T.2da: innate spells for tieflings
    SPCHF_GW.2da: innate spells for ghostwise halflings
  • The user and all related content has been deleted.
  • kjeronkjeron Member Posts: 2,367

    The idea us, whichever spells trigger Evasion (check, say, Fireball: there should be a 324-equivalent effect at the top of each header,

    Nope, just a damage opcode. which it is likely built into. A simple combination of "Save for Half" and "Reflex Save", doesn't even have to be an area-effect spell.
  • The user and all related content has been deleted.
  • kjeronkjeron Member Posts: 2,367
    It's easily detectable, "Save for Half" is just a parameter2 option, "Reflex Save" is just a breath save, but I don't know if it would be of any use. IWD2 creatures store a level for every class at all times. While they also store a Class, Class2, and ClassMask for targeting, they are not linked to their class levels, so changing them would not alter how many thief or monk levels you have.
  • semiticgoddesssemiticgoddess Member Posts: 14,903
    A new finding: a spell's spell level (the "Power Level" in its opcodes; not its "Spell Level" on the spell file) is what gives it its save DC bonus. Thus, if you make Sleep strike as a level 4 spell instead of level 1 to make it bypass MGOI, it will have a save DC of 3 higher than normal. Likewise, if you set a spell's level to zero to let it bypass a golem's spell level immunities, it will have a +0 to its save DC, making it much weaker than it otherwise would be. As always, you can adjust the save DC directly.

    This means that spells have the same save DC regardless of which spell slot they occupy. A Fire Storm spell will have the same save DC if cast by a cleric or a druid, even though the cleric casts it as a level 8 spell instead of level 7. Also, the vanilla game Symbol spells erroneously have a save DC of 1 lower than they're supposed to, since they strike as level 7 spells even though they're level 8 in IWD2
  • semiticgoddesssemiticgoddess Member Posts: 14,903
    A very important new finding: opcode 402, Apply Effects List, works with leveled spells.

    This means that you can make a weapon's on-hit effects scale with level.

    In the past, an item's save DC was completely stagnant, making a lot of weapons wildly overpowered because their DCs were too high while others remained near-useless because their DCs were too low. Worse yet, the intense scaling in Heart of Fury mode all but negated the effects of all kinds of weapons because the save DCs were just too low to affect any target more than 5% of the time.

    This means high-level fighters can get on-hit effects to work more reliably. Better still, it means that the save DCs for magical weapons like Black Blade of Disaster can scale dynamically.
  • GrammarsaladGrammarsalad Member Posts: 2,582
    edited May 2018
    Oh, I want to get in on this convo. I've done some investigating myself. I'll look for the notes and report back

    Edit: Unfortunately, it appears that I did not record my findings anywhere.

    Still, I'm inspired now, so I'll experiment when I get a chance and report back.
    Post edited by Grammarsalad on
  • GrammarsaladGrammarsalad Member Posts: 2,582
    edited May 2018
    @semiticgod
    Have you had any luck adding around skill bonuses for particular races. I'm going on memory, but I tried to give half orcs a bonus to intimidate, and as I recall, it was a complete dead end...
    Edit: presumably without resorting to some invisible monster craziness
  • semiticgoddesssemiticgoddess Member Posts: 14,903
    @Grammarsalad: I assumed you could just use the SKILLRAC.2da table. Other than that, no. The only way you can target races via spells is to use a Protection from Spell opcode, and to my knowledge, the only races you can target are drow and duergar. See the Sunscorch spell for those entries; they're labeled as "intelligence less than 17" or something instead of "drow" or whatever.

    As for skills, the only opcodes that seem to work are those that show up properly in Near Infinity, and not all skills are represented by opcodes. Alchemy, Knowledge, and thief skills are the only things that show up in NI as opcodes. For other skills, like Concentration, I found .spl files for feats like Combat Casting by downloading them from GemRB, which shows that opcode 301, for example, is supposed to modify Concentration. But attempting to use opcode 301 seems to crash the game, though I've only tested it as a passive effect applied via a CLAB.2fa file.

    You could give Half-orcs the Bullheaded feat at level 1 by altering the FEATS.2da.

    Note that bard songs cannot be leveled; they will always be cast as if they were level 1.

    By the way, you can get around this by using opcode 402, Apply Effects by List. The bard song itself will not be leveled, but it can cast a spell that is.
  • semiticgoddesssemiticgoddess Member Posts: 14,903
    Also, I've had difficulty working with BAM files in IWD2 and getting them to show up properly. They look fine in Near Infinity...

    ...but in-game, they appear to get shrunk by a few pixels, which distorts them and makes them look wrong--and asymmetrical, which means they simply don't fit in with the other icons. It might be fine with images that are already asymmetrical, but for a circle one like this with concentric rings, the rings won't show up properly.
  • GrammarsaladGrammarsalad Member Posts: 2,582
    "You could give Half-orcs the Bullheaded feat at level 1 by altering the FEATS.2da."

    I seem to recall that that 2da was handcoded...I'm going to experiment and report back specifics after I get to a good place with fnp.

    I'm thinking that we should document our findings in a more organized, IESDP way. If I can figure out how, I might try to fork that on github...
  • GrammarsaladGrammarsalad Member Posts: 2,582
    edited May 2018

    Also, I've had difficulty working with BAM files in IWD2 and getting them to show up properly. They look fine in Near Infinity...

    snip

    ...but in-game, they appear to get shrunk by a few pixels, which distorts them and makes them look wrong--and asymmetrical, which means they simply don't fit in with the other icons. It might be fine with images that are already asymmetrical, but for a circle one like this with concentric rings, the rings won't show up properly.

    Hmm, have you tried bam batcher (I think that's the name). I've had a lot better luck with that:

    http://readme.spellholdstudios.net/bam-readme.html

    Edit: I checked and I think that I meant Bam workshop. Actually, I think I've had good results from both:

    http://www.shsforums.net/topic/57564-bamworkshop/
  • semiticgoddesssemiticgoddess Member Posts: 14,903
    A new finding: the Animal Empathy skill works using SPIN108.spl, Charm Animal. You can edit that spell to change how Animal Empathy works.
  • semiticgoddesssemiticgoddess Member Posts: 14,903
    I was completely wrong about Apply Effects List scaling with levels. It seems that when used with items, the caster level is 10 by default. Apply Effects List cannot be used to make on-hit effects from items scale with levels.
  • fluke13fluke13 Member Posts: 399
    As IWD2 currently stands, what must have mods would you recommend installing? I'm liking the look of that semi-overhaul mod you made.

    With mention on the stream of Camdawg chasing one last option for the possibility of iwd2ee, what are your thoughts on it? The modding community has been around so long, that perhaps if Beamdog finally give up on iwd2ee, it might be something possible to mod? I was thinking perhaps putting iwd2 together with 1 in the iwdee game, might be a nice option. It shouldn't be too hard to add an EET style world map, iwd2 areas, people, story/dialogue... the tricky part will then be the rule changes, extra races, rule tweaks, but if the groundwork is already there, those things can be added over time. I'm literally just thinking out loud right now, so well aware I might be totally off the mark.

    Here's a quick world map I wipped up:


  • semiticgoddesssemiticgoddess Member Posts: 14,903
    @fluke13: What stream was that? I missed it.
  • fluke13fluke13 Member Posts: 399
    The last one, 29th June, Trent just quickly mentioned that there was one idea they might try, but it's a bit of a long shot, it was fairly vague, but I think it was around tracking down the source code, rather than any other potential avenue.
  • semiticgoddesssemiticgoddess Member Posts: 14,903
    @fluke13: As for re-creating IWD2 in the IWD:EE game engine, I've long wondered about that. It would certainly be doable in terms of base content; that would just involve a combination of copying and pasting and replicating content by hand, not unlike a mega-mod whose details were already completely worked out. You could replace all IWD2-exclusive content with EE-compatible content and it would work fine.

    As for implementing feats and other 3E features--which is really what people would be most interested in--it could theoretically be done by modifying the EE source code, adding to the code in an attempt to replicate the effects of IWD2 features. But I'm guessing that would be a more intensive process that relies on skills that Beamdog doesn't specialize in--that is, adding new features rather than re-working existing code to function better on modern platforms. Duplicating IWD2 content and then tacking on some completely new code which attempts to replicate known features from unknown source code would be a sluggish and difficult process that might falter midway through development. You don't want to commit to an unfamiliar task if the potential for profit is low and there's a chance that you wouldn't be able to implement everything.
  • GrammarsaladGrammarsalad Member Posts: 2,582
    ...As for implementing feats and other 3E features--which is really what people would be most interested in--it could theoretically be done by modifying the EE source code, adding to the code in an attempt to replicate the effects of IWD2 features....


    So much this!
  • Mantis37Mantis37 Member Posts: 1,174
    Some of IWD2 should end up in IWD in EET apparently. Hopefully that will move on now the games are getting to 2.5.
  • GrammarsaladGrammarsalad Member Posts: 2,582
    Mantis37 said:

    Some of IWD2 should end up in IWD in EET apparently. Hopefully that will move on now the games are getting to 2.5.

    I believe that @AWizardDidIt has done a lot of work to resolve the discrepancies
  • fluke13fluke13 Member Posts: 399
    Any news on updates, EET? I think IWDEE is getting a final 2.5 update soon.

    There quite a few differences, but not that many that can't be replicated in another way. The only difference I think can't be done is the ability to pick and choose levels from different classes. Skills, subraces, feats...can all be replicated with global and exisiting effects. Scripts can be replicated with much longer versions (lots of new triggers and actions in iwd2 which would be great to have, like the whole Team structure), but these can be worked around with time.

    Realisticly, I think a group of 10 people, dividing up the game, could reproduce iwd2 in iwdee within a few months.
Sign In or Register to comment.