.:Sam:. Posted October 24, 2010 Share Posted October 24, 2010 Correct me if I'm wrong, but wouldn't it work in-game if you simply compiled it and had it as the OnEnter script in the modules .are file? Link to comment Share on other sites More sharing options...
Qui-Gon Glenn Posted October 24, 2010 Share Posted October 24, 2010 [quote name=..]Correct me if I'm wrong, but wouldn't it work in-game if you simply compiled it and had it as the OnEnter script in the modules .are file?Yes and no.... if you edit modules directly, you can encounter mod compatibility issues. It is a better way to use the script injection method of using the OnEnter in the override, as you avoid causing problems for other mods and your own upon installation. It is also easier to troubleshoot mod compatibility this way. In the case of BoS and Redhawke's Jawa Shop, I found that the problem between the two was conflicting OnEnter's, which I never would have found (or at least not as quickly) if they were buried in the .mod. In that case, all I had to do was rename a file and change the OnEnter to find the new filename and both mods worked. Link to comment Share on other sites More sharing options...
TimBob12 Posted October 28, 2010 Share Posted October 28, 2010 Alright, I made my script, but I have 3 questions: 1.) Where do I put my X and Y Orientations? 2.) How do I add more people to this script, and also a placeable? 3.) How do I make this script work ingame? I don't get what you mean by X and Y orientations The three numbers you get when using the 'whereami' cheat should be entered in the brackets after 'Vector'. CreateObject(OBJECT_TYPE_CREATURE, "kor_czex1", Location(Vector(#1,#2,#3), 0.0)); There is no way to get a number from the game about orientation so you just have to play around. The orientation goes immediately after the three numbers where the '0.0' is. CreateObject(OBJECT_TYPE_CREATURE, "kor_czex1", Location(Vector(22.99,23.79,59.10), Orientation)); (This is the same for placeables by the way) to add more people just repeat the code but change "kor_czex1" to the tag of your other utc file. To create a placeable replace 'OBJECT_TYPE CREATURE' with 'OBJECT_TYPE_PLACEABLE' and make "kor_czex1" the tag of your utp file. CreateObject(OBJECT_TYPE_PLACEABLE, "kor_czex1", Location(Vector(22.99,23.79,59.10), 0.0)); OK, now comes the mini tutorial, getting it working in game. First you have to extract the original on_enter script for the area (should be a .ncs file) and rename it so it has 'old_' at the begining. You already have most of your script done just make sure that before the final curly bracket you have: ExecuteScript("old_old script name", OBJECT_SELF); This means that the old code will still be run even with your new code running. Then save your script BUT MAKE SURE THAT WHEN YOU SAVE IT THE EXTENSION IS .NSS AND THAT IT IS THE SAME NAME AS THE ORIGINAL ON_ENTER SCRIPT BEFORE YOU RENAMED IT OR THIS WILL NOT WORK!!!!! (This cannot be stressed enough ) Then you have to open up KOTOR Tool and open up the text edior from the menu at the top. Show spoiler (hidden content - requires Javascript to show) Then with the text editor open up your .nss file. (This is just an on_enter script I made for a mod i am making and it is for the Tatooine Cantina) Show spoiler (hidden content - requires Javascript to show) This next step is very important. Go to the script menu at the top and click on 'Script is for KOTOR 1'. Show spoiler (hidden content - requires Javascript to show) Now go to file, save and just overite the original file. (If you do this now then it doesn't make it more confusing later on. Then go to the script menu again and click on 'Compile' Show spoiler (hidden content - requires Javascript to show) If all went well and there were no errors then this should pop up: Show spoiler (hidden content - requires Javascript to show) If not it will state the error and the line. Usually errors are quite easy to fix like you missed out a semi colon. If you get stuck you can post here or ask me . Then if you look in the folder you saved the .nss , there should now be a .NCS file. This is your compiled script and the file that the game can read. Now you need to place your new compiled script and your old renamed one in your Overide directory and you are DONE!. Phew. My longest post yet. If you have any problems just post them and i will do my best to answer them TimBob12 Link to comment Share on other sites More sharing options...
LDR Posted October 28, 2010 Author Share Posted October 28, 2010 Thanks man. I'll work on the script later. A little busy with homework over here. lol Link to comment Share on other sites More sharing options...
Qui-Gon Glenn Posted October 28, 2010 Share Posted October 28, 2010 I don't get what you mean by X and Y orientations? IIRC, I believe that they are now given as output from the whereami armband, functionality added by glovemaster. Nice little tut tho! Link to comment Share on other sites More sharing options...
LDR Posted October 29, 2010 Author Share Posted October 29, 2010 void main() { object oEntering = GetEnteringObject(); object oPC=GetFirstPC(); if (GetIsPC(oEntering)) { //check if the object is already there to avoid multiple objects if (!GetIsObjectValid(GetObjectByTag("kor_czex1"))) { //Note that the script uses OBJECT_TYPE_CREATURE instead of OBJECT_TYPE_PLACEABLE - that's the only difference with the container: CreateObject(OBJECT_TYPE_CREATURE, "kor_czex1", Location(Vector(22.99,23.79,59.10), 00.28)); CreateObject(OBJECT_TYPE_CREATURE, "kor_czex2", Location(Vector(40.78,00.68,59.22), 00.23)); CreateObject(OBJECT_TYPE_CREATURE, "kor_czex3", Location(Vector(32.08,-40.12,59.16), 00.12)); CreateObject(OBJECT_TYPE_CREATURE, "kor_cmer", Location(Vector(18.13,11.03,58.94), 00.97)); CreateObject(OBJECT_TYPE_CREATURE, "kor_coff1", Location(Vector(10.20,-20.08,63.71), -00.61)); CreateObject(OBJECT_TYPE_CREATURE, "kor_coff2", Location(Vector(10.24,08.61,63.71), -00.70)); CreateObject(OBJECT_TYPE_CREATURE, "kor_coff3", Location(Vector(10.96,10.71,63.71), 00.99)); CreateObject(OBJECT_TYPE_CREATURE, "kor_coff4", Location(Vector(10.96,10.71,63.71), 00.99)); ExecuteScript("k33b_openacademy", OBJECT_SELF); } I made the script but the compiler keeps aborting it. I have no idea what the error is. Link to comment Share on other sites More sharing options...
newbiemodder Posted October 29, 2010 Share Posted October 29, 2010 I'm not a scipter, so assuming your script is logically right. I think your a missing som }'s void main() { object oEntering = GetEnteringObject(); object oPC=GetFirstPC(); if (GetIsPC(oEntering)) { //check if the object is already there to avoid multiple objects if (!GetIsObjectValid(GetObjectByTag("kor_czex1"))) { //Note that the script uses OBJECT_TYPE_CREATURE instead of OBJECT_TYPE_PLACEABLE - that's the only difference with the container: CreateObject(OBJECT_TYPE_CREATURE, "kor_czex1", Location(Vector(22.99,23.79,59.10), 00.28)); CreateObject(OBJECT_TYPE_CREATURE, "kor_czex2", Location(Vector(40.78,00.68,59.22), 00.23)); CreateObject(OBJECT_TYPE_CREATURE, "kor_czex3", Location(Vector(32.08,-40.12,59.16), 00.12)); CreateObject(OBJECT_TYPE_CREATURE, "kor_cmer", Location(Vector(18.13,11.03,58.94), 00.97)); CreateObject(OBJECT_TYPE_CREATURE, "kor_coff1", Location(Vector(10.20,-20.08,63.71), -00.61)); CreateObject(OBJECT_TYPE_CREATURE, "kor_coff2", Location(Vector(10.24,08.61,63.71), -00.70)); CreateObject(OBJECT_TYPE_CREATURE, "kor_coff3", Location(Vector(10.96,10.71,63.71), 00.99)); CreateObject(OBJECT_TYPE_CREATURE, "kor_coff4", Location(Vector(10.96,10.71,63.71), 00.99)); ExecuteScript("k33b_openacademy", OBJECT_SELF); } [color="Yellow"]}}[/color] Try adding two more....see the yellow Link to comment Share on other sites More sharing options...
LDR Posted October 29, 2010 Author Share Posted October 29, 2010 It still isn't working. This is what the error message is saying: Lookup path root set to: C:\Program Files\LucasArts\SWKotOR\ Loaded nescript.nss from C:\Program Files\LucasArts\SWKotOR\override/ Compiling k33b_open academy.nss k33b_open academy.nss(22): Error: Unexpected end of file Compilation aborted with errors Total Execution time = 16 ms I need help. I used to be able to compile scripts easily, but now I don't know what is happening. Link to comment Share on other sites More sharing options...
TriggerGod Posted October 29, 2010 Share Posted October 29, 2010 With my now rudimentary knowledge of coding, I can tell that you are missing a couple end braces void main() { object oEntering = GetEnteringObject(); object oPC=GetFirstPC(); if (GetIsPC(oEntering)) { //check if the object is already there to avoid multiple objects if (!GetIsObjectValid(GetObjectByTag("kor_czex1"))) { //Note that the script uses OBJECT_TYPE_CREATURE instead of OBJECT_TYPE_PLACEABLE - that's the only difference with the container: CreateObject(OBJECT_TYPE_CREATURE, "kor_czex1", Location(Vector(22.99,23.79,59.10), 00.28)); CreateObject(OBJECT_TYPE_CREATURE, "kor_czex2", Location(Vector(40.78,00.68,59.22), 00.23)); CreateObject(OBJECT_TYPE_CREATURE, "kor_czex3", Location(Vector(32.08,-40.12,59.16), 00.12)); CreateObject(OBJECT_TYPE_CREATURE, "kor_cmer", Location(Vector(18.13,11.03,58.94), 00.97)); CreateObject(OBJECT_TYPE_CREATURE, "kor_coff1", Location(Vector(10.20,-20.08,63.71), -00.61)); CreateObject(OBJECT_TYPE_CREATURE, "kor_coff2", Location(Vector(10.24,08.61,63.71), -00.70)); CreateObject(OBJECT_TYPE_CREATURE, "kor_coff3", Location(Vector(10.96,10.71,63.71), 00.99)); CreateObject(OBJECT_TYPE_CREATURE, "kor_coff4", Location(Vector(10.96,10.71,63.71), 00.99)); } ExecuteScript("k33b_openacademy", OBJECT_SELF); } } Of course I could be completely off, but in my short time of programming, my most common error was forgetting the correct number of end brackets I needed. Link to comment Share on other sites More sharing options...
LDR Posted October 30, 2010 Author Share Posted October 30, 2010 It still isn't working. Is there another way to compile a script? Link to comment Share on other sites More sharing options...
TimBob12 Posted October 30, 2010 Share Posted October 30, 2010 I just compiled the script that Trigger God posted with no problems what so ever. Ive uploaded the .ncs to filefront. http://www.filefront.com/17451321/[name this as the original on enter script].ncs don't forget to name them correctly otherwise they won't run Link to comment Share on other sites More sharing options...
LDR Posted October 30, 2010 Author Share Posted October 30, 2010 Thanks. My computer must hate me. lol Actually it was because there was a space instead of a _ , which I just noticed now. Link to comment Share on other sites More sharing options...
LDR Posted October 31, 2010 Author Share Posted October 31, 2010 I made my script but when I enter the module a second time, they spawn AGAIN, putting two instead of 1. When I warp there again, there will be three there where there should be one. I think it's looping. Somebody help? void main() { object oEntering = GetEnteringObject(); object oPC=GetFirstPC(); if (oEntering==oPC) { //check if the object is already there to avoid multiple objects if (!GetIsObjectValid(GetObjectByTag("kor_czex1"))) { //Note that the script uses OBJECT_TYPE_CREATURE instead of OBJECT_TYPE_PLACEABLE - that's the only difference with the container: CreateObject(OBJECT_TYPE_CREATURE, "kor_coff1", Location(Vector(10.47,8.82,63.72), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_coff2", Location(Vector(10.48,-2.28,63.72), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_coff3", Location(Vector(32.62,0.65,59.14), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_coff4", Location(Vector(32.65,6.00,59.14), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_sgrd1", Location(Vector(40.57,8.33,59.11), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_sgrd2", Location(Vector(40.92,4.77,59.11), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_cmer", Location(Vector(20.46,12.05,58.94), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_czex1", Location(Vector(19.21,6.88,58.97), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_czex2", Location(Vector(22.99,24.14,59.11), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_czex3", Location(Vector(41.07,0.63,59.32), 0.00)); } //ExecuteScript("k33b_openacademy", OBJECT_SELF); } } Link to comment Share on other sites More sharing options...
logan23 Posted October 31, 2010 Share Posted October 31, 2010 you have to do a checkon one of the newly spawned npcs, so if this one npc is present, do not fire......if the npc is not present then the script will spawn them void main() { if ((GetEnteringObject() == GetFirstPC())){ if( GetObjectByTag( "pl1" ) == OBJECT_INVALID ) CreateObject(OBJECT_TYPE_CREATURE, "pl1", Location(Vector(12.236,4.148,0.856), 0.92)); CreateObject(OBJECT_TYPE_CREATURE, "pl2", Location(Vector(-39.104,16.36,9.345), 0.07)); } } Link to comment Share on other sites More sharing options...
LDR Posted October 31, 2010 Author Share Posted October 31, 2010 void main() { if ((GetEnteringObject() == GetFirstPC())){ if( GetObjectByTag( "p1" ) == OBJECT_INVALID ) CreateObject(OBJECT_TYPE_CREATURE, "kor_coff1", Location(Vector(10.47,8.82,63.72), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_coff2", Location(Vector(10.48,-2.28,63.72), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_coff3", Location(Vector(32.62,0.65,59.14), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_coff4", Location(Vector(32.65,6.00,59.14), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_sgrd1", Location(Vector(40.57,8.33,59.11), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_sgrd2", Location(Vector(40.92,4.77,59.11), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_cmer", Location(Vector(20.46,12.05,58.94), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_czex1", Location(Vector(19.21,6.88,58.97), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_czex2", Location(Vector(22.99,24.14,59.11), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_czex3", Location(Vector(41.07,0.63,59.32), 0.00)); } } Logan, I made the script you mentioned above, but they're still looping. Link to comment Share on other sites More sharing options...
logan23 Posted October 31, 2010 Share Posted October 31, 2010 Here you go void main() { if ((GetEnteringObject() == GetFirstPC())){ if( GetObjectByTag( "kor_coff1" ) == OBJECT_INVALID ) { CreateObject(OBJECT_TYPE_CREATURE, "kor_coff1", Location(Vector(10.47,8.82,63.72), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_coff2", Location(Vector(10.48,-2.28,63.72), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_coff3", Location(Vector(32.62,0.65,59.14), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_coff4", Location(Vector(32.65,6.00,59.14), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_sgrd1", Location(Vector(40.57,8.33,59.11), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_sgrd2", Location(Vector(40.92,4.77,59.11), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_cmer", Location(Vector(20.46,12.05,58.94), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_czex1", Location(Vector(19.21,6.88,58.97), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_czex2", Location(Vector(22.99,24.14,59.11), 0.00)); CreateObject(OBJECT_TYPE_CREATURE, "kor_czex3", Location(Vector(41.07,0.63,59.32), 0.00)); } } } Link to comment Share on other sites More sharing options...
LDR Posted November 30, 2010 Author Share Posted November 30, 2010 Hello everybody! Sorry for the lack of updates as I'm taking a break from my Korriban Restoration. To make up for that, I just released a new mod: http://knightsoftheoldrepublic.filefront.com/file/LordDeathRays_KOTOR_Improvement_Mod_LKIM;117596 . This is a private project I made which I WILL update eventually. Link to comment Share on other sites More sharing options...
Jaevyn Posted December 1, 2010 Share Posted December 1, 2010 I have to hand it to you, a new ship that is more interactable than the "Ebon Hawk", a "Prison Ship" mod and then "Katarr" (I toyed with the idea for a while myself). All of these are excellent ideas and have alot of promise. Link to comment Share on other sites More sharing options...
LDR Posted December 1, 2010 Author Share Posted December 1, 2010 What can I say? I'm a young man with an open mind! lol Link to comment Share on other sites More sharing options...
LDR Posted December 2, 2010 Author Share Posted December 2, 2010 Hey everybody! I hope everyone had a great Thanksgiving! I sure did! Now, I apparently fail at OnEnter script, so I'm going to start up my prison ship mod again. I can imagine all the happy faces, such as yours, Holty. Now, I have something to show you all. Show spoiler (hidden content - requires Javascript to show) Thanks to Dak for making me the skin. All I'll tell you about this guy is that he is a major character in one of the side quests. Link to comment Share on other sites More sharing options...
Dak Drexl Posted December 2, 2010 Share Posted December 2, 2010 Awesome LDR it's looking pretty good. If you want any other character skins let me know! Always happy to help out. Looking forward to you finally finishing the prison ship... do you have to start all over again? Link to comment Share on other sites More sharing options...
LDR Posted December 2, 2010 Author Share Posted December 2, 2010 Awesome LDR it's looking pretty good. If you want any other character skins let me know! Always happy to help out. Looking forward to you finally finishing the prison ship... do you have to start all over again? Most of it, if not all of it. I wrote down all the coordinates on a piece of paper, but I think I lost it. Also, it was written in pen, so some of the coordinates were scribbled off after I used them. If all else fails, I could just stare at the videos and remake the coordinates by hand. Link to comment Share on other sites More sharing options...
Holty1-5 Posted December 4, 2010 Share Posted December 4, 2010 Hello everybody! Sorry for the lack of updates as I'm taking a break from my Korriban Restoration. To make up for that, I just released a new mod: http://knightsoftheoldrepublic.filefront.com/file/LordDeathRays_KOTOR_Improvement_Mod_LKIM;117596 . This is a private project I made which I WILL update eventually. Looks Good had similar ideas myself months ago but never actually got round to it. so I'm going to start up my prison ship mod again. I can imagine all the happy faces, such as yours, Holty. Me? don't even have Kotor Installed. it would make a mighty big temptation for me to re-install... and a even bigger one to make me mod again (By Temptation i mean Money xD) Have Fun LDR don't let It drive you Insane... That why i live in this white room "Crazy Laugh" Link to comment Share on other sites More sharing options...
.:Lord Revan:. Posted December 9, 2010 Share Posted December 9, 2010 Looking forward to the mods LDR. Link to comment Share on other sites More sharing options...
LDR Posted December 30, 2010 Author Share Posted December 30, 2010 Hey guys! One of my mods just got onto KFiles: http://knightsoftheoldrepublic.filefront.com/file/Improved_Dark_Jedi;117939 This is the last of the 'filler' mods I made, so no more mods without you guys knowing. I'm actively working on LKIM 2.0., but progress has been slow. 2da isn't being very cooperative... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.