Difference between revisions of "UsingLocoTools"

From TTWiki
Jump to navigationJump to search
m (Reverted edits by Apedizivif (Talk) to last version by Maalth)
 
m (18 revisions)
(No difference)

Revision as of 17:43, 13 June 2011

Important Notes

Before using LocoTools it is recommended you back up your Locomotion .DAT files found in the ObjData folder. You can then restore the original version if you have any problems.


Downloading & Installing

You can download the latest LocoTools version from http://www.ttdpatch.net/loco/. I then recommend putting the unzipped files in a seperate folder in the ObjData directory. You will create alot of files and it is best to not mix them in with your .DAT files. Remember to keep the .dll with the executable or it won't work.


Decoding Files

To decode your DAT files into an editable format, copy them from ObjData to your LocoTools folder and then simply drag the file onto the LocoTools executable. It will then create an .XML file in that directory and create a new folder for the images. The XML file contains all the variables for that object, such as cost and name, whilst all the graphics used by that object are stored as individual .PNG files in the seperate folder.

Decoding Files with Parameters

By just double clicking on locotool.exe (or reading the readme.txt) you will notice some options/parameters:


-p 'num' : choose company colours.
-d : make a *.dat file for the demo version.
-o 'path' : set base path for png files
-q do not display error messages
-s put all sprites in one *.png file (instead of each sprite in one *.png file)
-u output all unknown entries, even if they are zero


Simple usage of parameters
right click locotool.exe and create a link of/to it.
right click the link and select "Properties"/"Eigenschaften"
change "Target"/"Ziel" from something like...
C:\Windows\Desktop\locotool.exe
...to...
C:\Windows\Desktop\locotool.exe -s -q
...by just adding your needed parameters there.
now instead on locotool.exe drag and drop your *.dat file on locotool.lnk (the link you just created and edited) to use locotool.exe with your parameteters.

Encoding Files

When you are happy with your changes, you can simply drag your updated .XML file onto the LocoTools executable. It will create a backup file of your old .DAT and create a new one for you. Simply drop this file into your ObjData folder and when you next run Locomotion, it will update itself with the new objects.


Troubleshooting

If you are having problems, make note of the error message and use it to fix the problem. To avoid problems, ensure you have all the graphics files properly numbered in relation to the .XML file. Even if the graphic is not used, it needs to be present, but you can shrink it to a single transparent blue pixel to save on file space. If the problems persist, restore an old backup file.

Basic Testing

If your custimized object shows up in the scenario editor when you click "advanced menu" and the right table, your object basically works.


If it does not show up in the scenario editor you might have done something wrong in the first line that looks like:
object class="0x95" subclass="0x11827C" name="AIRPORT2"><chunk compression="1"
"AIRPORT2" should be the filename (unique, no duplicates allowed) and exactly 8 letters long (including spaces, not longer not shorter).
Also check each line for the correct "structure" (accidently broken or partly missing lines).


If it shows up in the scenario editor but not ingame you need to change (decompile and compile) your trackst.dat file manually, your kind of object might be listed there, but not the object you just added.
If so, add a line with your object filename and increase the matching "numobjects" variable by one.
also scheck if the scenarios year is not too early for your object.