Page 1 of 5

[HOWTO]Add things to Road, Normal Gauge & Narrow Gauge?

Posted: 31 Dec 2006 19:48
by Illegal_Alien
Welcome to the Locomotion Problems section.

Before you continue
Be warned: I am not responsible for any damage to your Locomotion installation, or your mariage. Make sure you have a full copy of your working objdata folder.

Add things to Road, Normal Gauge & Narrow Gauge? (like bridges, stations and signals)

You require some things to do this;

- The .dat files of the Road (ROADTMC, ROADONE, ROADUS2, ROADUS1, ROADRGH and ROADTRAM (Yes thats a roadtype)) or Normal Gauge (TRACKST.dat or Narrow Gauge (TRACKNG.dat) Wich can be usualy found in; c:\program files\atari\locomotion\objdata\
- LocoTool ( http://www.tt-forums.net/viewtopic.php?t=10314 )
- Plain texteditor (e.g. notepad)
- The new bridge/signal/station .dat (internal)filename. (e.g.: NEWBRDG1.dat)

Decompile the .dat file of the Road (road.dat) or Normal Gauge (trackst.dat or Narrow Gauge (trackng.dat) with LocoTool
Drag the file over the LocoTool.exe and drop, you will see an .XML file with the same name as the .dat file you just dragged and dropped.

Edit the .XML file
Find in the XML the following lines: (Example of the trackng.dat (Narrow gauge))

Code: Select all

	<useobject desc="compatible[0]" class="17">TRACKST </useobject>
	<useobject desc="compatible[1]" class="20">ROADTMC </useobject>
	<useobject desc="compatible[2]" class="20">ROADONE </useobject>
	<useobject desc="compatible[3]" class="20">ROADUS2 </useobject>
	<useobject desc="compatible[4]" class="20">ROADUS1 </useobject>
	<useobject desc="compatible[5]" class="20">ROADRGH </useobject>
	<useobject desc="compatible[6]" class="20">ROADTRAM</useobject>
	<useobject desc="trackmod[0]" class="16">TREXRACK</useobject>
	<useobject desc="trackmod[1]" class="16">TREXCAT1</useobject>
	<useobject desc="signal[0]" class="10">SIGS    </useobject>
	<useobject desc="signal[1]" class="10">SIGSL   </useobject>
	<useobject desc="signal[2]" class="10">SIGSD   </useobject>
	<useobject desc="signal[3]" class="10">SIGSDL  </useobject>
	<useobject desc="signal[4]" class="10">SIGC3   </useobject>
	<useobject desc="signal[5]" class="10">SIGC4   </useobject>
	<useobject desc="signal[6]" class="10">SIGSW   </useobject>
	<useobject desc="signal[7]" class="10">SIGCSW  </useobject>
	<useobject desc="signal[8]" class="10">SIGSUS  </useobject>
	<useobject desc="signal[9]" class="10">SIGCUS  </useobject>
	<useobject desc="tunnel[0]" class="13">TUNNEL1 </useobject>
	<useobject desc="bridge[0]" class="14">BRDGBRCK</useobject>
	<useobject desc="bridge[1]" class="14">BRDGSTAR</useobject>
	<useobject desc="bridge[2]" class="14">BRDGGIRD</useobject>
	<useobject desc="bridge[3]" class="14">BRDGSUSP</useobject>
	<useobject desc="bridge[4]" class="14">BRDGWOOD</useobject>
	<useobject desc="station[0]" class="15">TRSTAT1 </useobject>
	<useobject desc="station[1]" class="15">TRSTAT2 </useobject>
	<useobject desc="station[2]" class="15">TRSTAT3 </useobject>
	<useobject desc="station[3]" class="15">TRSTAT4 </useobject>
	<useobject desc="station[4]" class="15">TRSTAT5 </useobject>
Add the following line (I used a example .dat filename.) for a new station:

Code: Select all

<useobject desc="station[5]" class="15">NEWSTAT1</useobject>
Add the following line (I used the example .dat filename as mentioned.) for a new bridge:

Code: Select all

<useobject desc="bridge[5]" class="14">NEWBRDG1</useobject>
Add the following line (I used a example .dat filename.) for a new signal:

Code: Select all

<useobject desc="signal[7]" class="10">NEWSIGN </useobject>
Add the following line (I used a example .dat filename.) for a new tunnel(entrance):

Code: Select all

<useobject desc="tunnel[1]" class="13">TUNNEL3 </useobject>
Add the following line (I used a example .dat filename.) for a new trackmod (Catenary/third rail etc..):

Code: Select all

<useobject desc="trackmod[2]" class="16">CNDYTRCK</useobject>
Keep in mind that the space always needs to be 8 long, so use space`s if its shorter.

It should like like this now:

Code: Select all

	<useobject desc="compatible[0]" class="17">TRACKST </useobject>
	<useobject desc="compatible[1]" class="20">ROADTMC </useobject>
	<useobject desc="compatible[2]" class="20">ROADONE </useobject>
	<useobject desc="compatible[3]" class="20">ROADUS2 </useobject>
	<useobject desc="compatible[4]" class="20">ROADUS1 </useobject>
	<useobject desc="compatible[5]" class="20">ROADRGH </useobject>
	<useobject desc="compatible[6]" class="20">ROADTRAM</useobject>
	<useobject desc="trackmod[0]" class="16">TREXRACK</useobject>
	<useobject desc="trackmod[1]" class="16">TREXCAT1</useobject>
	<useobject desc="trackmod[2]" class="16">CNDYTRCK</useobject>
	<useobject desc="signal[0]" class="10">SIGS    </useobject>
	<useobject desc="signal[1]" class="10">SIGSL   </useobject>
	<useobject desc="signal[2]" class="10">SIGSD   </useobject>
	<useobject desc="signal[3]" class="10">SIGSDL  </useobject>
	<useobject desc="signal[4]" class="10">SIGC3   </useobject>
	<useobject desc="signal[5]" class="10">SIGC4   </useobject>
	<useobject desc="signal[6]" class="10">SIGSW   </useobject>
	<useobject desc="signal[7]" class="10">SIGCSW  </useobject>
	<useobject desc="signal[8]" class="10">SIGSUS  </useobject>
	<useobject desc="signal[9]" class="10">SIGCUS  </useobject>
	<useobject desc="signal[10]" class="10">NEWSIGN </useobject>
	<useobject desc="tunnel[0]" class="13">TUNNEL1 </useobject>
	<useobject desc="tunnel[1]" class="13">TUNNEL3 </useobject>
	<useobject desc="bridge[0]" class="14">BRDGBRCK</useobject>
	<useobject desc="bridge[1]" class="14">BRDGSTAR</useobject>
	<useobject desc="bridge[2]" class="14">BRDGGIRD</useobject>
	<useobject desc="bridge[3]" class="14">BRDGSUSP</useobject>
	<useobject desc="bridge[4]" class="14">BRDGWOOD</useobject>
	<useobject desc="bridge[5]" class="14">NEWBRDG1</useobject>
	<useobject desc="station[0]" class="15">TRSTAT1 </useobject>
	<useobject desc="station[1]" class="15">TRSTAT2 </useobject>
	<useobject desc="station[2]" class="15">TRSTAT3 </useobject>
	<useobject desc="station[3]" class="15">TRSTAT4 </useobject>
	<useobject desc="station[4]" class="15">TRSTAT5 </useobject>
	<useobject desc="station[5]" class="15">NEWSTAT1</useobject>
Compile the .XML files to .DAT
Drag the XML file over LocoTool.exe drop it, it will generate the .dat place this .dat in your Locomotion objdata folder. (With offcourse the new bridge/signal/station .dat file.)

Start your Locomotion and it should work.


-------- Important! ---------
Plastikman wrote:Two big problems with this tutorial. as is, It wont work.

1 You fail to mention the maximum number of mods you can add to a road/track, 7 for stations and bridges. and 15(?) for signals (I'll edit this when I remember the correct number) and only 1 for tunnels.

2 You have to tell the XML how many Mods for each type to look for in the mods section.

Snipped from Trackst.dat. the same lines are valid for the other track/road types.

Code: Select all

  	</bitmask>
	<variable name="numcompat" size="1">7</variable>
	<variable name="nummods" size="1">2</variable>
	<variable name="numsignals" size="1">14</variable>    <======<<< You need to change this line to reflect how many signals You have. (Max 15?)
	<variable name="buildcostfact" size="2">11</variable>
	<variable name="sellcostfact" size="2">-10</variable>
	<variable name="tunnelcostfact" size="2">49</variable>
	<variable name="costind" size="1">1</variable>
	<variable name="curvespeed" size="2">400</variable>
	<unknown name="field_1E[4]" size="1">1</unknown>
	<variable name="numbridges" size="1">7</variable>     <=======<<< You need to change this line to reflect how many bridges You have. (Max 7)
	<variable name="numstations" size="1">7</variable>    <=======<<< You need to change this line to reflect how many stations You have. (Max 7)
	<variable name="displayoffset" size="1">3</variable>
	<description num="0" language="0">Railway Track</description>

*** Be warned: I am not responsible for any damage to your Locomotion installation, or your mariage. Make sure you have a full copy of your working objdata folder. ***

If i made any mistakes or erros post it below. Keep also in mind that you have some limits of wich to add or to remove. Please read the readme`s wich most of the time are included by the new bridges/stations/signals.

Posted: 31 Dec 2006 20:06
by gibboloco
Hi AI

Now that is very useful for members - nice to see. Not sure what you mean when you refer to the DAT file name being (internal filename?)
Is this really what you mean?

Kindest regards as always

Posted: 31 Dec 2006 20:15
by Illegal_Alien
Read and you will find the answer...

Posted: 31 Dec 2006 20:23
by MjD
gibboloco wrote:Hi AI

Now that is very useful for members - nice to see. Not sure what you mean when you refer to the DAT file name being (internal filename?)
Is this really what you mean?

Kindest regards as always
Not sure what you are asking but I will try to answer.

The .dat name is the name of the file in the objdata folder and not necessarily the internal name of the object. You can rename the .dat name to help you indentify what it does, but it won't change the internal name as this is specified in the .xml part of the .dat.

I hope that is understandable.

MD

Posted: 31 Dec 2006 20:43
by gibboloco
Hi MajorDuck

Thanks for your comments. My question concerns the xml variable name that is passed to locotool. We know the descriptive name is limited to a string length of a max of 8 chars AND THAT It mirrors the DAT filename in whole or (in part with the appropriate padding of (asccii 32) spaces). It just seems a little confusing to call the 8 char descriptor as internal when one is re-typing the external DAT file name into notepad (I use notepad++ a much better package for this purpose).

The 'internal' reference I felt could be a little confusing to people using the editor for the first time. As far as they are concerned, they are simply re-typing the DAT file name (or part thereof with spaces) into the XML file.

Kindest of regards as usual

Posted: 02 Jan 2007 12:00
by Illegal_Alien
Can we sticky this? Thanks :)

Posted: 02 Jan 2007 13:57
by Chrill
I suggest we sticky some nice Locomotion Tutorials :wink:

Re: [HOWTO]Add things to Road, Normal Gauge & Narrow Gauge?

Posted: 17 Feb 2008 19:44
by Plastikman
Two big problems with this tutorial. as is, It wont work.

1 You fail to mention the maximum number of mods you can add to a road/track, 7 for stations and bridges. and 16 for signals and only 1 for tunnels.

2 You have to tell the XML how many Mods for each type to look for in the mods section.

Snipped from Trackst.dat. the same lines are valid for the other track/road types.

Code: Select all

  	</bitmask>
	<variable name="numcompat" size="1">7</variable>
	<variable name="nummods" size="1">2</variable>
	<variable name="numsignals" size="1">14</variable>    <===========<<< You need to change this line to reflect how many signals You have. (Max 16)
	<variable name="buildcostfact" size="2">11</variable>
	<variable name="sellcostfact" size="2">-10</variable>
	<variable name="tunnelcostfact" size="2">49</variable>
	<variable name="costind" size="1">1</variable>
	<variable name="curvespeed" size="2">400</variable>
	<unknown name="field_1E[4]" size="1">1</unknown>
	<variable name="numbridges" size="1">7</variable>     <===========<<< You need to change this line to reflect how many bridges You have. (Max 7)
	<variable name="numstations" size="1">7</variable>    <===========<<< You need to change this line to reflect how many stations You have. (Max 7)
	<variable name="displayoffset" size="1">3</variable>
	<description num="0" language="0">Railway Track</description>

Re: [HOWTO]Add things to Road, Normal Gauge & Narrow Gauge?

Posted: 20 Feb 2008 21:27
by Illegal_Alien
Dont make it too easy for the people ;)

Re: [HOWTO]Add things to Road, Normal Gauge & Narrow Gauge?

Posted: 01 Apr 2010 16:13
by Wibble199
When I open ROADTMC and try to add a station it has

Code: Select all

<variable name="numstations" size="1">0</variable>
Any help?

P.S. nice tutorial

Re: [HOWTO]Add things to Road, Normal Gauge & Narrow Gauge?

Posted: 01 Apr 2010 16:55
by Plastikman
Roads use

Code: Select all

<unknown name="field_15[7]" size="1">7</unknown>
instead of "numstations"

PS. If i remember correctly, If you go past 7 on a road, lomo crashes. I could be wrong again. feel free to let me know.

Re: [HOWTO]Add things to Road, Normal Gauge & Narrow Gauge?

Posted: 01 Apr 2010 16:56
by Illegal_Alien
Ok clearly you didnt read the whole topic. See post above...

Re: [HOWTO]Add things to Road, Normal Gauge & Narrow Gauge?

Posted: 01 Apr 2010 17:00
by Plastikman
Illegal_Alien wrote:Ok clearly you didnt read the whole topic. See post above...
He is correct. We didn't document "field_15[7]"

Roads do not use "numstations".

Re: [HOWTO]Add things to Road, Normal Gauge & Narrow Gauge?

Posted: 20 Apr 2010 07:45
by Illegal_Alien
Going to work on a refurbished version of this topic. Now its all scattered around.

Re: [HOWTO]Add things to Road, Normal Gauge & Narrow Gauge?

Posted: 09 Sep 2010 09:13
by Emperor Darth Sidious
I got two questions about the LocoTool,

1. I have downloaded a few new Road-Stations but I have to add them manualy, to what .DAT file do I have to add them and how many extra stations can you add to a road.dat ?

2. What is the maximum for signals in the TRACKST.dat ? Is it possible to replace original signals from the game with new ones ?

I didn't know in what topic I should be asking about this (sorry about that if I did it in the wrong topic, please remove it and I place it in another or a new topic), but I don't want to screw up my Locomotion game again now that I already have a few cool mods in it and over 1500 extra vehicles. By the way about vehicles...Is there a maximum of vehicles that you can add to the game before it crashes, because when I add to many new objects to RCT2 the slider from the selection box in the editor doesn't want to move anymore at some point, is this similar in Locomotion ?


Thnxss in advance !!!

Re: [HOWTO]Add things to Road, Normal Gauge & Narrow Gauge?

Posted: 09 Sep 2010 12:55
by Badger
One answer is above - 16 signals maximum.

The other may be trial and error as it's not overly clear from what I've read.

Re: [HOWTO]Add things to Road, Normal Gauge & Narrow Gauge?

Posted: 09 Sep 2010 13:21
by Emperor Darth Sidious
Badger wrote:
The other may be trial and error as it's not overly clear from what I've read.
You mean you don't understand what I mean or do you mean that I have to find out myself ?

Thanks for the other answer.... :)

Re: [HOWTO]Add things to Road, Normal Gauge & Narrow Gauge?

Posted: 09 Sep 2010 19:59
by Badger
I've read through the topic and I don't think it's clear. Maybe someone with more knowledge will assist.

Re: [HOWTO]Add things to Road, Normal Gauge & Narrow Gauge?

Posted: 06 Oct 2010 22:23
by cman13
Hi, I was wondering if someone would be able to make a video on youtube sr something because I'm not very good with this as a first timer so it would be really helpful if someone could do that, that would be great.

Thanks
cman13

Re: [HOWTO]Add things to Road, Normal Gauge & Narrow Gauge?

Posted: 06 Oct 2010 22:51
by Illegal_Alien
Not gonan make a movie of somethign beeing rather obvious written down. Common sense works better then a stupid Youtube video. peopel from OTTD doesnt need it; so we dont need it either, or people here realy lacking something.