Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Adding planet to galaxy map in TSL questions

Page: 1 of 1
 Miltiades
09-15-2007, 11:13 AM
#1
I followed stoffe's tutorial on how to add planets on the galaxy map here (http://www.lucasforums.com/showthread.php?t=169825). At the moment, I haven't got it to work, and I have some questions. In the tutorial, you have to add new cases to scripts, like this:

case 12: //ST: Gaia....
{
nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP05;
}break;

To what exactly do you have to rename the "ST: Gaia..." bit of the statement? Is it the name of the module file, or the name as it appears in the planetary.2da? (I know in point 9 of the tutorial, it says that it's the name of the Mod or Rim file, though I'm not certain if it's for point 9 alone or for everywhere in the tutorial).

Another thing is adding the two lines in the a_galaxymap.nss. "Somewhere near the end", it doesn't matter where? The a_galaxymap.ncs file makes the new planet appear on the galaxy map, doesn't it? In my case, the planet doesn't appear, so the problem has to lie there, no?

Sorry if this has been asked before, but because the search function doesn't work, I can't find any thread about this subject.
 Darth InSidious
09-15-2007, 12:34 PM
#2
case 12: //ST: Gaia....
{
nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP05;
}break;

In that case, it's not actually part of the script. It's just a comment, as indicated by the '//' part. If I were you doing this I'd change it to '//DI: Rhen Var' in this instance...

I think, anyway. My scripting may be a little rusty.
 stoffe
09-15-2007, 12:44 PM
#3
I think, anyway. My scripting may be a little rusty.

You are right. :) Anything that follows // in a script is just code comments meant to make the script a little easier to read for human viewers. It's stripped away when the script is compiled to NCS.

In this case I just put it there to make it easier to follow which case belongs to what world in those functions. :)

As for the a_galaxymap question, it shouldn't matter where you put it as long as you don't put it inside an if-statement that checks for something (unless you only want the world to appear under those circumstances of course), or somewhere after a return; statement has been reached (since those terminate the script, ignoring any code that follows it). You also need to put it before the ShowGalaxyMap(nPlanet); line, since that starts the galaxy map screen.

You can put your own if-statements there checking for something as well if you don't want the planet to be available during the whole game.
 Miltiades
09-15-2007, 1:08 PM
#4
Ah, okay. Didn't know that. And that makes sense. But I should check everything again, because then I haven't made any mistakes there, maybe I did somewhere else.

Edit: And found something: in the Planetary.2da, the guitag is empty, although I have changed it. Tried it again, saved it, but when I load it again, it's empty again. What's wrong?
 stoffe
09-15-2007, 1:12 PM
#5
Edit: And found something: in the Planetary.2da, the guitag is empty, although I have changed it. Tried it again, saved it, but when I load it again, it's empty again. What's wrong?

What are you using to edit the 2DA file? (If you are using KotorTool you must click on another line after editing, otherwise your changes won't be kept when you save.)

Does your Gui-tag contain any blank spaces? If so, try to use one that only contains alphanumerical characters and underscores.
 Miltiades
09-15-2007, 1:52 PM
#6
What are you using to edit the 2DA file? (If you are using KotorTool you must click on another line after editing, otherwise your changes won't be kept when you save.)

Heh, can't believe I've made that mistake. But that's exactly what was wrong, and it works... well, sort of. The Icon on the galaxy map is oval-shaped, what's happened there? And while the Hyperspace movies trigger, when trying to exit the Ebon Hawk, and choosing the party members, I stay on the Ebon Hawk, but now with those two party members following me. What did I do wrong there? (btw, the module is in the modules folder and can be warped to).
 Qui-Gon Glenn
09-15-2007, 2:10 PM
#7
What are you using to edit the 2DA file? (If you are using KotorTool you must click on another line after editing, otherwise your changes won't be kept when you save.)

Does your Gui-tag contain any blank spaces? If so, try to use one that only contains alphanumerical characters and underscores.

DOH!!!! I hadn't noticed that little persnicketiness in the 2da editor on KT... thus I encountered the same problem and couldn't understand why. Just wanted to thank Miltiades for asking and Stoffe for answering :D
 stoffe
09-15-2007, 2:22 PM
#8
The Icon on the galaxy map is oval-shaped, what's happened there?

Have you set the dimensions of the icon image in the .GUI file to the same X and Y size?


And while the Hyperspace movies trigger, when trying to exit the Ebon Hawk, and choosing the party members, I stay on the Ebon Hawk, but now with those two party members following me.

Linking the exit trigger to the planet you are "landed" on is handled by two scripts. First, in k_sup_galaxymap (which is run after you select something on the galaxy map), you set the 003EBO_RETURN_DEST global number variable to a value representing your planet, when it is selected (in the second switch statement in the main() function).

Then, in check_party_gui (which is run when have selected party members exiting the ship), the script checks for the 003EBO_RETURN_DEST number set in k_sup_galaxymap and loads the corresponding module (in the ExitEbonHawk() function).

I'd guess that you've made some mistake in either of those scripts.
 Miltiades
09-15-2007, 6:38 PM
#9
Have you set the dimensions of the icon image in the .GUI file to the same X and Y size?

Oops. Changed more numbers than I should have. Thanks, that solves it.

Then, in check_party_gui (which is run when have selected party members exiting the ship), the script checks for the 003EBO_RETURN_DEST number set in k_sup_galaxymap and loads the corresponding module (in the ExitEbonHawk() function).

I'd guess that you've made some mistake in either of those scripts.

Uh... I may have.. uh... skipped that part of the tutorial... :p Anyway, I got it to work now. But the script I used was a little different from yours. The line I had to change was different, and there was no ExitEbonHawk() function in the script. But it still did the job. The only thing wrong now is the fact that the holographic image isn't there. I used holo_dan. 'Tis not a big problem, but any idea what that could be all about? Anyway, thanks a lot. ;)
 Darth InSidious
09-16-2007, 2:10 PM
#10
That didn't work for me, either...never got around to fixing it, 'though....
 Miltiades
09-16-2007, 2:26 PM
#11
Ah, okay. It's not that important anyway... Should I found the problem, I'll let you know (though stoffe or someone else may already know what the problem is... :))
 stoffe
09-16-2007, 3:20 PM
#12
Anyway, I got it to work now. But the script I used was a little different from yours. The line I had to change was different, and there was no ExitEbonHawk() function in the script.

Hmm, I didn't include the relevant scripts earlier? I've updated the tutorial thread (http://www.lucasforums.com/showthread.php?t=169825) with some of the scripts mentioned in it that were from the 003EBO module and thus has no source code included in the game.

As for the holoworld, after you've updated k_inc_hawk.nss like the tutorial mentions, you'll need to recompile two scripts using this file:
The script a_holoworld.nss has been added to the tutorial, recompile that. It will update the hologram in the main hold when you select a destination on the galaxy map.

The script k_003ebo_enter.nss is the OnEnter script for the Ebon Hawk area. It updates the hologram every time you re-enter the ship. You need to recompile it with your modified k_inc_hawk.nss file for the holoworld to be set properly when you enter the ship (or load a savegame inside the ship).
 Miltiades
09-16-2007, 3:38 PM
#13
Yep, that does it. The hologram works. Thanks! :)
Page: 1 of 1