Jump to content

SoD's "bdresurr.spl" - what is different?


jastey

Recommended Posts

The resurrection spell bdresurr.spl is used in SoD to raise potentially dead party members upon transition from BG:EE to SoD (in bdsodtrn.bcs).

Thing is: This spell changes the animation from my joinable dog NPC into a human fighter. None of the other resurrection spells do: sppr504.spl, sppr729.spl, spwi720.spl, sppr504.spl.

The change inot human fighter animation also happens for Adalon's "change into drow and back" spells, so the dog is immune to those.

Since I'd like my dog to remain a dog, does anyone know why bdresurr.spl is so different? When looking at it with NI, all I see is a ranged "Raise Dead" effect like it is also in sppr504.spl, so I am at a loss why this breaks my "dog kit". (The dog cre has "animal" for GENERAL and "dog" for RACE but the kit is a wild addition of several kits to restrict it from using normal items).

 

Also, how would I prevent this from happening? The only thing I can think of is making my dog immune to bdresurr.spl.

Link to comment

The resurrection spell bdresurr.spl is used in SoD to raise potentially dead party members upon transition from BG:EE to SoD (in bdsodtrn.bcs).

 

Thing is: This spell changes the animation from my joinable dog NPC into a human fighter. None of the other resurrection spells do: sppr504.spl, sppr729.spl, spwi720.spl, sppr504.spl.

The change inot human fighter animation also happens for Adalon's "change into drow and back" spells, so the dog is immune to those.

 

Since I'd like my dog to remain a dog, does anyone know why bdresurr.spl is so different? When looking at it with NI, all I see is a ranged "Raise Dead" effect like it is also in sppr504.spl, so I am at a loss why this breaks my "dog kit". (The dog cre has "animal" for GENERAL and "dog" for RACE but the kit is a wild addition of several kits to restrict it from using normal items).

 

Also, how would I prevent this from happening? The only thing I can think of is making my dog immune to bdresurr.spl.

Under which circumstances does that happen? Only when the dog is actually dead?

 

Background

 

In my mod the party can have Haiass the tame wolf as PC's companion and Sandrah has her pantheress Pelligram. I have done the transition with them countless times without any issues, so I wonder what may be different here. Unless the difference is BGEE+SoD vs EET. No issue with Adalon's spell for me.

 

Edited by Roxanne
Link to comment

Are you certain the resurrection spell is the cause? SoD uses different files for all kinds of stuff, such as new CLASTEXT or RACETEXT tables (see campaign.2da). If you added the class or race of your NPC to these files they may be reset to a default value when not found.

Link to comment

I made a small testmod with a creature that casts the bdresurr.spl onto Grey [DO ~ApplySpellRES("bdresurr","C#Grey")~] , and it turns him into a human animation no matter whether he is dead or not. Only the bdresurr.spl is applied this way, so I am rather convinced it's the spell. (Maybe there are other instances I'm not aware of, too, but the spell does it if cast on its own).

 

I guess resetting to some default is the cause for this, I just don't understand why it happens for a spell that does nothing but raise dead.

 

EDIT: In the cutscene, the spell is only cast to party members, maybe that's why familiar-like companions are not affected. And I guess it does nothing to an animal companion that doesn't have a hacked kit like my dog has.

Edited by jastey
Link to comment

I made a small testmod with a creature that casts the bdresurr.spl onto Grey [DO ~ApplySpellRES("bdresurr","C#Grey")~] , and it turns him into a human animation no matter whether he is dead or not. Only the bdresurr.spl is applied this way, so I am rather convinced it's the spell. (Maybe there are other instances I'm not aware of, too, but the spell does it if cast on its own).

 

I guess resetting to some default is the cause for this, I just don't understand why it happens for a spell that does nothing but raise dead.

 

EDIT: In the cutscene, the spell is only cast to party members, maybe that's why familiar-like companions are not affected. And I guess it does nothing to an animal companion that doesn't have a hacked kit like my dog has.

Ah, it means your dog is a joinable NPC?

This is maybe comparable then whith my githyanki NPC (Argent77's comment has reminded me of this.) Although the race and animation exist in the game, they are not definedt for joinable creatures. I remember there were issues with my creature before I made an entry for githyanki into APPEND ~racetext.2da~.

This was before EE, and I cannot recall all the details and I never discussed that on a forum, but maybe adding *dog* to racetext.2da helps - the second column in that file makes the reference to the id for race.ids (152 for githyanki or 105 for dog) and if I remember well, that connects to the animations etc).

 

Just to test, you can just add a line with NI into racetext.2da and repeat the test you described above.

Edited by Roxanne
Link to comment

The resurrection spell bdresurr.spl is used in SoD to raise potentially dead party members upon transition from BG:EE to SoD (in bdsodtrn.bcs).

 

Thing is: This spell changes the animation from my joinable dog NPC into a human fighter. None of the other resurrection spells do: sppr504.spl, sppr729.spl, spwi720.spl, sppr504.spl.

The change inot human fighter animation also happens for Adalon's "change into drow and back" spells, so the dog is immune to those.

 

Since I'd like my dog to remain a dog, does anyone know why bdresurr.spl is so different? When looking at it with NI, all I see is a ranged "Raise Dead" effect like it is also in sppr504.spl, so I am at a loss why this breaks my "dog kit". (The dog cre has "animal" for GENERAL and "dog" for RACE but the kit is a wild addition of several kits to restrict it from using normal items).

 

Also, how would I prevent this from happening? The only thing I can think of is making my dog immune to bdresurr.spl.

Raise dead resets the creatures animation in the same manner it is determined at character generation. It is how the game restores the animation to someone who has been chunked.

Normally, the creature must be dead for Raise Dead to have any effect, but this restriction can be bypassed by setting Parameter2=1, which bdresurr.spl uses. Changing it's parameter2=0 will stop it from altering the dog's animation, but only if the dog is alive.

 

You might be better off giving the dog a scripted check in its override script to set a variable when dead, and re-apply whatever spell sets the Dog animation when that variable is set and it is alive.

Link to comment

Thank you for your ideas.

Patching racetext.2da did not change this behavior.

 

kjeron: That would be one ossibility, but bdresurr.spl also changes the animation if the dog is alive.

 

I can only repeat my findings: bdresurr.spl changes the dog's animation to a human, no matter whether the dog is dead or alive. sppr504.spl does not.

And after the animation change with bdresurr.spl, the animation stays a human fighter even if the former dog dies and is resurrected with sppr504.spl..

Link to comment

You can patch the spl to restore dog animation on appropriate targets.

 

Supposedly this should work, though I haven't tried it myself:

 

COPY_EXISTING bdresurr.spl override
  LPF ADD_SPELL_EFFECT INT_VAR opcode=177 parameter1=105 parameter2=4 target=2 timing=1 STR_VAR resource=doganim END

// the CREATE_EFFECT function can taken from IR https://github.com/Gibberlings3/ItemRevisions/blob/master/item_rev/lib/macros.tpa#L69
LAF CREATE_EFFECT INT_VAR opcode=53 parameter1=0x7400 parameter2=2 target=2 timing=1 STR_VAR effect=doganim END
Other than that, you can inject ~IF Race(Player2,DOG) Global("fix_the_dogs","bd0120",0) THEN RESPONSE #100 SetGlobal("fix_the_dogs","bd0120",1) WhicheverActionActuallyChangesAnimation(Player2,DOG_WILD) Continue() END~ for players 2-6 after the first block in bd0120.bcs. Edited by Ardanis
Link to comment

You can patch the spl to restore dog animation on appropriate targets.

 

Supposedly this should work, though I haven't tried it myself:

 

COPY_EXISTING bdresurr.spl override
  LPF ADD_SPELL_EFFECT INT_VAR opcode=177 parameter1=105 parameter2=4 target=2 timing=1 STR_VAR resource=doganim END

// the CREATE_EFFECT function can taken from IR https://github.com/Gibberlings3/ItemRevisions/blob/master/item_rev/lib/macros.tpa#L69
LAF CREATE_EFFECT INT_VAR opcode=53 parameter1=0x7400 parameter2=2 target=2 timing=1 STR_VAR effect=doganim END

This works. Thank you!!

Link to comment

You can patch the spl to restore dog animation on appropriate targets.

 

Supposedly this should work, though I haven't tried it myself:

 

COPY_EXISTING bdresurr.spl override
  LPF ADD_SPELL_EFFECT INT_VAR opcode=177 parameter1=105 parameter2=4 target=2 timing=1 STR_VAR resource=doganim END

// the CREATE_EFFECT function can taken from IR https://github.com/Gibberlings3/ItemRevisions/blob/master/item_rev/lib/macros.tpa#L69
LAF CREATE_EFFECT INT_VAR opcode=53 parameter1=0x7400 parameter2=2 target=2 timing=1 STR_VAR effect=doganim END
Other than that, you can inject ~IF Race(Player2,DOG) Global("fix_the_dogs","bd0120",0) THEN RESPONSE #100 SetGlobal("fix_the_dogs","bd0120",1) WhicheverActionActuallyChangesAnimation(Player2,DOG_WILD) Continue() END~ for players 2-6 after the first block in bd0120.bcs.

 

WhicheverActionActuallyChangesAnimation = Polymorph or ChangeAnimation

Link to comment

kjeron: That would be one ossibility, but bdresurr.spl also changes the animation if the dog is alive.

 

Apologies ... I was thinking of it's other function - parameter2 controls two separate aspects of opcode 32:

If zero, the animation is NOT reset, and the effect only works if the target is dead (specifically, STATE_DEAD).

If non-zero, the animation IS reset, and the effect works whether the target is dead or alive.

 

 

The priest's raise dead and resurrection spells have it set to zero.

bdresurr.spl has parameter2 of its opcode 32 set to one.

Link to comment

Somehow I am still wondering why my githyanki NPC is not affected here - not that I am complaining. I just tested the whole transition again with her being dead or alive after Sarevok's defeat. She always appears in Korlasz dungeon completely as she is expected, githyanki animation and all. So knock on wood that it stays that way.

 

bdresurr.spl has parameter2 of its opcode 32 set to one.

I understand that refers to what NI shows as *unused*, there are two parameters and the second is 1 in my install?

post-5210-0-20632200-1515489461_thumb.jpg

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...