Jump to content


Photo

How to handle custom familiar resurrection / prevent final death?


19 replies to this topic

#16 jastey

jastey
  • Gibberlings
  • 6818 posts
  • Gender:Female

Posted 30 July 2017 - 10:00 AM

Thank you for your idea(s). One question (maybe I'm just too tired right now): What exactly is spell "A", and is the min 1 HP applied via spell or item?



#17 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6116 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 30 July 2017 - 10:16 AM

and is the min 1 HP applied via spell or item?

Usually it's best to use the minhp1.itm for this... Sarevok etc people use it, so the AI mods, spell etc mods.. also extend it with effects that could end up deadly into it in some occasions. So that should be almost guarantee that it works.
Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#18 Ulb

Ulb
  • Members
  • 136 posts
  • Gender:Male

Posted 30 July 2017 - 10:46 AM

It is all done via spell effects, no items involved.

 

Let me give you a slightly more detailed run down.

 

Your character must run those two script blocks:

IF
Global("FAMILIARMODE","GLOBAL",1) // gets set to 1 when your character goes into familiar mode and set to 0 whenever he goes back to party member mode
Global("FAMILIARSPELLAPPLIED","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("FAMILIARSPELLAPPLIED","GLOBAL",1)
ApplySpellRES("FAMILIARSPELL_1",Myself) // FAMILIARSPELL_1 adds the following effects to your character (duration permanent): minhp1, castspelloncondition (hp <2) (spell casted is FAMILIARSPELL_2)
END
IF
Global("FAMILIARMODE","GLOBAL",0) // gets set to 1 when your character goes into familiar mode and set to 0 whenever he goes back to party member mode
Global("FAMILIARSPELLAPPLIED","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("FAMILIARSPELLAPPLIED","GLOBAL",0)
ApplySpellRES("FAMILIARSPELL_3",Myself) // FAMILIARSPELL_3 just removes the spelleffects from FAMILIARSPELL_1 via the remove effects by resource opcode
END

With those blocks he buffs/unbuffs himself whenever he changes from familiar to party member and back. (Technically he could get interrupted during this phase since he is not AI spell immune, so to make extra sure everything goes as planned you could give him short term immunities whenever he switches modes.)

 

 

 

The FAMILIARSPELL_2 heals your character to full, cures him of any AI effects like fear or confusion and gives short term immunity to pretty much everything (to prevent script disruption and death) and removes the effects of FAMILIARSPELL_1 via “remove effects by resource”.

It also spawns an invisible helper creature which runs the following script:

IF
Global("FAMILIARMODE","GLOBAL",1) // gets set to 1 when your character goes into familiar mode and set to 0 whenever he goes back to party member mode, this is slightly redundant but better safe than sorry
Global("FAMILIARSPELLAPPLIED","GLOBAL",1)
THEN
RESPONSE #100
ActionOverride("FAMILIAR-DOG-PARTY-MEMBER-GUY", DestroySelf()) // removes your familiar guy from the area
SetGlobal("FAMILIARSPELLAPPLIED","GLOBAL",0) // sets global back so familiar guy will re-apply FAMILIARSPELL_1 buffs when he returns
"Create ground item action" // I'm too lazy to look up the right code for this but it basically places the conversable corpse item on the ground near the familiar
DestroySelf()
END

And there you have it. Now you only need to make the conversable item to resurrect the familiar and you should be good to go.



#19 Ulb

Ulb
  • Members
  • 136 posts
  • Gender:Male

Posted 30 July 2017 - 10:50 AM

 

and is the min 1 HP applied via spell or item?

Usually it's best to use the minhp1.itm for this... Sarevok etc people use it, so the AI mods, spell etc mods.. also extend it with effects that could end up deadly into it in some occasions. So that should be almost guarantee that it works.

 

 

There is no real need for the item anymore though. Obviously, when I say minhp1 this means not just that effect but all the usual effects that go with it. I think the "remove effects by resource" opcode is EE only which means the classic games needed to use items so they could remove the effects. Now we can do it via the opcode.



#20 jastey

jastey
  • Gibberlings
  • 6818 posts
  • Gender:Female

Posted 31 July 2017 - 01:25 AM

Thank you very much for the detailed description. The possibilities for the EE engine is so much better, for BGT I guess I can't get rid of the 1 HP item. (I start to feel about modding the tob engine vs. EE like vanilla BG1 vs. BGII..)





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users