Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: Wounded_Lion
« on: December 13, 2005, 10:55:13 PM »

Thank you, Zyraen.

:pirate

a Wounded Lion
Posted by: Zyraen
« on: December 13, 2005, 10:16:35 PM »

This is the code on Kiyone's BAF file. Similar Blocks are also present for Kova's BAF.

The first block describes a perma-death of sorts, where Kova "dies" and immediately leaves the party. This includes Imprisonment and Petrification though. This causes Kiyone to say something like "oh no." and leave.
The second block describes a normal death, but the party kicks Kova out. Conventionally, this means the NPC is not resurrectable in any way. This results in Kiyone giving <Charname> a middle finger for being an ass before leaving and taking Kova with her, presumably to try to resurrect him.

// If Kova dies and is kicked out

IF    OR(5)
      StateCheck("Kova",STATE_ACID_DEATH)
      StateCheck("Kova",STATE_FLAME_DEATH)
      StateCheck("Kova",STATE_EXPLODING_DEATH)
      StateCheck("Kova",STATE_STONE_DEATH)
      StateCheck("Kova",STATE_FROZEN_DEATH)
   !InPartyAllowDead("Kova")
   InParty(Myself)
   Global("KKJoin", "GLOBAL", 1)
   !Global("FindingKova", "GLOBAL", 250)
THEN
   RESPONSE #100
   StartDialog("KYCSPLAT", Player1)
END

IF    Dead("Kova")
   !StateCheck("Kova",STATE_ACID_DEATH)
   !StateCheck("Kova",STATE_FLAME_DEATH)
   !StateCheck("Kova",STATE_EXPLODING_DEATH)
   !StateCheck("Kova",STATE_STONE_DEATH)
   !StateCheck("Kova",STATE_FROZEN_DEATH)
   !InPartyAllowDead("Kova")
   Global("KKJoin", "GLOBAL", 1)
   !Global("FindingKova", "GLOBAL", 250)
THEN
   RESPONSE #100
   StartDialog("KYCDEAD", Player1)
END

BTW, in "KYCDEAD", when Kova is dead, I need to execute ActionOverride("Kova", DestroySelf()) in the dialog, as when Player1 kicks a dead person out of the party, the body will appear beside Player1 (usually).
Kiyone, in her annoyance expressed in the "KYCDEAD" dialog, will speak of taking his body away to be revived, so I use the DestroySelf() command to make Kova's discarded body disappear.
Obviously, in "KYCSPLAT" it is not an issue as there Kova has no corpse left for her to deal with.

================

Further Notes - Kiyone joins the Party before Kova does, so I use the KKJoin Global to indicate if he has joined in the party. From the time that Kova joins the party, they become coded to be "inseparable".

For the standard party leaving Dialogue for Kiyone... (the following isn't the exact code i use, btw)

CHAIN
IF ~(blah)~ THEN Z#KIYOP ByePlayer1
~blah blah Bye <CHARNAME>!~
END
IF ~InParty("Kova")~ THEN EXTERN Z#KOVAJ ByePlayer1AfterKiyoSayBye
IF ~!Dead("Kova") !InParty("Kova") Global("KKJoin","GLOBAL",1) THEN EXTERN Z#KOVAP ByePlayer1AfterKiyoSayBye
IF ~Dead("Kova") InPartyAllowDead("Kova")~ THEN EXTERN Z#KIYOB KiyoNotLeavingWithKovaDead

The first option it is Z#KOVAJ and not Z#KOVAP, because I assume that the player reformed party and kicked only Kiyone out without taking him along.
The second option assumes the Player1 kicked them both out at the same time (so both switch to P files).
The third option checks that Kova is dead and in the party, and if so she simply refuses to leave. If you want her to leave and take Kova's dead body along, in place of
EXTERN Z#KIYOB KiyoNotLeavingWithKovaDead
use
DO ~ActionOverride("Kova", LeaveParty())
ActionOverride("Kova", DestroySelf())~ EXTERN KiyoTakeKovaBodyAway

Note there is a distinction between "ByePlayer1AfterKiyoSayBye" and "ByePlayer1". This prevents infinite loops (like Kiyone saying bye, then Kova saying bye, then Kiyone saying bye, then Kova saying bye) and so on and so forth. However if you can control it through globals and proper checks, then it's not an issue, you can use the same blocks. In my case, if I use a setting of "KKJoin" Global to control it, I can use the same DLG blocks.

===============

Remember for both of the above you must create the same for the other NPC (in this case, for Kova)
Posted by: Lu
« on: December 13, 2005, 04:33:07 PM »

Quote
Wow.  Thanks all for all of the advice.  I think its appropriate to force this issue (with additional script checks) because NPCs ideally have thoughts, opinions, and motivations of their own (imo, at least)
  I agree 100%
  I also agree 100% when Ghrey says, "let 'em cheaters cheat", that's why I retreated when you said it, Mr. Ghreyfain, sir
  But now I think, "let 'em cheaters cheat, but why should we care 'bout 'em cheaters?"
  So I think now, the more you take care about the stuff the better, Mr. Wounded Lion, sir
Posted by: Wounded_Lion
« on: December 13, 2005, 02:33:52 PM »

For those who wish the coding I use to keep them together, in consideration of Death / Drop, Perma-Death and other weird stuff, as well as Join Dialogues, just make a request on this thread and I'll put up the Code.

I am interested in seeing how you do it.

a W.L.
Posted by: Wounded_Lion
« on: December 13, 2005, 02:32:18 PM »

Wow.  Thanks all for all of the advice.  I think its appropriate to force this issue (with additional script checks) because NPCs ideally have thoughts, opinions, and motivations of their own (imo, at least).

After all, if that hot half-elven girl (or guy, to be fair) that you've been nailing is kicked out of the party, are you really going to stick around?   ;D

a W.L.
Posted by: Borsook
« on: December 10, 2005, 11:27:05 AM »

Posted by: Zyraen
« on: December 10, 2005, 11:23:55 AM »

I actually did Beyond the Law because I wanted an NPC Pair, but since I didn't have BG1 I had NO idea that it was not a new idea.

In any case, if you want to check BTL out, you can just click the banner in my Signature.

For those who wish the coding I use to keep them together, in consideration of Death / Drop, Perma-Death and other weird stuff, as well as Join Dialogues, just make a request on this thread and I'll put up the Code.
Posted by: Lu
« on: December 10, 2005, 10:48:38 AM »

Quote
Khalid and Jaheira work for me quite well and if I tire of one, but want to keep the other, just make sure you stand back while one of the pair is attacking that dragon
   I dunno actually... I kinda feel uncomfortable when anyone dies, other than Irenicus (not our lovely "Adlerson", of course) and the likes, save Jaheira or Khalid, so I'd rather have neither in the party instead. Not that it belongs in this section though
Posted by: jester
« on: December 10, 2005, 10:22:11 AM »

Why would you have to code anything extra to prevent NPC pairs from being split up? Khalid and Jaheira work for me quite well and if I tire of one, but want to keep the other, just make sure you stand back while one of the pair is attacking that dragon. You can always mourn together afterwards, as a team.

To prevent this you should check for resurrectability and install a time that makes the surviving paired NPC leave after an ultimatum to bring the companion back to live. IMO this would nevertheless prevent this 'cheat', but could be a debatable character flaw with said NPC. :/
Posted by: jcompton
« on: December 10, 2005, 10:11:16 AM »

I don't think coding to prevent people from cheating is a good practice to get into.  Next you'll be trying to circumvent ctrl+y.  Or writing a script that takes away the killsword.  Let cheaters cheat.  They hurt no one but themselves.

Eh. I don't think a check that says "If my buddy isn't in the party, there's a problem" is particularly egregious. That seems far more in keeping with "characters should have a reasonable awareness of the gameworld" than anything else.
Posted by: Borsook
« on: December 10, 2005, 02:23:38 AM »

Thog like pair npcs too. Thog want them back.
Posted by: Lu
« on: December 10, 2005, 01:52:47 AM »

 @ Ghreyfain
   Sir, yes, sir!
   I mean I actually saw the way of kicking out an NPC that I mentioned as an engine flaw, so what I suggested was rather kinda way to fix it, the word 'cheater' maybe wasn't that good. But perhaps it really isn't worth bothering at all. Either way, I thought Mr. W. Lion would like to hear about it
Posted by: Ghreyfain
« on: December 10, 2005, 01:07:42 AM »

I don't think coding to prevent people from cheating is a good practice to get into.  Next you'll be trying to circumvent ctrl+y.  Or writing a script that takes away the killsword.  Let cheaters cheat.  They hurt no one but themselves.
Posted by: Lu
« on: December 10, 2005, 12:00:44 AM »

   Yet what Rabain suggests doesn't solve it 100%. Them cheaters can make Khalid enter a small area alone, then kick him out and never enter the small area again with a party member. So adding additional checks in Jaheira script whether Khalid's in the party is needed, too
Posted by: Wounded_Lion
« on: December 09, 2005, 03:46:17 PM »

Thanks, Rabain.  I'll experiment a little with this and see what seems to work best.  I appreciate the info.

a W.L.