TTDX Editor 1.10.0014 will be out soon

Get help, info, news and advice about the Transport Tycoon Deluxe patch.

Moderator: TTDPatch Moderators

Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

orudge wrote:could someone (Josef/Osker) create a patch to load extra chunk with ID 03 (can be changed obviously if wanted), store this in memory somewhere, and then save it back again?
This won't be easy. The problem is that the chunk is variable size, and when loading a game, it would need to be loaded in memory and remembered. That last part is difficult... especially because it's got a variable size. Everything else in these blocks is fixed size, though the size may change from one patch version to the next.

If you only need a few bytes instead of a whole history, it would be easier to store it in the unused bytes of the landscape3 array, where TTDPatch also stores some data. These are the bytes from 24cba..24db9. TTDPatch currently uses 24cba..24cca, so I could reserve 24ccb plus a couple more for you if you like. This would work with non-patch games as well.
User avatar
orudge
Administrator
Administrator
Posts: 25223
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Post by orudge »

Well, just a couple of bytes to say "modified by TTDX Editor" would do, so yes, that'll be fine.

/me goes and comments out all that code he worked on earlier :( ;)
User avatar
orudge
Administrator
Administrator
Posts: 25223
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Post by orudge »

OK, I've used it as follows (just FYI, if you want to know):

Code: Select all

OFFSET     SIZE        MEANING

24CCB      B           TTDX Editor major version
24CCC      B           TTDX Editor minor version
24CCD      B           TTDX Editor revision
24CCE      B           Reserved for future use
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

orudge wrote:OK, I've used it as follows (just FYI, if you want to know):

Code: Select all

OFFSET     SIZE        MEANING

24CCB      B           TTDX Editor major version
24CCC      B           TTDX Editor minor version
24CCD      B           TTDX Editor revision
24CCE      B           Reserved for future use
Good. I'll mark those bytes as reserved for TTDX Editor. Then no-one will use them accidentally.
Post Reply

Return to “General TTDPatch”

Who is online

Users browsing this forum: No registered users and 18 guests