Jump to content

The vexation with Valygars


Wisp

Recommended Posts

Originally from here.

When Valygar dies irreversibly he jettisons his body, so you can still open the sphere. Problem is, he does it when he is imprisoned as well, even though that is reversible death. When you then free him, you have Valygar and his body.

Script:

IF
 Die()
 !InPartyAllowDead(Myself)
 !StateCheck(Myself,STATE_STONE_DEATH)
 OR(2)
Allegiance(Myself,ENEMY)
Allegiance(Myself,NEUTRAL)
 !Dead("Tolger")
 Global("DropValygar","GLOBAL",0)
THEN
 RESPONSE #100
CreateItem("misc7l",0,0,0) // Valygar's Body
SetGlobal("DropValygar","GLOBAL",1)
DropInventory()
END

 

Since there is no STATE_IMPRISONED or equivalent, this problem strikes me as rather hard to fix. Does anyone else have any bright ideas, or is this one for the 'unfixable' pile?

Link to comment

ToBEX request?

 

Or is this perhaps a place where the scripting should be moved to dialog, where you have to actually murder him in order to gain the body - if he just

 

...wait -

 

what about a script addition that runs and looks for both Vaygar being alive and the body being present, and deletes the body if he is alive?

 

in Valygar's script -

IF
 Global("DropValygar","GLOBAL",1)
 !StateCheck(Myself,CD_STATE_NOTVALID)
 !Dead("Tolger")
 PartyHasItem("misc7l") // Valygar's Body
THEN
 RESPONSE #100
	TakePartyItem("misc7l") // Valygar's Body
	DestroyItem("misc7l")
	SetGlobal("DropValygar","GLOBAL",0)
END

 

Without referencing InParty, you get a hostile or kicked-out Vally stealing back his body, but It still has the loophole of the body showing up on the ground, though, if the party doesn't pick it up. Which argues for a baldur.bcs placement. Except I am not sure master scripts like that can actually take items and destroy them... and it gets more complicated if you start using the invisible creature shell game.

Link to comment

Well, don't I feel stupid. He doesn't actually drop his body the moment he is imprisoned. He does it the moment he is freed, which makes the fix very simple:

COPY_EXISTING valygar.bcs override
 DECOMPILE_AND_PATCH BEGIN
   REPLACE_TEXTUALLY ~\(Global("DropValygar","GLOBAL",0)\)~ ~Dead("Valygar") \1~
 END
BUT_ONLY

 

The result is that he only drops his body when Die() is true and his death var is set. But since Freedom clears his death var, he won't drop his body after being imprisoned.

Link to comment

Archived

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

×
×
  • Create New...