Thread: Recruitng NPC's
View Single Post
Old 07-02-2012, 01:42 AM   #6
Fallen Guardian
Wandering the Galaxy...
 
Fallen Guardian's Avatar
 
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,288
Current Game: Knights of the Old Republic
Veteran Modder Helpful! 
Quote:
Originally Posted by JCarter426 View Post
Too recruit an NPC by object - in other words, to add a specific creature in the game world to your party:
Code:
AddAvailableNPCByObject( int nNPC, object oCreature );
The engine is capable of saving object data, of course - but everything except the player and party are restricted to whatever module they were spawned in. As soon as Canderous exits your party, he's no different; he was spawned in that module, so he has to stay in that module. As long as he isn't destroyed, his information is saved and you can get him back by going to that module and recruiting him with the above script.

Of course, if you are doing it in K2, you can just add them to the puppet table and not have to worry about all that; if you add them to the table but don't assign them as a puppet, their information is stored from module to module even if they aren't present.
Code:
AddAvailablePUPByObject( int nPUP, object oPuppet );
nPUP must be 0, 1, or 2; the remote takes up slot 0.
So if I added the NPC as a puppet, it wouldn't spawn on the Hawk correct? And I could just use a normal recruit function whenever I wanted them back?

Quote:
Originally Posted by Hassat Hunter View Post
You could get around the module limitation technically by first going to another module, spawning him/her there and THEN removing them from the party.
Handy if you want that party member added for just a map, say, cleaning a base.

So, for example;
Talking to the new party member.
Getting taken to a new module where to use him, which is a one-shot (say, end of Taris).
Spawn, remove, add new NPC as member, leaving the old member behind.
Add to the .dlg that when the stuff is done, the new is removed and he/she re-added and re-warp somewhere else.

Of course, that's just one example, more could be done with that...
Interesting. Thanks HH.


The truly fallen cannot return to the light. If someone "falls" and "returns," they never really, truly fell.

Current Work in Progress: Dantooine Tension

Released Works
Blaster Pistol Enhancement
Dustil Restoration
Ebon Hawk Texture Enhancement
Gaffi Stick Improvement
Weapon Model Overhaul Texture Rework (Thanks to Toasty Fresh!)
Sunry Murder Recording Enhancement
VP's Hi Poly Tin Cans - KotOR 1 Version
Fallen Guardian is offline   you may: quote & reply,