Skip to content

[BG1] Cloak of the Wolf allows you to turn into a wolf, but not back to a human.

TanthalasTanthalas Member Posts: 6,738
edited November 2012 in Fixed
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.
Post edited by Tanthalas on

Comments

  • WispWisp Member Posts: 1,102
    I imagine a fix for this will be posted as part of the G3 Fixpack package (there is a fix for this in there).
  • TanthalasTanthalas Member Posts: 6,738
    Ah ok. Thanks again.
  • CamDawgCamDawg Member, Developer Posts: 3,438
    // cloak of the wuff needs some work; clean up druid transformation spells and give a return to human innate
    COPY_EXISTING ~clck04.itm~ ~override~
    READ_LONG 0x64 "abil_off"
    READ_SHORT 0x68 "abil_num"
    READ_LONG 0x6a "fx_off"
    SET "fx_delta" = 0
    SET "abil_length" = 0x38
    FOR (index = 0 ; index < abil_num ; index = index + 1) BEGIN
    READ_SHORT ("%abil_off%" + 0x1e + ("%abil_length%" * "%index%")) "abil_fx_num"
    READ_SHORT ("%abil_off%" + 0x20 + ("%abil_length%" * "%index%")) "abil_fx_idx"
    SET "abil_fx_idx" = ("%abil_fx_idx%" + "%fx_delta%")
    WRITE_SHORT ("%abil_off%" + 0x20 + ("%abil_length%" * "%index%")) "%abil_fx_idx%"
    FOR (index2 = 0 ; index2 < 8 ; index2 = index2 + 1) BEGIN
    INSERT_BYTES ("%fx_off%" + ("%abil_fx_idx%" * 0x30)) 0x30
    WRITE_SHORT ("%fx_off%" + ("%abil_fx_idx%" * 0x30)) 172 // opcode: remove spell
    WRITE_BYTE ("%fx_off%" + 0x02 + ("%abil_fx_idx%" * 0x30)) 1 // target: self
    WRITE_BYTE ("%fx_off%" + 0x0c + ("%abil_fx_idx%" * 0x30)) 1 // instant/permanent
    WRITE_LONG ("%fx_off%" + 0x12 + ("%abil_fx_idx%" * 0x30)) 100 // probability
    WRITE_ASCII ("%fx_off%" + 0x14 + ("%abil_fx_idx%" * 0x30)) ~spin160~ // probability
    END
    WRITE_ASCII ("%fx_off%" + 0x14 + (("%abil_fx_idx%" + 3) * 0x30)) ~spinhum~
    WRITE_ASCII ("%fx_off%" + 0x14 + (("%abil_fx_idx%" + 4) * 0x30)) ~spwi491~
    WRITE_ASCII ("%fx_off%" + 0x14 + (("%abil_fx_idx%" + 5) * 0x30)) ~spin122~
    WRITE_ASCII ("%fx_off%" + 0x14 + (("%abil_fx_idx%" + 6) * 0x30)) ~spin123~
    WRITE_ASCII ("%fx_off%" + 0x14 + (("%abil_fx_idx%" + 7) * 0x30)) ~spin124~
    // finally, add return-to-human innate
    INSERT_BYTES ("%fx_off%" + (("%abil_fx_idx%" + "%abil_fx_num%" + 8) * 0x30)) 0x30
    WRITE_SHORT ("%fx_off%" + (("%abil_fx_idx%" + "%abil_fx_num%" + 8) * 0x30)) 171 // opcode: give innate ability
    WRITE_BYTE ("%fx_off%" + 0x02 + (("%abil_fx_idx%" + "%abil_fx_num%" + 8) * 0x30)) 1 // target: self
    WRITE_LONG ("%fx_off%" + 0x0e + (("%abil_fx_idx%" + "%abil_fx_num%" + 8) * 0x30)) 120 // duration
    WRITE_LONG ("%fx_off%" + 0x12 + (("%abil_fx_idx%" + "%abil_fx_num%" + 8) * 0x30)) 100 // probability
    WRITE_ASCII ("%fx_off%" + 0x14 + (("%abil_fx_idx%" + "%abil_fx_num%" + 8) * 0x30)) ~spin122~ // resref
    WRITE_SHORT ("%abil_off%" + 0x1e + ("%abil_length%" * "%index%")) ("%abil_fx_num%" + 9)
    SET "fx_delta" = ("%fx_delta%" + 9)
    END
    BUT_ONLY_IF_IT_CHANGES
  • TanthalasTanthalas Member Posts: 6,738
    @CamDawg

    Thanks, I'll change this into a bug thread.
  • SethDavisSethDavis Member Posts: 1,812
    edited August 2012
    checking this one now

    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.
    Post edited by SethDavis on
  • WispWisp Member Posts: 1,102
    edited August 2012
    @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
    Edit, on account of Cam's comment.
    Post edited by Wisp on
  • CamDawgCamDawg Member, Developer Posts: 3,438
    @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.
  • WispWisp Member Posts: 1,102
    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.
  • CamDawgCamDawg Member, Developer Posts: 3,438
    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

    COPY_EXISTING ~wolfm.itm~ ~override/cdwolfm.itm~
    LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 60 target = 1 timing = 2 parameter1 = 100 END
    LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 60 target = 1 timing = 2 parameter1 = 100 parameter2 = 1 END
    LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 53 target = 1 timing = 2 parameter1 = 31488 END
    LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 44 target = 1 timing = 2 parameter1 = 18 parameter2 = 1 END
    LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 15 target = 1 timing = 2 parameter1 = 17 parameter2 = 1 END
    LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 215 target = 1 parameter2 = 1 duration = 117 timing = 3 STR_VAR resource = sppolymp END
    LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 215 target = 1 parameter2 = 1 duration = 117 timing = 3 STR_VAR resource = polyback END

    // now add removal of cdwolfm.itm to spells that already have removal of wolfm
    COPY_EXISTING ~spin150.spl~ ~override~
    ~spin151.spl~ ~override~
    ~spin152.spl~ ~override~
    ~spin153.spl~ ~override~
    ~spin154.spl~ ~override~
    ~spin155.spl~ ~override~
    ~spin156.spl~ ~override~
    ~spin157.spl~ ~override~
    LPF ADD_SPELL_EFFECT INT_VAR opcode = 112 target = 1 timing = 1 STR_VAR resource = cdwolfm END

    END
  • SethDavisSethDavis Member Posts: 1,812
    Potentially fixed - @CamDawg's fix has been applied
  • TanthalasTanthalas Member Posts: 6,738
    Confirmed Fixed in Build 0924

    Now when the Cloak of the Wolf is used, a "Shapeshift Natural Form" ability is added to the Special Abilities menu.
  • CamDawgCamDawg Member, Developer Posts: 3,438
    @Tanthalas
    One was appearing before--the problem was that it didn't work.
  • TanthalasTanthalas Member Posts: 6,738
    Oh, I didn't even notice it before.

    It works now though!
  • CamDawgCamDawg Member, Developer Posts: 3,438
    Confirmed this is fixed in 0924.
  • XeviatXeviat Member Posts: 9
    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.
  • HooHoo Member Posts: 128
    This problem has been issued in BGT, but I'm not sure the problem even occured in BG1.
  • bob_vengbob_veng Member Posts: 2,308
    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.
Sign In or Register to comment.