Jump to content

Home

Travelling to other planets IS possible, try it.


tk102

Recommended Posts

This is proof-of-concept for our "other planets" discussion.

 

Simple tweak to two scripts unlocks the potenial of other planets that Bioware was intending with "Live Content" whatever that is.

 

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.

 

 

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
    ShowGalaxyMap(nPlanet);


    Just before this line, add the following lines of 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 mistake before we can compile our code.)
  5. Look for this line of code around line 19:
    void EBO_PlayTakeOff(int nCurrentPlanet);

    and replace it with

    string EBO_PlayTakeOff(int nCurrentPlanet);


  6. Look for this line of code around line 21:
    void EBO_PlayLanding(int nDestination);

    and replace it with

    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

Link to comment
Share on other sites

Have you tryed to make a user mod load when you get to the live planet. I have been looking at those scripts quite a bit and so it looks like it would not be to difficult to add new planets , but it is still like trying to read french to me. I can get the gist of and a few things here and there are clear. I just don't understand enough to do anything with it. :(

 

It looks your on the right track though. keep up the good work tk102.

Link to comment
Share on other sites

T7Nowhere asked:

Have you tryed to make a user mod load when you get to the live planet.

 

I've traced out the scripts that send you from planet to planet.

 

After selecting a planet from Galaxy Map:

 

k_sup_galaxmap.ncs[sic] (.nss available) fires, which loads module ebo_m12aa and shows the takeoff and landing sequence.

Upon leaving the module, k_pebn_leavhawk.ncs fires. This pulls up the Party Selection GUI and queues k_pebn_exithawk.ncs. The latter is what actually loads the appropriate module. Looking at the decompiled code, it appears the expected modules' names should be liv_m99xx where xx is a two letter index.

 

And surprise surprise, Yavin Station is already taken the name for Live Planet #1: liv_m99aa.

 

So in order to get a new planet to load from the starmap, the custom module should be named "liv_m99ab" through "liv_m99af".

 

Note: it appears that some of the scripts only expected 5 custom planets, not 6, so variables are only allocated up through Live Planet 5 (liv_m99ae).

Link to comment
Share on other sites

Originally posted by tk102

"Live Content" whatever that is.

 

think X-Box , think X-Box Live , think Live content :D

 

basiclaly these were by the sounds of them planets etc they were going to add via xboxlive and proberly mods like nwn for the game , but through unknow to us reasons were dropped , maybe Lucasarts said no , maybe they couldnt come up with good enough planets etc etc

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Hey tk, any chance you know how the function "IsLiveContentAvailable" (not the exact name, I can't check it as I am not in my home computer) works? I know the function is in the k_pebn_galaxy.ncs. I tried what you did a few weeks ago and was able to get the live planet to show up on the galaxy map, but in order to do that, I have to force it in the script using the SetPlanetAvailable without checking whether the live content is available using the IsLiveContentAvailable function (the original ncs file checks it before it sets the planet to be available). Everytime I use that function, it always return a false even though I have copied the liv99ab module file. I was trying to find perhaps there is a 2da file that dictates what live planets are available but can't seem to find one and I have abandoned to look for it ever since.

Link to comment
Share on other sites

Haven't played with that function, but I see the point in trying to use it. I couldn't find anything in the 2das either.

 

Did you copy liv_m99aa*.rim files to liv_m99ab*.rim? and it still returned false? Maybe the area files themselves need to be renamed and repackaged into .rim files. ??

Link to comment
Share on other sites

Yes, I did rename a module to liv_m99ab, but I think I put it as a mod file, not rim. It still returned me a FALSE.

 

Yup, the point of knowing how this function works, as you probably have seen in the k_pebn_galaxy.ncs, is so that we don't have to edit that file, since everything is already there.

Link to comment
Share on other sites

I did a quick test. I moved out the original yavin module files liv_m99aa.rim and liv_m99aa_s.rim file out of the module directory, and guess what... the galaxy map still shows it as available, although after selecting it, I couldn't get out of the Ebon Hawk to the Yavin station. So my guess now is that there is some other way besides the available files that tells the game whether a live planet is available or not.

Link to comment
Share on other sites

Tk102, you mentioned extracting a GUI element and using tpc2tga to convert it, so it could be edited.

 

If you just double-click on the GUI (planet icon) of your choice in Kotor Tool, it'll come up in KT's image viewer, from which you can save it as a TGA-format file. Just click the 'Write' button.

Link to comment
Share on other sites

You know I never saw the Write button because the viewer window dipped below the bottom of my screen. Actually, what I do is set up Photoshop as the receptacle and use the handy Ctrl-Doubleclick to extract, convert, open up Photoshop. That's pretty slick, btw Fred.

 

Thanks for pointing that out to me -- someone else mentioned it in another thread too. Maybe the Viewer child window could default to Maximized state?

Link to comment
Share on other sites

jackel is right about "live content" being for xbox live. infact i think just recently Yavin Station was released for download on xbox live as "live content" i remember seing some kind of news post somewhere confirming that. perhaps the other "Live" planet is slated for relaease at a later date, however i can't imagine it would be anything more than Yavin Station, otherwise you'd have to alter the story. personally i'd rather see modders make a new planets. however, even with this breakthrough we would probably still have to use existing maps right? i haven't tried these out yet, but i would assume since its downloadable content that was never released and the game crashes when you leave the ship that new undiscovered maps probably dont exist anywhere but the recycle bin on a computer at bioware

Link to comment
Share on other sites

yeah Yavin station was released to the x-boxers a month or so ago

 

they still miss out on several items though , calrisseans belt , circlet of sarash and one or two others

 

while we pc users on the other hand had the live content from the get go and some good items aswell

Link to comment
Share on other sites

gameunlimited said:

So my guess now is that there is some other way besides the available files that tells the game whether a live planet is available or not.

 

It makes you wonder if it's not in some obvious place like the registry or swkotor.ini. But it's not. I checked. :)

 

i like commas said:

however, even with this breakthrough we would probably still have to use existing maps right?

 

This is an area in which I have no experience. Mr. Tetra, in your experience with Module Editing, how difficult do you believe it would be to make a new map?

Link to comment
Share on other sites

Well, isn't a map simply a .tga file named "lbl_map" + modulename and stored in swpc_tex_gui.erf? Then there are some icons that appear on the map according to the location of the player and other points of interest. The rooms are denoted in the .lyt and .are files and I suppose that's where the dreaded .mdl files come in: they define the walls of the rooms. Hmm.

Link to comment
Share on other sites

Originally posted by tk102

Has anyone ever asked Bioware if they have documentation for the .mdl/.mdx file formats?

 

... but.. but but thats logical! ..

 

gah , i guess we just figured that seeing they didnt want to talk about modding they wouldnt actually want to talk about anything to do with modding including file formats etc

Link to comment
Share on other sites

  • 2 months later...

Archived

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

×
×
  • Create New...