Author Topic: Keeping NPCs Together  (Read 3331 times)

0 Members and 1 Guest are viewing this topic.

Offline Zyraen

  • Level 2
  • **
  • Posts: 818
  • Karma: +0/-0
    • MSN Messenger -
    • View Profile
Keeping NPCs Together
« on: August 29, 2005, 12:21:45 AM »
As it looks like BTL may not be the only Mod around that tries to keep two characters actively together in the party at the same time, I decided to post up some code that I use to keep them together, so that maybe other Modders like Miss Sakaki for the Luxley Family can find it useful :) hopefully.

Code for Joining / Leaving together shouldn't be too hard to do, so not doing it here, this particular code is just for checking if an NPC is irretrievably killed, causing the other to say something and leave. The following code is in the Override Script of my NPC Kiyone.

This code assumes that we want two separate types of conversation for when the other NPC is irretrievably killed. The first is the more "Gasp, oh no!" kind, while the second is "How can you just throw him away like that?" sort of thing.


The NPC Kova has been irretrievably killed due to some event, as can be seen, and this causes Kiyone to initiate a particular DLG file before leaving. Note that if you want her to make a comment without leaving the party, its best to use StartDialogNoSet() instead of StartDialog().

The !Global check in the block covers an event that will cause Kiyone to NOT comment if Kova is irretrievably killed, for a Mod event.

IF    OR(5)
   !Global("FindingKova", "GLOBAL", 250)
   RESPONSE #100
   StartDialog("KYCSPLAT", Player1)


The NPC Kova has been killed and is resurrectable, but has been kicked out of the party, making him, game-wise, impossible to resurrect. This causes Kiyone to initiate a particular DLG file before leaving.

IF    Dead("Kova")
   !Global("FindingKova", "GLOBAL", 250)
   RESPONSE #100
   StartDialog("KYCDEAD", Player1)
Love between a Law Enforcer and a Fugitive - can such a thing even happen?
SoA Release - Overview / Download Links

Zyraen's Miscellaneous Mods - Ust Natha Accelerator, item tweaks, XP caps and redistribution, and more.