Jump to content

Photo

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


16 replies to this topic

#1 jastey

jastey
  • Gibberlings
  • 7472 posts
  • Gender:Female

Posted 07 January 2018 - 12:54 PM

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.



#2 Roxanne

Roxanne

    Modder

  • Modders
  • 2041 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 07 January 2018 - 01:07 PM

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

Spoiler


Edited by Roxanne, 07 January 2018 - 01:08 PM.

The Sandrah Saga!

another piece of *buggy, cheesy, unbalanced junk*

 

 

 


#3 argent77

argent77
  • Modders
  • 823 posts
  • Gender:Male

Posted 07 January 2018 - 01:20 PM

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.



#4 jastey

jastey
  • Gibberlings
  • 7472 posts
  • Gender:Female

Posted 07 January 2018 - 02:27 PM

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, 07 January 2018 - 02:30 PM.


#5 Roxanne

Roxanne

    Modder

  • Modders
  • 2041 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 07 January 2018 - 02:45 PM

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, 07 January 2018 - 02:47 PM.

The Sandrah Saga!

another piece of *buggy, cheesy, unbalanced junk*

 

 

 


#6 kjeron

kjeron
  • Members
  • 131 posts

Posted 07 January 2018 - 03:31 PM

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.



#7 jastey

jastey
  • Gibberlings
  • 7472 posts
  • Gender:Female

Posted 07 January 2018 - 09:42 PM

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..



#8 Ardanis

Ardanis

    A very GAR character

  • Modders
  • 2612 posts
  • Gender:Male
  • Location:Saint-Petersburg, Russia

Posted 07 January 2018 - 11:04 PM

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, 07 January 2018 - 11:09 PM.

Retired from modding.


#9 jastey

jastey
  • Gibberlings
  • 7472 posts
  • Gender:Female

Posted 07 January 2018 - 11:49 PM

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!!



#10 Roxanne

Roxanne

    Modder

  • Modders
  • 2041 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 07 January 2018 - 11:51 PM

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


The Sandrah Saga!

another piece of *buggy, cheesy, unbalanced junk*

 

 

 


#11 jastey

jastey
  • Gibberlings
  • 7472 posts
  • Gender:Female

Posted 08 January 2018 - 02:18 AM

 

WhicheverActionActuallyChangesAnimation

(You know, after reading Ardanis' post for an instant I thought it's an availbale action in SoD. You never know!)



#12 Ardanis

Ardanis

    A very GAR character

  • Modders
  • 2612 posts
  • Gender:Male
  • Location:Saint-Petersburg, Russia

Posted 08 January 2018 - 05:57 AM

There're some "bd_i_hate_journal" variables, so... :rolleyes: 

IIRC it's Polymorph() then. I remember them two having reverse-intuitive names.


Retired from modding.


#13 kjeron

kjeron
  • Members
  • 131 posts

Posted 08 January 2018 - 11:33 AM

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.



#14 jastey

jastey
  • Gibberlings
  • 7472 posts
  • Gender:Female

Posted 08 January 2018 - 10:40 PM

Ah, now I understand the different behavior. Thank you!



#15 Roxanne

Roxanne

    Modder

  • Modders
  • 2041 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 09 January 2018 - 01:12 AM

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?

BDResurr.jpg


The Sandrah Saga!

another piece of *buggy, cheesy, unbalanced junk*

 

 

 




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users