PDA

View Full Version : Is this method of "Character Recruitment" possible?


Bitmap212
03-31-2007, 07:10 PM
In both KOTOR 1 and 2.

Is it possible to gain new party members, who DON'T replace your existing NPCs, CANNOT be used in battle/DON'T follow you around - but permanently stay on the Ebon Hawk, and used for "utility" purpose (giving you items and small sidequests)?

Thanks in advance.

stoffe
03-31-2007, 07:17 PM
In both KOTOR 1 and 2.

Is it possible to gain new party members, who DON'T replace your existing NPCs, CANNOT be used in battle/DON'T follow you around - but permanently stay on the Ebon Hawk, and used for "utility" purpose (giving you items and small sidequests)?


If you mean just placing NPCs on the Ebon Hawk you can interact with and where maintaining their game state (inventory items, class levels, feat/power selections etc) is unimportant then this can be done.

It could be done by creating an UTC template for your new Ebon Hawk, and then modifying the main Ebon Hawks area's OnEnter event script (k_003ebo_enter.ncs) to check if a global variable has been set to indicate that the NPC should be present. If so, check if the NPC already exists, and if not spawn them into the area. Could be done by adding something like this to the script:

if (GetGlobalBoolean("SpawnMyEbonHawkNPC")) {
if (!GetIsObjectValid(GetObjectByTag("TagOfNPC"))) {
object oDestination = GetWaypointByTag("TagOfWaypoint");
CreateObject(OBJECT_TYPE_CREATURE, "ResRefOfNPC", GetLocation(oDestination));
}
}


Replace SpawnMyEbonHawkNPC with the name of the global variable (set in globalcat.2da), TagOfNPC with the Tag of the NPC (set in its UTC template), TagOfWaypoint by the tag of a waypoint on the Ebon Hawk you want the NPC to be standing at, and ResRefOfNPC with the resref (filename without extension of the UTC template) of the NPC template.

Then whenever you want them to appear in the game (like after a certain quest has been done) you set the global variable the OnEnter script checks for.