Polymorph limitations
seraglio
Member Posts: 122
I've been playing around with polymorphs(opcode135) recently and noticed that the head slot is not used when a player polymorphs. Chest slot seems to be retained. Also noticed that only STR and DEX (not CON), come from the .cre file. Anyone have a complete list of how polymorphs work? For instance do resistances from the Cre set or increment existing resistances?
0
Comments
Could you shed some light? Thanks
However, it stacks in the same manner as (most) other effects. Any effect that "increments" will not conflict with Polymorphing, aside from those that permanently affect the base stat (Manual of Gainful Exercise).
Effects that "Set" values from Abilities override equipped effects that "Set" those values (for almost every opcode*). In BGEE/SOD, the Polymorph effect is applied by the spell, while in BG2EE it is applied by the item(weapon). Effects of each type (Equipped/Ability) stack in the order they were applied, with the most recent having priority.
When the polymorph comes from an equipped effect, the Item Slot of other effects matters only in regards to loading the game - as all equipped items are re-equipped in a set order when the game is loaded.
When the polymorph comes from an ability, any abilities used prior to polymorphing that set those stats will be overridden by the polymorph, while abilities used after the polymorphing will override the polymorph stats. A polymorph from an ability will always override any stats set by equipped effects.
*Op0 (Modify AC) has a "Set Base AC" mode that always uses the "Best" value from all effects. The Base AC set by polymorph does not have this behavior.
*Op1 (Modify APR) has a "Set Final" mode that can override any other source (excluding haste/slow AFAIK).
*Op129/130/131/132/133/137 (Aid, Bless, Chant, DUHM, Luck, Bad Chant) stack in reverse order (equipped effects will override abilties, both are overridden by the base states).
Is this "In BGEE/SOD, the Polymorph effect is applied by the spell, while in BG2EE it is applied by the item(weapon)" somewhat relevant?
In BGEE/SOD, spells that set stats will only override the stats set by polymorph if cast after the polymorph, while items will never override them.
In BG2EE, spells will always override the stats set by polymorph, while items that set stats will only override them if equipped after the polymorph.
Moreover, can you confirm that in order to "fix" this issue => https://support.baldursgate.com/issues/20603, you need to delete the existing opcode #135 and use opcode #53 as an equipped effect on the creature weapon or opcode #135 (param #2 = 1) as an equipped effect on the creature weapon + adding resistances (opcodes #89, #88, #87, #29 and so forth) as equipped effects on the creature weapon (if any)?
Yeah, you're right, it feels more customizable..... Moreover, I was thinking of blocking access to the Inventory screen (op#144, param#2 = 15). I mean, you should not be able to adjust your equipment while polymorphed into a slime
According to NearInfinity, opcode #135 has three 'Appearance only' modes (param#2 = 1, param#2 = 2, param#2 = 3). I assume they're all equivalent, right?
Which is to say that it will clear all Polymorph effects if Param2 = -1, else it will only clear Polymorph effects that have a Param2 that matches.
@Luke93 Human/Natural form abilities end polymorph effects with param2=0, so they will not remove animation-only polymorphs (unless the effects are on the weapon, which would be removed), which is intended, so that it will not remove effects such as the Drow Transformation spell that is cast on the party in BG2EE.
Another interesting issue - the creature you're polymorphing into cannot have STATE_SLEEPING, STATE_FROZEN_DEATH, STATE_STONE_DEATH, STATE_FLAME_DEATH, or STATE_DEAD set in it's CRE file, or the game will crash. Seems to be two common factors - states that color the creature's animation (FROZEN,STONE,FLAME) and states that already crash if forced to take actions not listed in ACTSLEEP.IDS (SLEEPING, DEAD).
So, are you saying they're currently removing all polymorph effects that have param#2 = 0? And all the other polymorph effects are instead removed by opcode #112 (Remove item)?
In BGEE, the Polymorph is in the spell, removing the weapon doesn't remove the polymorph effect, and removing the effect doesn't remove the weapon, so both are needed.
In BG2EE, the Polymorph is on the weapon, removing the effect is only temporary - it will be reapplied if you save and reload, as all items gets re-equipped on load. Removing the weapon will remove both the weapon and the effect.
Guess the same holds if I use op#53 instead of op#135 (p2=0), doesn't it?
A related question: multiple applications of opcode #111 (Create weapon) automatically remove whatever ITM is in the Magical Weapon slot (if any!) before creating the ITM specified by the resource field, right? If that's the case, then only the 'Return to Human Form' SPL needs opcode #112 (Remove item), correct?
The "Return to Human Form" ability still needs both (op111 then op112), so that it "knows" which item it is removing. You can't drop op112 and just use op111 with an empty resource field, as doing so is prone to crashing (not consistently, but it happens).
That implies creating a "Return to Human Form" ability per opcode #111... It's not ideal with something like WIZARD_POLYMORPH_SELF that grants several forms... In such cases it's probably better to code a single "Return to Human Form" ability which collects all the necessary op#112...
And what about SPIN160.spl (SALAMANDER_BREATHE_FIREBALL) and the like? If I create an item that lets you shapeshift into something, then I should remember to apply op#172 referencing those SPLs... But I cannot know how many there are in the game (if you also take into accounts other mods...)
This would mostly be irrelevant if the Magical Weapon slot would allow Item Abilities, or if op171 could function temporarily "While Equipped".
@subtledoctor
What you're suggesting is not enough. As kjeron said, you should also patch every other polymorph ability in the game so as to remove whatever you're adding via opcode #171, and there's no (easy?) way to know what items/spells grant polymorph abilities...
Another altnerative would be to abandon granting the "Natural Form" ability, and add an item ability to "FIST.ITM" (and any Monk fists) to cast it. This way it would always be available, and hostile polymorphs could disable the "Use Item" button to block it's use.
Yes, that's exactly what I'd like to avoid.
Option #1 and #3 are definitely the best options here, but:
Sorry to bother you again, but the same holds for the 'Return to Natural Form' abilities, right? That is, you need to take into account all of them and apply op#172 referencing them whenever you shapeshift into something / return to your original form or your 'Innate Abilities' menu will be filled with 'Return to Natural Form' abilities, correct? For instance, cast WIZARD_POLYMORPH_SELF, shapeshift into a Flind and then activate 'CLCK04.itm' (Relair's Mistake).... Of course, this issue is due to the fact that there are many 'Return to Natural Form' abilities in the game....