Re: Savegame editing

From: Charles <usetex_at_...>
Date: Tue, 08 Dec 2009 10:16:19 -0000

> Below is the content of my KoDP.bt file, you can run it on any save file from 010 Editor, terribly formatted due partly to the line length here.

This is hot stuff. It's more readable than you think: I guess the average piece of code isn't half as well commented.

I'm most interested in the representation of the geography: I'd like to export a labelled map, showing what land the clans control. Call figuring out how this is represented "The Clan Occupancy Problem" :->

The clan struct is the most obvious place to have this, but:

////////////////////////////////////////////////////////////////CLAN A-L////////////////////////////////////////////////////////////////

> typedef struct {
> SetBackColor(cLtBlue);
> struct {

...
> } dataAL;

...then substructs Leaders, dataLR, Relations, dataRW

and then some puzzling (to me) code containing the line:
> ARRAY Zones;

followed by the last substruct, History.

Nothing has a name shouting Clan Occupancy, but I'll come back to struct Zones, after: the Map struct, which I'm pretty sure must describe what areas have been explored:

> ////////////////////////////////////////////////////////////////MAP////////////////////////////////////////////////////////////////
> SetBackColor(cLtYellow);
> struct { struct { BOOL Hex[27]; } Line[32]; } Map;

27x32, I think, is too coarse grained to describe clan occupancy.

Then the encouragingly named Zones struct:

////////////////////////////////////////////////////////////////LANDS////////////////////////////////////////////////////////////////

> SetBackColor(cLtYellow);
> struct {
> SetForeColor(cWhite);
> short ct;
> SetForeColor(cNone);
> if (ct) short Owner[ct];
> SetColor(cNone,cNone);
> char Opal[4];
> } Zones;

Recall the directive I don't understand, "ARRAY Zones", between the declaration of the dataRW and History substructs in the CLAN struct.

I'm guessing that's it, but it doesn't give a huge amount of insight into the layout part of The Clan Occupancy Problem.

The issue is that, while struct Map seems to be a straightforward Cartesian representation of the map, Zones contains a string (called here Owner), followed by an Opal id. So how does the representation work?

Guess: each little parcel of territory that clans can occupy has a name, so Clan Occupancy is a list of name/id pairs identifying these land parcels.

In your follow-up, you write:
> I've also found that the map blocks are separated into "regions", each with
> their proper name, too. The region that the player starts out in, for example,
> is called Arfritha, with Lorthing to the east. The Colymar tribe typically
> occupies the Nymie, Starfire and Lismelder regions. But no, as far as I know
> the regions has no bearing on the gameplay and are never mentioned.

Huh? Where? Is that Zone.Owner?

I'd guess that maybe clans are more interested in joining clans from the same, or nearby, regions.

> Lastly, I think I've exhausted most things that can be readily parsed tested.
> I'd love to hear more ideas on what other tests I could do.

Map data: what happens when a clan decamps to a new region? Or loses a parcel of land in a raid?

I'd love to use your data representation code and poke about with some game files myself, but I'm terrified of Windows (inexplicable machine behaviour induces palpitations in me), and the 010 Editor .bt format doesn't appear to be supported by any linux-friendly hex editors.

It might not be too difficult to translate your code to C, though. Would it be possible to share a game file together with what your KoDP.bt makes of it?

Many thanks for the fruits of your six months of hacking!

Charles

Powered by hypermail