Reply to Re: Save games and globals
If you don't have an account, just leave the password field blank.
There are no DinkC commands for it, but you could write an external savegame editor that does just that. Variables are saved as an array of 250 items that all look like:
4 bytes (=1 integer) of variable value
20 bytes (=20 characters) of variable name
4 bytes (=1 integer) of "scope" (either global (presumably 0 or -1 or something like that), or a script number)
1 byte (=1 boolean) to indicate if this slot is currently in use.
3 bytes of padding, to make this 32 bytes total.
I'll have to do a bit more math to figure out at which byte offset in the .dat file you can find this structure, but I bet you can open it with a hex editor and look for anything that looks like a variable name.
EDIT<whatever>: I guess this assumes a 32bits architecture, which is the only thing I'm familiar with.
EDIT<whatever+1>: Modified the savegame layout a bit to better reflect how data is saved.
EDIT<whatever+2>: Reading up on 64bits architectures, it looks like an "int" is 4 bytes, no matter which system is used. It is only a "long" that suddenly gets bigger.
4 bytes (=1 integer) of variable value
20 bytes (=20 characters) of variable name
4 bytes (=1 integer) of "scope" (either global (presumably 0 or -1 or something like that), or a script number)
1 byte (=1 boolean) to indicate if this slot is currently in use.
3 bytes of padding, to make this 32 bytes total.
I'll have to do a bit more math to figure out at which byte offset in the .dat file you can find this structure, but I bet you can open it with a hex editor and look for anything that looks like a variable name.
EDIT<whatever>: I guess this assumes a 32bits architecture, which is the only thing I'm familiar with.
EDIT<whatever+1>: Modified the savegame layout a bit to better reflect how data is saved.
EDIT<whatever+2>: Reading up on 64bits architectures, it looks like an "int" is 4 bytes, no matter which system is used. It is only a "long" that suddenly gets bigger.