randydg Posted July 14, 2005 Share Posted July 14, 2005 I need help on the ebon hawk's map, what i need done is the following: 1. always have corrisant as a destination (after leaving 949cor & 951cor for the first time. 2. Have the planet korriban availble after talking to the council on 951cor the council gives you "orders.uti" maybe attaching the planet viewable to if you have the object? 3.Having Planet Duxan available after talking to hk60 on korriban hk60 gives you "droidorders.uti" maybe attaching the planet viewable to if you have the object? thats all for now, untill i come up with more planets this should do me. Link to comment Share on other sites More sharing options...
Det. Bart Lasiter Posted July 14, 2005 Share Posted July 14, 2005 I believe this makes the planet available when an item is possessed: #include "k_inc_debug" // I'm just including these by default now #include "k_inc_utility" void main() { object oPC = GetItemPossessedBy(GetFirstPC(), "/*Item ResRef*/"); if (oPC = GetFirstPC()) { SetPlanetAvailable(/*planet number*/, TRUE); SetPlanetSelectable(/*planet number*/, TRUE); } else { SetPlanetAvailable(/*planet number*/, FALSE); SetPlanetSelectable(/*planet number*/, FALSE); } } Link to comment Share on other sites More sharing options...
randydg Posted July 14, 2005 Author Share Posted July 14, 2005 thanks! i'll get to work on these things tonight, yalls help has gotten rid of multiple ebon hawks. i had 6 ebon hawks now i just need 3. wee Link to comment Share on other sites More sharing options...
randydg Posted July 14, 2005 Author Share Posted July 14, 2005 How do i tie the map to the ebo exit? i want it to show the group window then exit out the planet i selected on the map. Link to comment Share on other sites More sharing options...
randydg Posted July 14, 2005 Author Share Posted July 14, 2005 What if my planets are new and redone and don't have a planet_name asigned to it how do i do it then?? and also as above how do i tie it to the exit? #include "k_inc_debug" #include "k_inc_utility" void main() { oject oPC = GetItemPossessedBy(GetFirstPC(), "orders"); if (oPC = GetFirstPC()) { SetPlanetAvailable(planet_, TRUE); SetPlanetSelectable(planet_, TRUE); } oject oPC = GetItemPossessedBy(GetFirstPC(), "datapad1"); if (oPC = GetFirstPC()) { SetPlanetAvailable(planet_, TRUE); SetPlanetSelectable(planet_, TRUE); else { SetPlanetAvailable(planet_, FALSE); SetPlanetSelectable(planet_, FALSE); } } Link to comment Share on other sites More sharing options...
stoffe Posted July 14, 2005 Share Posted July 14, 2005 Originally posted by randydg What if my planets are new and redone and don't have a planet_name asigned to it how do i do it then?? The number you use in above mentioned scripting functions to toggle the availability of travel destinations on the galaxy map corresponds to the row label in the planetary.2da file. As for the exit, the game set a global var in the galaxy map script when you travel to a destination. The Ebon Hawk Exit trigger then checks this variable to see what your current location is, and loads the proper module to reflect this when you exit. Link to comment Share on other sites More sharing options...
randydg Posted July 14, 2005 Author Share Posted July 14, 2005 The number you use in above mentioned scripting functions to toggle the availability of travel destinations on the galaxy map corresponds to the row label in the planetary.2da file. So, i would have to edit the planetary.2da file to goto the planet i want it to goto? then throw the edited planetary.2da into the override folder? **edit** in the planetary.2da i don't see a destination that i can change, how does it know to go to the new planet? Link to comment Share on other sites More sharing options...
stoffe Posted July 14, 2005 Share Posted July 14, 2005 Originally posted by randydg in the planetary.2da i don't see a destination that i can change, how does it know to go to the new planet? It doesn't. The galaxy map does not keep track of the actual modules to use, it only keeps track of galaxy map representations for those locations and and allows/denies "travel" between them. It's the exit script of the Ebon Hawk that loads the actual module. The galaxy map sets a global number labeled 003EBO_RETURN_DEST whenever you change destinations. The Hawk exit script then checks this var and loads the appropriate module depending on its value when you leave the ship. Link to comment Share on other sites More sharing options...
Det. Bart Lasiter Posted July 14, 2005 Share Posted July 14, 2005 I think to declare an entirely different planet, you'd either have to switch the modules that the game loads for each planet by default, or edit nwscript.nss, and change the planet integers, for instance: int PLANET_TATOOINE = 0 and so forth for all the planets, then drop *nwscript.nss* into the Override, but your best bet may be within another file (I'm not sure which one though, I don't have TSL installed). Next, to tie the script into the Ebon Hawk's loading ramp, I'd add this script to trigger when the PC exits or enters: #include "k_inc_debug" #include "k_inc_utility" void main() { object oEntering = GetEnteringObject() object oExiting = GetExitingObject(); object oPC = GetFirstPC(); if (oEntering = oPC) { ExectuteScript("/*script name*/", OBJECT_SELF); } else if (oExiting = oPC) { ExecuteScript("/*script name*/", OBJECT_SELF); } else { return; } } ***edit*** Just ignore my advice on nwscript.nss Link to comment Share on other sites More sharing options...
randydg Posted July 14, 2005 Author Share Posted July 14, 2005 This whole map thing is very complicated, wish there was a way to make it much less complicated. #include "k_inc_debug" #include "k_inc_utility" void main() { oject oPC = GetItemPossessedBy(GetFirstPC(), "orders"); if (oPC = GetFirstPC()) { SetPlanetAvailable(planet_, TRUE); SetPlanetSelectable(planet_, TRUE); PlayRoomAnimation("003EBOq", 1); } oject oPC = GetItemPossessedBy(GetFirstPC(), "datapad1"); if (oPC = GetFirstPC()) { SetPlanetAvailable(planet_, TRUE); SetPlanetSelectable(planet_, TRUE); PlayRoomAnimation("003EBOq", 2); } else { SetPlanetAvailable(planet_, FALSE); SetPlanetSelectable(planet_, FALSE); when compileing it gives the following error: C:\Program Files\la\swkotor2\Override>compile -c -g 2 galaxymap.nss Lookup path root set to: C:\Program Files\la\swkotor2\ Loaded nwscript.nss via key file lookup Compiling: galaxymap.nss Loaded k_inc_debug.nss via key file lookup Loaded k_inc_utility.nss via key file lookup galaxymap.nss(5): Error: Syntax error at "oPC" galaxymap.nss(12): Error: Syntax error at "oPC" Compilation aborted with errors Link to comment Share on other sites More sharing options...
Darth333 Posted July 15, 2005 Share Posted July 15, 2005 Originally posted by randydg when compileing it gives the following error: C:\Program Files\la\swkotor2\Override>compile -c -g 2 galaxymap.nss Lookup path root set to: C:\Program Files\la\swkotor2\ Loaded nwscript.nss via key file lookup Compiling: galaxymap.nss Loaded k_inc_debug.nss via key file lookup Loaded k_inc_utility.nss via key file lookup galaxymap.nss(5): Error: Syntax error at "oPC" galaxymap.nss(12): Error: Syntax error at "oPC" Compilation aborted with errors The problem is that you define oPC two times: void main() { oject oPC = GetItemPossessedBy(GetFirstPC(), "orders"); if (oPC = GetFirstPC()) ... oPC cannot be the "item possesed by the PC" and the PC itself at the same time. Use object oItem=GetItemPossessedBy(GetFirstPC(), "orders"); per example. edit: in fact it's defined more than 2 times and object misses a "b" plus oPC doesn't do anything.: try: #include "k_inc_debug" #include "k_inc_utility" void main() { object oItem= GetItemPossessedBy(GetFirstPC(), "orders"); object oItem1 = GetItemPossessedBy(GetFirstPC(), "datapad1"); if (GetIsObjectValid (oItem)) { SetPlanetAvailable(planet_ [color=skyblue]???[/color] , TRUE); SetPlanetSelectable(planet_[color=skyblue]???[/color] , TRUE); PlayRoomAnimation("003EBOq", 1); } [b]else[/b] if (GetIsObjectValid (oItem1)) { SetPlanetAvailable(planet_[color=skyblue]???[/color] , TRUE); SetPlanetSelectable(planet_[color=skyblue]???[/color] , TRUE); PlayRoomAnimation("003EBOq", 2); } else { SetPlanetAvailable(planet_, FALSE); SetPlanetSelectable(planet_, FALSE); Link to comment Share on other sites More sharing options...
randydg Posted July 15, 2005 Author Share Posted July 15, 2005 #include "k_inc_debug" #include "k_inc_utility" void main() { object oItem= GetItemPossessedBy(GetFirstPC(), "orders"); object oItem1 = GetItemPossessedBy(GetFirstPC(), "datapad1"); if (GetIsObjectValid (oItem)) { SetPlanetAvailable(planet_07 , TRUE); SetPlanetSelectable(planet_07 , TRUE); PlayRoomAnimation("003EBOq", 1); } else if (GetIsObjectValid (oItem1)) { SetPlanetAvailable(planet_04 , TRUE); SetPlanetSelectable(planet_04 , TRUE); PlayRoomAnimation("003EBOq", 2); } else { SetPlanetAvailable(planet_07, FALSE); SetPlanetSelectable(planet_07, FALSE); SetPlanetAvailable(planet_04, FALSE); SetPlanetSelectable(planet_04, FALSE); C:\Program Files\la\swkotor2\Override>compile -c -g 2 galaxymap.nss Lookup path root set to: C:\Program Files\la\swkotor2\ Loaded nwscript.nss via key file lookup Compiling: galaxymap.nss Loaded k_inc_debug.nss via key file lookup Loaded k_inc_utility.nss via key file lookup galaxymap.nss(3): Error: Syntax error at "{" galaxymap.nss(6): Error: Syntax error at "if" Compilation aborted with errors Total Execution time = 71 ms Link to comment Share on other sites More sharing options...
Det. Bart Lasiter Posted July 15, 2005 Share Posted July 15, 2005 Try: #include "k_inc_debug" #include "k_inc_utility" void main() // put this on a new line { object oItem= GetItemPossessedBy(GetFirstPC(), "orders"); object oItem1 = GetItemPossessedBy(GetFirstPC(), "datapad1"); if (GetIsObjectValid(oItem)) // don't put a space between "GetIsObjectValid" and (oItem)* { SetPlanetAvailable(6 , TRUE); // use an integer instead (so that it compiles right** SetPlanetSelectable(6 , TRUE); // **here too PlayRoomAnimation("003EBOq", 1); } else if (GetIsObjectValid(oItem1)) // *here too { SetPlanetAvailable(7 , TRUE); // ** and here SetPlanetSelectable(7 , TRUE); // ** and here too PlayRoomAnimation("003EBOq", 2); } else { SetPlanetAvailable(7, FALSE); // ** SetPlanetSelectable(7, FALSE); // ** SetPlanetAvailable(4, FALSE); // ** SetPlanetSelectable(4, FALSE); // ** } // don't forget the end bracket for the 'else' scope } // don't forget the end braket for the main scope either /************************************* ------------------------------------------- NSSCOMP.bat output Fri 07/15/2005 01:53 ------------------------------------------- Compiling: TEST.nss Total Execution time = 62 ms ------------------------------------------- Compilation complete: 1/1 file compiled **************************************/ I included syntax fixes in the comments Link to comment Share on other sites More sharing options...
randydg Posted July 15, 2005 Author Share Posted July 15, 2005 Ok, compiled fine, but when i go in the game & click on the galaxy map it does nuthing, just sits there, i can click on it a bunch of times and nuthing. Link to comment Share on other sites More sharing options...
randydg Posted July 16, 2005 Author Share Posted July 16, 2005 any clue why its not working? Link to comment Share on other sites More sharing options...
Det. Bart Lasiter Posted July 16, 2005 Share Posted July 16, 2005 Did you change any map scripts? Maybe the scripts that trigger movies didn't fire, try going outside of the Ebon Hawk. Link to comment Share on other sites More sharing options...
randydg Posted July 16, 2005 Author Share Posted July 16, 2005 Did you change any map scripts? Maybe the scripts that trigger movies didn't fire, try going outside of the Ebon Hawk. no, didn't change anything just complied it and put it in the invisible002 galaxymap. when i click on the galaxy map it doesn't open the map, not the planets. when i click on the object galaxy map it doesn't do anything. tried exiting once, but i can try it again. Link to comment Share on other sites More sharing options...
Det. Bart Lasiter Posted July 16, 2005 Share Posted July 16, 2005 Ahhh, that happens to me sometimes after I run the game's .exe for a while, try re-starting the game, then selecting it. Link to comment Share on other sites More sharing options...
randydg Posted July 16, 2005 Author Share Posted July 16, 2005 nope, still not working, i tried it a few times, once before i had the object and once after. all it will let me do is click on the object "galaxy map" but won't actualy open the map up. Link to comment Share on other sites More sharing options...
randydg Posted July 16, 2005 Author Share Posted July 16, 2005 here is how i have it... in 003ebo.git placeable: =invisible001 invisible001 properties: name:Galaxy map tag: galaxymap2 aperance invisible only plot item is checked advanced tab: templete resref: invisible001 faction: 1 animation state: 2 type: 0 checked is: party interact & usable scripts: onused:galaxymap then galaxymap.ncs is the one you gave me. Link to comment Share on other sites More sharing options...
Det. Bart Lasiter Posted July 16, 2005 Share Posted July 16, 2005 scripts: onused:galaxymap Bingo! Try this: #include "k_inc_debug" #include "k_inc_utility" void main() // put this on a new line { object oItem= GetItemPossessedBy(GetFirstPC(), "orders"); object oItem1 = GetItemPossessedBy(GetFirstPC(), "datapad1"); if (GetIsObjectValid(oItem)) // don't put a space between "GetIsObjectValid" and (oItem)* { SetPlanetAvailable(6 , TRUE); // use an integer instead (so that it compiles right** SetPlanetSelectable(6 , TRUE); // **here too PlayRoomAnimation("003EBOq", 1); } else if (GetIsObjectValid(oItem1)) // *here too { SetPlanetAvailable(7 , TRUE); // ** and here SetPlanetSelectable(7 , TRUE); // ** and here too PlayRoomAnimation("003EBOq", 2); } else { SetPlanetAvailable(7, FALSE); // ** SetPlanetSelectable(7, FALSE); // ** SetPlanetAvailable(4, FALSE); // ** SetPlanetSelectable(4, FALSE); // ** } // don't forget the end bracket for the 'else' scope ShowGalaxyMap(1); // Try this, it shows the map } // don't forget the end braket for the main scope either That should be the 'OnClick' script Link to comment Share on other sites More sharing options...
randydg Posted July 16, 2005 Author Share Posted July 16, 2005 Ok, so that gets the galaxymap working, is there anway to tie the exit to the map? here is my current exit script: void main(){ SetGlobalFadeOut(); SetSoloMode(FALSE); SetPartyLeader(NPC_PLAYER); DelayCommand(0.4,ShowPartySelectionGUI()); StartNewModule("planet"); } Link to comment Share on other sites More sharing options...
randydg Posted July 16, 2005 Author Share Posted July 16, 2005 ok, the galaxymap still isn't working, when i click on it it brings up an empty map, when i go get the "orders" and come back it brings up the wrong planet. orders=korriban datapad1=duxon #include "k_inc_debug" #include "k_inc_utility" void main() // put this on a new line { object oItem= GetItemPossessedBy(GetFirstPC(), "orders"); object oItem1 = GetItemPossessedBy(GetFirstPC(), "datapad1"); if (GetIsObjectValid(oItem)) // don't put a space between "GetIsObjectValid" and (oItem)* { SetPlanetAvailable(7 , TRUE); // use an integer instead (so that it compiles right** SetPlanetSelectable(7 , TRUE); // **here too PlayRoomAnimation("003EBOq", 1); } else if (GetIsObjectValid(oItem1)) // *here too { SetPlanetAvailable(4 , TRUE); // ** and here SetPlanetSelectable(4 , TRUE); // ** and here too PlayRoomAnimation("003EBOq", 2); } else { SetPlanetAvailable(3, TRUE); // ** SetPlanetSelectable(3, TRUE); // ** SetPlanetAvailable(4, FALSE); // ** SetPlanetSelectable(4, FALSE); // ** SetPlanetAvailable(1, FALSE); // ** SetPlanetSelectable(1, FALSE); // ** } // don't forget the end bracket for the 'else' scope ShowGalaxyMap(1); // Try this, it shows the map } // don't forget the end braket for the main scope either Link to comment Share on other sites More sharing options...
Det. Bart Lasiter Posted July 16, 2005 Share Posted July 16, 2005 Check the integers for the script, it should be something along the lines of: int PLANET_KORRIBAN = 7; // the 7 should be the planet integer after the first 'if' statement int PLANET_DXUN = 4; // the 4 should be the integer after the 'else if' statement' /* ------------------------------------------------------ For instance, if it's 'SetPlanetAvailable(7, TRUE)', then 7 should be the planet in question. ------------------------------------------------------ */ I hope that answers the first part of your question. Now the next part. If that script is your current 'OnClick' script, you may have to set each planet's availability, so try this: #include "k_inc_debug" #include "k_inc_utility" void main() // put this on a new line { object oItem= GetItemPossessedBy(GetFirstPC(), "orders"); object oItem1 = GetItemPossessedBy(GetFirstPC(), "datapad1"); if (GetIsObjectValid(oItem)) // don't put a space between "GetIsObjectValid" and (oItem)* { SetPlanetAvailable(6 , TRUE); // use an integer instead (so that it compiles right** SetPlanetSelectable(6 , TRUE); // **here too PlayRoomAnimation("003EBOq", 1); } else if (GetIsObjectValid(oItem1)) // *here too { SetPlanetAvailable(7 , TRUE); // ** and here SetPlanetSelectable(7 , TRUE); // ** and here too PlayRoomAnimation("003EBOq", 2); } else { SetPlanetAvailable(7, FALSE); // ** SetPlanetSelectable(7, FALSE); // ** SetPlanetAvailable(4, FALSE); // ** SetPlanetSelectable(4, FALSE); // ** } // don't forget the end bracket for the 'else' scope /* ---------------------------------------- Now set each planet's availability and selectability... ---------------------------------------- */ SetPlanetAvailable(/*planet integer*/, TRUE); // Repeat for ell planets that haven't already been set as available SetPlanetSelectable(/*planet integer*/, TRUE); // Repeat for all planets that haven't already been set as selectable ShowGalaxyMap(1); // Try this, it shows the map } // don't forget the end braket for the main scope either I hope that answers both parts of your questions Link to comment Share on other sites More sharing options...
randydg Posted July 16, 2005 Author Share Posted July 16, 2005 so i put both of those together? like this: #include "k_inc_debug" #include "k_inc_utility" void main() // put this on a new line int PLANET_KORRIBAN = 7; // the 7 should be the planet integer after the first 'if' statement int PLANET_DXUN = 4; // the 4 should be the integer after the 'else if' statement' /* ------------------------------------------------------ For instance, if it's 'SetPlanetAvailable(7, TRUE)', then 7 should be the planet in question. ------------------------------------------------------ */ { object oItem= GetItemPossessedBy(GetFirstPC(), "orders"); object oItem1 = GetItemPossessedBy(GetFirstPC(), "datapad1"); if (GetIsObjectValid(oItem)) // don't put a space between "GetIsObjectValid" and (oItem)* { SetPlanetAvailable(6 , TRUE); // use an integer instead (so that it compiles right** SetPlanetSelectable(6 , TRUE); // **here too PlayRoomAnimation("003EBOq", 1); } else if (GetIsObjectValid(oItem1)) // *here too { SetPlanetAvailable(7 , TRUE); // ** and here SetPlanetSelectable(7 , TRUE); // ** and here too PlayRoomAnimation("003EBOq", 2); } else { SetPlanetAvailable(7, FALSE); // ** SetPlanetSelectable(7, FALSE); // ** SetPlanetAvailable(4, FALSE); // ** SetPlanetSelectable(4, FALSE); // ** } // don't forget the end bracket for the 'else' scope Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.