lfnetwork.com mark read register faq members calendar

Thread: [TSL] Recruit Script
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 07-09-2008, 03:07 PM   #1
Ferc Kast
Modder
 
Ferc Kast's Avatar
 
Join Date: Jan 2007
Location: Tython
Posts: 1,586
Current Game: SWTOR
Helpful! Forum Veteran Contest winner - Fan Fiction Veteran Modder 
[TSL] Recruit Script

This is a recruit script I made a while back for TSL. I decided to finally release this as free source. You can use it in your TSL recruit mods, as long as you credit me in your readme file. This script has been tested, to ensure best results.

Code:
void main(){
    int iAction = GetScriptParameter(1);
    if ( iAction == 1 ){
        // Recruit "sNPC"
        int iNPC = GetScriptParameter(2);
        string sNPC = GetScriptStringParameter();
           RemoveAvailableNPC(iNPC);
           AddAvailableNPCByTemplate(iNPC, sNPC);
           DelayCommand(1.5,ShowPartySelectionGUI());
    }
    else if ( iAction == 2 ){
        // Eliminate "Twins"
        string sNPC = GetScriptStringParameter();
        object oNPC = GetObjectByTag(sNPC);
           ActionPauseConversation();
           SetGlobalFadeOut(1.0, 0.5);    
           DelayCommand(1.0, DestroyObject(oNPC));
           DelayCommand(1.0,SetGlobalFadeIn(0.7,0.0));
           ActionResumeConversation();
    }
}
Here's how to attach the script to your dialog:
  1. Click on your last entry or reply in your dialog, then fill in the script #1 & script #2 rows with the values from the above picture.
  2. In script #1, replace the 3 with the number of the NPC that you will replace. (Here is a list of the TSL NPC numbers.)
  3. Next, change "YOUR_NPC_RESREF" to the resref from the recruited NPC's utc. (I.E. "p_test")
  4. In script #2, replace "YOUR_NPC_TAG" to the tag of the pre-recruited NPC's utc. (I.E. "p_test001")

Note that this script & tutorial will only work in KotOR II: The Sith Lords, and not in KotOR I.

Last edited by Ferc Kast; 09-03-2008 at 11:24 AM.
Ferc Kast is offline   you may: quote & reply,
Old 07-09-2008, 06:28 PM   #2
TriggerGod
Senior Member
 
TriggerGod's Avatar
 
Join Date: Mar 2008
Location: hiding
Posts: 2,415
Helpful! 
YAY!
Thank you Ferc. This script will really help me. Maybe I can do a little better with the mod nao (You should know what I mean)
TriggerGod is offline   you may: quote & reply,
Old 07-09-2008, 06:33 PM   #3
HdVaderII
I am le sad.
 
HdVaderII's Avatar
 
Join Date: Feb 2007
Location: Space. The final frontier.
Posts: 615
Current Game: Dark Forces. Yeah.
Thanks Ferc, recruiting is now easier!


Are you one of those poor Macintosh gamers that are in the possession of Empire at War, yet because of the scarcity of Mac players out there you have nobody to play against? If you are, PM me if you want to set up a game.
HdVaderII is offline   you may: quote & reply,
Old 07-10-2008, 07:06 AM   #4
The Betrayer
Forumite
 
The Betrayer's Avatar
 
Join Date: Nov 2007
Posts: 716
Current Game: The Godfather II
Helpful! 
Is this just a script for the recruiting part?



OMNIA MUTANTUR NIHIL INTERIT.
The Betrayer is offline   you may: quote & reply,
Old 07-10-2008, 09:55 AM   #5
Ferc Kast
Modder
 
Ferc Kast's Avatar
 
Join Date: Jan 2007
Location: Tython
Posts: 1,586
Current Game: SWTOR
Helpful! Forum Veteran Contest winner - Fan Fiction Veteran Modder 
Yes, this script is for the recruiting itself. Aside from this script, one would only need to follow Darth333's tutorial to recruit an NPC.

Ferc Kast is offline   you may: quote & reply,
Old 08-19-2008, 06:26 PM   #6
DarthNandis
Rookie
 
DarthNandis's Avatar
 
Join Date: May 2008
Location: Blumenau - Brazil
Posts: 78
Current Game: A lot!
Hey, i did a script like this 3 months ago:
http://www.lucasforums.com/showthread.php?t=188853

Why it is not here?
DarthNandis is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > [TSL] Recruit Script

Tags
burritos

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:18 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.