PDA

View Full Version : Help with Script Compiler


Dirtnose
08-28-2006, 01:09 PM
Hey all, I Cant seem to get Hazardx's Script Compiler to work. Im trying to make a Recruitment Mod for Kotor II and im using Darth333's ''Recruit an NPC in less than 10 steps'' Tutorial. Ive Extracted the nwnnsscomp.exe and the _compileall.bat to my Main Kotor II Directory and im trying to compile a Script (Script Below)


code:
void main()
{
RemoveAvailableNPC(7);
AddAvailableNPCByTemplate(7, "p_dustil");
DelayCommand(1.5,ShowPartySelectionGUI());
}


And i did Save it with a nss extension. So how do i Compile that code i saved in a notepad with the Script Compiler? (The readme doesnt tell you how and the Links to the tutorial how to use it dont work)

Any help would be awsome.


Thanks (By the way, sorry about the code dont know how to put it in a box thingy :/)

Darth333
08-28-2006, 02:22 PM
You'll find the new "how to compile scripts" tutorial here: http://www.lucasforums.com/showthread.php?t=143681 :)

I also updated the link in the tutorial.

Darth Dragoon
08-28-2006, 02:38 PM
you could also use the kotor tool txt editor, that has a script compiler on it aswell.

hope this help.
-Darth Dragoon

Dirtnose
08-28-2006, 03:24 PM
Thats awsome Thanks guys got it working :D, One more question, as my Recruit mod is for Kotor II and im reading how to attach it to dialogue so i can recruit it. i dont really understand what Darth333 Means by it. Do you mean i get a dialogue file lets say...Batu rems Attack on you in telos and Add my dialogue to it? or make a new dialogue and attatch it to that dialogue file?


Sorry bad typing, typing fast :P

Darth Dragoon
08-28-2006, 07:16 PM
you extract the dialog using kotor tool and then open it with the dialog editor and add a new pc dialog for your character to say eg "come with me" then attach your script by typing your scripts name under script that fires when spoken.

hope this help
-Darth Dragoon
P.S i can make recruitment mods but they never work in my kotor 1 game..can anyone help me?

Dirtnose
08-29-2006, 08:01 AM
hmmm, i still dont really understand what you mean...could you explain it a bit more clear please?


Thanks

Sorry about this im a nooby modder ^^

Princess Artemis
08-29-2006, 09:59 AM
What you need to do is create a dialogue for your recruitable character and attach the recruit script to that. I'll use well, my Dustil recruit mod for an example. On the second time recruiting him, the PC can ask him to join the crew, and he'll say sure. So, I attach the first script, adddustil2.ncs, to one of the lines in the dialogue using DLGEditor (I think I attached it to the last line Dustil speaks after agreeing to join up, which is nearly the last line in that part of the dialogue, there's just a message saying he joined after that). There are fields there for two scripts to be fired upon the speaking of any line. Just add the name of the script to one of the lines toward the end of the dialogue.

You could have a really simple dialogue, just walk up to the person you want to recruit and say, "Hi, come with me." and they say, "OK," and then the dialogue ends. Attach the script to the "OK" line, and your script will fire, booting out whomever is 7 if that person has been recruited (you might want to add a line RemoveNPCFromPartyToBase(7); right before you RemoveAvailableNPC just in case lucky number 7 is in the party...sometimes K2 is twitchy about stuff like that), adding p_dustil to the 7 slot, then opening the party select screen.

Dirtnose
08-30-2006, 06:16 AM
ok, i think i understand, im gonna give it a go now. Thanks :)