Re: Savegame editing

From: outis02 <uly_at_...>
Date: Tue, 08 Dec 2009 15:13:17 -0000


Actually, I've made some more progress since I first posted the files. I'd be more than happy to send you the actual files, but let's keep the conversation public so that others may join in as well.

I'm not sure what kind of map you're looking for exactly. But I actually have a home-made photoshoped map that labels all the zones in KoDP. Let me know if you want it.

As for the "Clan Occupancy Problem"...
Yes, in fact that was precisely the question that got me into hacking the whole save file. I was content with some simple cow hacking before.

The "Problem" is quite simple, really, as far as I can tell, anyway. As you've observed, there are three data blocks that control the map.

Let me first clarify that a "Zone" is simply the arbitrary name I've picked for one unit of land on the map. The duck clan, for example, occupies one Zone. Other clans typically occupy 2 to 3 Zones. There are 122 Zones altogether in Dragon Pass, including Wintertop, Beast Valley, etc. And each Zone has a corresponding index number.

On the other hand, as you've guessed, the Hexes in Map.Line[].Hex[] are simply the units of "fog of war" for exploration. Nothing to do with the question at hand.

So, the Clans.Clan[].Zones is an array of Zones that the clan possess. This data, however, is only superficial. It does change the map display, but not the size, nor the near/neighbour attribute of the clan. It's also superficial in the sense that the game does not take this into consideration when determining occupancy of a Zone, such that several clans may have the same Zones in this array without any conflict.

The real Zone occupancy is, against as you've observed, down at the end of the file, in Zones.Owner[]. This is an array of 122 short integers, each for one Zone, and it records the index number of the occupant clan of a Zone. Presumably, this data is what the engine actual depends on for all calculations. Oh, and the Zones.Opal at the very end is simply a file footer; nothing to do with Zones at all. I just left it there out of sheer laziness.

Two things of note, though:

  1. As far as I can tell, new clans or split clans will only appear in the area to the east or in the Upland Marsh, regardless of the occupancy of the rest of the map.
  2. And one thing that remains to be tested, is whether Zones.Owner[] also determines the "raid pathing", i.e. whether it determines whose tula you have to go through on a raid. I am guessing Yes, but too lazy to actually test it at the moment.

> 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.

Oh, that has nothing to do with the save file whatsoever. I don't remember it very well, but I think I found that out from digging through KoDP\Opal\map.opm. Like I said, these "regions" have absolutely no bearing on the game as far as I can tell. I'm guessing that it's related to some background lore that I've no idea about. Or maybe these are the clan names in a particular KoDP source book? But I know that David Dunham is the author of a considerable amount of material in Gloranthan lore, so maybe he just made everything up. I know he doesn't want to encourage hacking, but if nothing else, I'd like to have his explanation on this.

I'm still making very slow progress on further parsing. I'm as always quite obsessed with figuring out the personality traits, which are really a pain in the ass to test. But most importantly, I've begun to investigate the Tribe properties, which I've mostly left untouched before.

I didn't even know you could run KoDP on Linux. But yeah, like I said I'd be happy to share the (latest) hex templates. As you see it's essentially C-based syntax, so it shouldn't be too difficult to convert. I could also send you 010Editor's documation if necessary, which may help with understanding some functions. But I think most of them are self-explanatory enough.

-o

Powered by hypermail