JediKnight707 Posted October 4, 2005 Share Posted October 4, 2005 I was thinking of putting my sabers from my Movie Saber mod inside the corpse like this person's mod (from the Holowan Plugin) did here. Or maybe doing it like this and this where I just put in a dead body. I was wondering how I would do this. Link to comment Share on other sites More sharing options...
Darth333 Posted October 4, 2005 Share Posted October 4, 2005 Check the sticky tutorials: Non-scripting method: http://lucasforums.com/showthread.php?t=134067 (note that you have to be sure that your .utc or .utp file is unique to use this method - use tk102's findrefs to search.) Scripting method (safe): http://lucasforums.com/showthread.php?t=143536 Link to comment Share on other sites More sharing options...
ChAiNz.2da Posted October 4, 2005 Share Posted October 4, 2005 with TSL it gets tricky You'll need to do some scripting work. This thread should point you in the right direction http://www.lucasforums.com/showthread.php?t=143536 Link to comment Share on other sites More sharing options...
JediKnight707 Posted October 4, 2005 Author Share Posted October 4, 2005 *crying* I was hoping that it didn't have to have any scripting involved. Alas, its for the greater good, so I should be grateful (BTW Can anybody help me with the scripting?) Link to comment Share on other sites More sharing options...
Darkkender Posted October 4, 2005 Share Posted October 4, 2005 Unless somebody beats me to it I'll try to throw an example script up for you tonight. Link to comment Share on other sites More sharing options...
Darth333 Posted October 4, 2005 Share Posted October 4, 2005 J_k_707: A lot of people are scared by scripting but without reason. Trust me, scripting is not difficult. Start reading the tutorial. It has quite a few exmaples in it and if you have questions just ask them. Basically, the tutorial is just asking you to copy and paste the script, change the area name, the tag of the placeable and the template of your item and finally compile. Once you've done it once, you'll find it easy the next time Give it a try and paste your final script here if you want us to review it. Edit: basically, a simple script to place an object in a container or npc is: void main() { //target the object on which you want to place the item object oContainer=GetObjectByTag("container_tag"); //tell the game to create your item on the targetted container: CreateItemOnObject("my_item_template",oContainer); } Replace container_ tag by the tag of the .utc or .utp on which you want to place the item and replace my_item_template by the template of your item. The above code will work fine if you attach it to a unique dialogue branch that will not be repeated. However, if you attach it to a non unique dialogue branch or the area onenter event and don't set a variable as explained in tk102's post in the tutorial, a new item will be spawned each time the dialogue line is repeated or each time you enter the area. Link to comment Share on other sites More sharing options...
JediKnight707 Posted October 4, 2005 Author Share Posted October 4, 2005 This is what I came up with by using RedHawke's script in the tut: void main() { float x=0.00f; //Here is where you add the 'whereami' cheat coordinate 1. float y=0.00f; //Here is where you add the 'whereami' cheat coordinate 2. float z=0.00f; //Here is where you add the 'whereami' cheat coordinate 3. float r=0.0f; // This is where you set the orientation of the placeable, set in degrees. vector MyVec = Vector(x,y,z); //line 1 location MyLoc = Location(MyVec, r); //line 2 object oLocker=CreateObject( OBJECT_TYPE_PLACEABLE, "footlker099", MyLoc); //line3 CreateItemOnObject("anakin_saber", oLocker); CreateItemOnObject("obiwan_saber", oLocker); CreateItemOnObject("jinn_saber", oLocker, 2); CreateItemOnObject("palpatine_saber", oLocker); CreateItemOnObject("yoda_saber", oLocker); CreateItemOnObject("maul_saber", oLocker); CreateItemOnObject("windu_saber", oLocker); CreateItemOnObject("luke_saber", oLocker); } As far as I can tell, all I need to change is the coordinate things. But I have never done a script, so I don't know. EDIT: And here are the coordinate's I'm going to use: -26.33176 11.75565 9.11693 Orientation=138.02206 Bearing=2.40894 Link to comment Share on other sites More sharing options...
Darth333 Posted October 4, 2005 Share Posted October 4, 2005 1. You can get the coordinates of where to place your container/corpse or wahtever with my wehreami armband: http://www.lucasforums.com/showthread.php?s=&threadid=144260 (edit: I see you already have the coordinates, just ignore the bearing - the script uses orientation - degrees.) 2. change footlker099 by the template of your custom container 3. In the lines where it says CreateItemOnObject("anakin_saber", oLocker) replace anakin_saber by the template of your .uti 4. compile: http://lucasforums.com/showthread.php?t=143681 5. drop the .ncs (compiled script), .uti and .utp file in the override folder. Link to comment Share on other sites More sharing options...
stoffe Posted October 4, 2005 Share Posted October 4, 2005 (BTW Can anybody help me with the scripting?) (Here is one variant of doing it. This is a modified script for opening the door to the morgue, a_doormor.nss, which will spawn two lightsabers at the corpse that holds the plasma torch. Since that corpse does not have an unique tag we check for the object that currently possesses the torch instead.) // ST: a_doormor.nss void main() { object oDoor = GetObjectByTag("MorgueDoor"); SetLocked(oDoor, FALSE); DelayCommand(1.0, AssignCommand(oDoor, ActionOpenDoor(oDoor))); object oCorpse = GetItemPossessor(GetObjectByTag("plasmatorch")); if (GetIsObjectValid(oCorpse)) { CreateItemOnObject("CustomSaber", oCorpse); } } Change where it says CustomSaber to the Resref (filename without .UTI suffix) of your custom saber. Compile that script and save the resulting a_doormor.ncs file in Override, and the saber should spawn on the corpse when you use the medbay computer to unlock the morgue door. Link to comment Share on other sites More sharing options...
JediKnight707 Posted October 4, 2005 Author Share Posted October 4, 2005 (This is for Darth's questions) 2. Can I simply name it footlker099 or do I HAVE TO change it? I just think that it would be easier with it like that. 3. anakin_saber is the name of m .uti file that I want to include 4. Ok 5. I didn't edit any .uti or .utp files Link to comment Share on other sites More sharing options...
Darth333 Posted October 4, 2005 Share Posted October 4, 2005 Redhawke' s script will spawn a new custom container with your items in it. You don't need to drop the .uti file in the override folder if the item is already in the .bifs but since it's your custom sabers, you'll have to point to your custom .uti files. Give a try to stoffe's script If you need something more specific, a corpse or a container in particular, tell us which one exactly. Link to comment Share on other sites More sharing options...
JediKnight707 Posted October 4, 2005 Author Share Posted October 4, 2005 Here's what I've got with stoffe's script: void main() { object oDoor = GetObjectByTag("MorgueDoor"); SetLocked(oDoor, FALSE); DelayCommand(1.0, AssignCommand(oDoor, ActionOpenDoor(oDoor))); object oCorpse = GetItemPossessor(GetObjectByTag("plasmatorch")); if (GetIsObjectValid(oCorpse)) { CreateItemOnObject("anakin_saber", oCorpse); CreateItemOnObject("jinn_saber", oCorpse); CreateItemOnObject("luke_saber", oCorpse); CreateItemOnObject("maul_saber", oCorpse); CreateItemOnObject("obiwan_saber", oCorpse); CreateItemOnObject("palpatine_saber", oCorpse); CreateItemOnObject("windu_saber", oCorpse); CreateItemOnObject("yoda_saber", oCorpse); } } All I need to do is compile it right? Link to comment Share on other sites More sharing options...
Darth333 Posted October 4, 2005 Share Posted October 4, 2005 looks good Link to comment Share on other sites More sharing options...
JediKnight707 Posted October 4, 2005 Author Share Posted October 4, 2005 It looks good, but alas something is wrong. It won't open the morgue door, even when I tell it to. Any idea's why? Link to comment Share on other sites More sharing options...
stoffe Posted October 4, 2005 Share Posted October 4, 2005 It looks good, but alas something is wrong. It won't open the morgue door, even when I tell it to. Any idea's why? Hmm, it works just fine here (after changing the resrefs to something I have), so you may have made some kind of mistake. How and with what did you compile the script? Did you name the script properly? Link to comment Share on other sites More sharing options...
JediKnight707 Posted October 4, 2005 Author Share Posted October 4, 2005 I probably compiled it wrong. I named the script just as how you said to name it, and I stuck nwnnsscomp.exe in override, along with my script. Then I put in this nwnnsscomp -v1.00 *.nss too. Link to comment Share on other sites More sharing options...
Darth333 Posted October 4, 2005 Share Posted October 4, 2005 which compiler are you using? With Fred's you have to specify the game : -g 2 for kotor 2 Link to comment Share on other sites More sharing options...
JediKnight707 Posted October 4, 2005 Author Share Posted October 4, 2005 Yes, I'm using Fred's. So how would I do it? Link to comment Share on other sites More sharing options...
Darth333 Posted October 4, 2005 Share Posted October 4, 2005 read this: http://lucasforums.com/showthread.php?t=143681 in the part where it says: "B. How to use Fred Tetra's script compiler/decompiler" You don't need the -v1.00 switch with Fred's compiler. Link to comment Share on other sites More sharing options...
JediKnight707 Posted October 4, 2005 Author Share Posted October 4, 2005 Ok, I was wondering, do I place this nwnnsscomp -c -g 2 my_script.nss as a seperate notepad thingy, or in the same notepad as my script? Link to comment Share on other sites More sharing options...
Darth333 Posted October 5, 2005 Share Posted October 5, 2005 neither: you use it when you run nwnnsscomp.exe (in the command prompt) Link to comment Share on other sites More sharing options...
JediKnight707 Posted October 5, 2005 Author Share Posted October 5, 2005 I ran nsscomp, and it said ''Compilation complete: 1/1 file compiled" but there were no other files. Link to comment Share on other sites More sharing options...
Det. Bart Lasiter Posted October 5, 2005 Share Posted October 5, 2005 Try injecting a script. Just follow beancounter's instructions and execute an original copy of the script, although I would try compiling the script from KT's project manager first. Link to comment Share on other sites More sharing options...
oldflash Posted October 10, 2005 Share Posted October 10, 2005 I have found 2 unique places on peragus where I can put my items without scripting. I stiil search for more. One of this is Kreia's corps on peragus morgue. All you need to do is to open gencrps004.utp (2060) with kt (is located in 101PER_s.rim/Blueprint, Placeables. Then check "Has Inventory" box on "Advanced" tab (http://q-net.netfirms.com/programing/07.html) and hit "Inventory" button (bottom left). Add on inventory whatever items you want (also you can add custom datapad which is open right after take-him). Save this file in override dir and start a new game. There are 2 gencrps004.utp in game. One on damaged Ebon Howk- tutorial part and this one from the morgue. This modification have no effect on Kreia's corpse on EH. Just be sure to search Kreia's body before she wake-up. (http://q-net.netfirms.com/programing/08.html) Good luck. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.