JuniorModder Posted September 24, 2009 Share Posted September 24, 2009 I want to test out a character, but don't know how to add him into the game. He is not reskinned or anything and is not a recruitable npc. just a baddie that a want to see. He is a force zombie. I don't really care where he is put, but I do want to know where he is. Can somebody help me? Thx! Link to comment Share on other sites More sharing options...
Queen of Night Posted September 24, 2009 Share Posted September 24, 2009 Are you busy yourself with the tutorials available here? Most are well explained. Link to comment Share on other sites More sharing options...
Giant Graffiti Posted September 24, 2009 Share Posted September 24, 2009 From the "Frequently used script functions topic": How can I create an object right next to me? // same OBJECT_TYPEs as above CreateObject( OBJECT_TYPE_CREATURE, "object_template", GetLocation(GetFirstPC())); Your object's template would go in the "object_template" section. Example: if your template's name is "grue01" you would put that there. This script can easily be attached to the end of any dialog. Be sure to read this topic for an introduction to scripting. Link to comment Share on other sites More sharing options...
JuniorModder Posted September 24, 2009 Author Share Posted September 24, 2009 From the "Frequently used script functions topic": Your object's template would go in the "object_template" section. Example: if your template's name is "grue01" you would put that there. This script can easily be attached to the end of any dialog. Be sure to read this topic for an introduction to scripting. So the template for file could be n_forcezomb01.uct? Sorry, I pretty new to this . And also, when I have the script all finished, would I put it in a dlg file or something? How would I get it to activate? Link to comment Share on other sites More sharing options...
Giant Graffiti Posted September 24, 2009 Share Posted September 24, 2009 So the template for file could be n_forcezomb01.utc? The template is the filename without the .utc, so it would be n_forcezomb01. Sorry, I pretty new to this. Don't worry, I'm sure all of us here have been at the stage that you're at. And also, when I have the script all finished, would I put it in a dlg file or something? How would I get it to activate? After you name the script and have it compiled, open up any dialog file, for this example I'll use Bao-Dur's default dialog. It's found in BIFs>dialogs.bif>Dialog>baodur.dlg. Save that somewhere on you computer and open it with DLGEditor. Press F10 to search and find the listing for "Never mind.", after finding it put the name of your script in this part (in my case that would be "spawn_grue"). After that put your compiled script and the edited dialog in your override folder. Start up the game and talk to Bao-Dur, choose the "Never mind." option. If everything went correctly, you should have spawned an NPC. EDIT: Force Zombies are enemies, so be prepared ready to fight. Link to comment Share on other sites More sharing options...
JuniorModder Posted September 24, 2009 Author Share Posted September 24, 2009 Okay, now I have my line of dialog ready for the ncs file, but I can't get either of the script compilers at http://www.starwarsknights.com/tools.php to work. And I the nwnnss compiler says I need NWN Explorer to extract the files, but the website it suggests, http://www.torlack.com doesn't work. Is there another way to compile my script? Link to comment Share on other sites More sharing options...
Star Admiral Posted September 24, 2009 Share Posted September 24, 2009 "doesn't work" as in the compiler doesn't start, or "doesn't work" as in the script has problems? Could you post the script that you're using? - Star Admiral Link to comment Share on other sites More sharing options...
JuniorModder Posted September 24, 2009 Author Share Posted September 24, 2009 The nwnnss compiler opens for like a millisecond and then closes before a can read it. And there is no readme to tell me what to do with it. In the one called Kotor compiler, when I click on the nwnnsscomp exe, the same thing as above happens. And when I click on the _CompileAll exe, it opens, but it says Unable to locate or open Neverwinter Night C:\BlaBlaBLa\Downloads\kotorcomp>pause Press any key to continiue . . . The script it self, I wrote in plain old notepad: // same OBJECT_TYPEs as above CreateObject( OBJECT_TYPE_CREATURE, "n_forcezomb01", GetLocation(GetFirstPC())); Link to comment Share on other sites More sharing options...
Giant Graffiti Posted September 24, 2009 Share Posted September 24, 2009 ^^^ Just a note, you'll need brackets, so it would actually be: void main(){ CreateObject( OBJECT_TYPE_CREATURE, "n_forcezomb01", GetLocation(GetFirstPC())); } Also, I would suggest using KotOR tool's own script compiler. You can see it near the top, it's the "TXT" button. Link to comment Share on other sites More sharing options...
JuniorModder Posted September 25, 2009 Author Share Posted September 25, 2009 This is so frustrating! I open the txt file spawn_forcezomb01, where the script is located, in the KOTOR tool script compiler, and I get the error: Unable to open imput file "C:\Program Files\LucasArts\SWKotOR2\Override\spawnforcezomb". I have added new node that says "spawn" in T3's dialog that SHOULD spawn the force zombie beside the PC, but when I select "spawn" in the game, nothing happens! Link to comment Share on other sites More sharing options...
Star Admiral Posted September 25, 2009 Share Posted September 25, 2009 Did you save the spawn_forcezomb01 script as a .nss file? Compilers don't like compiling .txt files. - Star Admiral Link to comment Share on other sites More sharing options...
JuniorModder Posted September 25, 2009 Author Share Posted September 25, 2009 How do I save it as an nss file? My only option was txt. Link to comment Share on other sites More sharing options...
JuniorModder Posted September 27, 2009 Author Share Posted September 27, 2009 1: Sorry for doubleposting, but it's been awhile since someone has posted. 2:Is it considered spam here to bump topics? Link to comment Share on other sites More sharing options...
Exile007 Posted September 27, 2009 Share Posted September 27, 2009 ^yes, and yes. But just change the file save type to all types. Then add the .nss end. Link to comment Share on other sites More sharing options...
stoffe Posted September 27, 2009 Share Posted September 27, 2009 How do I save it as an nss file? My only option was txt. NSS files are text files, just with a different file extension to mark them as NWScript Source code files. So you should be able to just type in .NSS as the file extension when saving, usually. Not using KotorTool when doing scripts so I don't know if it forces the file extension to txt, but I doubt it. If it does you can just change it manually in the Windows Explorer so the compiler will accept it. This is so frustrating! I open the txt file spawn_forcezomb01, where the script is located (...snip...) Also, that file name is too long. The name of a resource file can be at most 16 characters long (not counting the file extension), while spawn_forcezomb01 is 17 characters. Link to comment Share on other sites More sharing options...
JuniorModder Posted September 27, 2009 Author Share Posted September 27, 2009 YEEEAAAHHH!!! It worked! I'm so happy!! Thanks so much! But I do have a question. Why is the spawn_forcezomb an .nss file when all of the other scripts are .ncs? EDIT: Now it's not working. In the game, when I talk to T3, I get the error: Last conversation node contains either an end node or continue node. Please contact designers! I looked in the dlg file, and can't find anything wrong! I have created two replies for T3, SPAWN ZOMBIE [Already Listed], which would fire "spawn_forcezomb01" and SPAWN TENNETH [Already Listed] (Tenneth is my custom character) which would fire "spawn_tent" And the lines are not already listed! I want to end the dialog after you select that line! I am so confused! Link to comment Share on other sites More sharing options...
stoffe Posted September 27, 2009 Share Posted September 27, 2009 Also, that file name is too long. The name of a resource file can be at most 16 characters long (not counting the file extension) SPAWN ZOMBIE [Already Listed], which would fire "spawn_forcezomb01" (17) But I do have a question. Why is the spawn_forcezomb an .nss file when all of the other scripts are .ncs? EDIT: Now it's not working. In the game, when I talk to T3, I get the error: Last conversation node contains either an end node or continue node. Please contact designers! NSS files are script source code. These aren't used by the game for anything; they're used by designers/modders to write scripts in a more human-readable manner. In order for the game to use the script it must be compiled into a .NCS bytecode file. As for the dialog error, make sure all dialog branches that should exit dialog end with a reply node (put one without any text in it if the player isn't going to get the last word in). Link to comment Share on other sites More sharing options...
JuniorModder Posted September 28, 2009 Author Share Posted September 28, 2009 Okay this is ridiculous. I can't get anything to work. I made sure all of the dialog branches that exit dialog ended with a reply node. That fixed that problem. But nothing happens when I select the custom lines of dialog. The lines of dialog and corresponding scripts located in t3m4.dlg: SPAWN ZOMBIE (already listed) Script 1: spawn_forcezomb SPAWN TENNETH (already listed) Script 1: spawn_tent The actual scripts (without quotes of course): spawn_forcezomb: void main(){ CreateObject( OBJECT_TYPE_CREATURE, "n_forcezomb", GetLocation(GetFirstPC())); } spawn_tent void main(){ CreateObject( OBJECT_TYPE_CREATURE, "p_tent", GetLocation(GetFirstPC())); } And I deleted the ; that came at the end of both scripts, bc in kotor tool, I would get an error on the line of the ; . And in my override folder are p_tent.uct (The uct file for my new character) tenneth.dlg (My new characters global dlg) spawn_tent.ncs and spawn_tent.nss The edited t3m4.dlg spawn_forcezomb.ncs and spawn_forcezomb.nss Now! What am I doing wrong!?! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.