Page 1 of 1

LocoCodec - Savegame Tool -

Posted: 14 Oct 2004 17:42
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...

Posted: 14 Oct 2004 17:50
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

Posted: 14 Oct 2004 17:50
by Born Acorn
go for it, development of it would allow the objects into current games.

Posted: 14 Oct 2004 18:34
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...

Posted: 14 Oct 2004 20:44
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

Posted: 15 Oct 2004 07:21
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...

Posted: 29 Nov 2004 10:21
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 . . .

Posted: 29 Nov 2004 10:39
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.

Posted: 29 Nov 2004 11:15
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...

Posted: 07 Mar 2005 19:16
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.

Posted: 30 May 2005 07:57
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

Posted: 30 May 2005 08:08
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...

Posted: 30 May 2005 08:41
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:

Posted: 30 May 2005 10:18
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

Posted: 08 Jan 2006 00:47
by tubechallenger
Does anyone have a copy of this file to hand as the download link doesn't work?

Thanks