LocoCodec - Savegame Tool -

Discuss, get help with, or post new modifications, graphics or related tools for Locomotion in this forum.

Moderator: Locomotion Moderators

Post Reply
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

LocoCodec - Savegame Tool -

Post by eis_os »

Hi

Currently I haven't much time to really start with a savegame to xml project however lococodec a tool that get used by my next project works for the extracting and combine a savegame.

This means you can extract a savegame, use a hex editor to inspect the savegame internals and combine the file so loco can load it.

(Adding objects to Loco Savegames that didn't get introduced yet, worked very well in my tests, you should know how to use an hex editor however)

Please let me know if you have interest in this tool.
I try to make a release compile and a readme the next days.

-edit-
First Version is out, use at your own risk.
Please don't post links directly to the download file somewhere,
link to this thread instead. Otherwise I kill the file...

Lococodec is a commandline tool, use -h for help.

Help:
lococodec infilename.sv5

\/
Edit the files in chunks

\/
lococodec -+ outputfilename.sv5

Lococodec produces uncompressed savegames, so don't be afraid by the size, a simple save in loco will help ;)

http://www.allvb.de.vu/projects/lococod ... _2_0_2.zip
(link fixed)

Problems? Comments? Found something usefull? Post here...
Last edited by eis_os on 21 Mar 2005 19:28, edited 4 times in total.
TTDPatch dev in retirement ... Search a grf, try Grf Crawler 0.9 - now with even faster details view and new features...
Image
TrueSatan
Transport Coordinator
Transport Coordinator
Posts: 291
Joined: 16 Jul 2003 18:33

Post by TrueSatan »

Hi Oskar.
I'm very interested in such a tool :-)
So I would like to download it once you'll have the
time to release it.
Thanks in advance for this nice tool :D
greets
User avatar
Born Acorn
Tycoon
Tycoon
Posts: 7595
Joined: 10 Dec 2002 20:36
Skype: bornacorn
Location: Wrexham, Wales
Contact:

Post by Born Acorn »

go for it, development of it would allow the objects into current games.
Image
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Post by eis_os »

Lococodec 0.2 out, see first post

If you want to add new objects, extract the savegame and edit chunks3.dat. Each entry has 16Bytes.

Mek's Fileformat Description can be usefull, the size of the Object array seems not right in his doc however.
http://www.eljakim.nl/~mkruisselbrink/L ... ormat.html

PS: I know, the xp icon is broken somehow, blame my binutils...
TTDPatch dev in retirement ... Search a grf, try Grf Crawler 0.9 - now with even faster details view and new features...
Image
JTanczos
Traffic Manager
Traffic Manager
Posts: 233
Joined: 28 Sep 2004 05:59

Post by JTanczos »

If you find out a "simple" way of adding vehicals I would use this in a heartbeat. I dont know how to use a hexeditor. Took me awhile to learn how to use locotool. I am most interested in adding extra vehicals to my game. I hate the lack of high powered locos that dont require overhead wires. Overhead wires over thousands of miles of complex trackwork makes it look very messy and unattractive. Need to add locos like the SD-238.

JT
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Post by eis_os »

Thats what I planed with the xml project, but thats currently stopped until I have time to work on it...

Maybe I will recycle LocoTool with Josefs help to make a small tool to allow it without hex editing until I can start...
TTDPatch dev in retirement ... Search a grf, try Grf Crawler 0.9 - now with even faster details view and new features...
Image
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Post by eis_os »

Some progress news

I started to write an Tree Builder for the Fileformat XML, means if all works as aspected, you are able to rename unknowns self or discover new parts of the sv5 fileformat.
The current tree builder is very basic, and the tree objects are far away from doing something usefull.

Ohh, here is a screendump, currently all unknown objects are handled like containers, so it produces syntax errors.

Code: Select all

LocoCodec XML Test Application
--------------------------------------------
Syntax Error @ Line 15 - Column 28:No Text allowed here!
$class == 0x97|----Container
|    |----Container
|    |    |----Container
|    |    |    |----Array
|    |    |    |    |----Container
|    |    |    |    |    |----DDOVariable <(null)>
|    |    |    |    |    |----DDOVariable <(null)>
|    |    |    |    |    |----DDOVariable <(null)>
|    |    |    |    |    |----DDOVariable <(null)>
|    |    |    |    |    |----DDOVariable <(null)>
|    |    |    |    |    |----Container
|    |    |    |    |    |    |----Container
|    |    |    |    |    |    |----Container
|    |    |    |    |    |    |    |----Container
|    |    |    |    |    |    |    |    |----Container
|    |    |    |    |    |    |    |    |    |----DDOVariable <ContinousBit($ObjData.index-389)>
|    |    |    |    |    |----DDOVariable <(null)>
|    |----Container
|    |    |----Container
|    |    |----Array
|    |    |    |----Container
|    |    |    |    |----DDOVariable <(null)>
|    |    |    |    |----DDOVariable <(null)>
|    |    |    |    |----DDOVariable <(null)>
|    |    |    |    |----DDOVariable <(null)>
|    |    |    |    |----Container
|    |    |    |    |----DDOVariable <(null)>
|    |    |    |    |----Container
|    |    |    |    |----Container
Drücken Sie eine beliebige Taste . . .
TTDPatch dev in retirement ... Search a grf, try Grf Crawler 0.9 - now with even faster details view and new features...
Image
scrat
Chief Executive
Chief Executive
Posts: 713
Joined: 04 Oct 2004 10:20
Location: Rotterdam, The Netherlands

Post by scrat »

Sounds good.

Correct me if I'm wrong, but you're basically writing for savegames, what LocoTool is for object files, right?

The possibilities of this are endless. I hear people talking about patching Locomotion, but a lot of in-game tedium can be simply avoided by integrating vehicle replacement and upgrading through a well-written savegame tool.
So long and thanks for all the fish.
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Post by eis_os »

Yep, but locotool is a static app, the goal is to get a tool that reads a data description format (in XML) build the logic at runtime, then it can do binary <-> XML converstations, say we have this:

Code: Select all

<block id="objects">
	<array name="ObjData">
		<items>255</items>
		<itemsize>858</itemsize>
		<item>
			<var name="class" size="1" type="hex"></var>
			<var name="unknown_1" size="1" type="hex"></var>
			<var name="unknown_2" size="1" type="hex"></var>
			<var name="unknown_3" size="1" type="hex"></var>
			<var name="name" size="8"></var>
			<if>
				<condition>$class == 0x97</condition>
				<true>
					<file fileid="3" offset="0x0">
						<loop id="companyindex">
							<var name="vehava company" size="0" fileid="2">ContinousBit($ObjData.index-389)</var>
						</loop>
					</file>
				</true>
			</if>
			<var name="unknown_4" size="4" type="hex"></var>
		</item>
	</array>
</block>
It should produce something like as output:

<objects>
<array id="ObjData" items="255">
<item>
<class>0x12</class>
<unknown_1>0xAA<unknown_1>
...
</item
<item>
...
</array>
</objects>

I think now everyone gets the main idea behind it.
The DD-Format is currently work in progress, so it will change surely.

PS: Some ideas and thoughs about the Dataformat are welcome, the big part will be to support an small programming language to access other objects, do calculations and and...
TTDPatch dev in retirement ... Search a grf, try Grf Crawler 0.9 - now with even faster details view and new features...
Image
another_lomo_player
Engineer
Engineer
Posts: 66
Joined: 20 Nov 2004 21:42

Post by another_lomo_player »

Your link is dead. Can you give me a working, please?

Nice if you could send me some info about the compression of savegames and sceanrios.
Another LoMo player.

Various tools to Locomotion at my fresh site:
http://home.no/locomotion/
User avatar
chevyrider
Tycoon
Tycoon
Posts: 3285
Joined: 16 Sep 2004 09:52
Location: Amersfoort The Netherlands

Post by chevyrider »

The very good Save Changer Locomod, works as follows.

Put your new trains in the ObjDATA folder.
Start Locomod.
Your objdata are now read in the program.
After that, the only thing that you see happening is the appearance of one line on top of your screen.
Click on file..... Open ,
Open singleplayer saved games.
Choose one.
Your save game is read.
Click on OBJDATA.
Now you can almost alter everything in your game.
Choose vehicles.
Check them, and they become available in their release year.
An other feature is that when you are in 1900, you can go to companies\vehicles and check the new train.
in this way you can even use a maglev in that year.
Altered vehicles with new stats only appear when they are renewed
Important NOTE: Don't uncheck anything, only add things, otherwise your save game will not start anymore.
Reserve BAKfile is always made.
Just close the program with the cross and start up lomo.
It always works.
You can download the source from http://eljakim.nl/~mkruisselbrink/Locom ... 0.2.tar.gz
A windows executable can be found http://eljakim.nl/~mkruisselbrink/Locom ... ocoMod.exe
Last edited by chevyrider on 30 May 2005 09:04, edited 3 times in total.
-
-
39 years experience with trains and still driving.
-
-
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Post by eis_os »

May I ask you why you don't link to our thread...

http://www.tt-forums.net/viewtopic.php?t=11331

Plus he contacted me already via PM...
TTDPatch dev in retirement ... Search a grf, try Grf Crawler 0.9 - now with even faster details view and new features...
Image
User avatar
chevyrider
Tycoon
Tycoon
Posts: 3285
Joined: 16 Sep 2004 09:52
Location: Amersfoort The Netherlands

Post by chevyrider »

Sorry, done.
Please change the Topic name, because the exe is known as Locomod and not Lococodec.
or are there to different programs?
I'm not the onlyone who's confused. :wink:
-
-
39 years experience with trains and still driving.
-
-
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Post by eis_os »

Lococodec is lococodec, it's an application to extract and compress Loco Savegames, nothing more... And if you look at this topic here, it's name is LocoCodec
TTDPatch dev in retirement ... Search a grf, try Grf Crawler 0.9 - now with even faster details view and new features...
Image
tubechallenger
Route Supervisor
Route Supervisor
Posts: 429
Joined: 13 Dec 2003 18:23
Location: Bournemouth, UK

Post by tubechallenger »

Does anyone have a copy of this file to hand as the download link doesn't work?

Thanks
Post Reply

Return to “Locomotion Graphics, Modifications & Tools”

Who is online

Users browsing this forum: No registered users and 7 guests