Leviathan Posted October 28, 2004 Share Posted October 28, 2004 Hello world ! I've searched the source script named "k_ptar_duelrew.nss" with KotOR Tool, but I didn't find any files. Their is only the file named "k_ptar_duelrew.ncs". So, I ask you if you could give me Web adresses or e-m@il, where I can obtain this file ... I thank you in advance !... Link to comment Share on other sites More sharing options...
Darth333 Posted October 28, 2004 Share Posted October 28, 2004 If the .nss files you are looking for are not in Bifs --> scripts --> scripts source, then they are not available. What are you trying to do? Link to comment Share on other sites More sharing options...
Darkkender Posted October 28, 2004 Share Posted October 28, 2004 hey darth I've found some of the source scripts in the rim files tucked into certain areas. now this is not a guarunteed thing so don't hold breath. Link to comment Share on other sites More sharing options...
Leviathan Posted October 29, 2004 Author Share Posted October 29, 2004 I didn't find this file in "BIFs->Scripts->Source..." I want to modify the items gived by Ajuur The Hutt when you beat Bendak Starkiller. The file created by "NWNNSSCOMP" has a very bad quality (It's not a .NSS file, but a .PCODE file !) So, I await help ... (If it's possible...) Link to comment Share on other sites More sharing options...
Fred Tetra Posted October 29, 2004 Share Posted October 29, 2004 The file produced by nwnnsscomp is the best you're going to get. It's a disassembly of a machine code file. Local variables names are not stored in the file, so there's no way for nwnnsscomp to put them in the output file. It's analogous to compiling a C++ file to a binary file (like a .dll or .exe file) and running it through a tool like w32dasm. Just like the nwnnsscomp output, you can see the names of certain functions called, but you're not going to get C++ source out of it. If you want to learn more about how .ncs files work, go here. As far as your project, if by "modify the items gived(sp) by Ajuur The Hutt" you mean you want to alter those items' characteristics, you don't need to necessarily change the script; you can just edit the files from the tar0****.rim file or from templates.bif using Kotor Tool, then save your changed versions to your KotOR installation's Override directory. If you mean that you want to change what items are given, you would likely have to recreate the script and compile it. Good Luck! Link to comment Share on other sites More sharing options...
TemporaryTomato Posted October 29, 2004 Share Posted October 29, 2004 I remember seeing a mod that gave you "Bendaks armor" after you killed him. Maybe you could take a look at that? Link to comment Share on other sites More sharing options...
Darth333 Posted October 29, 2004 Share Posted October 29, 2004 Originally posted by Fred Tetra If you want to learn more about how .ncs files work, go here. Yup useful link, I inluded this in the Guide for the Newbie sometime ago If you mean that you want to change what items are given, you would likely have to recreate the script and compile it. This is one solution but there is another easy solution which very practical when the original script calls many functions (dunno if this is the case I haven't looked at "k_ptar_duelrew.ncs ") or when the person is not comfortable recreating a script: Rename the original "k_ptar_duelrew.ncs " to something else (old_script.ncs per example) Then make a new one called "k_ptar_duelrew.nss " that will use the CreateItemOnObject function to give the new items, and then the ExecuteScript function: ExecuteScript("old_script", OBJECT_SELF); and to get rid of the old objects, it is also possible to use the DestroyObject function. If you have problems with this Glakamech, just mention it and I'll look at it. Link to comment Share on other sites More sharing options...
Leviathan Posted October 29, 2004 Author Share Posted October 29, 2004 Thank you for your help ! So, for my problem : I just want to add some entries in the file "k_ptar_duelrew.ncs" : I want to add "g_a_class90xx" (Mandalorian Assault Armor) and "g_head" (The mandalorian's helmet) to the items gived by Ajuur when you killed Bendak during the final duel... It's easy in appearance, but more difficult in reality ... So, could you give me scripts corresponding to my project ?... I'm not a script's master ... Could you give me some adresses where I can follow a "training" (In French or English ...) I thank you in advance !... Link to comment Share on other sites More sharing options...
Darth333 Posted October 29, 2004 Share Posted October 29, 2004 Originally posted by Galakmech So, for my problem : I just want to add some entries in the file "k_ptar_duelrew.ncs" : I want to add "g_a_class90xx" (Mandalorian Assault Armor) and "g_head" (The mandalorian's helmet) to the items gived by Ajuur when you killed Bendak during the final duel... Err...are those .uti files? I know there is one for the mandalorian assault armor but I haven't seen any mandalorian helmet in the game...unless you made them. In the scripts you have to use the tag of your oject (it is in the tag field of the corresponding .uti file). The script would go like this: void main () { object oPC = GetPCSpeaker(); CreateItemOnObject("my_uti_tag1",oPC); CreateItemOnObject("my_uti_tag2",oPC); ExecuteScript("old_script", OBJECT_SELF); } old script is the original "k_ptar_duelrew.ncs " which you renamed to old_script.ncs (or whatever you want) Change my_uti_tag1 and my_uti_tag1 for the tag of the .uti files you are using, save as k_ptar_duelrew.nss and compile your script. If you want to destroy the original objects that are given to you, the use the DestroyObeject function. If you have problems with this, you can PM me any time (in French if you wish) I'm not a script's master ... Could you give me some adresses where I can follow a "training" (In French or English ...) Check this thread: http://www.lucasforums.com/showthread.php?s=&threadid=139180 Link to comment Share on other sites More sharing options...
Leviathan Posted October 30, 2004 Author Share Posted October 30, 2004 Thanks for your precious help ! (And for the script, of course...) Oh, I have an other question : Could you tell me more about the "DestroyObjectFunction" and give me examples of codes using this function ?... Now, for the items I want to add : They have all the extension ".UTI". The "g_head" item exists really, but it is hidden (Like other objects...) : We think that they can't exist because they do not appear in the "Templates" folder. These items are directly integrated in ".UTC" files without be mentioned in other folders. The "g_head" item, for example, is in the inventory of the mandalorian captain, located in the "Unknown World". You get the mandalorian assault armor on his corpse. You get an other "mandalorian head" on Kashyyyk : It's the mandalorian commander who have it. Then, you have to bring it to the injured wookie. (The wookie who is fighting against a mandalorian faction in the beginning of the level, after the Czerka's force field) In the two cases, you can't wear the mandalorian helmet (Except, if you wear the assault armor) Thanks again for your assistance !... Link to comment Share on other sites More sharing options...
Tesla Posted October 30, 2004 Share Posted October 30, 2004 The Mando helmet is an item you give to a wookie in the shadowlands after killing all of the cloaked mandos. It's on the commanders body. It's not an actual model i don't think just an item with the iw_ image as the helmet from the Assualt Armor, it's a useless item which does nothing. Link to comment Share on other sites More sharing options...
Leviathan Posted October 30, 2004 Author Share Posted October 30, 2004 it's a pity that we cannot carry this helmet with any armour or clothes ... Link to comment Share on other sites More sharing options...
Darth333 Posted October 30, 2004 Share Posted October 30, 2004 Originally posted by Galakmech Oh, I have an other question : Could you tell me more about the "DestroyObjectFunction" and give me examples of codes using this function ?... Actually, I wasn't at home and didn't have access to nwscript.nss when I told you this, the proper function to use is ActionTakeItem (sorry abou that - it is possible to use the other one too but much easier with this one) Et voici: void main () { object oPC = GetPCSpeaker(); object oBlaster=GetObjectByTag("G_W_BLSTRPSTL005"); CreateItemOnObject("my_uti_tag1",oPC); CreateItemOnObject("my_uti_tag2",oPC); ExecuteScript("old_script", OBJECT_SELF); ActionTakeItem(oBlaster, oPC); } Link to comment Share on other sites More sharing options...
Leviathan Posted October 30, 2004 Author Share Posted October 30, 2004 Thank you still for the help that you brought to me !... ************************************************** I'm not excellent in scripting, but I can help you when you're blocked in a SW : KotOR level... Do not forget it !!! Link to comment Share on other sites More sharing options...
Leviathan Posted November 2, 2004 Author Share Posted November 2, 2004 Before starting SW : KotOR once again, I would like to be sure that the script you gave to me will function correctly ... So, I ask you if you're really sure of yourself about this script ... Excuse me for my mistrust, but I would not like to have to start KotOR again because the script won't have functioned ... Good bye ! Link to comment Share on other sites More sharing options...
Darth333 Posted November 2, 2004 Share Posted November 2, 2004 Look I haven't tested the script but it should work. I have used similar scripts many times. I cannot test every script, when I answer questions. You know when I scripted some force powers, it took me quite a few shots before finding the proper visual effects and the targetting area. It is just normal. Make sure you have the right tags for your items. Testing a script does not require you to restart a game or a module. What you should do is save your game before you get to this dialogue with Ajuur and keep that saved game. Test the mod and if some adjustments are needed, then make them, recompile and simply reload your saved games. It only takes a few seconds. You don't even need to completely close the game when you recompile a script: simply minimize it. Link to comment Share on other sites More sharing options...
Leviathan Posted November 2, 2004 Author Share Posted November 2, 2004 Thank you for the help ! A très bientôt, j'espère ! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.