Jump to content

Home

Rapid Transit System on custom made planets


Recommended Posts

RAPID TRANSIT SYSTEM (RTS) for Live Planets

v0.1 Download

-----------------------------------------------

 

Live Planets were intended to be downloadable addition to the game. These

new planets appear on Ebon Hawk's galaxy map as selectable locations for your space travels. There was only one planet released so far - Yavin Station, which is already included in PC version of the game.

 

I found that RAPID TRANSIT SYSTEM doesn't work at custom made planets (substituted for Live Planets) so I modified some scripts to correct it. I thrived

for future compatibility. If there would be any other custom planets created, scripts will remain unchanged. What has to be done is controled by waypoints.

 

-----------------------------------------------

Files modified: k_sup_gohawk.ncs, k_sup_guiopen.ncs

 

NSS files icnluded

-----------------------------------------------

 

Usage:

 

  1. Copy NCS files to OVERRIDE folder
     
  2. Give your starting module name liv_m99a# where # stands for:
     
    a - Live Planet 1 (K_CURRENT_PLANET = 55) Yavin Station (N/A)
    b - Live Planet 2 (K_CURRENT_PLANET = 60)
    c - Live Planet 3 (K_CURRENT_PLANET = 65)
    d - Live Planet 4 (K_CURRENT_PLANET = 70)
    e - Live Planet 5 (K_CURRENT_PLANET = 75)
    f - Live Planet 6 (K_CURRENT_PLANET = 80)
     
    # - Live Planet number according to planetary.2da
    (global variable K_CURRENT_PLANET)
     
    IMPORTANT NOTE: Yavin Station is not usable as the starting module so DON'T USE IT. I added Yavin RTS option to scripts to allow people to use
    the system with new custom content related to the station.
     
    See "How to add custom loadscreens" at the end of this post please, before naming your files
     
  3. Waypoints
     
    3a. Add Waypoint file (see directory Waypoints) of your chosen planet
    to your starting module
     
    Example: Your module's name is liv_m99af (Live Planet 6), included waypoint should be k_lp6_ebon_hawk_.utw
     
    GFF NOTE: Tag [CexoString] of Waypoint must be in format K_LP6_EBON_HAWK_TRANSITION where 6 is number of planet (1-6).
    I think name of *.utw file can be different, but TemplateResRef [CResRef]
    of Waypoint still have to be same as Waypoint's filename.
     
    3b. I assume your starting module will be an existing area with Ebon Hawk's SpacePort so now you have to modify one exact waypoint by modifiyng
    the area's *.git file using GFF editor or whatever tool you prefer
     
    Under WaypointList find waypoint with Tag K_###_EBON_HAWK_TRANSITION (where ### stands for DAN, KAS, MAN, KOR, TAT, UNK) and substitut it
    for K_LP#_EBON_HAWK_TRANSITION where # is number of your planet (1-6)
     
    Next alter Waypoint's TemplateResRef to name of your waypoint file
    and you're done here (in my example it will be k_lp6_ebon_hawk_)
     
    IMPORTANT NOTE: Tag and TemplateResRef of Waypoint in *.git and *.utw have to match each other. If you want you can also alter XYZ position and XY orientation of the Waypoint
     
  4. You are almost done with it. One last thing remains to have working RTS
    at your custom planet
     
    Name your other modules liv_anythingyouwant, when creating custom made planet.
     
    Example: I arrive in liv_m99af. Through door in liv_m99af I enter liv_mymodule01 from which I enter liv_mymodule02. It's simple and really important. Scripts and Waypoints have the power to transport you to Ebon Hawk. Corerct format of names will get you back to last location.
     
  5. To disable RTS in desired area, edit *.are file nad change boolean unescapable to 1
    (1-RTS disabled, 0-RTS enabled). It also applies on party selection.

-----------------------------------------------

 

How it works?

 

You arrive on planet (in module), K_CURRENT_PLANET global variable is set

(see point 2). When exiting Ebon Hawk, K_CURRENT_PLANET is checked by k_pebn_exithwak.ncs script and according to it you are transported to module

(60 = liv_m99ab and so on). In module where is Ebon Hawk docked (SpacePort)

is RTS disabled by default. In any other module is unescapable boolean of *.are file checked for accessibility of RTS. In case the system is available (unescapable 0), PC can travel back to the ship or select party members.

 

When writing "in any other module" I thought that conditional:

if(!GetIsObjectValid(oEbonHawk) && !GetIsObjectValid(oSpacePort)

&& !GetIsObjectValid(oTarisApt)) is true

 

When travelling to Ebon Hawk, first of all is the current area sweeped and all "g_lastlocal" waypoints are deleted by function CleanUpWays(). Then is your party healed by function HealParty() and new "g_lastlocal" waypoint is created storing your last location. Next is set global string K_LAST_MODULE to value of the module filename by SetGlobalString("K_LAST_MODULE", GetModuleFileName()). And finaly

is integer nPlanet [int nPlanet = GetGlobalNumber("K_CURRENT_PLANET")] checked and you are transfered into module (where's SpacePort) at K_###_EBON_HAWK_TRANSITION waypoint.

 

To travel back you have to be at the SpacePort. String sMod is created

[string sMod = GetGlobalString("K_LAST_MODULE")] and checked for its value (values empty or NO_MODULE disable transit). At the same time function UT_ValidateJump looks if you are worthy to jump :) anywhere [uT_ValidateJump(sMod)]. If all conditionals are true, you are transfered to K_LAST_LOCATION.

I had some problems with "Transit back" when filenames of other mods weren't

in format liv_anything.

 

If you look into *.nss you can find entries like Xor Ambush or what GUI buttons

are displayed.

 

I hope you'll find this useful and also I didn't forget anything.

 

 

How to add custom loadscreens

 

- extract any of them from ERFs / TexturePacks / L

- name it after your module and place it in OVERRIDE folder

 

Example: My module is liv_m99ae01.mod, the screen's name will be load_liv_m99ae01.tga

 

This works only in case, your module's filename is NOT LONGER than 11 characters (including liv_ preffix)! So think twice about your module's filename. I don't really know, why is such limitation here :(

 

It's up to you. When module's filename is longer than 11 chars, the game will use default loadscreen. In this case DON'T put into OVERRIDE folder any loadscreen with the same name as your module's.

 

Btw I think, that we could use LoadScreenID indexes in *.are files, if anyone

fills up loadscreens.2da

 

I wish to thank Fred Tetra for his KOTOR TOOL. It's really great util and must

have for any modder out there.

 

Original thread

Link to comment
Share on other sites

There are some things missing to have complete new planet kit. Here is one

of them.

 

 

Custom names for custom modules (as seen on map and load game GUIs)

 

Problem: Custom made modules were so far completed using an existing areas

and modules. These have their specific names. For an example you can take Korriban's Dreshdae module and attach it to any new planet (RedHawke already

did it with his great ORD Mandell mod). We desire better name for this module.

Let it be Planet - Location. Check the map (pressing M?) after exiting Ebon Hawk.

There should be sign Korriban - Dreshdae. The same text is displayed when

loading previously saved game (top right of GUI). What to do to change the sign?

 

There are 4 solutions.

 

Let it be. Make it blank. Make custom talktable (I tried that trick from NWN

- custom.tlk starts at string 16777216 - it didn't work, strings were still

taken from the beginning of dialog.tlk :) ) or patch somehow dialog.tlk file.

And finaly add local string to *.are file.

 

Well, it is against entire dialog.tlk system philosophy (other languages)

but local strings can do the job.

 

Solution: Load *.are file of your module into GFF Editor and find entry NAME [CExoLocString]. To make it blank change its STRREF to -1 (no reference to dialog.tlk). Then move cursor to Language ID input filed, left click in it and hit enter. You should be able to write there now. My string will be Planet - Location. Name will state = 1 strings. Save GFF, import *.are to module and

test it.

 

On map GUI should be Planet - Location. On Load Game GUI should be Planet

in the upper field and Location in the lower one.

 

 

How to add custom maps

 

Here is what I did. I exported map of Naga Sadow Tomb "lbl_mapm39aa.tga",

made one red square in the middle of the map in Photoshop and saved it to Override as "lbl_mapm50ab.tga" My module's name is abc_m60ab BUT it contains *.are and *.git files by name of m50ab. So we have m50ab.are,m50ab.git and lbl_mapm50ab.tga

 

Now the harder part. You should rename *.are and *.git files in case to have custom map without overwriting original map of Naga Sadow Tomb right?

Open module.ifo file with GFF Editor and navigate to Mod Area List

  • / 0

[user-defined struct: 6] / Area Name [CResRef]. Change Area Name to m50ab.

Save the file. Finaly take *.lyt of Naga Sadow's Tomb from Layouts, rename it

to m50ab.lyt and place it to Override. Everything should be OK and custom map

in the game (warp modulename) while original Naga Sadow's map remains intact.

I tested this but could forget something.

Link to comment
Share on other sites

Creating planets for Ebon Hawk's Galaxy Map

 

Models: As is said in tk102's thread, use model lplanet_01.mdl as a template

for creation of the live planet. Change all 4 instances of model's orginal name

in the file.

 

If you do so, you won't ger an error like "Names Differ: planet_0# lplanet_0#"

in "Ar_error.log" in your KotOR root folder.

 

I suggest naming planet's texture GUI_livep_# (where # is number 2-6).

It's perfect match to GUI_yavin_1 when hex editing planet's model and

it makes things clear.

Link to comment
Share on other sites

  • 2 months later...

Archived

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

×
×
  • Create New...