lfnetwork.com mark read register faq members calendar

Thread: Travelling to custom planets
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 04-17-2004, 02:37 PM   #1
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,766
Current Game: Fallout 2
Forum Veteran Helpful! Notable contributor 
Travelling to other planets IS possible, try it.

Edit tk102: This tutorial is centered around KotOR. stoffe -mkb- wrote an excellent tutorial for travelling to custom planets in TSL.

A simple tweak to two scripts unlocks the potenial of other planets that Bioware was intending with "Live Content".

The planets appear as white squares on your Galaxy map*. You can travel to them. Of course once you arrive at these unmade planets, if you step off the Ebon Hawk you'll be nowhere and the game will crash. But that's for us to fix.


*=See below for fixing that


Directions:
  1. Extract k_pebn_galaxy.nss and k_inc_ebonhawk.nss using KotOR Tool
  2. Open up k_pebn_galaxy.nss and find the last line of code that says
    Code:
    ShowGalaxyMap(nPlanet);
    Just before this line, add the following lines of code:
    Code:
    SetPlanetAvailable(11, TRUE);
    SetPlanetAvailable(12, TRUE);
    SetPlanetAvailable(13, TRUE);
    SetPlanetAvailable(14, TRUE);
    SetPlanetAvailable(15, TRUE);
    SetPlanetAvailable(16, TRUE);
    SetPlanetSelectable(11, TRUE);
    SetPlanetSelectable(12, TRUE);
    SetPlanetSelectable(13, TRUE);
    SetPlanetSelectable(14, TRUE);
    SetPlanetSelectable(15, TRUE);
    SetPlanetSelectable(16, TRUE);
  3. Save your changes k_pebn_galaxy.nss
  4. Open up k_inc_ebonhawk.nss (we have to fix the original programmer's syntax error! before we can compile our code.)
  5. Look for this line of code around line 19:
    Code:
    void EBO_PlayTakeOff(int nCurrentPlanet);
    and replace it with
    Code:
    string EBO_PlayTakeOff(int nCurrentPlanet);
  6. Look for this line of code around line 21:
    Code:
    void EBO_PlayLanding(int nDestination);
    and replace it with
    Code:
    string EBO_PlayLanding(int nDestination);
  7. Save your changes to k_inc_ebonhawk.nss
  8. Put a copy of nwnnsscomp.exe into the same folder as these two .nss files and use it to compile k_pebn_galaxy.nss to k_pebn_galaxy.ncs.
  9. Move k_pebn_galaxy.ncs to your Override folder.
  10. Start KotOR and go check your galaxy map


Edit: Screenshots:
New star map: Hoth
New star map: Sleheyron


Original thread



Last edited by tk102; 08-31-2006 at 01:50 PM. Reason: Added references to TSL tutorial....
tk102 is offline   you may: quote & reply,
Old 04-17-2004, 09:37 PM   #2
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,766
Current Game: Fallout 2
Forum Veteran Helpful! Notable contributor 
Here is the sequence of how the game loads a new custom planet module.

1. Player selects a planet from Galaxy Map which fires the k_sup_galaxmap.ncs script.
2. The k_sup_galaxmap.ncs script loads module ebo_m12aa and sets K_CURRENT_PLANET global variable based on the planet index that was selected on the Galaxy Map.
3. Module ebo_m12aa plays takeoff and landing sequence.
4. The player then exits Ebon Hawk module (ebo_m12aa) which fires k_pebn_exithawk.ncs script.
5. The k_pebn_exithawk.ncs script loads the new planet's module based on the value stored in K_CURRENT_PLANET.

The values of K_CURRENT_PLANET correspond with the following module names:
Code:
Planet Index  K_CURRENT_PLANET  Associated Module   Description
0*            5                 (none)              Endar Spire
1             10                tar_m02aa           Taris Apartments
2*            -1                (none)              Ebon Hawk
3             15                danm13              Dantooine
4             35                tat_m17ab           Tattooine
5             20                kas_m22aa           Kashyyyk
6             25                manm26ad            Manaan
7             30                korr_m33aa          Korriban
8*            40                lev_40a             Leviathan
9             45                unk_m41aa           Unknown World
10            50                sta_m45aa           Star Forge
11            55                liv_m99aa           Yavin Station
12*           60                liv_m99ab           Custom Planet#1
13*           65                liv_m99ac           Custom Planet#2
14*           70                liv_m99ad           Custom Planet#3
15*           75                liv_m99ae           Custom Planet#4
16**          80                liv_m99af           Custom Planet#5

*=not normally selectable from Galaxy Map
**=requires extra editing and recompilation to get liv_m99af
Let's say you want to travel to a single new planet (planet #12). So you follow the instructions in the above first post, making sure to add
Code:
SetPlanetAvailable(12, TRUE);
SetPlanetSelectable(12, TRUE);
to k_pebn_galaxy.nss and recompiling it (with the fixed k_inc_ebonhawk.nss script). Now you will need to create a new module called liv_m99ab.mod and place it in your modules directory. Creating a custom module and area are outside the scope of this tutorial -- see Doom Dealer's Area Editing tutorial for more info.

Now when you click your new custom planet you should be able to exit the Ebon Hawk and enter your new custom module.


-----
If you really want to get liv_m99af, you will need to do the following:
1. In k_inc_ebonhawk.nss search for this lines (EBO_GetPlanetFrom2DA function):
Code:
    else if(nPlanetIndex == PLANET_LIVE_05)
    {
        return 75;
    }
2. Right after the brace, insert:
Code:
    else if(nPlanetIndex == 16)
    {
        return 80;
    }
3. Save. Recompile k_pebn_galaxy.nss with the newly modified k_inc_ebonhawk.nss.



Last edited by tk102; 08-31-2006 at 07:11 PM.
tk102 is offline   you may: quote & reply,
Old 04-18-2004, 02:06 AM   #3
Jackel
Senior Member
 
Jackel's Avatar
 
Join Date: Sep 2003
Posts: 1,056
Quote:
Originally posted by shosey
is it possible to add new cutscene animations for the inbetween planet travel?
shouldnt be to hard , just change the scripts that tk was talking baout .. though unless someone is willing to make new bink files we would have to reuse the ones in game already
Jackel is offline   you may: quote & reply,
Old 04-19-2004, 06:59 PM   #4
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,766
Current Game: Fallout 2
Forum Veteran Helpful! Notable contributor 
Here's some more information regarding the graphical representation of new planets. The planetary.2da file has two fields of importance: icon and model. The first is a reference to a .tga file. The second is a reference to an .mdl/.mdx set.

To create a new planet icon on the Galaxy Map
  1. Extract an existing planet icon (eg. "lbl_ikash.tpc") using KotOR Tool under ERFs->TexturePacks->swpc_tex_gui.erf (L section).
  2. Convert the .tpc to .tga using tpc2tga utility.
  3. Modify the .tga file as you please. Save it as 32-bit uncompressed .tga with a name as designated in the planetary.2dafor the "Live Planets" (eg. "lbl_live04.tga").
  4. Put the file in your override folder.
To create a new planet model on the Galaxy Map (the slow rotating planet that zooms in):
  1. Extract the .mdl/.mdx files from the models.bif for "lplanet_01.mdl" and "lplanet_01.mdx". You'll need to make sure you have the "Enable Model BIF node in tree" option selected in KotOR Tool.
  2. Rename the .mdl/.mdx set with a name as designated in the planetary.2da for "Live Planets" (eg. "lplanet_04.mdl", "lplanet_04.mdx")
  3. Extract any existing planet's texture from ERFs->TexturePacks->swpc_tex_gui.erf (G section). They're named something like "GUI_KORRIBAN_1.tpc".
  4. Convert the .tpc to .tga using tpc2tga utility.
  5. Modify the .tga as you please. Save it as 32-bit uncompressed .tga with a name formatted as "GUI_xxxxx_1" (eg. "GUI_SLEHE_1"). This will make sure the name has the same number of characters as the original.
  6. Save the .tga in the override folder.
  7. Hex Edit the .mdl file from step 2. Replace the one instance of the original texture name to the new texture name (eg. Find "GUI_YAVIN_1" and replace with "GUI_SLEHE_1"). Replace the 4 instances of the original model name to the modified name (eg. Find "lplanet_01" and replace with "lplanet_04"). Save the modification.



Last edited by tk102; 04-19-2004 at 07:09 PM.
tk102 is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > Tutorials: General Tutorials + Tools > Travelling to custom planets

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:51 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.