Problem: The Cloak of the Wolf (CLCK04) allows the user to change into a wolf, but the only way to return to being a human is to wait for the effect of the spell to wear off.
Desired Behaviour: There should be a way for the character to change back into a human.
@SethDavis The cloak uses opcode 53, animation change, instead of opcode polymorph. I guess that means you revert back after 2 minutes, but the normal-form spell does not undo the animation.
This should make it functionally equivalent to how it is now, but allow back-to-human to do its stuff:
COPY_EXISTING clck04.itm override LPF DELETE_ITEM_EFFECT INT_VAR opcode_to_delete = 53 END LPF ADD_ITEM_EFFECT INT_VAR insert_point = 0 opcode = 135 target = 1 duration = 120 STR_VAR resource = WOLF END
@Wisp I've been messing around with this, and that doesn't work either--the return polymorph only works if param2 is set to 0. I was about to fire up BG2 to see if this is a BGEE issue or if BG2 works the same way.
Well then, set p2 to 0 and insert the polymorph effect as the first effect. That should work, although the wearer would have to live with being a bit more of an authentic wolf than before.
OK, got this working through a lot of deviousness. The effects of the cloak have been moved to a new paw which in turn required was updating some of the other polymorph abilities to account for the new item. Works dandy, though.
ACTION_IF !FILE_EXISTS_IN_GAME cdwolfm.itm BEGIN // prevents double patching
// allow arbitrary return-to-human form from clock of the wuff COPY_EXISTING ~clck04.itm~ ~override~ LPF DELETE_ITEM_EFFECT INT_VAR opcode_to_delete = "-1" END // delete all effects LPF ADD_ITEM_EFFECT INT_VAR opcode = 215 target = 1 parameter2 = 1 duration = 3 STR_VAR resource = sppolymp END LPF ADD_ITEM_EFFECT INT_VAR opcode = 215 target = 1 parameter2 = 1 duration = 3 STR_VAR resource = polyback END LPF ADD_ITEM_EFFECT INT_VAR opcode = 171 target = 1 duration = 120 STR_VAR resource = spin122 END LPF ADD_ITEM_EFFECT INT_VAR opcode = 111 target = 1 duration = 120 STR_VAR resource = cdwolfm END PATCH_FOR_EACH spell IN spin124 spin123 spin122 spwi491 spinhum spin160 spin160 spin160 BEGIN LPF ADD_ITEM_EFFECT INT_VAR opcode = 172 target = 1 timing = 1 STR_VAR resource = EVAL "%spell%" END END
There is a big problem with the item at the moment, though; the AC bonus from the polymorph seems to stick around. And it stacks if you keep transforming and reverting back. I don't want to be tempted to do this for an exploit, so I'm going to end up leaving the cloak off. I hope the AC bonus wears off after I rest; I just came to give the news.
The cloak works mostly fine but i have a following bug:
when the polymorph effect expires (doesn't last a very long time for me), and the character turns to human, the return to original form special ability button remains available (and it shouldn't, since you can't turn to human if you're already human) when i then press that button, it produces the effect that the spell animation replays a several times, but other than that nothing scary happens.
Comments
Thanks, I'll change this into a bug thread.
well.... I can get my hands back now.... The innate restores my ability to use items, but the paperdoll/animation is still a wolf.
All of the spells mentioned in the code are ineffective. A watchers quarter staff is surprisingly effective at the highest difficulty.
The cloak uses opcode 53, animation change, instead of opcode polymorph. I guess that means you revert back after 2 minutes, but the normal-form spell does not undo the animation.
This should make it functionally equivalent to how it is now, but allow back-to-human to do its stuff: Edit, on account of Cam's comment.
I've been messing around with this, and that doesn't work either--the return polymorph only works if param2 is set to 0. I was about to fire up BG2 to see if this is a BGEE issue or if BG2 works the same way.
Now when the Cloak of the Wolf is used, a "Shapeshift Natural Form" ability is added to the Special Abilities menu.
One was appearing before--the problem was that it didn't work.
It works now though!
when the polymorph effect expires (doesn't last a very long time for me), and the character turns to human, the return to original form special ability button remains available (and it shouldn't, since you can't turn to human if you're already human)
when i then press that button, it produces the effect that the spell animation replays a several times, but other than that nothing scary happens.