RAPID TRANSIT SYSTEM (RTS) for Live Planets
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
- Copy NCS files to OVERRIDE folder
- 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
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
- 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.
- 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
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
: 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.