CrimsonKnight13 Posted July 12, 2005 Share Posted July 12, 2005 HELLO ALL IT'S ME BLOODKNIGHT13!!! Well I don't know how I did it but I got my new name to work which I'm kinda upset about but that 's OK. I had a tread going ( before the meltdown ) of a party package that consisted of items, both a jedi knight robe and master robe for Atton, Visa, Mira, and Handmaiden and maybe for Bao Dur. Now I don't know how to have the items appear in my inventory after I created them. I'm think of having them be in a container right after you wake up from the kolto tank, but I don't understand the tutial that is up. What are the step the make the container appear with the items? Where do I look to extract my container? Again any and all help is greatly appreciated Link to comment Share on other sites More sharing options...
stoffe Posted July 12, 2005 Share Posted July 12, 2005 Originally posted by CrimsonKnight13 I'm think of having them be in a container right after you wake up from the kolto tank, but I don't understand the tutial that is up. What are the step the make the container appear with the items? Where do I look to extract my container? This is how I do it personally. Perhaps not the most elegant way of handling it, but it works for me at least. I've modified the script that runs when you first arrive on Peragus to spawn an extra plasteel cylinder in the medical storage room behind the first computer console. I then add the things I want to be available to that container through the script. The modified script would look like: // ST: a_hatchopen.nss (101PER_s.rim) void TurnToT3(); // ST: Added... object SpawnStorageBin(); void main() { object oEnter = GetEnteringObject(); if (GetEnteringObject() == GetFirstPC()) { if (GetGlobalNumber("101PER_Sion_Arrives") > 0) PlayRoomAnimation("101PERzc", ANIMATION_ROOM_SCRIPTLOOP01); else PlayRoomAnimation("101PERzc", ANIMATION_ROOM_SCRIPTLOOP02); if (GetLoadFromSaveGame()) { SetGlobalFadeOut(); SetFadeUntilScript(); DelayCommand(2.0, SetGlobalFadeIn(1.0, 1.0)); return; } if (GetGlobalBoolean("PER_TURNINTO_T3M4")) { SetGlobalBoolean("PER_TURNINTO_T3M4", FALSE); DelayCommand(0.1, TurnToT3()); } if (GetGlobalNumber("105PER_T3_End") == 1) { SetGlobalFadeIn(0.0, 1.0); SetGlobalNumber("105PER_T3_End", 2); object oAtton = GetObjectByTag("Atton"); DelayCommand(0.5, AssignCommand(oAtton, ClearAllActions())); DelayCommand(0.5, AssignCommand(oAtton, ActionStartConversation(oEnter, "101Atton", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE))); } object oWP = GetObjectByTag("WP_wakeup_donnie"); if (GetIsObjectValid(oWP) && GetLocalBoolean(oWP, 29)) { PlayRoomAnimation("101per2b", ANIMATION_ROOM_SCRIPTLOOP03); } else { if (GENDER_MALE == GetGender(oEnter)) { SetGlobalBoolean("000_PLAYER_GENDER", TRUE); // return; } // ST: ADD ITEMS TO START WITH TO BIN INVENTORY HERE ----------- object oBin = SpawnStorageBin(); if (GetIsObjectValid(oBin)) { CreateItemOnObject("st_exilerobe01", oBin); CreateItemOnObject("st_exilecirclet", oBin); } // --------------------------------------------------------- SetGlobalFadeOut(); SetFadeUntilScript(); } } } // ST: Added... object SpawnStorageBin() { location lLoc = Location(Vector(-0.99, -5.8, 9.09), 138.0); int nIdx = 0; int bFound = FALSE; object oBin = GetObjectByTag("MilHighPlstcCylin", nIdx); while (GetIsObjectValid(oBin)) { if (GetDistanceBetweenLocations2D(GetLocation(oBin), lLoc) < 0.5) { bFound = TRUE; break; } oBin = GetObjectByTag("MilHighPlstcCylin", ++nIdx); } if (!GetIsObjectValid(oBin) || !bFound) { oBin = CreateObject(OBJECT_TYPE_PLACEABLE, "g_tresmilhig005", lLoc); if (GetIsObjectValid(oBin)) { RemoveHeartbeat(oBin); return oBin; } } return OBJECT_INVALID; } void TurnToT3() { object oT3 = GetObjectByTag("t3m4"); if (GetIsObjectValid(oT3)) { AurPostString("destroying t3 off the map", 5, 15, 10.0); DestroyObject(oT3); } SetNPCSelectability(NPC_T3_M4, FALSE); object oPC = GetFirstPC(); effect eEff = GetFirstEffect(oPC); while (GetIsEffectValid(eEff)) { if (GetEffectType(eEff) == EFFECT_TYPE_PARALYZE) RemoveEffect(oPC, eEff); eEff = GetNextEffect(oPC); } SetGlobalFadeIn(0.0, 2.0); } If you no-one else offers a better solution and you want to use it, find where it calls the CreateItemOnObject function in the script. This is where the items are added to the cargo cylinder. In this example a robe and a headband is added. Change the ResRef of the item for the existing CreateItemOnObject calls, and copy&paste one of those lines if you need to add more. Then save the script as a_hatchopen.nss, compile it and put the resulting NCS file in the override folder, and it should work. Link to comment Share on other sites More sharing options...
Jeff Posted July 12, 2005 Share Posted July 12, 2005 Originally posted by CrimsonKnight13 and maybe for Bao Dur. You can't make robes for Bao-Dur because of his arm. You would have to use an armour model. Link to comment Share on other sites More sharing options...
CrimsonKnight13 Posted July 12, 2005 Author Share Posted July 12, 2005 @Stoffe-mkb- Thanks for the info but where did you go to edit the script? Did you extract a container first? Like the tutial says to do? Did you go to BIFs--scripts.bif--Script. Compiled or Script. Source? Then I would copy everything that you mentioned and in the // ST: ADD ITEMS TO START WITH TO BIN INVENTORY HERE ----------- object oBin = SpawnStorageBin(); if (GetIsObjectValid(oBin)) { CreateItemOnObject("st_exilerobe01", oBin); CreateItemOnObject("st_exilecirclet", oBin); In the ( ) I would put the code for my robes and items, for example it would look like CreateItemOnObject("r_robe_13" , oBin); CreateItemOnObject("r_mrobe_33" , oBin); CreateItemOnObject("r_belt_33" , oBin); And so on, and so on, is that correct? I'm still new to modding, only been doing it for about a month @DarthMoeller OPPS my bad I should have been more clear, I meant to say armor for Bau-Dur. Link to comment Share on other sites More sharing options...
stoffe Posted July 12, 2005 Share Posted July 12, 2005 Originally posted by CrimsonKnight13 where did you go to edit the script? Just use a text editor of your choice. Notepad will do if you don't have anything better. Copy & paste the script from the forum post into a new text document and save it as a_hatchopen.nss. After modifying it to your liking, use nwnnsscomp.exe to compile the a_hatchopen.nss script and put the resulting a_hatchopen.ncs file in your override folder. Originally posted by CrimsonKnight13 Did you extract a container first? Like the tutial says to do? No, I'm reusing one of the standard game container templates rather than make a new one. It felt a bit unnessecary to create a new placeable template when one of the standard ones worked for what I needed it for. If you have a custom container you wish to use, change where the script says MilHighPlstcCylin to the TAG of your container, and where it says g_tresmilhig005 to the ResRef of your container. Originally posted by CrimsonKnight13 Did you go to BIFs--scripts.bif--Script. Compiled or Script. Source? The a_hatchopen script can be found within the 101PER_s.rim file rather than in scripts.bif since it's a module specific script and not a generic one. There's no source code available for it there though, only a NCS bytecode file. I recreated the above posted source code for it manually. Originally posted by CrimsonKnight13 Then I would copy everything that you mentioned and in the (snip) In the ( ) I would put the code for my robes and items, for example it would look like CreateItemOnObject("r_robe_13" , oBin); CreateItemOnObject("r_mrobe_33" , oBin); CreateItemOnObject("r_belt_33" , oBin); And so on, and so on, is that correct? That looks correct as far as I can see, provided that those are the ResRefs of your new items. Link to comment Share on other sites More sharing options...
CrimsonKnight13 Posted July 12, 2005 Author Share Posted July 12, 2005 Hey Stoffe -mkb- thanks alot for the small tutial I'll start looking into it as soon as I have a day off got 2 jobs and the hours are conflicting with my mod time I'm sure I'll come across some more questions. Link to comment Share on other sites More sharing options...
CrimsonKnight13 Posted July 15, 2005 Author Share Posted July 15, 2005 I seem to be having problems on how to compile my script. I wanted to do a test run of the script that Stoffe-mkb- gave me to use to have my new items appear in the container at the medical labs after you wake up from the kolto tank and I can't seem to get my nwnnsscomp.exe to open on my screen to compile my new script. Now I'm sure that I'm doing something wrong since I'm a newbie and all Do I extract the script a_hatchopen script that is in the 101PER_s.rim file? How would I go about compiling my new script? I am having problems not being able to open the nwnnsscomp.exe on my computer. I appreciate any and all help thanks Link to comment Share on other sites More sharing options...
Darth333 Posted July 15, 2005 Share Posted July 15, 2005 Originally posted by CrimsonKnight13 How would I go about compiling my new script? I am having problems not being able to open the nwnnsscomp.exe on my computer. Have a look at the tutorials You can't simply double click on nwnnsscomp.exe: you have to use a command prompt or a .bat file. http://www.lucasforums.com/showthread.php?s=&threadid=143681 Link to comment Share on other sites More sharing options...
CrimsonKnight13 Posted July 30, 2005 Author Share Posted July 30, 2005 well I was having problems trying to understand the tutial of how to compile scripts so I desided to try and add my items by means of the workbench. I'm trying to do the mod for both the PC version and the XBOX version. For the xbox I'm using another save that has the workbench already at the start of the game to test it. I got it to work but it will freeze on me after I remove it and then try to put on a different robe of mine. Any ideas to what might be the cause of the freeze? THANKS UPFRONT FOR THE HELP. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.