Jump to content

CamDawg

Gibberling Poobah
  • Posts

    12,012
  • Joined

Posts posted by CamDawg

  1. 9 hours ago, Dan_P said:

    The issue is with those spells. They have effects that bypass magic resist. From a quick check, Otiluke's Freezing Sphere also ignores resist. Possibly others. I didn't look at everything.

    Yeah, this. Whether something bypasses MR is set on individual effects within a spell--so you can have some effects be blocked by MR on a spell while others work. Generally you'll see all effects either bypass or respect magic resistance, but there are some spells with mixed effects, e.g. when you want a cosmetic visual to play even if the spell itself gets blocked.

    There's not really rhyme or reason why some spells bypass MR while others don't, and there's not really any in-game resources to indicate which spells should be which. As such, Fixpack essentially punts and instead focuses on making sure that all effects on a spell treat MR the same way (with a handful of exceptions for e.g. mixed spells with visuals as noted above) since there's no way to solidly determine otherwise.

    For Sol's Searing Orb, in oIWD all of its effects are handled by a single monolithic opcode--IOW everything it does is handled internally by the engine in ways I can't access. I can probably emulate it with other effects, but I'll need to play around with it.

  2. Yes, COMPILE assuming the output to be a BCS and in the override folder is a little annoying. However, before we had DECOMPILE_AND_PATCH BEGIN ... END, we had paired commands of DECOMPILE_BCS_TO_BAF and COMPILE_BAF_TO_BCS actions. The easiest way to add a BS script, for example, is simply this:

    COPY ~mymod/myscript.baf~ ~scripts/myscript.bs~
      COMPILE_BAF_TO_BCS

    If you want to edit BS files, you can also just

    COPY ~scripts/agen.bs~ ~scripts/agen.bs~
      DECOMPILE_BCS_TO_BAF
        // REPLACE_TEXTUALLY or whatever
      COMPILE_BAF_TO_BCS
      BUT_ONLY

    You can't COPY_EXISTING_REGEXP through the folder. However, since all the scripts are there as files, you can wrap the above in an ACTION_BASH_FOR:

    ACTION_BASH_FOR ~scripts~ ~^.+\.bs$~ BEGIN
    
      COPY ~%BASH_FOR_FILESPEC%~ ~%BASH_FOR_FILESPEC%~
        DECOMPILE_BCS_TO_BAF
          // REPLACE_TEXTUALLY or whatever
        COMPILE_BAF_TO_BCS
        BUT_ONLY
    
    END

    (I'm using ACTION_BASH_FOR from memory, so the syntax of the directory/regexp may not be 100%.)

    edit: Now that I'm thinking about it, I think you can still use DECOMPILE_AND_PATCH BEGIN ... END in the second and third cases (and should, since it's preferred syntax). WeiDU will respect the destination file name in a COPY regardless of which patch actions are being brought to bear--it's only the one-offs like COMPILE that assume the extension and destination folder.

  3. I believe this is by design as I've not seen anything in-game that suggest they should have bonus damage. The only official source that touches on this is the manual, which states that the strength damage bonus is explicitly for melee weapons:

    IWD manual, pg 132

    Dam Adj: Added or subtracted from the damage inflicted by a succussful [sic] melee attack.

  4. The Gibberlings Three

    The Icewind Dale Fixpack is designed to fix several bugs and errors that remain in the game after the official patches have been applied. Version 8 fixes a nasty bug in non-How games as well as a few other minor fixes. The Fixpack works with or without the expansions Heart of Winter and Trials of the Luremaster installed. In fact, many issues quietly fixed by Heart of Winter or Trials of the Luremaster have been rolled back to every version of the game.

    Version 10 addresses a crash introduced by the Fixpack, and also incorporates many new fixes uncovered by the EE Fixpack.

     

  5. The Icewind Dale Fixpack is designed to fix several bugs and errors that remain in the game after the official patches have been applied. Version 8 fixes a nasty bug in non-How games as well as a few other minor fixes. The Fixpack works with or without the expansions Heart of Winter and Trials of the Luremaster installed. In fact, many issues quietly fixed by Heart of Winter or Trials of the Luremaster have been rolled back to every version of the game.

    Version 10 addresses a crash introduced by the Fixpack, and also incorporates many new fixes uncovered by the EE Fixpack.

    v10 changelog

    • Fixed a CTD error in Tiernon's Sundered Shield introduced by the Fixpack (thanks eyre!)
    • EE Fixpack identified several bugs in IWDEE that trace their way back to the original, which are now addressed:
      • Symbol of Pain's area-of-effect is a 30' radius, but the description listed a 60' radius
      • Spell protections could partially shield the caster from the negative side effects of Great Shout
      • If the party was split on either side of the closing door, the player could end up softlocked during the Yxunomei battle
      • The overlapping containers in the Hall of Heroes are now fixed by removing one of them
      • The range of Stone to Flesh scrolls was inconsistent
      • The Sword of Days was not fully protecting its wielder from Haste and Slow effects
      • The Elixir of Health now 'cures' intoxication rather than setting intoxication to zero
      • Several innate spells were set as 'generalist' school meaning that non-specialized mages received unwarranted save bonuses against them. In a handful of cases where there was a corresponding arcane/divine spell they were assigned the same school, otherwise they were made schoolless.
      • The durations of effects on Retribution did not match
      • Spell protections should not protect from the effects of Wall of Moonlight or Grease
      • Depending on the level of the caster, Beltyn's Burning Blood could bypass or be blocked by the target's magic resistance. Previous versions fixed this by standardizing the spell to bypass MR, but after re-examination, it now is blocked by magic resistance.
      • The portrait icons for feeblemind and petrification in Prismatic Spray did not match the durations of the underlying effects
      • Free action should not block the movement penalty from Suffocate
  6. On 12/14/2022 at 3:47 PM, eyre said:

    Bug Report: fixpack introduces a CTD issue with Tiernon's Sundered Shield (DNTSHD1.ITM).  Line 4212 of setup-iwdfixpack.tp2 specifies an invalid modifier type for parameter2 of the CLONE_EFFECT function call:

    LPF CLONE_EFFECT INT_VAR match_opcode = 88 opcode = 89 parameter2 = 13 END // add missile damage reduction

    Changing the parameter2 argument to 0 solves the issue (and also matches modifier type for the opcode 89 effect present in the upgraded version of the shield DNTSHD2.ITM).

    Thanks, this is fixed in v10!

  7. Bug report from Tempest on Discord:

    Quote

     

    G'day- not sure if this is the place to put this but I've encountered an issue with the Faster Bears part of SCS conflicting with the Boots of Speed.

    My Mage/Thief cast Polymorph Self and transformed into a Brown Bear near the start of the game. Scroll forward to ages later and I found the Paws of the Cheetah. Put them on, but not speed change (not wearing the Ring of Free Action or anything).

    Checked EEKeeper and under the Effects tab...well you can see the screenshot I've taken.

    [screenshot shows op126 setting speed to 8 from spwi497]

     

     

  8. Oh right, the thing I led off with--"these can now do X"--and then I didn't provide any examples.

    The _ex parameters don't have any restrictions, so you can literally just use

     LPF ALTER_EFFECT
        INT_VAR silent=1
                match_opcode=0x107   // backstab (263)
                match_parameter2=0
                parameter1=1
        STR_VAR match_parameter1_ex = (o_parameter1 < 0)            
      END

    edit: and writing negative values is just as easy, e.g.

    parameter1_ex = ~"-1"~

     

  9. ALTER_, CLONE_, and DELETE_EFFECT are pretty useful functions, but they (rather infamously) don't allow you to write in negative numbers into the effects you're modifying. I've always wanted to revisit these functions and address this, but it was always on my 'one of these days' to-do list and more or less ignored. Until today, when I was inspired to address this, and quite a bit more.

    Introducing the _EX versions of these effects: ALTER_EFFECT_EX, CLONE_EFFECT_EX, and DELETE_EFFECT_EX. These function exactly the same way as the originals, but have additional variables that make these exceptionally flexible.

    A short digression

    A quick aside on how the original functions work, as it is very relevant to how the new ones work. For the current function family, it reads in all of the parameters of an effect, and then runs comparisons against the match_ variables and, if all of the match comparisons are valid, it then deletes it (DELETE_EFFECT) or writes in the new values (ALTER or CLONE). This is an example of how, say, the opcode is checked for a match:

    PATCH_IF (((match_opcode        = o_opcode)        OR (match_opcode < 0)) AND 
              ((match_target        = o_target)        OR (match_target < 0)) AND
      // ... other parameter checks
      ) BEGIN

    The original effect values are read into o_foo variables, so o_opcode is the opcode of the current effect being examined. Since the default value for the match_ variables are -1 (-10 for save bonuses), the latter parameter basically tells it to bypass this check if no match_opcode is specified. (Incidentally, the -1 default value is also why the functions don't handle negatives well.) Similarly, the code to change the effect (via ALTER or CLONE) has similar checks:

    PATCH_IF (opcode >= 0)        BEGIN WRITE_SHORT (base        + (0x08 * fx_type)) opcode        END

    Same idea; opcode's default value is -1, so it'll only write in a new opcode value if a non-default, positive value is specified in the function call.

    So what's new?

    The EX family introduces two new series of string variables for both the match and value variables with _ex suffixes. The match_foo_ex series inserts WeiDU code into the comparisons to allow for more flexibility. Let's say you're looking to delete effects that block a spell, which can be done with opcodes 206, 318, or 324. In the past you'd have to invoke DELETE_EFFECT for each of the three opcodes, but now we can simply use

    DELETE_EFFECT_EX STR_VAR match_opcode_ex = ~((o_opcode = 206) OR (o_opcode = 318) OR (o_opcode = 324))~ match_resource = myspell END

    The presence of an _ex variable will cause the function to ignore the normal version, e.g. in the example above match_opcode would be ignored because match_opcode_ex exists. match_resource is respected because there's no match_resource_ex specified. You could even extend this further by using resource field to remove all spell protections against divine magic by using a regexp with the resource field:

    DELETE_EFFECT_EX STR_VAR match_opcode_ex = ~((o_opcode = 206) OR (o_opcode = 318) OR (o_opcode = 324))~ match_resource_ex = ~("%o_resource%" STRING_COMPARE_REGEXP "^[Ss][Pp][Pp][Rr][0-9]+" = 0)~ END

    This would delete any 206/318/324 that targeted spells starting with SPPR-numeral.

    The value variables also accept code. So if you wanted to, say, improve shields by increasing their base AC bonus by +1 across the board, this would work just dandy:

    COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
      READ_SHORT 0x1c type
      PATCH_IF type = 12 BEGIN // shield
        LPF ALTER_EFFECT_EX INT_VAR match_opcode = 0 match_parameter2 = 0 STR_VAR parameter1_ex = ~(THIS + 1)~ END // increase AC bonus by 1
      END  
      BUT_ONLY

    You can also use some limited tests in the value fields, too, Let's say you're trying to boost transmuters at the expense of abjurers, so you want alterations to receive a universal -1 save penalty and abjurations a universal +1 save bonus:

    COPY_EXISTING_REGEXP GLOB ~^.+\.spl$~ ~override~
      READ_SHORT 0x22 type
      PATCH_IF ((type = 10) OR (type = 12)) BEGIN // alteration, abjuration
        LPF ALTER_EFFECT_EX STR_VAR match_savingthrow_ex = ~(o_savingthrow != 0)~ savebonus_ex = ~((type = 12) ? (THIS + 1) : (THIS - 1))~ END
      END  
      BUT_ONLY

    Let's throw in an ALTER_HEADER variant as well

    I wrote an ALTER_HEADER function as well, but unlike my other functions, it never made it into WeiDU proper. I've added an ALTER_HEADER_EX variant as well, e.g. let's say you wanted to give spears a bit of a boost by giving them a +1 damage bonus:

    COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
      READ_SHORT 0x1c type
      PATCH_IF type = 29 BEGIN // spear
        LPF ALTER_HEADER_EX STR_VAR match_type_ex = ~((o_type = 1) OR (o_type = 2) OR (o_type = 4))~ damage_ex = ~(THIS + 1)~ END // melee or anged or launcher
      END  
      BUT_ONLY

    Because there are (albeit unused) throwing spears in the game, it checks for melee, ranged, and even launcher headers and then bumps the damage by one. One difference for ALTER_HEADER is that, instead of 10 different bit field value_ex variables, there's just one (flags_ex) for the entire four bytes, since you can do whatever bit operations desired.

    Some final words

    These were written more or less in day, so I'm sure something is wrong somewhere--so I'm putting these out there and asking for some field testing. I'd also be happy to provide examples of how to utilize them in actual real-use scenarios if anyone would like to give them a shot.

    The library with the functions is attached!

    x_force.tph

  10. It's simple, but it just requires a script block for every identifiable item in the game. Which is easy to code but may slow the game down to a crawl, so I'm currently pondering alternatives.

    edit: Simple, but after testing, not reliable enough due to how the actions and triggers interact with multiple copies of items in inventory.

  11. The Gibberlings Three

    This mod modifies the Devas and Planetars that are summoned by the player so they gain most of their Monster Manual abilities and stats. I have taken some small liberties in how I adapted some of these abilities. Since the devas and planetars that are summoned are level 25 creatures and the monster manual lists them as much lower level creatures, I have chosen a class for each of the creatures and increased their statistics according to their class.

    Version 8 is due to the hard work of TotoR who, with Caedwyr's blessing, tracked down and fixed a lot of the old bugs and made a number of overall improvements. As if that wasn't enough, the mod now has a nice, new cosmetic component (based on Spell Revisions), a preview of which is available on the project page or readme.

  12. Posting this here instead of the miscellaneous release thread, since this is a pretty substantial update to the mod. Originally from @Caedwyr:

    Quote

    Something that bothered me from the first time I played Baldur's Gate II was the weakness of many of the creatures. Among these were the elemental princes, the devas and planetars, and the various demons and devils. In Pen and Paper AD&D these are powerful and scary enemies if you get on their wrong sides. In Baldur's Gate II, they were minor obstacles to be plowed over by the Bhaalspawn and his/her party.

    What I have done in this mod is to modify the Devas and Planetars that are summoned by the player so they gain most of their Monster Manual abilities and stats. I have taken some small liberties in how I adapted some of these abilities. Since the devas and planetars that are summoned are level 25 creatures and the monster manual lists them as much lower level creatures, I have chosen a class for each of the creatures and increased their statistics according to their class.

    Version 8 is due to the hard work of @TotoR who, with Caedwyr's blessing, tracked down and fixed a lot of the old bugs and made a number of overall improvements. As if that wasn't enough, the mod now has a nice, new cosmetic component (based on @Demivrgvs work in Spell Revisions), a preview of which I'll add to below.

    celestials_cosmetics.jpg

    v9 changelog

    • Fixed a fairly dumb and egregious bug from CamDawg where the new spell cloning code was corrupting creature files
    • Fallen Devas from the Blackguard HLA are now covered
    • The Deva and Planetar Animations component will now affect the bogstandard celestials in the game, and no longer requires the main component

    v8 changelog

    • Add LABEL to both components
    • Add a new component from Spell Revisions: deva and planetar animation. As this component fits really well and was already designed with P&P celestials in mind, I have integrated it directly in this mod. I have updated it with P&P skin and hair colors for various devas and planetars and fixed CTD (missing two-handed flag mostly) - thanks Demivrgvs
    • Create Dark Planetar and Fallen Deva:
      • Dark Planetar is created from a planetar without priest spells (Fallen). For balance purposes those spells are replaced by mage spells. In addition to innate Holy Word, Heal and Cure Serious Wounds spells are replaced by Unholy Word, Harm and Cause Serious Wounds.
      • Fallen deva is created from the Astral deva, with less dexterity (16 was 19), but more strength (19 was 17) and constitution (16 was 15) to compensate the lake of diversity. Innate Heal and Cure Serious Wounds spells are replaced by Harm and Cause Serious Wounds.
    • Corrected XP of deva and planetars to match P&P Source
    • Update planetar immunities to add protection from gas spells
    • Add always-active True Sight for Planetars and remove detect invisibility ability as it is now useless
    • Add always-active infravision to all devas and planetars (P&P) and remove the spell-like ability
    • Removed shapeshift and polymorph self spells - why would you polymorph into a weaker creature?
    • Removed the call Planetar spell from the Movanic Deva - it is too powerful and not P&P
    • Update levels of all devas and Planetars to more match P&P (add +2 levels vs. books) and keep balanced. it used to be too overpowered in comparison with Vanilla. Now: Astral Deva is fighter lv 14 with 121 hp (15 cons), Monadic Deva is fighter lv 12 with 132 hp (18 cons), Movanic Deva is fighter/mage lv 10/10 with 96 hp (16 cons), Fallen Deva is fighter lv 14 with 130 hp (16 cons), Planetar is fighter/priest lv 16/9 with 146 hp (16 cons), Fallen Planetar is fighter/mage lv 16/9 with 146 hp (16 cons)
    • Add compatibility with Item Revisions, specifically the Rod of Smiting (ca#monrd.itm)
    • Add a save vs death at -2 for the vorpal effect of the planetar swords and add immunity to effect for sensible creatures (slimes, constructs, incorporeal creatures, &c.)
    • Corrected typo for planetar boots
    • Removed the weird puff effect (noattack.spl)
    • Set Enchantment to +3 for Mace of Disruption + 3 (P&P) and update trad with +3 ; add a probability of 50% for the senseless ability (P&P) to simulate that the mace need two consecutive attacks to trigger it
    • Weapons are now visible with all animations (SOLAR animation and new animation)
    • Restore Teleport Without Error (resource was present but not installed) - but removed it from innate. it will be used only by script
    • Create Unholy Word for Fallen Planetar
    • Create a special limited wish spell for planetar, and make it more combat oriented: it shows now only repeatable wishes
    • Correction to Anti-Magic Shell, now it works correctly
    • Recreate script to add it with the 'COMPILE' command to allow check of incompatibilities
    • Some update to the script to consider planetar immunity to gas spell
    • Add missing idents in state.ids and stats.ids for compatibility with oBG2
    • Update script to remove typo, useless blocks, triggers
    • Add missing spells for the Monadic deva
    • Add new blocks for new spells added for fallen planetar
    • script update: Add trigger for combat-oriented spells and out-of-fight spells and globally remove blocks that target PCs, as it is a wast of time and take too long in a fight. Those spells could always be used manually.
    • Some bug fixes and code modernization from CamDawg:
      • Improved Invisibility 10' Radius was not providing the +4 save bonus on oBG2 games
      • Various celestials had incomplete immunities, e.g. they would block the actual petrification effect but still report 'Petrified' in the combat feedback
      • The description of Anti-Magic Shell had extra line breaks which would cause the in-game description to be very wonky
      • The various 'at-will' innate spells could be lost until the next rest if the caster was interrupted
      • Innate spells that were cloned from existing spells were not being blocked/reflected/removed like their source spells
      • More innate spells are now cloned from their underlying spells for better compatibility: Symbols, Death, Fear, and Stun; Improved Invisibility 10' Radius; Protection from Evil 40' Radius; Protection from Good 40' Radius
      • Detect Pits and Snares would spam 'Find Traps' every round instead of the correct 'Detect Pits and Snares'
      • Various abilities will now use EE's engine features, e.g. filtering to block effects (Charm Elemental) or spell stacking (Resist Cold)
      • If EE Fixpack is installed, spells will integrate into its better immunity and cure systems
      • Since innate spell descriptions are available in-game on the EEs, descriptions fields will no longer contain random strings
×
×
  • Create New...