LocoTool V0.4.3 [30 Oct 2004]
Moderator: Locomotion Moderators
LocoTool V0.4.3 [30 Oct 2004]
The latest version is always at http://www.ttdpatch.net/loco/
Ignore the _src, _dll and _dyn zip files, just download the regular LocTool one for the latest version.
[old text]
I've been working on a couple of programs which should eventually allow the inclusion of new objects in Locomotion. This is a lot easier than in TTD, so all I have to do is decode the object file format.
Here's the first step, two programs to decode vehicle object files and write the vehicle stats in an xml file, available at http://www.ttdpatch.net/loco/locotools.zip and some sample xml files A380 Cattle truck 2 EMU1 HG 2/3 Hopper
All comments welcome, especially on the xml structure!
They're console mode programs, so don't expect any fancy buttons or windows or anything...
To look at a vehicle's data, first use objdump to decompress the file and then dmptrans to translate the data to xml. There's still some data missing in the xml file (descriptions/translations, required objects and of course the graphics), I'll be working on those the next few days and hope to have a fully working codec soon.
PS: Many thanks to the RCT Technical Information Depot for information on the basic file format.
Ignore the _src, _dll and _dyn zip files, just download the regular LocTool one for the latest version.
[old text]
I've been working on a couple of programs which should eventually allow the inclusion of new objects in Locomotion. This is a lot easier than in TTD, so all I have to do is decode the object file format.
Here's the first step, two programs to decode vehicle object files and write the vehicle stats in an xml file, available at http://www.ttdpatch.net/loco/locotools.zip and some sample xml files A380 Cattle truck 2 EMU1 HG 2/3 Hopper
All comments welcome, especially on the xml structure!
They're console mode programs, so don't expect any fancy buttons or windows or anything...
To look at a vehicle's data, first use objdump to decompress the file and then dmptrans to translate the data to xml. There's still some data missing in the xml file (descriptions/translations, required objects and of course the graphics), I'll be working on those the next few days and hope to have a fully working codec soon.
PS: Many thanks to the RCT Technical Information Depot for information on the basic file format.
Last edited by Patchman on 31 Oct 2004 00:53, edited 14 times in total.
- Born Acorn
- Tycoon
- Posts: 7596
- Joined: 10 Dec 2002 20:36
- Skype: bornacorn
- Location: Wrexham, Wales
- Contact:
By the way, here's the meaning of all the variables you can set...
A "variable" entry is something I know what it means.
A "unknown" entry is something I don't understand yet.
A "variable" entry is something I know what it means.
A "unknown" entry is something I don't understand yet.
- class = what does it run on, 0=rail, 1=road, 2=air, 3=water
- nummods = how many track modifications are needed to run (e.g. 3rd rail); the specific ones will be in the "required objects" information which I don't decode yet
- costind = purchase cost index (index into a table of base costs)
- costfact = purchase cost factor (final cost = basecost[costind]*costfact)
- runcostind = running cost index
- runcostfact = running cost factor
- numcompat = number of compatible vehicles, 0 if compatible with all
- vehunk = mostly unknown structure, except
- spriteind = seems to be an index into the sprite table
- sprites = some information about which sprites to use
- numdir = number of different view directions
- flags = some flags, only one bit known so far
- spritenum = first sprite to use for this
- power = power
- speed = top speed
- rackspeed = top speed while on rack rail (and I think broken down speed for planes)
- weight = weight
- flags = vehicle settings
- rackrail = whether vehicle can use a rackrail
- dualhead = vehicle is dualheaded
- refittable = vehicle is refittable
- noannounce = vehicle will not be announced when it is new (this is set for train wagons)
- visfxtype = how to draw the visual effect (what kind is set in the required object list)
- wakefxtype = how to draw the wake effect (what kind is set in the required object list)
- designed = year vehicle is designed, 0 if available from the beginng
- obsolete = year vehicle becomes obsolete, 65535 if never
- startsndtype = how to play the starting sound (what kind is set in the required object list)
- numsnd = number of sound effects (the kinds are set in the required object list)
- PennCentral
- Transport Coordinator
- Posts: 268
- Joined: 12 Sep 2004 05:43
- Location: Springfield, Ohio
- Contact:
-
- Tycoon
- Posts: 1966
- Joined: 21 May 2004 07:39
- Location: Singapore
- RaptorTycoon
- Tycoon
- Posts: 2310
- Joined: 09 Dec 2002 15:35
- Location: Urope>Dutchland>Rotterdam
-
- Tycoon
- Posts: 1966
- Joined: 21 May 2004 07:39
- Location: Singapore
- Daan Timmer
- Tycoon
- Posts: 2406
- Joined: 12 Apr 2004 11:21
- Location: +31299......
not true, those narrow gauge trains are by far more reliable then those steamers(not talking about the steaming narrow gauge locos)singaporekid_92 wrote:Steamers are not the suck!, hehe
In locomotion, steamers have about the highest reliability i've seen
and I must say, there arent that many steamers in game, as I like to see how they run with those wheels thingys how ya call 'm ?
those crossbars that connect the wheels with each other....
Alrighty then, an update. http://www.ttdpatch.net/loco/locotool_v0.02.zip
Now it's all in one, no more running objdump then dmptrans. Also it's called "locotool" now, it'll convert your vehicle dats into xml format again.
Now it includes all information from the .dat file, although I'm having some doubts about how best to add the sprites. Currently they're png files in CDATA sections, but that still stops the xml from being wellformed. Oh well... maybe I'll base64 encode them or something. It works fine for most vehicles, but not all of them for some reason.
Next step (after fixing that) will be to make it possible to encode those files again, but since I understand how everything works that shouldn't be too hard. And then to work on the other 32 object types...
Now it's all in one, no more running objdump then dmptrans. Also it's called "locotool" now, it'll convert your vehicle dats into xml format again.
Now it includes all information from the .dat file, although I'm having some doubts about how best to add the sprites. Currently they're png files in CDATA sections, but that still stops the xml from being wellformed. Oh well... maybe I'll base64 encode them or something. It works fine for most vehicles, but not all of them for some reason.
Next step (after fixing that) will be to make it possible to encode those files again, but since I understand how everything works that shouldn't be too hard. And then to work on the other 32 object types...
Patchman is Josef Drexler right?
Before everybody gets too excited, can I just add a few words of caution based on similar work that has gone on in the RCT2 arena?
Before everybody gets too excited, can I just add a few words of caution based on similar work that has gone on in the RCT2 arena?
- There needs to be a database established so that new object makers can make sure that they don't reuse a filename and/or object handle that has already been allocated.
Unlike RCT2 which has a 'save with objects' option, Locomotion does not. Based on 'missing object' posts here, it looks as though downloading a saved game which uses objects that you don't have will cause the game to crash.
Chris Sawyer is still using a fixed memory model. Therefore the number of objects of each type that you can use in a scenario is fixed. Check out the scenario editor advanced tab for the limits.
- RaptorTycoon
- Tycoon
- Posts: 2310
- Joined: 09 Dec 2002 15:35
- Location: Urope>Dutchland>Rotterdam
I'm not patchman, but I can answer the question. It's not a patch or something like that, it just are some tools which at the moment dump vehicle stats to a xml file, nothing more, nothing less.raptortycoon wrote:@ Patchman: What is now called LocoTools is like "LocoPatch" under a different name? or am i missing something?
And to patchman:
You're not free'ing your malloc'ed memory, tsssk

"Peace cannot be kept by force. It can only be achieved by understanding." - Albert Einstein
Who is online
Users browsing this forum: Semrush [Bot] and 12 guests