dj_owen Posted February 23, 2004 Share Posted February 23, 2004 okay, what i really want to do is make a custom npc that is recruitable on dantooine (they would replace someone like mission or t3). i downloaded the yuthura mod to see how it was done, and i think i've understood everything about, but i still need a lot of help. so here are the files in the yuthura mod, and my understanding of what they do: 1.appearance.2da- simple, just points out the mesh for the game to use for yuthura (her appearance is 280). 2.portraits.2da- same thing, points the game to yuthura's portrait. 3.p_yuthura.utc- okay, i understand this to be her character "stats" sheet. basically, it lets the game know what she looks like, what feats and powers she has, her class, etc. the one important thing i noticed is that her tag refernce was T3's. is this how the game knows to overlap her to T3's party slot? 4.p_yuthura.dlg- this is simply her dialog when you talk to her after she is recruited. could be used for a subplot? 5.kor39_yuthura.dlg- this seems to be the dialog options you have with yuthura. i really don't understand how a dialog file works, if anyone has a guide to creating a dialog file, otherwise i'd probably just copy gameunlimited's format. 6.kor_recruit.ncs- i'm guessing that this is the most important file, but i have no idea what it is or what it does because i can't open .ncs files. so i'm really hoping someone could inform me what the significance of this file is... okay, that's pretty much what i understand about each file, and having looked at them, it seems that you could make a custom npc that is recruitable with only a small use of scripting (i'm horrible at scripts). i've already created the character file, and i have the ideas of how i want to implement their recruitment, but the last step is figuring out what is all necessary to replace a party npc with my custom one. thanks so much for your help. Link to comment Share on other sites More sharing options...
gameunlimited Posted February 23, 2004 Share Posted February 23, 2004 1 and 2: yes you are correct. 3: you are partially correct, the files determine all the stats, feats, appearances, etc. However, the tag is not for the fact that it will replace T3. This is done in #6. I simply leave the tag as T3M4 just for compatibility. 4: correct. The dialog in this case is only one line. This is the dialog if you talk to her after she is recruited. You can virtually add anything you want in here. 5:This is the dialog of yuthura before she is recruited. This includes everything starting when you first meet her near the bar, and goes as far until she is in the Naga Sadow's tomb. I added a few extra lines in this dialog file at the very end so that there is an option to recruit her. Also the very important part of this dialog file is at that extra line that I added at the end, the dialog file will call for the script "kor_recruit.ncs". Dialog file itself does not recruit her. This script is the one that added yuthura into the party member. 6: This is the script file that I mentioned above. It simply recruits yuthura. This script is fired when you choose the correct dialog in the dialog file #5. Link to comment Share on other sites More sharing options...
dj_owen Posted February 24, 2004 Author Share Posted February 24, 2004 hey gameunlimited, thanks for the informative reply. the one problem i'm still having is that i can't open the (most important) kor_recruit.ncs file. what program should i use to read this, and write new .ncs files? how did you do this, basically? what does it do, and what is the necessary information? thanks for helping. Link to comment Share on other sites More sharing options...
gameunlimited Posted February 24, 2004 Share Posted February 24, 2004 it is not openable. Once compiled, you cant revert it back to the uncompiled version. So this is what I did: I wrote a script file in plain text format. It has the extension of .nss. Then I used the nwncompiler thing to compile it to the .ncs format. Only ncs format is readable by the game. The script is written in C++ programming language. Link to comment Share on other sites More sharing options...
dj_owen Posted February 24, 2004 Author Share Posted February 24, 2004 oh man, so there's no way i can look at it, huh? i would really appreciate it if you could send me the .nss version, or it's really small, just post it here. like i said, i'm trying to incorporate custom npc's into my party, but the only way i ever figure stuff out it is by looking at what other people have done and figuring it out. i hope it's not too much trouble (and if it is, i could make you a custom lightsaber or something for the trouble, i can rip those out pretty fast now). here's the address if you decide to send it: dj_owen@hotmail.com thanks for your help so far man. Link to comment Share on other sites More sharing options...
gameunlimited Posted February 24, 2004 Share Posted February 24, 2004 No problem at all, let me dig through my files. I think the nss file is still somewhere around. Link to comment Share on other sites More sharing options...
gameunlimited Posted February 24, 2004 Share Posted February 24, 2004 file sent. if you need any explanation, feel free to ask although there shouldnt be any problem as it is very simple. Link to comment Share on other sites More sharing options...
dj_owen Posted February 24, 2004 Author Share Posted February 24, 2004 haha, oh man. i was really scared that i was going to get the file and it was going to be so far over my head... how simple! thanks for helping me through this. Link to comment Share on other sites More sharing options...
messkell Posted February 24, 2004 Share Posted February 24, 2004 gameunlimited, may i acquire a copy of the .nss file..... thanks, messkell messkell@australiamail.com Link to comment Share on other sites More sharing options...
indianajennings Posted February 25, 2004 Share Posted February 25, 2004 Is it possible to upload this file for those who are interested in learning how you did this can have a look? or I would be grateful if you could email it to me aswell matthjennings@hotmail.com Thanks Link to comment Share on other sites More sharing options...
gameunlimited Posted February 25, 2004 Share Posted February 25, 2004 Here is the script, I will just post it here since it is VERY small for those who wants to take a look. If you want to compile this script, save it under an extension of .nss then use the compiler to compile it. void main() { RemoveAvailableNPC(7); AddAvailableNPCByTemplate(7, "p_yuthura"); } Link to comment Share on other sites More sharing options...
messkell Posted February 25, 2004 Share Posted February 25, 2004 gameunlimited, thanks for posting/sharing the code to your script. Link to comment Share on other sites More sharing options...
Kitty Kitty Posted February 25, 2004 Share Posted February 25, 2004 gameunlimited, Just curious about something here... Since T3 is (AFAIK) a mandatory recruit (on Taris) which means unless you've used some other mod or possibly cheats of some sort you WILL have him in the party when you attempt to recruit Yuthura, it's sorta moot in this instance but... When you RemoveAvailableNPC(7), what would be the effect if there were no NPC there to begin with? Would it cause an error-out situation, or is the function itself already written with a little intelligent error handling so that if it finds no NPC there it just moves on? Just wondering for the sheer information value of it, as sometime down the road I might be trying to put together a fairly intensive project, and things like this will be helpful to know. If I were to have done it myself, my instinct would have been to use an if beforehand and then only do the remove NPC if there indeed was one present or the like. Anyways... forgive my rambling. Late night last night -Kitty Link to comment Share on other sites More sharing options...
gameunlimited Posted February 25, 2004 Share Posted February 25, 2004 I have tested this function and this is a "smart" function. I believe, most functions in this game that I have played around with always have an error handling mechanism, most of them will return OBJECT_INVALID whenever they encounter problem. Link to comment Share on other sites More sharing options...
Kitty Kitty Posted February 26, 2004 Share Posted February 26, 2004 Good to know. Like I said, I've got some plans rattling around in my head, so I figure the more I can learn about their built in function library (for lack of a better way to put it) the easier it'll be if/when I get around to actually doing anything with it all later. I've seen both sides of the coin, and it can be really iritating when game companies test things just enough for very very specific conditions and anything even slightly different gives you no end of CTDs or the like... Though I somewhat suspcected that at least the majority of these weren't going to be quite that bad. One of the advantages of their scripting language being a C++ derivative is the ability to do just this sort of error handling and the like from within. Makes life a whole lot simpler later on -Kitty Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.