lfnetwork.com mark read register faq members calendar

Thread: Rapid Transit System on custom made 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 11-17-2004, 02:15 AM   #1
Kaspian's Avatar
Join Date: Oct 2004
Location: Europe
Posts: 51
Rapid Transit System on custom made 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

  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

Last edited by Fair Strides 2; 11-25-2015 at 12:39 PM. Reason: Fixed BBCode for the list layout of the steps.
Kaspian is offline   you may: quote & reply,
Old 11-17-2004, 09:12 AM   #2
Kaspian's Avatar
Join Date: Oct 2004
Location: Europe
Posts: 51
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[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.

Last edited by tk102; 01-23-2005 at 08:02 PM.
Kaspian is offline   you may: quote & reply,
Old 11-17-2004, 09:43 AM   #3
Kaspian's Avatar
Join Date: Oct 2004
Location: Europe
Posts: 51
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.

Last edited by tk102; 01-23-2005 at 08:00 PM.
Kaspian is offline   you may: quote & reply,
Old 01-23-2005, 08:05 PM   #4
Well past expiration date
tk102's Avatar
Join Date: Jan 2004
Posts: 5,768
Current Game: FTL
10 year veteran!  Forum Veteran  Helpful!  Notable contributor 
Secondary copy of Kaspian's .ncs/.nss/.utw files.
Attached Files
File Type: zip rts_lp.zip (12.1 KB, 333 views)

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 > Star Wars Gamer > Community > The Star Forge > Knights of the Old Republic series > Holowan Laboratories > Tutorials > Tutorials: General Tutorials + Tools > Rapid Transit System on custom made 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 08:56 PM.

Powered by vBulletin®
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.