7/13/2023 0 Comments Openttd percentage transported![]() ![]() In each of those, the north (top) corner of the map is the 'zero' of the coordinate system.Īlso called X offset and Y offset in this document, these are most common and are used when it's only necessary to know the location of a tile ( square, in TTD terms). ![]() Of various coordinate systems used in TTD, the three listed below appear in savegames. Note: All information below applies to uncompressed savegames. SV1Codec produces uncompressed savegames (a.k.a. Title screen demonstration savegames (the TITLE.DAT files) use the same format, except that at the end of the file checksum calculation, the game format version is subtracted from the checksum, instead of being added to it. This is fixed in TTDPatch 1.8 and later if 'generalfixes' or 'win2k' switch is on. Finally, the game format version (+105128 for TTO, +201100 for TTD) is added to the checksum.įile checksum is broken in games saved by the Windows version of TTD. Each byte is added to the low 8 bits of the checksum after each addition, the (32-bit) checksum is rotated 3 bits to the left. The file checksum calculation starts with checksum equal to 0. The file checksum is always at the end of the file. If c is negative: the other byte of the chunk repeated (- c + 1) times.įile checksum, calculated from all the preceding bytes of the file (including the title and the title checksum fields). If c is nonnegative: the rest of the chunk, i.e. A string of chunks, each consisting of a leading code byte (the value of which is denoted as c here) followed by one byte if c is negative, otherwise by c+1 bytes. The actual data, compressed with a variant of run-length encoding (RLE) scheme. This is calculated by adding up all bytes of the title field, rotating the (16-bit) value 1 bit to the left after each addition, then EXORing the resulting value with 0xAAAA. A string of characters, terminated with a NUL unless they take up the entire title space. The format of a compressed savegame (a file with one of the following extensions. Words and doublewords are stored in the 'little-endian' convention, with the least significant byte first, as usual on the x86 processor architecture.Īll known versions of Transport Tycoon save and load compressed savegames. Variable sizes are indicated with the following symbols: B - byte, W - word (16-bit), L - 'long' word (32-bit the standard term for the x86 architecture is 'doubleword', but B and D are visually not enough distinct for my taste).ī means two bytes a notation like means an array of 0x1E (or +30) structures, each 0x14 (or +20) bytes long. ![]() Sorry if it gets confusing, it's intuitive enough to me :-) 0x prefix means hexadecimal, 0 prefix means octal, otherwise it's decimal) monospaced font has no significance there. In fragments marked as "C notation", numbers are in the notation used in the C language (i.e. To further disambiguate between the decimal and hexadecimal notation, hexadecimal is typically marked by the use of a monospaced font, like this: 1F, and/or the 0x prefix, like this: 0x1F. Numbers with a fractional part, percentages and dates are also in decimal by default. A plain number prefixed with a plus (+) or minus (-) sign is in the decimal notation. Unless stated otherwise, a plain number with no prefix is assumed to be in the hexadecimal notation, except for bit numbers, which are in the decimal notation. (For Windows, a good one is frhed (Free Hex Editor). You should have a decent hex editor, too, but you probably know that already. I assume that you, the reader, are familiar with basic concepts of savegameĮditing if you're not, there are plenty of tutorials on the Web. The original Transport Tycoon (TTO) uses a similar savegame format, but so far I have little information concerning the exact structure of uncompressed TTO savegames (see "Compressed vs. If you notice any errors, or have suggestions regarding this document, feel free to e-mail me about it. For an up-to-date reference, the best you can do is probably getting the TTDPatch source code (also available at my TTDPatch site) and browse the assembly files ( *.asm and *.ah). TTDPatch extensions up to version 2.0 are also documented, but often in less detail, and since TTDPatch is under continuous development, the list is likely to be incomplete the moment you read it. You can rely on the information you find here :-) In fact, my goal is to make this file as complete and accurate reference of TTD savegame structure as possible, for as long as I can maintain it. This file documents many things I know about the structure of Transport Tycoon Deluxe (TTD) savegame files. If your browser cannot display it properly, you're probably better off viewing it as plain text, especially if you have a way to filter out all the HTML markup. Hint: Although this document is 100% HTML 3.2, it uses nested tables rather heavily. Transport Tycoon Deluxe savegame internals
0 Comments
Leave a Reply. |