Jump to content

How to handle custom familiar resurrection / prevent final death?


jastey

Recommended Posts

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.
Link to comment

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.

Link to comment

 

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.

Link to comment

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

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...