Jump to content

Luke

Modders
  • Posts

    879
  • Joined

Posts posted by Luke

  1. 2 hours ago, DavidW said:

    However, the sound effect played at the end of the domination period does not bypass magic resistance. So a heavily magic-resistant character might be dominated and yet get no sound effect.

    Yes, this does sound like a bug IMHO (in particular, a consistency issue).

    I think that op174 effect should not be dispellable and bypass magic resistance, just like the main payload (precisely because it's a psionic rather than a magical power).

    3 hours ago, DavidW said:

    there's lots of developer intent supporting the idea that the sound effects associated with spells are supposed to be blocked by the same things that block the main payload of the spell.

    Indeed.

  2. 9 hours ago, Bubb said:

    and some projectiles, (like chain lightning's secondary strikes)

    Did you perhaps mean call lightning's secondary strikes (i.e., hardcoded projectiles "Call_Lightning_Chain_1", "Call_Lightning_Chain_2", ... , "Call_Lightning_Chain_11")?

    9 hours ago, Bubb said:

    any sort of Nearest object, object selectors (like [ENEMY]),

    9 hours ago, Bubb said:

    This mode is applied when op12 knocks a creature out with STUNNING damage.

    Could you please clarify this point...? I mean:

    • Candlekeep Watchers ("seeenemy.bcs", "AttackReevaluate([ENEMY],30)") ignore "sleeping" creatures (due to op12, p2=STUNNING)
    • "bddefai.bcs" ("AttackOneRound(NearestEnemyOf(Myself))") does not ignore "sleeping" creatures (due to op12, p2=STUNNING)
      • That is to say: what do you mean by "any sort of Nearest object"...?

    Also, what if op39 is applied with `Special == 0`...? In such a case, everything functions as expected...?

    Separately, do you perhaps know if there's a secret hidden mode that can bypass / ignore op101 (see `parameter2` of op24)...? If not, we still can't properly distinguish Earthquake from Sleep/Unconsciousness without introducing new splstates...

  3. 1 hour ago, kjeron said:

    No, it's the newly added (arbitrary) header descriptions that are incorrect for the alignment rows, not the checks.

    • Row 33 = (NOT BIT1 = Not NEUTRAL or EVIL) = Alignment=GOOD
    • Row 34 = (HAS BIT1 = Is NEUTRAL or EVIL) = Alignment=NOTGOOD
    • Row 35 = (NOT BIT0 = Not GOOD or EVIL) = Alignment=...NEUTRAL
    • Row 36 = (HAS BIT0 = Is GOOD or EVIL) = Alignment=...NOTNEUTRAL
    • Row 37 = EVIL
    • Row 38 = NOTEVIL
    • Row 59 = (NOT BIT5 = Not CHAOTIC or NEUTRAL) = Alignment=LAWFUL
    • Row 60 = (HAS BIT5 = Is CHAOTIC or NEUTRAL) = Alignment=NOTLAWFUL
    • Row 61 = CHAOTIC
    • Row 62 = NOTCHAOTIC

    These are how they are used, how they were listed before those descriptions were added, and their listing from IWD1/IWD2.

    i.e Unholy Blight doesn't affect (324) row 34 (NOTGOOD). (only affects GOOD creatures)

    I see, good to know.

    Will fix and rename those entries as you suggested (f.i. "34_ALIGNMENTBITS!=GOOD" instead of "34_ALIGNMENTBITS!=MASK_GENEUTRAL")

  4. @kjeron

    Committed.

    Spoiler

    I made the following changes / additions:

    • Added missing ~%CLERIC_ELEMENTAL_TRANSFORMATION_FIRE%~ and ~%CLERIC_ELEMENTAL_TRANSFORMATION_EARTH%~
      • As far as "When the Druid returns to human form, <PRO_HESHE> is also healed 3d10 Hit Points." is concerned, I used the usual 'op318 + EFF' trick, i.e.:
        • Before casting ""SPINHUMR.SPL", "SPINHUM.SPL" (universal Natural Form) casts another subspell (I called it "SPINHUME.SPL")
          • "SPINHUME.SPL" has a leading op177 effect ("SPINHUME.EFF" => op318, resource="SPINHUME", parent_resource="*PINHUME") protecting the caster from healing
          • "DRUFIR.ITM" and "DRUEAR.ITM" grant the caster protection from that EFF (op318, timing=2, resource="*PINHUME"), so that he can be healed 3d10 HP when returning to its natural form.
    • Edited visual / audio effects so as to match BG / IWD style (depending on the current game).
    • ~%WIZARD_POLYMORPH_SELF%~, ~%WIZARD_SHAPECHANGE%~

      • I'm not sure why you put a leading op321 effect here... I mean, you can't really prevent self stacking because op171 does not leave behind a removable effect...

        • As a result, I recreated vanilla behavior, i.e.:
          I added two op206 effects granting protection to ~%SOURCE_RES%~ and ~%WIZARD_SHAPECHANGE%~ / ~%WIZARD_POLYMORPH_SELF%~ respectively (so that you can't use them together and cannot cast the same spell until when the current casting runs out)

    • As far as instantaneous effects (op171, op172, op146, op321, op326) are concerned, I opted for `timing=1, duration=0` instead of `timing=0, duration=0`

      • No particular reason, just a personal preference...

    • Slightly edited subspells naming scheme.

    • When iterating over Hostile / Limited polymorphs, I skipped subspell if permanent duration (f.i. "Bolt of Polymorphing", "Wand of Polymorphing", etc...)

      • That is, I put `op111, timing=4, duration=0` instead of `op146, timing=4, duration=0` (with the subspell applying `op111, timing=1, duration=0`)

  5. On 5/4/2022 at 1:31 AM, Dan_P said:

    Just adding a note, since you mentioned IWD for this. IWDEE should not get op18. It's supposed to be just normal healing and that's how it's written in the descriptions as well.

    Yeah, you're right.

    Having extra temporary HP while polymorphed would be cool IMHO, but that's not developer intent...

  6. 21 hours ago, kjeron said:

    SPIN823 normally gives SPIN822 back after a 180s delay.  This way SPIN822 is blocked for 180s rather than removed and given back later, as it seems like that process got interrupted on occasion (people complaining about permanently losing the ability).

    I see, good to know.

    21 hours ago, kjeron said:

    As an equipped effect that would heal them every time you load the game with it active.

    Yes, it can be exploited to heal yourself. Better to put an op17 effect in the SPL and an op18 (p2=3|Increment, don't update current HP) effect in the ITM.

    21 hours ago, kjeron said:

    Non-polymorph Weapon-Creation spells cast SPINHUMW, which casts SPINHUMR while blocking it's first EFF (op135), but not the rest.

    21 hours ago, kjeron said:

    Slayer Change (SPIN823) casts SPINHUMS, which casts SPINHUMR while blocking it's second EFF (op312->SPIN823)

    Here is the magic part.

    I thought it would not work as intended because that op318 has a duration of 0, and the EFF it is meant to block is not in the current effect stack (since it is applied by the SPL file cast by op326).

    I mean, it reminds me of the current implementation of "Vitriolic Sphere", where the main SPL file ("spwi432") is supposed to block the splash damage ("spwi432y", cast by op326) for the initial target.
    In this case the op318 effect targeting "spwi432y" has a very short duration (timing=10, duration=2)... I'm not sure if `duration=0` would work the same or not... Just wanted to know whether the two scenarios are comparable or not...

  7. On 4/30/2022 at 7:24 PM, kjeron said:

    I never got around to looking up/making the correct string since it wasn't working.

    Fair enough. I'm defaulting to one of the two values that actually works, i.e. 0xF00080 (Unaffected by effects from <RESOURCE>).

    Having said that, I'm not sure why the `duration` field is set to 180... Is this correct...?

    @kjeron

    OK, some final comments / questions (before committing):

    • [bg2ee] Cloak of the Sewers, Mustard Jelly form: should not share the same ITM resref as WIZARD_POLYMORPH_MUSTARD_JELLY.
      • I made a clone of "plyjelly.itm"
    • [sod] SHAPECHANGE_MIND_FLAYER: should not use "mindflay.itm" (since that is used by enemy/NPC Mind Flayers)
      • I made a clone of "mindflay.itm" ("cdmindfl.itm")
    • [bgeeWILD_SURGE_POLYMORPH_SPIRIT_WOLF: should not share the same ITM resref as WIZARD_POLYMORPH_WOLF.
      • I made a clone of "cdwolfm.itm" ("wswolf.itm")
    • Slayer Change / IWDEE Druid Shapeshift Heal: shouldn't this healing be applied by opcode #18 (p2=0 | update both current and max HP) in the ITM file (as equipped effect)...?
      • In so doing, it can act as temporary bonus hit points if the caster is already at full health...
    • I must admit it is still not clear to me the following block
      Spoiler
      COPY_EXISTING_REGEXP	~^.+\.\(spl\|itm\)$~	override
      	PATCH_IF	!VARIABLE_IS_SET	$POLYFORM_abort(~%SOURCE_RES%~)	BEGIN
      		LPF	CLONE_EFFECT	INT_VAR	silent = 1	match_opcode = 111	opcode = 326	parameter2 = $splprot(~POLYMORPH=1~)	timing = 0	duration = 0	STR_VAR	resource = ~SPINHUMW~	END
      		END
      	BUT_ONLY
      END

       

      Assuming it's only relevant when a contingency (since op135 automatically disables arcane / divine spell casting) with, say, Phantom Blade triggers while you're polymorphed (under the effects of op135, p2=0):

      • SPINHUMW.SPL

        • op318 => this is supposed to block EFF file "*PINHUMW.EFF". However, it will never be able to block it since the following op326 effect (which applies a SPL file that in turn applies the EFF file "*PINHUMW.EFF") is not delayed (timing=4, duration=0).

        • op326 (no filter) => applies SPL file "SPINHUMR".

      • SPINHUMR.SPL

        • op177 => "SPINHUMW.EFF" (revert to natural form and remove magically created weapon – you should be immune to it but that's not actually the case...)

        • op177 => "SPINHUMS.EFF" (remove Slayer Change delayed damage)

        • op215 => visual effects

      • To sum up: is it supposed to block the Slayer Change delayed damage and cancel the current polymorph ability (including the Slayer)...? But then why is it supposed to block "SPINHUMW.EFF"...? I fear I'm missing something here...

  8. More fixes / tweaks:

    Spoiler

    The following fixes and tweaks apply to both `bg` and `bg2` (unless otherwise specified)

    Cause / Cure Wounds

    • Make sure "Range: Touch" (i.e., `range=0`)

    Lesser / Greater Restoration

    • Make sure "Range: Touch" (i.e., `range=0`)

    Lay on Hands

    • Make sure "Range: Touch" (i.e., `range=0`)

    Slay Living

    • Make sure "Range: Touch" (i.e., `range=0`)
    • Make sure all effects do not bypass Magic Resistance

    Remove redundant portrait icons

    • `op25, op78, op16/317, op40, op98, op175, op45, op74` naturally provides a portrait icon, there's no need to apply a separate `op142` effect

    splprot.2da

    • the newly added (v2.6) header descriptions are incorrect for the alignment rows

    Longtooth: The Grave Binder

    • Unusually large dagger, depicted as a Short Sword => make sure `range=1`

    Paralytic Bolt +1 [sod]

    • `Save vs. Paralysis` negates (was `Save vs. Spell`)
    • `Weight` should be `0` (was `1`)
    • Hit target is stunned for `5 rounds` (was `6 rounds`)
    • `resist_dispel` should be `0` (effects should not be dispellable and should ignore MR)

    Paralytic Bolt [bg2]

    • Rename as "Paralytic Bolt +1" (the item's name should state its enchantment level)
    • `resist_dispel` should be `0` (effects should not be dispellable and should ignore MR)

    Flame Blade

    • should not interact with level-based spell protections

    Fire Seed

    • should not interact with level-based spell protections

    Searing Orb

    • should not interact with level-based spell protections
    • recode from scratch so as to use `op326` effects instead of messy `op177` effects

    Command

    • Creatures with `37` or more Hit Dice (or experience levels) should not be immune to it

    Armor of Faith

    • remove duplicate `op328` effect(s)

    Barkskin

    • Instantaneous effects should have a duration of `0` (this is probably irrelevant, but just in case...)

    Slow Poison

    • Make sure it truly slows poison (so as to match `IWDEE` and spell description/name)

    Summon Insects, Insect Plague

    • remove duplicate `op233` effect(s)

    Poison

    • Make sure `duration=60 // 1 turn` (instead of `62`)
    • Use multiple `op25` effects instead of `spwi411[a-e].eff` (so as to make it work with `CLERIC_SLOW_POISON`)
      • As far as I know, `op329` cannot slow poison if `op25` is applied via `op177`...

    Chaotic Commands

    • remove duplicate `op328` effect(s)

    Blade Barrier

    • Make sure `duration=60 // 1 turn` (instead of `62`)

    Dolorous Decay

    • Make sure all poison-related effects have a duration of `50` (instead of `56`)
    • Make sure the "Decaying" portrait icon does not bypass Magic Resistance
    • Make sure the delayed `op174` effect (the one related with Poison) offers a Save vs. Poison @ -2

    Physical Mirror

    • remove duplicate `op328` / `op233` effects

    Shield of the Archons

    • remove duplicate `op328` / `op233` effects

    Sunray

    • recode from scratch so as to use `op326` effects instead of messy `op177` effects
    • its insta-death effect against `UNDEAD` is now blocked by `"%CLERIC_DEATH_WARD%"` and the like

    Holy / Unholy Word

    • recode from scratch so as to use `op324` magic instead of messy `op177` effects
    • make sure it causes arcane spell failure (not just divine spell failure)

    Creeping Doom [bg2]

    • remove duplicate `op233` effect(s)
    • subspell's `Primary/Secondary type` should match parent `SPL` file
    • subspell's effects should bypass Magic Resistance (since MR is already checked on the parent file)
    • do not use the same projectile as "Insect Plague" (since that is supposed to affect up to 6 creatures)

    Creeping Doom [bg]

    • remove duplicate `op233` effect(s)
    • "For each round the victim remains inside the cloud, <PRO_HESHE> must make a Save vs. Spell at -2 or run away in fear for one round." => match `BG2EE` implementation
      • `op272` is unreliable and can trigger under unintended circumstances...

    Summon Insects (Black Dragon)

    • use same projectile as `"%CLERIC_CREEPING_DOOM%"`

    Absorb Health (Blackguard)

    • should not bypass Magic Resistance
    • subspell should scale up to level `40` (`BG2` level cap)
    • subspell's Primary/Secondary type should match parent `SPL` file
    • subspell should not play a casting sound

    Insect Plague (projectile)

    • make sure it affects up to `6` creatures (as per spell description)

    Spirit Fire

    • "Spirits, fey creatures, elementals, and spectral undead take double damage." => make sure this double damage bypasses Mirror Image (since the parent `SPL` file is an AoE spell)

     

  9. 4 hours ago, kjeron said:

    SPINHUM doesn't exist in every game.

    True (I recalled wrong, sorry...)

    4 hours ago, kjeron said:

    The untyped/unknown damage type is to avoid screwing around with the player's damage resistance, using something they cannot prevent.

    I see.

    So are you saying that the vanilla approach (i.e., applying a 0-second "Set to 0" op31 effect before dealing Magic damage via op12) is not really safe...?

    4 hours ago, kjeron said:

    Only reason for a variable to be in the function definition is if you need it to have a default value. Those arrays are set by this line:

    OK, I see.

    However, it can be problem when using "MODDER fun_args fail"...

     

    Some other things:

    • PATCH_IF $x(4) = 3 BEGIN (when iterating over array "slayer")
      • I mean, that's certainly true since it is preceded by "PATCH_IF $x(4) != 3 BEGIN", so I'm not sure about the intent here...
    • LPF "ADD_SPELL_EFFECT" INT_VAR "opcode" = 206 "target" = 2 "parameter1" = 26011 "duration" = 180 STR_VAR "resource" = ~%SLAYER_START%~ END // Protection from spell (when iterating over array "slayer")

      • Excluding the fact that op206's feedback string is bugged as of now, String #26011 is "There was leather hide found, and tannin was smelled on the killer!". Guess you meant some other strref...?

    • LAF alter_poly_item INT_VAR hostile = $x(5) STR_VAR item_ cre_ RET_ARRAY POLYITEM END (when iterating over array "slayer")

      • guess that this one does not need to return array "POLYITEM" since it's the last call...

    • PATCH_IF !IS_AN_INT $x(2) BEGIN (~alter_poly_item~)

      • This should probably be skipped when you're iterating over array ~slayer~, shouldn't it? Otherwise you'll grant protection against non-existing resources...

  10. 15 hours ago, kjeron said:

    $res(~~) and $SOURCE(RES) are just shortcuts to avoid requiring an EVAL.  Functions will automatically evaluate an array construct for a string variable.

    under a functions STR_VAR: $res(~~) == EVAL ~%res_%~,   $SOURCE(RES) == EVAL ~%SOURCE_RES%~

    Good to know.

    Anyway, the fixpack uses AUTO_EVAL_STRINGS, so EVAL is not needed in any case...

    15 hours ago, kjeron said:

    I don't know whether the size issue was fixed or not.

    Will test...

    15 hours ago, kjeron said:

    The references to %idx% are for unrelated code, just forgot to prune all of them.

    OK, so that line is supposed to be deleted entirely...?

     

    Follow-up questions:

    • Regarding "IWDEE Druid Shapeshift Heal (heal 40% of lost HP)"
      • I know it's supposed to be a flat +12 HP, but I'm not sure what you wanted to do here... I mean, you first set HP (both current and max to 250%) and then set current HP to 40%...? Also Damage Type 65535 is unknown...
    • Regarding "Slayer damage scaling":
      • Damage type 4096 is unknown. Guess you meant
        parameter2 = IDS_OF_SYMBOL ("DMGTYPE" "MAGIC") // Normal mode
    • arrays ~SPWI416~ and ~SPWI916~ appear to be empty/uninitialized (when launching function ~alter_poly_spell~)
      • First of all, ~array~ is not part of function definition
      • Second, guess you meant something like
        Spoiler
        ACTION_DEFINE_ASSOCIATIVE_ARRAY "%WIZARD_POLYMORPH_SELF%" BEGIN
          ~%WIZARD_POLYMORPH_FLIND%~ => ~~
          ~%WIZARD_POLYMORPH_OGRE%~ => ~~
          ~%WIZARD_POLYMORPH_SPIDER%~ => ~~
          ~%WIZARD_POLYMORPH_MUSTARD_JELLY%~ => ~~
          ~%WIZARD_POLYMORPH_BROWN_BEAR%~ => ~~
          ~%WIZARD_POLYMORPH_BLACK_BEAR%~ => ~~
          ~%WIZARD_POLYMORPH_WOLF%~ => ~~
        END
        
        ACTION_IF (GAME_IS "iwdee") BEGIN
          ACTION_DEFINE_ASSOCIATIVE_ARRAY "%WIZARD_POLYMORPH_SELF%" BEGIN
          	~%WIZARD_POLYMORPH_BORING_BEETLE%~ => ~~
          	~%WIZARD_POLYMORPH_POLAR_BEAR%~ => ~~
          	~%WIZARD_POLYMORPH_WINTER_WOLF%~ => ~~
          END
        END
          
        ACTION_DEFINE_ASSOCIATIVE_ARRAY "%WIZARD_SHAPECHANGE%" BEGIN
          ~%SHAPECHANGE_MIND_FLAYER%~ => ~~
          ~%SHAPECHANGE_IRON_GOLEM%~ => ~~
          ~%SHAPECHANGE_GIANT_TROLL%~ => ~~
          ~%SHAPECHANGE_GREATER_WOLFWERE%~ => ~~
          ~%SHAPECHANGE_GREATER_WOLFWERE%~ => ~~
          ~%SHAPECHANGE_EARTH_ELEMENTAL%~ => ~~
        END

         

    • OUTER_SET squirrel = 1
      • This variable appears to be unused...?
    • Any particular reason for using op326 with no filter instead of a simple op146,p2=1 (see f.i. when patching ~SPINHUM~, ~SPINHUMS~, ~SPINHUMW~)...?
    • ACTION_MATCH $x(12) WITH (when iterating over array ~list~)

      • Should be $x(11) // count start from 0, not 1

    • ACTION_MATCH $x(15) WITH (when iterating over array ~other~)

      • Should be $x(14) // count start from 0, not 1

    • ACTION_MATCH $x(7) WITH (when iterating over array ~slayer~)

      • Not sure what you wanted to do here, seems to be a copy/paste error...?
        I mean, it should only apply to bgee, bg2ee, eet, and since the resrefs appear to be the same in both games, there should be no need for the "game" variable...

    • CREATE SPL ~SPINHUM~

      • This SPL file already exists as a game resource. Guess you meant

        COPY_EXISTING ~spinhum.spl~ ~override~

         

  11. 22 hours ago, kjeron said:

    Timing=4,Duration=0 is not the same as Timing=0/1,Duration=0.  The latter is instant, the former is not.

    The first op146 needs to be instant (not timing=4) - it removes any old polymorph.

    So basically effect order is irrelevant...?

    OK, I see it now (hopefully): it's like IWDEE Chill Touch, where the subspell (op326) applying op24 is delayed (1 sec, but guess that 0 secs is also fine) so that the first subspell (op326) can remove immunity to op24...

    22 hours ago, kjeron said:

    Op335 has a similar issue as op135 with regards to applying the effect while another is already active:  If you apply op335 while the specified spellstate is already set (either by op328 or another op335), then the new op335 will NOT be applied.  A timing=4,Duration=0 delay between removing the old (polymorph/spellstate) and applying the new will bypass the issue for both opcodes.

    Got it, will report...

    22 hours ago, kjeron said:

    The op326/101 pair would go on spells like Flame Blade:  op101(135) -> op326(SPINHUM) -> op111(FBLADE)   

    Interesting.

    But does your overhauled system interfere with such spells...? I mean, op135 (p2=0) automatically disables Arcane/Divine spell casting, so you are not be able to cast those spells while polymorphed... Unless a contingency triggers maybe...?

    Regarding your code:

    • things like $res(~~) and $SOURCE(RES) are those hidden array constructs, right?
    • Override Creature Size: "3" // Otherwise transforming into a larger creature can result in being immediately stuck, even in wide open areas.

      • If I recall correctly, this used to be an op135 bug during v2.6 beta (where it used to create impassable tiles). Is it still the case in the stable version...? Asking because that will certainly interfere with op318/324/326 checking for Circle Size...

    • SPRINT $ $x(2)(~%resource%~ ~%idx%~) $item(~~)

      • Unless I'm missing something, ~idx~ appears to be uninitialized...? I'm not sure what you're trying to do / overwrite here...

  12. @kjeron

    So, I started working on this (wanted to give it a try) and got a first draft

    Spoiler
    DEFINE_ACTION_FUNCTION "POLYMORPH_OVERHAUL"
    BEGIN
    	/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
    	/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
    	/////                                                  \\\\\
    	///// unified natural form ability                     \\\\\
    	/////                                                  \\\\\
    	/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
    	/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
    
    	WITH_SCOPE BEGIN
    		WITH_SCOPE BEGIN
    			COPY_EXISTING "%SHAPESHIFT_NATURAL_FORM_1%.spl" "override/gtnatfor.spl"
    				/* Extended header */
    				/* Feature blocks */
    				LPF "DELETE_EFFECT" END // delete current content
    				// Remove any existing p2=0 polymorph (op135) effect and any item in the magical weapon slot
    				LPF "ADD_SPELL_EFFECT"
    				INT_VAR
    					"opcode" = 135 // Polymorph
    					"target" = 1 // Self
    				END
    				// Remove slayer-change delayed damage effects // if necessary
    				LPF "ADD_SPELL_EFFECT"
    				INT_VAR
    					"opcode" = 321 // Remove effects by resource
    					"target" = 1 // Self
    					"timing" = 1
    				STR_VAR
    					"resource" = "????????"
    				END
    				// Visual effects
    				LPF "ADD_SPELL_EFFECT"
    				INT_VAR
    					"opcode" = 215 // Play visual effect
    					"target" = 1 // Self
    					"parameter2" = 1 // Play where?: Over target (attached)
    					"duration" = 3
    				STR_VAR
    					"resource" = "SPPOLYMP"
    				END
    				LPF "ADD_SPELL_EFFECT"
    				INT_VAR
    					"opcode" = 215 // Play visual effect
    					"target" = 1 // Self
    					"parameter2" = 1 // Play where?: Over target (attached)
    					"duration" = 3
    				STR_VAR
    					"resource" = "POLYBACK"
    				END
    				// Remove temporary abilities such as "Breathe Fireball" and "Psionic Blast"
    				// optional – alternate method available with op335, but uses a spellstate...
    				LPF "ADD_SPELL_EFFECT"
    				INT_VAR
    					"opcode" = 172 // Remove spell/ability
    					"target" = 1 // Self
    					"timing" = 1
    				STR_VAR
    					"resource" = "%SALAMANDER_BREATHE_FIREBALL%"
    				END
    				LPF "ADD_SPELL_EFFECT"
    				INT_VAR
    					"opcode" = 172 // Remove spell/ability
    					"target" = 1 // Self
    					"timing" = 1
    				STR_VAR
    					"resource" = "%MIND_FLAYER_PSIONIC_BLAST%"
    				END
    			BUT_ONLY_IF_IT_CHANGES
    		END
    	END
    
    	/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
    	/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
    	/////                                                  \\\\\
    	///// Polymorph Self, Shapechange:                     \\\\\
    	///// do not accidentally override a different         \\\\\
    	///// transformation                                   \\\\\
    	/////                                                  \\\\\
    	/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
    	/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
    
    	WITH_SCOPE BEGIN
    		COPY_EXISTING
    			"spwi489.spl" "override"
    			"spin150.spl" "override"
    			/* Feature blocks */
    			LPF "DELETE_EFFECT" END // delete current content
    			// op318 + EFF file trick => https://forums.beamdog.com/discussion/70593/getting-the-most-out-of-opcodes-318-and-177-effs
    			LPF "ADD_SPELL_EFFECT"
    			INT_VAR
    				"opcode" = 177 // Use EFF file
    				"target" = 1 // Self
    				"parameter2" = 2 // EA.IDS
    			STR_VAR
    				"resource" = "%DEST_RES%e"
    			END
    			// Visual effects
    			LPF "ADD_SPELL_EFFECT"
    			INT_VAR
    				"opcode" = 146 // Cast spell
    				"target" = 1 // Self
    				"parameter2" = 1 // Cast instantly (ignore level)
    				"timing" = 1
    			STR_VAR
    				"resource" = "gtnatfor"
    			END
    			// Make the V2 EFF file
    			PATCH_WITH_SCOPE BEGIN
    				INNER_ACTION BEGIN
    					CREATE "EFF" "%DEST_RES%e"
    						WRITE_LONG 0x10 0x13E // Effect ID: Protection from resource
    						WRITE_SHORT 0x2C 100 // Probability 1
    						WRITE_EVALUATED_ASCII 0x30 "%DEST_RES%" #8 // Resource
    						TO_UPPER "DEST_RES"
    						WRITE_EVALUATED_ASCII 0x94 "%DEST_RES%E" #8 // Parent resource (Important: This specific field always needs to be in ALLCAPS!!!)
    				END
    			END
    		BUT_ONLY_IF_IT_CHANGES
    	END
    
    	/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
    	/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
    	/////                                                  \\\\\
    	///// SPL files                                        \\\\\
    	/////                                                  \\\\\
    	/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
    	/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
    
    	WITH_SCOPE BEGIN
    		ACTION_CLEAR_ARRAY "polymorph_abilities"
    		ACTION_DEFINE_ASSOCIATIVE_ARRAY "polymorph_abilities" BEGIN
    			// SPL file , target , power , duration (put `0` if permanent) , savetype , savebonus , resist_dispel , minimum_level , maximum_level , subspell (put `""` if permanent) , poly creature (CRE resref) => ITM file (poly weapon)
    			/* Polymorph Self */
    			"%WIZARD_POLYMORPH_FLIND%" , "1" , "0" , "0" , "0" , "0" , "0" , "0" , "0" , "" , "plyflind" => "plyflind"
    			"%WIZARD_POLYMORPH_MUSTARD_JELLY%" , "1" , "0" , "0" , "0" , "0" , "0" , "0" , "0" , "" , "plyjelly" => "plyjelly"
    			"%WIZARD_POLYMORPH_OGRE%" , "1" , "0" , "0" , "0" , "0" , "0" , "0" , "0" , "" , "plyogre" => "plymstar"
    			"%WIZARD_POLYMORPH_SPIDER%" , "1" , "0" , "0" , "0" , "0" , "0" , "0" , "0" , "" , "plyspid2" => "plyspid"
    			"%WIZARD_POLYMORPH_BROWN_BEAR%" , "1" , "0" , "0" , "0" , "0" , "0" , "0" , "0" , "" , "bearbr" => "plybear2"
    			"%WIZARD_POLYMORPH_BLACK_BEAR%" , "1" , "0" , "0" , "0" , "0" , "0" , "0" , "0" , "" , "bearbl" => "plybear1"
    			"%WIZARD_POLYMORPH_WOLF%" , "1" , "0" , "0" , "0" , "0" , "0" , "0" , "0" , "" , "plywolf1" => "plywolf1"
    			/* Shapechange */
    			"%SHAPECHANGE_MIND_FLAYER%" , "1" , "0" , "0" , "0" , "0" , "0" , "0" , "0" , "" , "shmind" => "cdmindfl"
    			"%SHAPECHANGE_IRON_GOLEM%" , "1" , "0" , "0" , "0" , "0" , "0" , "0" , "0" , "" , "shiron" => "cdgoliro"
    			"%SHAPECHANGE_GREATER_WOLFWERE%" , "1" , "0" , "0" , "0" , "0" , "0" , "0" , "0" , "" , "shwolf" => "wolfgr"
    			"%SHAPECHANGE_EARTH_ELEMENTAL%" , "1" , "0" , "0" , "0" , "0" , "0" , "0" , "0" , "" , "shearth" => "earthrn"
    			"%SHAPECHANGE_FIRE_ELEMENTAL%" , "1" , "0" , "0" , "0" , "0" , "0" , "0" , "0" , "" , "shfire" => "firern"
    			"%SHAPECHANGE_GIANT_TROLL%" , "1" , "0" , "0" , "0" , "0" , "0" , "0" , "0" , "" , "shtroll" => "trollall"
    			/* Driud HLA */
    			"%CLERIC_ELEMENTAL_TRANSFORMATION_EARTH%" , "1" , "0" , "0" , "0" , "0" , "0" , "0" , "0" , "" , "druear01" => "druear"
    			"%CLERIC_ELEMENTAL_TRANSFORMATION_FIRE%" , "1" , "0" , "0" , "0" , "0" , "0" , "0" , "0" , "" , "drufir01" => "drufir"
    			/* Polymorph Other */
    			"%WIZARD_POLYMORPH_OTHER%" , "2" , "4" , "0" , "%BIT4%" , "0" , "%BIT0%" , "0" , "0" , "" , "squirr" => "squirp"
    			"spwm113" , "2" , "4" , "70" , "0" , "0" , "%BIT0%" , "0" , "0" , "spwm113a" , "spirwolf" => "plywolf1"
    		END
    		ACTION_PHP_EACH "polymorph_abilities" AS "poly_data" => "poly_weapon" BEGIN
    			ACTION_IF (FILE_EXISTS_IN_GAME "%poly_data_0%.spl") BEGIN
    				WITH_SCOPE BEGIN
    					COPY_EXISTING "%poly_data_0%.spl" "override"
    						/* Feature blocks */
    						LPF "DELETE_EFFECT" END // delete current content
    						// Refresh ability, Polymoph Self and Shapechange, and any other unlimited/at-will abilities
    						PATCH_MATCH "%poly_data_0%" WITH
    							"%WIZARD_POLYMORPH_FLIND%" "%WIZARD_POLYMORPH_SPIDER%" "%WIZARD_POLYMORPH_WOLF%" "%WIZARD_POLYMORPH_BLACK_BEAR%" "%WIZARD_POLYMORPH_BROWN_BEAR%" "%WIZARD_POLYMORPH_MUSTARD_JELLY%"
    							"%SHAPECHANGE_MIND_FLAYER%" "%SHAPECHANGE_IRON_GOLEM%" "%SHAPECHANGE_GREATER_WOLFWERE%" "%SHAPECHANGE_EARTH_ELEMENTAL%" "%SHAPECHANGE_FIRE_ELEMENTAL%" "%SHAPECHANGE_GIANT_TROLL%" BEGIN
    								LPF "ADD_SPELL_CFEFFECT"
    								INT_VAR
    									"opcode" = 172 // Remove spell/ability
    									"target" = 1 // Self
    									"timing" = 1
    									"insert_point" = "-1"
    								STR_VAR
    									"resource" = "%DEST_RES%"
    								END
    								LPF "ADD_SPELL_CFEFFECT"
    								INT_VAR
    									"opcode" = 171 // Give spell/ability
    									"target" = 1 // Self
    									"timing" = 1
    									"insert_point" = "-1"
    								STR_VAR
    									"resource" = "%DEST_RES%"
    								END
    							END
    							DEFAULT
    						END
    						// removes old polymorph, provides visual fx, removes form-specific innates
    						LPF "ADD_SPELL_EFFECT"
    						INT_VAR
    							"opcode" = 146 // Cast spell
    							"target" = "%poly_data_1%"
    							"power" = "%poly_data_2%"
    							"parameter2" = 1 // Cast instantly (ignore level)
    							"timing" = 1
    							"savingthrow" = "%poly_data_4%"
    							"savebonus" = "%poly_data_5%"
    							"resist_dispel" = "%poly_data_6%"
    							"dicenumber" = "%poly_data_7%"
    							"dicesize" = "%poly_data_8%"
    						STR_VAR
    							"resource" = "gtnatfor"
    						END
    						PATCH_IF ("%poly_data_3%" == 0) BEGIN
    							// if permanent duration...
    							LPF "ADD_SPELL_EFFECT"
    							INT_VAR
    								"opcode" = 111 // Create weapon
    								"target" = "%poly_data_1%"
    								"power" = "%poly_data_2%"
    								"timing" = 4
    								"duration" = 0
    								"savingthrow" = "%poly_data_4%"
    								"savebonus" = "%poly_data_5%"
    								"resist_dispel" = "%poly_data_6%"
    								"dicenumber" = "%poly_data_7%"
    								"dicesize" = "%poly_data_8%"
    							STR_VAR
    								"resource" = "%poly_weapon%"
    							END
    						END ELSE BEGIN
    							// if non-permanent duration...
    							LPF "ADD_SPELL_EFFECT"
    							INT_VAR
    								"opcode" = 146 // Cast spell
    								"target" = "%poly_data_1%"
    								"power" = "%poly_data_2%"
    								"parameter2" = 1 // Cast instantly (ignore level)
    								"timing" = 4
    								"duration" = 0
    								"savingthrow" = "%poly_data_4%"
    								"savebonus" = "%poly_data_5%"
    								"resist_dispel" = "%poly_data_6%"
    								"dicenumber" = "%poly_data_7%"
    								"dicesize" = "%poly_data_8%"
    							STR_VAR
    								"resource" = "%poly_data_9%" // subspell with `op111` and a duration
    							END
    						END
    					BUT_ONLY_IF_IT_CHANGES
    				END
    				// subspell with `op111` and a duration
    				ACTION_IF ("%poly_data_9%" STRING_COMPARE_CASE "") BEGIN
    					WITH_SCOPE BEGIN
    						COPY_EXISTING "%poly_data_0%.spl" "override/%poly_data_9%.spl"
    							/* Header */
    							WRITE_ASCII 0x10 ~~ #8
    							WRITE_LONG NAME1 "-1"
    							WRITE_LONG NAME2 "-1"
    							WRITE_LONG 0x1E 0
    							WRITE_SHORT 0x22 0
    							/* Feature block */
    							LPF "DELETE_EFFECT" END // delete current content
    							LPF "ADD_SPELL_EFFECT"
    							INT_VAR
    								"opcode" = 111 // Create weapon
    								"target" = "%poly_data_1%"
    								"duration" = "%poly_data_3%"
    							STR_VAR
    								"resource" = "%poly_weapon%"
    							END
    						BUT_ONLY_IF_IT_CHANGES
    					END
    				END
    				// poly weapon
    				WITH_SCOPE BEGIN
    					COPY_EXISTING "%poly_weapon%.itm" "override"
    						/* Feature block */
    						PATCH_IF ("%game_is_bgee%" OR "%game_is_iwdee%") BEGIN
    							LPF "ADD_ITEM_EQEFFECT"
    							INT_VAR
    								"opcode" = 144 // Disable button
    								"target" = 1
    								"parameter2" = IDS_OF_SYMBOL ("BUTTON" "BUTTON_DIALOG")
    								"timing" = 2
    							END
    							LPF "ADD_ITEM_EQEFFECT"
    							INT_VAR
    								"opcode" = 135 // Polymorph
    								"target" = 1
    								"timing" = 2
    							STR_VAR
    								"resource" = "%poly_data_10%"
    							END
    						END
    						PATCH_MATCH "%DEST_RES%" WITH
    							"plyjelly" "plyflind" "plywolf1" "plymstar" "plyspid" "plybear[1-2]" BEGIN
    								LPF "ADD_ITEM_EQEFFECT"
    								INT_VAR
    									"opcode" = 318 // Protection from resource
    									"target" = 1
    									"timing" = 2
    								STR_VAR
    									"resource" = "spwi489e"
    								END
    							END
    							"cdmindfl" "cdgoliro" "trollall" "wolfgr" "firern" "earthrn" BEGIN
    								LPF "ADD_ITEM_EQEFFECT"
    								INT_VAR
    									"opcode" = 318 // Protection from resource
    									"target" = 1
    									"timing" = 2
    								STR_VAR
    									"resource" = "spin150e"
    								END
    							END
    							DEFAULT
    						END
    					BUT_ONLY_IF_IT_CHANGES
    				END
    			END
    		END
    	END
    
    	/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
    	/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
    	/////                                                  \\\\\
    	///// ITM files                                        \\\\\
    	/////                                                  \\\\\
    	/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
    	/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
    
    	WITH_SCOPE BEGIN
    		ACTION_CLEAR_ARRAY "polymorph_items"
    		ACTION_DEFINE_ASSOCIATIVE_ARRAY "polymorph_items" BEGIN
    			// ITM file , target , power , duration (put `0` if permanent) , savetype , savebonus , resist_dispel , minimum_level , maximum_level , subspell (put `""` if permanent) , poly creature (CRE resref) => ITM file (poly weapon)
    			"wand09" , "2" , "4" , "0" , "%BIT3%" , "0" , "%BIT0%" , "0" , "0" , "" , "squirr" => "squirp" // Wand of Polymorphing
    			"bolt05" , "2" , "4" , "0" , "%BIT4%" , "0" , "%BIT0%" , "0" , "0" , "" , "squirr" => "squirp" // Bolt of Polymorphing
    			"clck04" , "2" , "0" , "120" , "0" , "0" , "0" , "0" , "0" , "clck04" , "spirwolf" => "plywolf1" // Relair's Mistake
    			//"clck27" , "2" , "0" , "120" , "0" , "0" , "0" , "0" , "0" , "" , "spirwolf" => "plywolf1" // Cloak of the Sewers
    			"figure01" , "2" , "0" , "24" , "0" , "0" , "0" , "0" , "0" , "figure01" , "" => "shakti1" // Shakti Figurine
    		END
    		ACTION_PHP_EACH "polymorph_items" AS "poly_data" => "poly_weapon" BEGIN
    			ACTION_IF (FILE_EXISTS_IN_GAME "%poly_data_0%.itm") BEGIN
    				WITH_SCOPE BEGIN
    					COPY_EXISTING "%poly_data_0%.itm" "override"
    						/* Feature blocks */
    						LPF "DELETE_EFFECT" END // delete current content
    						// removes old polymorph, provides visual fx, removes form-specific innates
    						LPF "ADD_ITEM_EFFECT"
    						INT_VAR
    							"type" 99 // All types (ability / extended header)
    							"opcode" = 146 // Cast spell
    							"target" = "%poly_data_1%"
    							"power" = "%poly_data_2%"
    							"parameter2" = 1 // Cast instantly (ignore level)
    							"timing" = 1
    							"savingthrow" = "%poly_data_4%"
    							"savebonus" = "%poly_data_5%"
    							"resist_dispel" = "%poly_data_6%"
    							"dicenumber" = "%poly_data_7%"
    							"dicesize" = "%poly_data_8%"
    						STR_VAR
    							"resource" = "gtnatfor"
    						END
    						PATCH_IF ("%poly_data_3%" == 0) BEGIN
    							// if permanent duration...
    							LPF "ADD_ITEM_EFFECT"
    							INT_VAR
    								"type" 99 // All types (ability / extended header)
    								"opcode" = 111 // Create weapon
    								"target" = "%poly_data_1%"
    								"power" = "%poly_data_2%"
    								"timing" = 4
    								"duration" = 0
    								"savingthrow" = "%poly_data_4%"
    								"savebonus" = "%poly_data_5%"
    								"resist_dispel" = "%poly_data_6%"
    								"dicenumber" = "%poly_data_7%"
    								"dicesize" = "%poly_data_8%"
    							STR_VAR
    								"resource" = "%poly_weapon%"
    							END
    						END ELSE BEGIN
    							// if non-permanent duration...
    							LPF "ADD_ITEM_EFFECT"
    							INT_VAR
    								"type" 99 // All types (ability / extended header)
    								"opcode" = 146 // Cast spell
    								"target" = "%poly_data_1%"
    								"power" = "%poly_data_2%"
    								"parameter2" = 1 // Cast instantly (ignore level)
    								"timing" = 4
    								"duration" = 0
    								"savingthrow" = "%poly_data_4%"
    								"savebonus" = "%poly_data_5%"
    								"resist_dispel" = "%poly_data_6%"
    								"dicenumber" = "%poly_data_7%"
    								"dicesize" = "%poly_data_8%"
    							STR_VAR
    								"resource" = "%poly_data_9%" // subspell with `op111` and a duration
    							END
    						END
    					BUT_ONLY_IF_IT_CHANGES
    				END
    				// subspell with `op111` and a duration
    				ACTION_IF ("%poly_data_9%" STRING_COMPARE_CASE "") BEGIN
    					WITH_SCOPE BEGIN
    						ACTION_MATCH "%poly_data_9%" WITH
    							"clck04" "figure01" BEGIN
    								COPY_EXISTING "gtnatfor.spl" "override/%poly_data_9%.spl"
    									/* Header */
    									WRITE_ASCII 0x10 ~~ #8
    									WRITE_LONG NAME1 "-1"
    									WRITE_LONG NAME2 "-1"
    									WRITE_LONG 0x1E 0
    									WRITE_SHORT 0x22 0
    									/* Feature block */
    									LPF "DELETE_EFFECT" END // delete current content
    									LPF "ADD_SPELL_EFFECT"
    									INT_VAR
    										"opcode" = 111 // Create weapon
    										"target" = "%poly_data_1%"
    										"duration" = "%poly_data_3%"
    									STR_VAR
    										"resource" = "%poly_weapon%"
    									END
    								BUT_ONLY_IF_IT_CHANGES
    							END
    							DEFAULT
    						END
    					END
    				END
    				// poly weapon
    				WITH_SCOPE BEGIN
    					COPY_EXISTING "%poly_weapon%.itm" "override"
    						/* Feature block */
    						PATCH_IF ("%game_is_bgee%" OR "%game_is_iwdee%") BEGIN
    							LPF "ADD_ITEM_EQEFFECT"
    							INT_VAR
    								"opcode" = 144 // Disable button
    								"target" = 1
    								"parameter2" = IDS_OF_SYMBOL ("BUTTON" "BUTTON_DIALOG")
    								"timing" = 2
    							END
    							LPF "ADD_ITEM_EQEFFECT"
    							INT_VAR
    								"opcode" = 135 // Polymorph
    								"target" = 1
    								"timing" = 2
    							STR_VAR
    								"resource" = "%poly_data_10%"
    							END
    						END
    					BUT_ONLY_IF_IT_CHANGES
    				END
    			END
    		END
    	END
    END

     

    Got some questions:

    On 4/8/2022 at 11:07 PM, kjeron said:

    Any given polymorph/shapechange ability would contain::
    op146: timing=0, duration=0, saving throw(if hostile), resource=(unified natural form) // removes old polymorph, provides visual fx, removes form-specific innates.

    Did you mean timing=4...? Also, generally speaking: "timing=4, duration=0" is basically the same as "timing=1, duration=0", right? It's just this specific case (op135 bug) that requires "timing=4, duration=0"...? Or is it related to op335...?

    On 4/8/2022 at 11:07 PM, kjeron said:

    unified natural form:
    op321: resource=(???) // Remove slayer-change delayed damage effects. // if necessary

    What should I put here exactly...?

    On 4/9/2022 at 2:26 AM, kjeron said:

    Those two can easily be repurposed to achieve that.  Each of their polymorph weapons would be given an immunity effect (op318) with a resource (SubA) shared by all for that spell.

    Guess that the Clock of the Sewers should receive a similar treatment, right...?

    On 4/9/2022 at 2:26 AM, kjeron said:

    This is something a (single) spellstate could accomplish, using op335.  By giving every voluntary polymorph weapon the same 335 effect (same spellstate) with resource=(same natural form ability), the ability will automatically be given when you create the item & removed when you remove the weapon.  You would always and only have the natural form ability while polymorphed in any voluntary form.  The 0-second delay I referenced prior will also get around the issues op335 has regarding using the same spellstate.

    What should I put in "7eyes.2da"...? What about `parameter2` of op335...?

    What is exactly this issue => "The 0-second delay I referenced prior will also get around the issues op335 has regarding using the same spellstate.". Better to put it on the IESDP me thinks...

    On 4/9/2022 at 2:26 AM, kjeron said:

    If the normal weapon-creation spells continue to cancel polymorphs (at least voluntary ones), they can cast (op326) the same natural form ability (if POLYMORPHED stat = 1), right before opcode 111, to remove those effects as well, with a momentary (0-duration) immunity to op135 so the newly created weapon doesn't get cleared.

    So how these op326 / op101 integrate with the rest...?

    Basically, they should go right before

    On 4/8/2022 at 11:07 PM, kjeron said:
    • op111: timing=4, duration=0, saving throw(if hostile), resource=(item) // if permanent duration.
    • op146: timing=4, duration=0, saving throw(if hostile), resource=(subspell with op111 and a duration) // if non-permanent duration.

    ...?

  13. 1 hour ago, argent77 said:

    List of duplicate entries in SPELL.IDS:

      Reveal hidden contents

    BGEE (with or without SoD😞
    2924 BERESH_CHANGE
    2924 WIZARD_SUMMON_PLANATAR_EVIL

    2925 KAISHAS_CHANGE
    2925 WIZARD_COMET

    3899 RED_EFFECT
    3899 ZOMBIE_SICKNESS

    BG2EE:
    2124 WIZARD_ALARM
    2124 WIZARD_NAHALS_RECKLESS_DWEOMER

    2302 WIZARD_DISPEL_MAGIC
    2302 WIZARD_REMOVE_MAGIC

    2705 WIZARD_KHELBENS_WARDING_WHIP
    2705 WIZARD_WARDING_WHIP

    2921 WIZARD_IMPROVED_ALACRITY
    2921 WIZARD_IMPROVED_ALUCRITY

    2924 BERESH_CHANGE
    2924 WIZARD_SUMMON_PLANATAR_EVIL

    2925 KAISHAS_CHANGE
    2925 WIZARD_COMET

    3123 DRUID_HUMAN_FORM
    3123 DRUID_SHAPESHIFT_FROM_BLACKBEAR

    3899 RED_EFFECT
    3899 ZOMBIE_SICKNESS

    4321 BERSERKER_ENRAGE
    4321 BERSERKER_RAGE

    4412 SET_SNARE_TRAP
    4412 THIEF_SET_SNARE

    4414 SET_SPECIAL_SNARE_TRAP
    4414 THIEF_SET_SPECIAL_SNARE

    IWDEE:
    4103 AURA_OF_DESPAIR
    4103 BLACKGUARD_AURA_OF_DESPAIR

    Guess that the goal is to have the same human-friendly identifiers across all games, right...?

    I'm not sure though... I mean, on BG:EE I'd delete WIZARD_SUMMON_PLANATAR_EVIL and keep BERESH_CHANGE, whereas on BG2:EE I'd do the opposite (since the HLA is actually available there...)

  14. On 4/25/2022 at 7:04 PM, CamDawg said:

    More than likely the description--like everything else--was simply copied from PnP and then implemented within the framework of what makes a good game.

    When we have a conflict, we look for other sources; e.g. Hive Mothers specifically target undead summons with Cause Wounds. The devs did not view this as a restriction.

     

    Yeah, you're right...

    I also found this block

    Spoiler
    IF
    	See(NearestMyGroupOfType([EVILCUTOFF.0.0.TANARI]))
    	HPPercentLT(LastSeenBy(Myself),50)
    	!HPPercentLT(Myself,50)
    	!GlobalTimerNotExpired("Healing","LOCALS")
    THEN
    	RESPONSE #100
    		SetGlobalTimer("Healing","LOCALS",ONE_ROUND)
    		SetInterrupt(FALSE)
    		SpellNoDec(LastSeenBy(Myself),CLERIC_CURE_CRITICAL_WOUNDS)  // SPPR502.SPL (Cure Critical Wounds)
    		SetInterrupt(TRUE)
    END

     

    in "demsuc.bcs", which is equally weird... Guess I'll leave things as they are...

    Anyway, since I've already written the code, I just commented it out in case you want to include it into the "Optional, but we think it's cool" mod component...

  15. 1 hour ago, mickabouille said:

    actually I don't even know if we can heal her in the unmodified game (never played with her).

    Yes, you can heal her...

    1 hour ago, CamDawg said:

    Yes. In this case specifically, we need to update the descriptions.

    That's bad IMHO...

    It appears as if the original devs wrote that clause but never actually implemented it because they did not think about potential unnatural joinable NPCs... and at the same time they thought the player would never waste his healing spells to heal his allied (summoned) skeleton warriors (though this may be relevant / noticeable when casting the 5th-level spell "Mass Cure"...)

    On top of that, everything that applies op224 (Restoration) and op216 (Level Drain) should receive the same treatment (for consistency reasons – the fact that Haer'Dalis is vulnerable to Level Drain is kinda weird / bad), so in the end this would be a nerf and a buff at the same time...

  16. 20 hours ago, hook71 said:

    SoD - Paralytic Bolt should have the correct saving throw type, weight, and stun duration

    What about resist_dispel...?

    Currently, op45/142 are Dispellable and Bypass MR, whereas op139 does not bypass MR (dispellability is irrelevant here since it's an instantaneous effect).

    Guess that they should all be coded as `resist_dispel=0` (Natural/Nonmagical, i.e., Not dispel/Bypass MR) so as to match other ITM on-hit effects...?

  17. On 3/17/2022 at 3:31 AM, CamDawg said:

    Spell fixes

    • Resolving conflicts between spell description and what the spell actually does (generally in favor of the description)

    Does this mean that BG cure / cause wounds spells / abilities should match their IWD counterparts (i.e., they should not affect unnatural creatures)...?

    Spell description specifically states that "This healing cannot affect creatures without corporeal bodies, nor can it cure wounds of creatures not living or of extraplanar origin."

    The most noticeable in-game effect would be that the player will no longer be able to heal NPCs such as Haer'Dalis or Caelar... Not much of an issue, right...?

  18. Some more fixes

    Spoiler

    [bg, bg2]

    • [bg] add missing spell.ids entries.
    • [sod] Make sure plants are properly flagged as such
    • Chill Touch – better feedback for the player when attacking Golems or Undead
    • Shocking Grasp – should not interact with spell protections
    • Ghoul Touch – should not interact with spell protections
    • Melf's Minute Meteors – should not interact with spell protections
    • Black Blade of Disaster – should not interact with spell protections and Magic Resistance
    • Energy Blade – should not interact with spell protections
    • Hamatula, Barbed Defense – Suppress misleading "One of the spell has failed" message
    • Lesser Fire Spirit – Suppress misleading "One of the spell has failed" message
    • Shield of Barnassus: The Suncatcher – Suppress misleading "One of the spell has failed" message
    • Grease – Remove duplicate op321 effect
    • Blindness – op74 naturally provides the "Blind" portrait icon
    • Magic Missile – provide better feedback for the player when you cast it at someone protected by WIZARD_SHIELD
    • Chromatic Orb
      • op74 naturally provides the "Blind" portrait icon
      • op45 naturally provides the "Stun" portrait icon
    • Larloch's Minor Drain
      • power levels fixes
      • subspell should not play casting graphics and casting sound
    • Chill Touch – should not interact with spell protections
    • Detect Evil
      • should not interact with spell protections
      • creatures flagged as STATE_NONDETECTION (see f.i. "Cloak of Non-Detection: Whispers of Silence") should not be immune to it
    • Stinking Cloud
      • op39 can automatically display a portrait icon, there's no need to apply a separate op142 effect
      • remove the "Bypass Mirror Image" flag (it's only relevant for opcode #12 and opcode #25)
      • provide better feedback for the player when attacking Golems or Undead
    • Chaos Shield – remove duplicate op328 effect
    • Deafness
      • should not bypass Magic Resistance
      • should be dispellable
    • Glitterdust – op74 naturally provides the "Blind" portrait icon
    • Darkness, 15' Radius – op74 naturally provides the "Blind" portrait icon
    • Flame Arrow – op12 effects should have a duration of 0 (this is probably irrelevant, but just in case...)
    • Haste – op16 naturally provides the "Haste" portrait icon
    • Slow – op40 naturally provides the "Slow" portrait icon
    • Lightning Bolt – remove duplicate op318 effect
    • Protection From Normal Missiles – remove duplicate op328 effect
    • Vampiric Touch
      • subspell's effects should have power=0
      • subspell should not play casting graphics and casting sound
      • subspell's type should match its parent (to maintain casting level!)
    • Wraithform – make sure all limited effects are dispellable
    • Minor Spell Deflection – remove duplicate op328 / op233 effects
    • Improved Invisibility – Applying "Improved" Invisibility will cause the effect to be duplicated, with the duplicate using "Normal" invisibility
    • Op78 can automatically display a portrait icon, there's no need to apply a separate op142 effect
    • Emotion, Hopelessness
      • Op39 can automatically display a portrait icon, there's no need to apply a separate op142 effect
    • Cloudkill
      • Remove the "Bypass Mirror Image" flag from op55 / op215 / op174 (it's only relevant for opcode #12)
    • Shadow Door
      • Applying "Improved" Invisibility will cause the effect to be duplicated, with the duplicate using "Normal" invisibility.
    • Feeblemind – make sure it is truly permanent (until dispelled or character death)
    • Protection From Normal Weapons – remove duplicate op328 effect
    • Minor Spell Turning – remove duplicate op328 / op233 effects
    • Improved Haste
      • make sure all effects bypass Magic Resistance
      • op16 naturally provides the "Improved Haste" portrait icon
      • add missing protection against Ranger Haste
    • Spell Deflection – remove duplicate op328 / op233 effects
    • Stone to Flesh – make sure all effects bypass Magic Resistance
    • Spell Turning – remove duplicate op328 / op233 effects
    • Sphere of Chaos – make sure all effects are subjected to Magic Resistance
    • Prismatic Spray – op74 naturally provides the "Blind" portrait icon
    • Mass Invisibility
      • Applying "Improved" Invisibility will cause the effect to be duplicated, with the duplicate using "Normal" invisibility.
      • "Improved" Invisibility naturally provides a bonus of 4 to all saves, there's no need for separate op33-37 effects.
    • Power Word, Blind – op74 naturally provides the "Blind" portrait icon
    • Symbol, Stun – op45 naturally provides the "Stun" portrait icon
    • Spell Trap – remove duplicate op328 / op282 effects
    • Energy Drain – provide better feedback for the player
    • Ice Storm should last 4 rounds (not 3)

     

  19. 15 hours ago, CamDawg said:

    First is Nature's Beauty, specifically, making it work only on general = humanoid.

    Pretty much what DavidW said...

    I mean, op55 (Slay) targets HUMANOID and there are a lot of unnatural (non-HUMANOID) creatures that are immune it (see for instance the following creature skins: "ring95.itm", "vamp.itm", "wight.itm", "wraith1.itm", "bdplant.itm", "bdspirit.itm", ...)

  20. 13 hours ago, CamDawg said:

    One interpretation is that on 10% of all hits there's an extra point of fire damage, so Neera gets hit 5% of the time and her target 5% (so 0-4 for Neera, 5-9 for the target, 10-99 for nothing). Another is that 10% of hits will get Neera a point of fire damage, and then a separate 10% for the target to get hit (so 0-9 for Neera, 10-19 for the target, 20-99 for nothing).

    Good to know.

    Feel free to change it to 0-4, 5-9 if that's indeed more appropriate... Let us wait for additional feedback from other people for the time being...

    In any case, we shouldn't probably fix the probability range (the 1% off) here, that should be done in "6037_probabilities.tph" (so that we do not lose track of this item...)

  21. 1 hour ago, kjeron said:

    STAT POLYMORPHED already exists, why waste spellstates for this.

    True, but you can only set it via op135, p2=0 (Change into)... But that is bugged when you shapechange between two different non-natural forms...

    Moreover, you cannot set it via op233 (it's not a weapon proficiency), nor via op282...

    So basically either we add a new splstate or we need to avoid shapechanging between two different non-natural forms...

    1 hour ago, kjeron said:

    The numerous "Human/Natural Form" abilities need to go, condensed into a single ability.

    True.

    As you suggested, it should be attached to SLOT_FIST, so it's always available...

×
×
  • Create New...