Jump to content

Home

Adding planet to galaxy map in TSL questions


Miltiades

Recommended Posts

I followed stoffe's tutorial on how to add planets on the galaxy map here. 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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. ;)

Link to comment
Share on other sites

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 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).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...