Loading ...
Sorry, an error occurred while loading the content.
 

Savegame editing

Expand Messages
  • outis02
    ...or hacking if you prefer. So having played KoDP on and off for half a decade now, I ve taken up hacking the savegame files. Just out of curiosity really.
    Message 1 of 18 , Nov 1 4:23 PM
      ...or hacking if you prefer.

      So having played KoDP on and off for half a decade now, I've taken up hacking the savegame files. Just out of curiosity really. I'd always been the kind of kids that ended up disecting all their toys.

      I have some basic programming knowledge but I'm certainly not what you would call a proper programmer or hacker. Nevertheless I've made quite a lot of progress over the past 6 months, with maybe around 80% of the file parsed. I'd be happy to share my research and hopefully get some help too. But before I do so, would anyone object to this? Or, is anyone interested at all?
    • Alexander G. M. Smith
      ... I d be interested, mostly from a curiosity point of view. But first, any objections from A-Sharp? - Alex
      Message 2 of 18 , Nov 1 5:49 PM
        outis02 wrote on Mon, 02 Nov 2009 00:23:44 +0000:
        > [...] I'd be happy to share my research and hopefully get some help too.
        > But before I do so, would anyone object to this? Or, is anyone interested at all?

        I'd be interested, mostly from a curiosity point of view. But first,
        any objections from A-Sharp?

        - Alex
      • donmoody@pro-ns.net
        ... Like Alex, I am curious. DonMoody
        Message 3 of 18 , Nov 1 6:10 PM
          Alex wrote:

          > outis02 wrote:
          >
          >> [...] I'd be happy to share my research and hopefully get some help too.
          >> But before I do so, would anyone object to this?
          >> Or, is anyone interested at all?
          >
          > I'd be interested, mostly from a curiosity point of view.
          > But first, any objections from A-Sharp?

          Like Alex, I am curious.

          DonMoody
        • David Dunham
          ... I don t *like* it, because frequently people end up breaking the game experience (no, we never tested with 30,000 cows). But it s your game, so I don t
          Message 4 of 18 , Nov 2 6:07 PM
            >any objections from A-Sharp?

            I don't *like* it, because frequently people end up breaking the game
            experience (no, we never tested with 30,000 cows). But it's your
            game, so I don't *object* (like I would to stealing from us).
            --

            David Dunham A Sharp, LLC
            Voice/Fax: 206 783 7404 http://a-sharp.com
            Efficiency is intelligent laziness.
          • James Casey
            ... Me too. I m very unlikely to actually edit my own saves, but I am very curious as to exactly what *is* saved.
            Message 5 of 18 , Nov 3 6:35 AM
              --- In KingOfDragonPass@yahoogroups.com, donmoody@... wrote:
              >
              > Alex wrote:
              >
              > > outis02 wrote:
              > >
              > >> [...] I'd be happy to share my research and hopefully get some help too.
              > >> But before I do so, would anyone object to this?
              > >> Or, is anyone interested at all?
              > >
              > > I'd be interested, mostly from a curiosity point of view.
              > > But first, any objections from A-Sharp?
              >
              > Like Alex, I am curious.
              >
              > DonMoody
              >

              Me too. I'm very unlikely to actually edit my own saves, but I am very curious as to exactly what *is* saved.
            • outis02
              ... It certainly breaks the game experience as it is originally intended, but for some, breaking the game is quite an experience all in itself. Some kids
              Message 6 of 18 , Nov 3 9:11 AM
                --- In KingOfDragonPass@yahoogroups.com, David Dunham <david@...> wrote:
                > >any objections from A-Sharp?
                > I don't *like* it, because frequently people end up breaking the game
                > experience (no, we never tested with 30,000 cows).

                It certainly breaks the "game experience" as it is originally intended, but for some, breaking the game is quite an experience all in itself. Some kids just get more kick out of breaking their toys.

                That said, there's the question of how I could actually share my findings. I use a hex editor called 010 Editor by SweetScape. It comes with a built-in template scripting system for hex files, with a C-like syntax. I could simply post up my template files, but that would probably be quite incomprehensible to any non-programmer who might also be interested. Suggestions?
              • outis02
                Anyway, before there s a better suggestion, I m just gonna post what I ve got so far. Below is the content of my KoDP.bt file, you can run it on any save file
                Message 7 of 18 , Nov 3 11:50 AM
                  Anyway, before there's a better suggestion, I'm just gonna post what I've got so far. 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. You may also notice that there's an #include at the bottom, but it's just for some display functions that aren't really important to the file structure. Also ignore all the SetColor(), ???read and ???write functions; it's just for display within 010 Editor.


                  BigEndian(); BitfieldRightToLeft();
                  enum <byte> BOOL { False, True=0xFF};

                  ////////////////////////////////////////////////////////////////DATE////////////////////////////////////////////////////////////////
                  typedef short DATE <read=DATEread>;
                  string DATEread (DATE &t) {
                  int year = t / 11;
                  enum { Sea1, Sea2, Fir1, Fir2, Ear1, Ear2, Dar1, Dar2, Sto1, Sto2, Sac } season = t % 11;
                  string s = SPrintf(s, "%i·%s", year, EnumToString(season));
                  return s;
                  }

                  ////////////////////////////////////////////////////////////////STR////////////////////////////////////////////////////////////////
                  typedef struct {
                  SetForeColor(cPurple);
                  short len;
                  SetForeColor(cDkPurple);
                  local int64 pos = FTell();
                  if (len) uchar Str[len];
                  SetForeColor(cNone);
                  } STR <read=STRread, write=STRwrite>;

                  string STRread (STR &v) { if (v.len) return v.Str; return ""; }
                  void STRwrite (STR &v, string s) {
                  if (v.len == Strlen(s)) Strncpy(v.Str, s, v.len);
                  else {
                  if (v.len < Strlen(s)) InsertBytes(v.pos, Strlen(s)-v.len);
                  if (v.len > Strlen(s)) DeleteBytes(v.pos, v.len-Strlen(s));
                  WriteBytes(s, v.pos, Strlen(s));
                  v.len = Strlen(s);
                  }
                  }

                  ////////////////////////////////////////////////////////////////ARRAY////////////////////////////////////////////////////////////////
                  typedef struct {
                  local int64 pos = FTell();
                  SetForeColor(cWhite);
                  short ct;
                  SetForeColor(cDkBlue);
                  if (ct) short Int[ct] <format=hex>;
                  SetForeColor(cNone);
                  } ARRAY <optimize=false, read=ARRAYread>;

                  string ARRAYread (ARRAY &v) { string s = SPrintf(s, "%i", v.ct); return s; }

                  ////////////////////////////////////////////////////////////////CHIEF////////////////////////////////////////////////////////////////
                  typedef struct { enum <short> PERSONALITY { low=1, mid, high, pc=0xCDCD } ChiefDaring;
                  PERSONALITY ChiefGenerosity; PERSONALITY ChiefGuile; PERSONALITY ChiefPiety;
                  } CHIEF <read=CHIEFread>;

                  string CHIEFread (CHIEF &c) {
                  string s;
                  switch (c.ChiefDaring) { case 1 : s += "·Dar-"; break; case 3 : s += "·Dar+"; break; }
                  switch (c.ChiefGenerosity) { case 1 : s += "·Gen-"; break; case 3 : s += "·Gen+"; break; }
                  switch (c.ChiefGuile) { case 1 : s += "·Gui-"; break; case 3 : s += "·Gui+"; break; }
                  switch (c.ChiefPiety) { case 1 : s += "·Pie-"; break; case 3 : s += "·Pie+"; break; }
                  s = SubStr(s, 1);
                  return s;
                  }

                  ////////////////////////////////////////////////////////////////POP////////////////////////////////////////////////////////////////
                  typedef struct { short Healthy, Absent, Sick, Wounded; } POP <read=POPread>;
                  string POPread (POP &v) { string s = SPrintf(s, "%i·%i·%i·%i", v.Healthy, v.Absent, v.Sick, v.Wounded); return s; }

                  ////////////////////////////////////////////////////////////////GODS////////////////////////////////////////////////////////////////
                  typedef struct {
                  long:1; long Ancestors:1; long ArganArgar:1;long Barntar:1;
                  long ChalanaArroy:1;long Elmal:1; long Ernalda:1; long Eurmal:1;
                  long Humakt:1; long Issaries:1; long KeroFin:1; long LhankorMhy:1;
                  long Malia:1; long MaranGor:1; long Odayla:1; long Orlanth:1;
                  long TarardRiel:1; long Uralda:1; long Urox:1; long Vinga:1;
                  long WindSpirits:1;
                  } GODS <read=GODSread>;

                  string GODSread (GODS &v) {
                  string s; if(v.Ancestors) s+="·A"; if(v.ArganArgar)s+="·a"; if (v.Barntar) s+="·B";
                  if(v.ChalanaArroy)s+="·C"; if(v.Elmal) s+="·El"; if(v.Ernalda) s+="·Er"; if (v.Eurmal) s+="·Eu";
                  if(v.Humakt) s+="·H"; if(v.Issaries) s+="·Is"; if(v.KeroFin) s+="·k"; if (v.LhankorMhy) s+="·L";
                  if(v.Malia) s+="·m"; if(v.MaranGor) s+="·mg"; if(v.Odayla) s+="·Od"; if (v.Orlanth) s+="·Or";
                  if(v.TarardRiel) s+="·t"; if(v.Uralda) s+="·Ua"; if(v.Urox) s+="·Ux"; if (v.Vinga) s+="·V";
                  if(v.WindSpirits) s+="·w"; s = SubStr(s, 1); return s;
                  }

                  ////////////////////////////////////////////////////////////////RAID////////////////////////////////////////////////////////////////
                  typedef struct {
                  short ClanIdx;
                  enum <short> { Cattle=65527, Battle=65532 } Type;
                  DATE Date;
                  enum <short> { draw, win_caught, loss_steal=65535 } Result;
                  } RAID <read=RAIDread>;

                  string RAIDread (RAID &r) {
                  int i = r.ClanIdx-1;
                  if (i<0) i = 0;
                  string s = SPrintf(s, "%s·%s·%s·%s", DATEread(r.Date), EnumToString(r.Type), EnumToString(r.Result), SubStr(Clans.Clan[i].dataLR.Name.Str,0,Clans.Clan[i].dataLR.Name.len));
                  return s;
                  }

                  ////////////////////////////////////////////////////////////////BALANCE////////////////////////////////////////////////////////////////
                  enum <short> BALANCE { War, Balanced, Peace };

                  ////////////////////////////////////////////////////////////////SKILL////////////////////////////////////////////////////////////////
                  typedef struct { SetForeColor(cDkBlue); LittleEndian();
                  double Animals; double Bargaining; double Combat; double Custom; double Leadership; double Magic; double Plant;
                  BigEndian(); SetForeColor(cNone);
                  } SKILLS <read=SKILLSread>;

                  string SKILLSread (SKILLS &v) { string s = SPrintf(s, "%1.f·%1.f·%1.f·%1.f·%1.f·%1.f·%1.f", v.Animals, v.Bargaining, v.Combat, v.Custom, v.Leadership, v.Magic, v.Plant); return s; }

                  ////////////////////////////////////////////////////////////////TRAIT////////////////////////////////////////////////////////////////
                  typedef struct {
                  long AntiAldryami :1, AntiUndead :1;
                  long _aggressive:1; //alliance: appeal to generosity, greed; tribute: appeal to guile, generosity, war: raid feuding neighbours; diplo: we can survive alone
                  long _Arrogant :1; //dictatorial, tribute: contest; kallyr: toast
                  long _11:1;
                  long _fearful :1; //tribute: avoid contest; trade: fear of ambush; magic: nervous of gods
                  long _12:1;
                  long _13:1;

                  long _unconfident :1; //tribute: can't win contest
                  long _21:1;
                  long _lore:1; //cites lore
                  long _peacelike :1;
                  long Matriarchal :1;
                  long Mumbler:1; //say crazy things, proverbial
                  long _greedy :1; //alliance: appeal to generosity; tribute: annual tribute
                  long Patriarchal :1;

                  long _31:1;
                  long _religious :1; //alliance: appeal to faith/orlanth
                  long _Poetic :1; //alliance: appeal to poetry; wyrm: follow ancestor
                  long _pacifist :1; //tribute: don't threaten
                  long ProDragonewt :1, Proverbial :1;
                  long _Tribelike :1; //diplo: gift neighbours to form tribe; trade: less trade, go explore (per omens)
                  long _generous :1; //? Generous? korlmar

                  long _hateful :1; //lousy XXX!
                  long _41:1;
                  long Religious :1; //alliance: worship
                  long _Told:1; //war: "told you XXX were gonna raid us!"
                  long Tradelike :1; //trade: more treasure
                  long Tribelike :1; //alliance: tribe
                  long Warlike :1;
                  long _42:1;
                  } TRAIT <read=TRAITread>;

                  string TRAITread (TRAIT &t) { string s;
                  if (t.AntiAldryami) s += "·Elf-";
                  if (t.AntiUndead) s += "·Undead-";
                  if (t._aggressive) s += "·?";
                  if (t._Arrogant) s += "·_Arrogant";
                  if (t._11) s += "·11";
                  if (t._fearful) s += "·_fearful";
                  if (t._12) s += "·12";
                  if (t._13) s += "·13";

                  if (t._unconfident) s += "·_unconfid";
                  if (t._21) s += "·21";
                  if (t._lore) s += "·_lore";
                  if (t._peacelike) s += "·_peace";
                  if (t.Matriarchal) s += "·Matri";
                  if (t.Mumbler) s += "·Mumbler";
                  if (t._greedy) s += "·?";
                  if (t.Patriarchal) s += "·Patri";

                  if (t._31) s += "·31";
                  if (t._religious) s += "·_religious";
                  if (t._Poetic) s += "·_Poetic";
                  if (t._pacifist) s += "·_pacifist";
                  if (t.ProDragonewt) s += "·Newt+";
                  if (t.Proverbial) s += "·Proverbial";
                  if (t._Tribelike) s += "·?";
                  if (t._generous) s += "·?";

                  if (t._hateful) s += "·_hateful";
                  if (t._41) s += "·41";
                  if (t.Religious) s += "·Religious";
                  if (t._Told) s += "·_Told";
                  if (t.Tradelike) s += "·_trade?";
                  if (t.Tribelike) s += "·_tribe?";
                  if (t.Warlike) s += "·Warlike";
                  if (t._42) s += "·42";
                  s = SubStr(s, 1);
                  return s;
                  }

                  ////////////////////////////////////////////////////////////////LEADER////////////////////////////////////////////////////////////////
                  typedef struct {
                  SetBackColor(cDkGray);
                  short Age;
                  SetBackColor(cLtPurple);
                  short ClanIdx;
                  enum <short> { Male=1, Female } Gender;
                  short TurnsUnavailable;
                  BOOL Heroic; //contest win, etc
                  enum <short> { Home, emissary, explorer=13, caravan=16, enthralled=18, Dead } Location; //enthralled by horsespawn
                  STR Name;
                  char Picture[12];
                  GODS Religion;
                  short Seat, Sick;
                  SKILLS Skills;
                  enum <short> { Alive, Dead_tmp1, Dead_tmp2, Dead_perm } State;
                  SetBackColor(cLtRed);
                  TRAIT Trait;
                  SetBackColor(cLtPurple);
                  enum <short> { craft=1, farm, heal, hunter, law, magic, noble, trader, trick, war } Type;
                  short Wounded, YearsOnRing;
                  } LEADER <optimize=false, read=LEADERread, write=LEADERwrite>;

                  string LEADERread (LEADER &v) { string s; if (v.Seat>0) s = "+"; else s = "-"; return s + v.Name.Str + ": " + TRAITread(v.Trait); }
                  void LEADERwrite (LEADER &v, string s) { string t = s; STRwrite(v.Name, t); }

                  ////////////////////////////////////////////////////////////////RELATION////////////////////////////////////////////////////////////////
                  typedef struct {
                  short ClanIdx, Attitude;
                  SetForeColor(cDkGreen);
                  short _always0;
                  SetForeColor(cNone);
                  short Favors, Alliance, Feud;
                  BOOL Trade;
                  BOOL Near; //canRaid (N)
                  BOOL Neighbour; //canSeize
                  SetForeColor(cDkGreen);
                  short _; //short
                  SetForeColor(cNone);
                  short TimesRaidedBy; //negative
                  SetForeColor(cDkGreen);
                  short _;
                  SetForeColor(cNone);
                  short TimesRaided;
                  SetForeColor(cDkGreen);
                  short _;
                  SetForeColor(cNone);
                  short Slights;
                  struct { short _wePayTribute, Cattle, Food, Goods; } Tribute;
                  SetForeColor(cDkGreen);
                  short _;
                  SetForeColor(cNone);
                  short _Flag; //changes whether a clan is displayed
                  } RELATION <optimize=false, read=RELATIONread>;

                  string RELATIONread (RELATION &v) {
                  int i = v.Attitude;
                  string s = SPrintf(s, "%s=%i", SubStr(Clans.Clan[v.ClanIdx-1].dataLR.Name.Str, 0, Clans.Clan[v.ClanIdx-1].dataLR.Name.len), i);
                  return s;
                  }

                  ////////////////////////////////////////////////////////////////TREASURE////////////////////////////////////////////////////////////////
                  typedef struct { local int Idx = TreasureIdx++; short Qt; short WearerIdx; } TREASURE <optimize=false, read=TREASUREread, write=TREASUREwrite>;
                  void TREASUREwrite (TREASURE &t, string s) { int i; int j = SScanf(s, "%i", i); if (j) t.Qt = i; }

                  ////////////////////////////////////////////////////////////////CLAN A-L////////////////////////////////////////////////////////////////
                  typedef struct {
                  SetBackColor(cLtBlue);
                  struct {
                  BOOL _Exists;
                  SetForeColor(cDkGreen);
                  short _xAB; //short, alternates 1/0 from the first clan
                  SetForeColor(cNone);
                  short Barley;
                  BOOL _BaseOrlanthiClan;
                  short Cattle;
                  SetForeColor(cDkGreen);
                  CHIEF Chief;
                  SetForeColor(cNone);
                  short Children[15];
                  enum <short> { Player, Orlanthi, Foreigner } ClanClass; //guessed, affects whether borders are displayed on map
                  short ClanIdx;
                  BALANCE ClanType;
                  POP Crafters;
                  short Cropland;
                  enum <short> { possible, failed, joined } TribeForm;
                  STR Description;
                  POP Farmers;
                  short Food;
                  struct { short Ditch :1, Hillfort :1, Ramparts :1, StakePerimeter :1, WoodenStockade :1, StoneWall :1, WatchTower :1, ImprovedStoneWall :1; } Fortifications;
                  short Goods;
                  GODS GreatTemples;
                  short Harvest;
                  SetForeColor(cDkGreen);
                  short _xH; //is short
                  SetForeColor(cNone);
                  short Horses;
                  POP Housecarls; //Weaponthanes; //Housecarls
                  POP Hunters;
                  SetForeColor(cDkGreen);
                  short _xHI[20]; //short
                  SetForeColor(cNone);
                  short InnerPatrol, KingIdx, KingshipReputation;
                  SetForeColor(cDkGreen);
                  short _xKL1; //short
                  byte _xKL2[10]; //byte
                  SetForeColor(cNone);
                  struct { RAID LastRaided, LastRaidedBy; } LastRaids;
                  SetForeColor(cDkGreen);
                  short _xL; //LastPeace? 2=marriage alliance, 3=beaten/warned, decreases over time
                  SetForeColor(cNone);
                  } dataAL;

                  ////////////////////////////////////////////////////////////////LEADERS////////////////////////////////////////////////////////////////
                  struct { SetBackColor(cNone);
                  SetForeColor(cWhite);
                  short ct;
                  SetForeColor(cNone);
                  if (ct) LEADER Leader[ct];
                  } Leaders;

                  ////////////////////////////////////////////////////////////////DATA L-R////////////////////////////////////////////////////////////////
                  struct {
                  SetBackColor(cLtAqua);
                  short Earthblood;
                  struct { byte Children, Crops, Diplomacy, Health, Herds, Hunting, Mysteries, Quests, Trade, War, Destiny, Heroism; } Magics;
                  enum <short> { Ancestors=1, ArganArgar, Barntar, ChalanaArroy, Elmal, Ernalda, Eurmal, Humakt, Issaries, KeroFin, LhankorMhy, Malia, MaranGor, Odayla, Orlanth, TarardRiel, Uralda, Urox, Vinga, WindSpirits } MainDeity;
                  struct { short Clan, Farmer, Warrior; } Mood;
                  STR Name;
                  POP Nobles;
                  SetForeColor(cDkGreen);
                  short _xNO; //short
                  SetForeColor(cNone);
                  short OuterPatrol, Pasture, Pigs;
                  struct { short Farmers, Oxen; } Planted;
                  BOOL PlayerHasThralls;
                  STR Plural;
                  short Magic; //powerpoints
                  struct {
                  byte Plain, Fancy, Amulets, Gems, Greenware, Iron, Ivory;
                  } Production;
                  GODS MinorShrines;

                  struct {
                  struct RAIDS {
                  SetForeColor(cWhite);
                  short ct;
                  SetForeColor(cNone);
                  if (ct) RAID Raid[ct];
                  } Raided;
                  RAIDS RaidedBy;
                  } Raids;
                  short VictoryScore; //increase over time?
                  } dataLR;

                  ////////////////////////////////////////////////////////////////RELATIONS////////////////////////////////////////////////////////////////
                  SetBackColor(cLtYellow);
                  struct {
                  SetForeColor(cWhite);
                  short ct;
                  SetForeColor(cNone);
                  if (ct) RELATION Relation[ct];
                  } Relations;
                  SetBackColor(cNone);

                  ////////////////////////////////////////////////////////////////DATA R-W////////////////////////////////////////////////////////////////
                  local int i = 0;
                  struct {
                  SetColor(cNone,cLtAqua);
                  short RingMemberIdx[7];
                  BOOL RoyalClan;
                  SetForeColor(cDkGreen);
                  short _RoyalJealousy; //=1 upon Einarth Milk-Eye prophecy, =3 tribe-bandits fight, =0 upon moot for new king
                  SetForeColor(cNone);
                  short Rye;
                  struct {
                  SetColor(cNone,cLtGreen);
                  struct { byte Blessing[4], _; } Sacrifice[20];
                  struct { byte Blessing[4], _; } Known[20];
                  SetColor(cNone,cLtAqua);
                  } Rituals;
                  byte Sacrificed[20]; //Gods
                  short Sheep;
                  GODS Shrines;
                  short _Shrine_[2];
                  SetColor(cNone,cLtGreen);
                  struct { byte _, Blessing[4]; } ShrinePermanent[20];
                  SetColor(cNone,cLtAqua);
                  GODS Temples;
                  POP Thralls;
                  BOOL ThrallsOkay;

                  //i = 0;
                  struct {
                  local int TreasureIdx = 1;
                  SetForeColor(cWhite);
                  short ct;
                  SetForeColor(cNone);
                  if (ct) TREASURE Treasure[ct];
                  TREASURE _Treasure;
                  //if (i) { local string s = SPrintf(s, "%s+", SubStr(dataLR.Name.Str, 0, dataLR.Name.len)); Printf("%s ", s); }
                  } Treasures;
                  short Wildlands;
                  short Wheat;
                  } dataRW;
                  local int x; local string s;
                  x = dataAL._xH;
                  if (x != 0) { s = SPrintf(s, "%i %s: xH = %i \n", dataAL.ClanIdx, SubStr(dataLR.Name.Str, 0, dataLR.Name.len), x); Printf("%s", s); }
                  x = dataAL._xKL1;
                  if (x != 0) { s = SPrintf(s, "%i %s: xKL1 = %i \n", dataAL.ClanIdx, SubStr(dataLR.Name.Str, 0, dataLR.Name.len), x); Printf("%s", s); }
                  x = dataAL._xL;
                  if (x != -1) { s = SPrintf(s, "%i %s: xL = %i \n", dataAL.ClanIdx, SubStr(dataLR.Name.Str, 0, dataLR.Name.len), x); Printf("%s", s); }
                  x = dataLR._xNO;
                  if (x != 0) { s = SPrintf(s, "%i %s: xNO = %i \n", dataAL.ClanIdx, SubStr(dataLR.Name.Str, 0, dataLR.Name.len), x); Printf("%s", s); }
                  x = dataRW._RoyalJealousy;
                  if (x != 0) { s = SPrintf(s, "%i %s: RoyalJealousy = %i \n", dataAL.ClanIdx, SubStr(dataLR.Name.Str, 0, dataLR.Name.len), x); Printf("%s", s); }

                  //s = SPrintf(s, "%i %s: %i + %i + %i = %i\n", dataAL.ClanIdx, SubStr(dataLR.Name.Str, 0, dataLR.Name.len), dataAL.Cropland, dataLR.Pasture, dataRW.Wildlands, dataAL.Cropland+dataLR.Pasture+dataRW.Wildlands); Printf("%s", s);

                  ARRAY Zones; //display only

                  //local string s = SPrintf(s, "%s = %d\n", dataLR.Name.Str, dataAL._xBC); Printf("%s",s);

                  ////////////////////////////////////////////////////////////////HISTORY////////////////////////////////////////////////////////////////
                  if (dataAL.ClanIdx==1) struct { //all data lengths confirmed
                  SetBackColor(cNone);
                  SetForeColor(cDkGreen);
                  short _x1; //increase per season, reset per year
                  SetForeColor(cNone);
                  enum <short> { ancestors=1, elmal, urox, odayla, ernalda, orlanth, issaries, lhankormhy, chalanaarroy, uralda } Awakened;
                  SetForeColor(cDkGreen);
                  short _x2[2]; //short
                  SetForeColor(cNone);
                  GODS KnownDeities;
                  enum <short> { Battle_of_Extinguishing_Field=1, Hundred_Day_Hunt, Jesteds_Settlement, Procession_of_Animals, Harnessed_Oxen, Hidden_Place, Marking_Bone, First_Pot, Clan_Making_Dance } EarliestEvent;
                  struct {
                  DATE LastEmissary, LastExplore;
                  } LastMissions;
                  SetForeColor(cDkGreen);
                  BOOL _x3;
                  short _x4[3]; //short
                  SetForeColor(cNone);
                  BOOL RaidedDuringEarth;
                  SetForeColor(cDkGreen);
                  byte _x5[2];
                  DATE _Date, _Date;
                  SetForeColor(cNone);
                  enum <short> { needed=1, more, lots, huge } LandClaim;
                  SetForeColor(cDkGreen);
                  DATE _LastMission; //last diplo/trade mission, not sure
                  SetForeColor(cNone);
                  short _YearNow; //short
                  short TribePolicy;
                  SetForeColor(cDkGreen);
                  short _x1; //short
                  short _x1; //increase per season, reset per year
                  SetForeColor(cNone);
                  BALANCE ClanType;
                  SetForeColor(cDkGreen);
                  short _x1; //short
                  DATE _DateLastTrade; //not sure
                  SetForeColor(cNone);
                  BOOL RaidedDuringSea;
                  struct {
                  short Cattle;
                  SetForeColor(cDkGreen);
                  short _x[2]; //short
                  SetForeColor(cNone);
                  short Horses, Pigs, Population, Sheep;
                  } Resources;
                  SetForeColor(cDkGreen);
                  long _x6; //long
                  SetForeColor(cNone);
                  DATE _Date;
                  BOOL HeroQuest[9];
                  SetForeColor(cDkGreen);
                  byte _x7;
                  short _Generosity; //short
                  DATE _Date;
                  short _x1; //short
                  SetForeColor(cNone);
                  short Myth[15];
                  local string s = SPrintf(s, "History= %i, %i", _x1[0], _x1[2]); Printf(s);
                  } History;
                  } CLAN <optimize=false, read=CLANread, write=CLANwrite>;

                  string CLANread (CLAN &v) { return v.dataLR.Name.Str + " (" + CHIEFread(v.dataAL.Chief) + ")"; }
                  void CLANwrite (CLAN &v, string s) { string t = s;
                  STRwrite(v.dataLR.Plural, t + "s");
                  STRwrite(v.dataLR.Name, t);
                  }

                  //////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
                  ////////////////////////////////////////////////////////////////HEADER////////////////////////////////////////////////////////////////
                  //////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
                  struct {
                  char Opal[4];
                  byte _x1[8];
                  short Omens; //or Omens
                  short _x2;
                  enum <short> { Short=1, Long } Length;
                  DATE Date;
                  short Harvest; //1 to 7
                  } Header;

                  ////////////////////////////////////////////////////////////////VARS////////////////////////////////////////////////////////////////
                  struct {
                  local int VarIdx = 0;
                  SetForeColor(cWhite);
                  short ct;
                  SetForeColor(cNone);
                  typedef struct {
                  local int Idx = VarIdx++;
                  SetForeColor(cBlue);
                  if (ReadShort(FTell())<0x7FF0 || ReadShort(FTell())>0x8000) long Value;
                  else {
                  enum <short> { Leader=0x7FF2, clan, tribe, treasure, leaders=0x7FFA, clans, tribes, treasures } Class <format=hex>;
                  short Value;
                  }
                  SetForeColor(cGray);
                  short Short;
                  BOOL Bool;
                  STR String;
                  } VAR <optimize=false, read=VARread>;
                  VAR Var[ct];
                  } Vars;

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

                  ////////////////////////////////////////////////////////////////TREASURES////////////////////////////////////////////////////////////////
                  SetBackColor(cNone);
                  struct {
                  short Total;
                  local int TreasureIdx = 1;
                  typedef struct {
                  local int Idx = TreasureIdx++;
                  short Qt;
                  } ONSALE <optimize=false, read=ONSALEread, write=ONSALEwrite>;
                  ONSALE OnSale[120];
                  } Treasures;

                  void ONSALEwrite (ONSALE &t, string s) { int i; int j = SScanf(s, "%i", i); if (j) t.Qt = i; }

                  ////////////////////////////////////////////////////////////////ARRAYS////////////////////////////////////////////////////////////////
                  struct { ARRAY Array[12]; } __arrays; //randomized at gamestart, all empty arrays for Tutorial and Opal

                  ////////////////////////////////////////////////////////////////LEADERNAMES////////////////////////////////////////////////////////////////
                  struct {
                  SetForeColor(cWhite);
                  short females;
                  SetForeColor(cNone);
                  local int i = 0;
                  typedef struct {
                  local int Idx = i++;
                  short Used;
                  } FEMALE <optimize=false, read=FEMALEread>;
                  if (females) FEMALE Female[females];

                  SetForeColor(cWhite);
                  short males;
                  SetForeColor(cNone);
                  i = 0;
                  typedef struct {
                  local int Idx = i++;
                  short Used;
                  } MALE <optimize=false, read=MALEread>;
                  if (males) MALE Male[males];
                  } LeaderNames;

                  ////////////////////////////////////////////////////////////////CLANS////////////////////////////////////////////////////////////////
                  struct {
                  SetBackColor(cLtBlue);
                  SetForeColor(cWhite);
                  short ct;
                  SetForeColor(cNone);
                  if (ct) CLAN Clan[ct] <optimize=false>;
                  } Clans;
                  SetBackColor(cNone);

                  //////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
                  struct {
                  short _xLunarWar; //=0 gamestart, =2 upon Tarsh recruit event for Lunar war
                  short _x2; //=-1 always
                  } __shorts1;

                  ////////////////////////////////////////////////////////////////CLANNAMES////////////////////////////////////////////////////////////////
                  struct {
                  typedef struct { short Name; } CLANNAME <optimize=false, read=CLANNAMEread>;

                  struct {
                  SetForeColor(cWhite);
                  short ct;
                  SetForeColor(cDkBlue);
                  if (ct) CLANNAME Clan[ct];
                  SetForeColor(cNone);
                  } ClanName;

                  short count;
                  byte _x3[7];
                  struct {
                  SetForeColor(cWhite);
                  short ct;
                  SetForeColor(cNone);
                  if (ct) byte x[ct];
                  } _x4;

                  struct {
                  SetForeColor(cWhite);
                  short ct;
                  SetForeColor(cDkBlue);
                  if (ct) CLANNAME Clan[ct];
                  SetForeColor(cNone);
                  } ClanPlural;

                  } ClanNames;

                  ////////////////////////////////////////////////////////////////TRIBES////////////////////////////////////////////////////////////////
                  SetBackColor(cLtRed);
                  struct {
                  SetForeColor(cWhite);
                  short ct;
                  SetForeColor(cNone);
                  struct {
                  DATE LastElection;
                  byte _x1;
                  STR Name;
                  struct { short ClanIdx, LeaderIdx; } King;
                  struct {
                  SetForeColor(cWhite);
                  short ct;
                  SetForeColor(cNone);
                  if (ct) struct {
                  short ClanIdx;
                  DATE DateJoined;
                  } Clan[ct];
                  } Clans;
                  short _x2;
                  long _x3 <format=hex>;
                  short _x2;
                  BOOL _x4;
                  struct {
                  SetForeColor(cWhite);
                  short ct;
                  SetForeColor(cNone);
                  if (ct) byte _x[ct];
                  } _x5;
                  } Tribe[ct] <optimize=false>;
                  } Tribes;
                  SetBackColor(cNone);

                  ////////////////////////////////////////////////////////////////?////////////////////////////////////////////////////////////////
                  //struct {
                  SetBackColor(cLtYellow);
                  short __shorts2[5]; //tribes related? _x1[0]==-1 until tribe formed
                  SetBackColor(cLtPurple);
                  BOOL __bools[53];
                  SetBackColor(cNone);
                  //} __static; //always same value at gamestart (not randomized)

                  ////////////////////////////////////////////////////////////////EVENTS////////////////////////////////////////////////////////////////
                  SetBackColor(cLtBlue);
                  struct {
                  SetForeColor(cWhite);
                  short ct;
                  SetForeColor(cNone);
                  typedef struct {
                  short EventIdx;
                  enum <short> { explore=0xFFF8, trade=0xFFFA, diplo, raid } Mission;
                  short Turns;
                  short _x3;
                  short LeaderIdx, ClanIdx;
                  short _x4;
                  struct {
                  short Weaponthane, Weaponthane, Fyrd, Cattle, Horses, Goods, Food;
                  enum <short> { Slowly=1, Normally, Quickly } Travel;
                  short Treasure;
                  } Convoy;
                  struct {
                  short TargetX, TargetY;
                  enum <short> { ask_cattle_route=1, ask_food, ask_info, ask_magic, tribute, gift, alliance, peace } Goal;
                  enum <short> { Small=1, Medium, Large, Pathfinder=15328 } Caravan;
                  } Objective;
                  } QUE <optimize=false, read=QUEread>;
                  if (ct) QUE Que[ct];

                  local int EventIdx = 0;
                  typedef struct {
                  local int Idx = EventIdx++;
                  short Value;
                  } EVENT <optimize=false, read=EVENTread>;
                  SetBackColor(cLtGreen);
                  struct { EventIdx = 0; EVENT Event[1579]; } Times; //how many times it happened?
                  SetBackColor(cLtAqua);
                  struct { EventIdx = 0; EVENT Event[1579]; } Years; //upon event, usually set to 0x7FFF, -1 per year

                  } Events;

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

                  #include "KoDPinc.bt"
                • Alexander G. M. Smith
                  ... Not too often that you see a GOD structure in code :-) Looks like you must have spent quite a while figuring out that many details! So, what do you
                  Message 8 of 18 , Nov 3 6:00 PM
                    outis02 wrote on Tue, 03 Nov 2009 19:50:23 +0000:
                    > typedef struct {
                    > long:1; long Ancestors:1; long ArganArgar:1;long Barntar:1;
                    > long ChalanaArroy:1;long Elmal:1; long Ernalda:1; long Eurmal:1;
                    > long Humakt:1; long Issaries:1; long KeroFin:1; long LhankorMhy:1;
                    > long Malia:1; long MaranGor:1; long Odayla:1; long Orlanth:1;
                    > long TarardRiel:1; long Uralda:1; long Urox:1; long Vinga:1;
                    > long WindSpirits:1;
                    > } GODS <read=GODSread>;

                    Not too often that you see a GOD structure in code :-) Looks like you must have
                    spent quite a while figuring out that many details!

                    So, what do you typically use it for?

                    Listing saved game inner secrets to see what affects what? Any heroquest tips?

                    Or do you change a saved game? Any interesting or fun changes?

                    Any signs of test code? Things like a flag that makes your battles always succeed?

                    - Alex
                  • outis02
                    Oh, forgot to mention a few things. First of all, sorry that the code is terribly commented. Feel free to ask any questions though. In general, all variables
                    Message 9 of 18 , Nov 4 4:58 AM
                      Oh, forgot to mention a few things.

                      First of all, sorry that the code is terribly commented. Feel free to ask any questions though. In general, all variables that start with an _underscore implies uncertainty; and ct is short for count, usually designating the number of structs that follows.

                      One of the most important observation you can make is that, overall, KoDP stores data in alphabetical order instead of grouping data according to functions. For example, you'll find a clan's Cattle value next to Barley and Children, instead of with Sheeps and Pigs. While it doesn't make the code very neat to read, it does help guessing the meaning of a data quite a lot.

                      > So, what do you typically use it for?
                      >
                      > Listing saved game inner secrets to see what affects what? Any heroquest tips?
                      >
                      > Or do you change a saved game? Any interesting or fun changes?
                      >
                      > Any signs of test code? Things like a flag that makes your battles always succeed?
                      >
                      > - Alex

                      I've worked at a very leisurely pace for about 6 months. I hadn't been very efficient since every time I picked it up again, I'd forgotten some of the things I'd learned. I really should have commented the whole thing better. As I explained, I don't really have any specific purpose in mind doing this; just want to see what's under the hood. The parse is complete enough to test out a variety of scenarios, though.

                      Here's a few interesting (at least for me) observations I've made:

                      The games keeps track of how many time each leader name is randomly assigned, and (probably) assigns new random names based on past usage.

                      In the code, the default clans are conveniently named "elmalClan", "pigClan", "prosperousClan", etc. Interestingly, the potClan (with fertile fields) is the only default Ernalda clan, and elmalClan (fine horses) is of course the only default Elmali clan. The tavernClan (careful planning) does in fact have Argan Argar as their chief deity, whereas uroxClan (hatred of chaos) and vingaClan (female chieftains), and all other clans that seem to worship a different deity are just simple Orlanthi clans.

                      Most groups in the game, such as the Humakti, the Elves and the Praxian are tracked as clans in their own right. But as far as I can tell the only purpose seems to be to allow for clan relation data.

                      The great majority of event data are stored in the Vars section: some of game constants, most of event-related variables, and some leader and clan attributes. I managed to find out what exactly variable is, but I don't remember how. Probably from peaking in the exe or the opal package file. I put that finding in the #include KoDPinc.bt file, I can post it if anyone's interested. On the other hand, some vars that you'd expect to see in here, such as _LunarWar, has its own dedicated data location for some reason.

                      One thing that interest me particularly is the leaders' personality traits. There are some 32 traits altogether, but I've only been able to figure out 10 or so, some of which with the help of the code snippet posted on A#'s site. More than anything else, this is something I'd like to parse completely.

                      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.

                      And no, I haven't found any test codes. Haven't even thought of looking, really. There are some stuff in the Vars like attackBonus that you can jack way up. Not sure how long it lasts though.

                      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.
                    • outis02
                      Might as well just post the whole thing. Here is the included KoDPinc.bt, which is just a list of variable names, event tags, treasures and names. Not
                      Message 10 of 18 , Nov 4 7:10 AM
                        Might as well just post the whole thing. Here is the included KoDPinc.bt, which is just a list of variable names, event tags, treasures and names. Not critical to the file structure but very interesting nonetheless. I invite anyone interested to run this and the previously posted KoDP.bt template on your save file.

                        You'll of course need 010 Editor, a free 30-days trial is available on SweetScape's site. If someone knows a better tool for this kind of thing I'd also try it out happily, and maybe convert the template to a new format.

                        So here's KoDPinc.bt:

                        ////////////////////////////////////////////////////////////////VAR////////////////////////////////////////////////////////////////
                        string VARread (VAR &v) { string s;
                        switch (v.Idx) {
                        case 1 : s = "A"; break;
                        case 2 : s = "B"; break;
                        case 3 : s = "C"; break;
                        case 4 : s = "D"; break;
                        case 5 : s = "E"; break;
                        case 6 : s = "F"; break;
                        case 7 : s = "G"; break;
                        case 8 : s = "H"; break;
                        case 9 : s = "I"; break;
                        case 10 : s = "J"; break;
                        case 11 : s = "K"; break;
                        case 12 : s = "L"; break;
                        case 13 : s = "M"; break;
                        case 14 : s = "N"; break;
                        case 15 : s = "O"; break;
                        case 16 : s = "P"; break;
                        case 17 : s = "Q"; break;
                        case 18 : s = "R"; break;
                        case 19 : s = "S"; break;
                        case 20 : s = "T"; break;
                        case 21 : s = "U"; break;
                        case 22 : s = "V"; break;
                        case 23 : s = "W"; break;
                        case 24 : s = "X"; break;
                        case 25 : s = "Y"; break;
                        case 26 : s = "Z"; break;
                        case 27 : s = "tempMacroVariable"; break;
                        case 28 : s = "earlyClan"; break;
                        case 29 : s = "elmalClan"; break;
                        case 30 : s = "huntClan"; break;
                        case 31 : s = "kilnClan"; break;
                        case 32 : s = "madClan"; break;
                        case 33 : s = "otherClan"; break;
                        case 34 : s = "ourClan"; break;
                        case 35 : s = "outlawClan"; break;
                        case 36 : s = "pigClan"; break;
                        case 37 : s = "plowClan"; break;
                        case 38 : s = "potClan"; break;
                        case 39 : s = "prosperousClan"; break;
                        case 40 : s = "rockClan"; break;
                        case 41 : s = "scrollClan"; break;
                        case 42 : s = "survivorClan"; break;
                        case 43 : s = "tavernClan"; break;
                        case 44 : s = "templeClan"; break;
                        case 45 : s = "tradeClan"; break;
                        case 46 : s = "uroxClan"; break;
                        case 47 : s = "vingaClan"; break;
                        case 48 : s = "warClan"; break;
                        case 49 : s = "aldryami"; break;
                        case 50 : s = "beastfolk"; break;
                        case 51 : s = "dragonewt"; break;
                        case 52 : s = "duck"; break;
                        case 53 : s = "dwarf"; break;
                        case 54 : s = "grazer"; break;
                        case 55 : s = "humakti"; break;
                        case 56 : s = "maranGor"; break;
                        case 57 : s = "tarsh"; break;
                        case 58 : s = "troll"; break;
                        case 59 : s = "uroxi"; break;
                        case 60 : s = "ourTribe"; break;
                        case 61 : s = "anotherTribe"; break;
                        case 62 : s = "colymar"; break;
                        case 63 : s = "contestTribe"; break;
                        case 64 : s = "endTribe1"; break;
                        case 65 : s = "endTribe2"; break;
                        case 66 : s = "endTribe3"; break;
                        case 67 : s = "endTribe4"; break;
                        case 68 : s = "plotTribe"; break;
                        case 69 : s = "yetAnotherTribe"; break;
                        case 70 : s = "candidateA"; break;
                        case 71 : s = "candidateB"; break;
                        case 72 : s = "duelist"; break;
                        case 73 : s = "expeditionLeader"; break;
                        case 74 : s = "mostRecentZappee"; break;
                        case 75 : s = "quester"; break;
                        case 76 : s = "gameLength"; break;
                        case 77 : s = "duckClan"; break;
                        case 78 : s = "testee"; break;
                        case 79 : s = "areaWeWereJustExploring"; break;
                        case 80 : s = "banditryThreat"; break;
                        case 81 : s = "orlanthSacrifices"; break;
                        case 82 : s = "calfPoints"; break;
                        case 83 : s = "chaosThreat"; break;
                        case 84 : s = "chosenAuxiliaries"; break;
                        case 85 : s = "chosenCattle"; break;
                        case 86 : s = "chosenClans"; break;
                        case 87 : s = "chosenFootmen"; break;
                        case 88 : s = "chosenGoods"; break;
                        case 89 : s = "chosenHousecarls"; break;
                        case 90 : s = "chosenThralls"; break;
                        case 91 : s = "msFormerTribe"; break;
                        case 92 : s = "cursedLand"; break;
                        case 93 : s = "directionOfDwarfMine"; break;
                        case 94 : s = "directionOfUplandMarsh"; break;
                        case 95 : s = "extraCow"; break;
                        case 96 : s = "foodValueBoar"; break;
                        case 97 : s = "foodValueCow"; break;
                        case 98 : s = "objective"; break;
                        case 99 : s = "anotherClan"; break;
                        case 100 : s = "helperClan"; break;
                        case 101 : s = "herb"; break;
                        case 102 : s = "heroSkill"; break;
                        case 103 : s = "tactic"; break;
                        case 104 : s = "huntingPenalty"; break;
                        case 105 : s = "clan99"; break;
                        case 106 : s = "questers"; break;
                        case 107 : s = "raidImmunity"; break;
                        case 108 : s = "ritualBonus"; break;
                        case 109 : s = "sorcerousImplementsMadClan"; break;
                        case 110 : s = "telmoriThreat"; break;
                        case 111 : s = "tribalHelp"; break;
                        case 112 : s = "undeadThreat"; break;
                        case 113 : s = "victory"; break;
                        case 114 : s = "formerTributary"; break;
                        case 115 : s = "chieftain"; break;
                        case 116 : s = "explorer125"; break;
                        case 117 : s = "stillAnotherClan"; break;
                        case 118 : s = "telmori"; break;
                        case 119 : s = "trickster"; break;
                        case 120 : s = "yetAnotherClan"; break;
                        case 121 : s = "footmenKilled"; break;
                        case 122 : s = "footmenWeKilled"; break;
                        case 123 : s = "footmenWeWounded"; break;
                        case 124 : s = "footmenWounded"; break;
                        case 125 : s = "housecarlsKilled"; break;
                        case 126 : s = "housecarlsWeKilled"; break;
                        case 127 : s = "housecarlsWeWounded"; break;
                        case 128 : s = "housecarlsWounded"; break;
                        case 129 : s = "expeditionAdvice"; break;
                        case 130 : s = "chosenFood"; break;
                        case 131 : s = "chosenHorses"; break;
                        case 132 : s = "otherTribe"; break;
                        case 133 : s = "farmerIncentive"; break;
                        case 134 : s = "ancientEnemies"; break;
                        case 135 : s = "answer24"; break;
                        case 136 : s = "antiPharaohClan"; break;
                        case 137 : s = "allTestBonus"; break;
                        case 138 : s = "attackBonus"; break;
                        case 139 : s = "autoRaid"; break;
                        case 140 : s = "auxiliariesCaptured"; break;
                        case 141 : s = "auxiliariesHelped"; break;
                        case 142 : s = "auxiliariesSaved"; break;
                        case 143 : s = "badAdvice"; break;
                        case 144 : s = "bandits"; break;
                        case 145 : s = "battleBonus"; break;
                        case 146 : s = "battleResult"; break;
                        case 147 : s = "battleWon"; break;
                        case 148 : s = "bht"; break;
                        case 149 : s = "blackSpearClan"; break;
                        case 150 : s = "bonusNextCombatTests"; break;
                        case 151 : s = "bonusNextCustomTests"; break;
                        case 152 : s = "bullheadedBonus"; break;
                        case 153 : s = "captives"; break;
                        case 154 : s = "cattleDiseaseRate"; break;
                        case 155 : s = "cattleFertilityBonus"; break;
                        case 156 : s = "cattleGuards"; break;
                        case 157 : s = "cattleSafety"; break;
                        case 158 : s = "cattleTradeBonus"; break;
                        case 159 : s = "caravanResults"; break;
                        case 160 : s = "chosenClan"; break;
                        case 161 : s = "chosenLeaders"; break;
                        case 162 : s = "chosenTreasure"; break;
                        case 163 : s = "clanA"; break;
                        case 164 : s = "clanB"; break;
                        case 165 : s = "cropPenalty"; break;
                        case 166 : s = "customBonus"; break;
                        case 167 : s = "defensiveBonus"; break;
                        case 168 : s = "deity"; break;
                        case 169 : s = "demandTributeClan"; break;
                        case 170 : s = "difficultyLevel"; break;
                        case 171 : s = "diseaseBonus"; break;
                        case 172 : s = "dontEraseText"; break;
                        case 173 : s = "doubleHorseClan"; break;
                        case 174 : s = "dragonAttitude"; break;
                        case 175 : s = "earthSacrifice"; break;
                        case 176 : s = "eccentricGift"; break;
                        case 177 : s = "elmalRitual"; break;
                        case 178 : s = "elmalSacrifice"; break;
                        case 179 : s = "enemyGodSacrifices"; break;
                        case 180 : s = "EOL"; break;
                        case 181 : s = "explorationBonus"; break;
                        case 182 : s = "enemy2vs1"; break;
                        case 183 : s = "extraMagic"; break;
                        case 184 : s = "fertilityPenalty"; break;
                        case 185 : s = "gifts"; break;
                        case 186 : s = "goal"; break;
                        case 187 : s = "grazerWeaponthanes"; break;
                        case 188 : s = "harvestRaid"; break;
                        case 189 : s = "herbalHealing"; break;
                        case 190 : s = "healingBonus"; break;
                        case 191 : s = "humaktAmbush"; break;
                        case 192 : s = "humaktMod"; break;
                        case 193 : s = "fromR133"; break;
                        case 194 : s = "isRaid"; break;
                        case 195 : s = "issaringTax"; break;
                        case 196 : s = "kallyr"; break;
                        case 197 : s = "kingBonus"; break;
                        case 198 : s = "landClearingPenalty"; break;
                        case 199 : s = "leadershipBonus"; break;
                        case 200 : s = "lhankorMhyRole"; break;
                        case 201 : s = "lismelderPatrols"; break;
                        case 202 : s = "lismelderPay"; break;
                        case 203 : s = "literacyBonus"; break;
                        case 204 : s = "literacyFund"; break;
                        case 205 : s = "lunarThralls"; break;
                        case 206 : s = "moodPenalty"; break;
                        case 207 : s = "nextSceneBonus"; break;
                        case 208 : s = "noChildren"; break;
                        case 209 : s = "noSickness"; break;
                        case 210 : s = "noRaidClans"; break;
                        case 211 : s = "notableFemale"; break;
                        case 212 : s = "notableMale"; break;
                        case 213 : s = "odaylaSacrifice"; break;
                        case 214 : s = "orlanthSacrifice"; break;
                        case 215 : s = "ourAncientEnemies"; break;
                        case 216 : s = "ourBattleMagic"; break;
                        case 217 : s = "ourHero"; break;
                        case 218 : s = "patrolBonus"; break;
                        case 219 : s = "pigPenalty"; break;
                        case 220 : s = "plantingRaid"; break;
                        case 221 : s = "praxDefenseBonus"; break;
                        case 222 : s = "praxians"; break;
                        case 223 : s = "preventTrollProblems"; break;
                        case 224 : s = "productivityBonus"; break;
                        case 225 : s = "prosperousGift"; break;
                        case 226 : s = "questBonus"; break;
                        case 227 : s = "questMagic"; break;
                        case 228 : s = "raidForFood"; break;
                        case 229 : s = "raidLeader"; break;
                        case 230 : s = "raidPromise"; break;
                        case 231 : s = "refusedToRaid"; break;
                        case 232 : s = "regalia"; break;
                        case 233 : s = "remnantPeople"; break;
                        case 234 : s = "royal"; break;
                        case 235 : s = "savvyReluctanceBonus"; break;
                        case 236 : s = "sceneBonus"; break;
                        case 237 : s = "seatsAvailable"; break;
                        case 238 : s = "sickWoman"; break;
                        case 239 : s = "starvationDead"; break;
                        case 240 : s = "starvationSick"; break;
                        case 241 : s = "stickGod"; break;
                        case 242 : s = "stickPenalty"; break;
                        case 243 : s = "stormBullRole"; break;
                        case 244 : s = "tavernBuilding"; break;
                        case 245 : s = "theirBattleMagic"; break;
                        case 246 : s = "thrallMorale"; break;
                        case 247 : s = "tradeBonus"; break;
                        case 248 : s = "tradeGuards"; break;
                        case 249 : s = "tribalMood"; break;
                        case 250 : s = "tribeSizeBonus"; break;
                        case 251 : s = "tribeStartBonus"; break;
                        case 252 : s = "tribeStartPenalty"; break;
                        case 253 : s = "trollPenalty"; break;
                        case 254 : s = "tuskRiders"; break;
                        case 255 : s = "undead"; break;
                        case 256 : s = "uraldaPromise"; break;
                        case 257 : s = "vingkotlingQuestion"; break;
                        case 258 : s = "walkthrough"; break;
                        case 259 : s = "wolfBounty"; break;
                        case 260 : s = "spare3"; break;
                        case 261 : s = "spare4"; break;
                        case 262 : s = "spare5"; break;
                        case 263 : s = "spare6"; break;
                        case 264 : s = "spare7"; break;
                        case 265 : s = "spare8"; break;
                        case 266 : s = "spare9"; break;
                        case 267 : s = "spare10"; break;
                        case 268 : s = "spare11"; break;
                        case 269 : s = "recentQuestPenalty"; break;
                        case 270 : s = "hugeAmountOfCows"; break;
                        case 271 : s = "largeAmountOfCows"; break;
                        case 272 : s = "middlingAmountOfCows"; break;
                        case 273 : s = "cwKing"; break;
                        case 274 : s = "middlingAmountOfGoods"; break;
                        case 275 : s = "middlingAmountOfMagic"; break;
                        case 276 : s = "minimalAmountOfCows"; break;
                        case 277 : s = "minimalAmountOfFood"; break;
                        case 278 : s = "minimalAmountOfGoods"; break;
                        case 279 : s = "minimalAmountOfHorses"; break;
                        case 280 : s = "minimalAmountOfMagic"; break;
                        case 281 : s = "minimalAmountOfPigs"; break;
                        case 282 : s = "minimalAmountOfSheep"; break;
                        case 283 : s = "moderateAmountOfCows"; break;
                        case 284 : s = "moderateAmountOfGoods"; break;
                        case 285 : s = "smallAmountOfCows"; break;
                        case 286 : s = "smallAmountOfGoods"; break;
                        case 287 : s = "smallAmountOfFood"; break;
                        case 288 : s = "smallAmountOfMagic"; break;
                        case 289 : s = "substantialAmountOfFood"; break;
                        case 290 : s = "substantialAmountOfGoods"; break;
                        case 291 : s = "substantialAmountOfCows"; break;
                        case 292 : s = "carlWergild"; break;
                        case 293 : s = "cottarWergild"; break;
                        case 294 : s = "thaneWergild"; break;
                        case 295 : s = "highBridePrice"; break;
                        case 296 : s = "shamanBasePrice"; break;
                        case 297 : s = "feudThreshold"; break;
                        case 298 : s = "tooManyAllianceThreshold"; break;
                        case 299 : s = "tooManyThrallsThreshold"; break;
                        case 300 : s = "foodTradeValue"; break;
                        case 301 : s = "horseTradeValue"; break;
                        case 302 : s = "sisterWontAttack"; break;
                        case 303 : s = "ours"; break;
                        case 304 : s = "theirs"; break;
                        case 305 : s = "battleTreasure1"; break;
                        case 306 : s = "dontBreakSaga"; break;
                        case 307 : s = "steadsBurnedBefore"; break;
                        case 308 : s = "summonsOfEvil"; break;
                        case 309 : s = "easinessLevel"; break;
                        case 310 : s = "insultedBy"; break;
                        case 311 : s = "squeezedClans"; break;
                        case 312 : s = "protectedClans"; break;
                        case 313 : s = "weDontRaid"; break;
                        case 314 : s = "dontHurtUsClan"; break;
                        case 315 : s = "clansPayingTribute"; break;
                        case 316 : s = "ernaldaPromiseClans"; break;
                        case 317 : s = "clan245"; break;
                        case 318 : s = "orlanthPromiseClans"; break;
                        case 319 : s = "unityPromiseClans"; break;
                        case 320 : s = "vileClan"; break;
                        case 321 : s = "totalKilled"; break;
                        case 322 : s = "totalWounded"; break;
                        case 323 : s = "captivesClan"; break;
                        case 324 : s = "landTaken"; break;
                        case 325 : s = "steadsBurned"; break;
                        case 326 : s = "fortificationDestroyed"; break;
                        case 327 : s = "fortHelped"; break;
                        case 328 : s = "thrallsFreed"; break;
                        case 329 : s = "tsMentioned"; break;
                        case 330 : s = "battleTreasure3"; break;
                        case 331 : s = "farmersCaptured"; break;
                        case 332 : s = "cattleRaidPromise"; break;
                        case 333 : s = "duckRaidPromise"; break;
                        case 334 : s = "thadartReckless"; break;
                        case 335 : s = "noSecondRound"; break;
                        case 336 : s = "cattleRaidSuccess"; break;
                        case 337 : s = "clanWeRaided"; break;
                        case 338 : s = "sneakyClan"; break;
                        case 339 : s = "forceVictory"; break;
                        case 340 : s = "pissedClan"; break;
                        case 341 : s = "surroundClan"; break;
                        case 342 : s = "wl"; break;
                        case 343 : s = "questPenalty"; break;
                        case 344 : s = "flyboy"; break;
                        case 345 : s = "deathlord"; break;
                        case 346 : s = "preventHeroism"; break;
                        case 347 : s = "hrbUses"; break;
                        case 348 : s = "bigThrower"; break;
                        case 349 : s = "ourCarlsVendreffed"; break;
                        case 350 : s = "benefit"; break;
                        case 351 : s = "downedFriend"; break;
                        case 352 : s = "keepQ"; break;
                        case 353 : s = "theirGuy"; break;
                        case 354 : s = "antiTrollBonus"; break;
                        case 355 : s = "preventCasualties"; break;
                        case 356 : s = "feudOverClan"; break;
                        case 357 : s = "blastedClan"; break;
                        case 358 : s = "plaguedClan"; break;
                        case 359 : s = "pigsNeeded"; break;
                        case 360 : s = "pigsBought"; break;
                        case 361 : s = "sheepNeeded"; break;
                        case 362 : s = "sheepBought"; break;
                        case 363 : s = "deadLivestock"; break;
                        case 364 : s = "newFarmers"; break;
                        case 365 : s = "newChildren"; break;
                        case 366 : s = "omens"; break;
                        case 367 : s = "cropMagicFailed"; break;
                        case 368 : s = "herdMagicFailed"; break;
                        case 369 : s = "monoculture"; break;
                        case 370 : s = "farmerHelp"; break;
                        case 371 : s = "recentS11"; break;
                        case 372 : s = "victoryPossible"; break;
                        case 373 : s = "tribeMakingStarted"; break;
                        case 374 : s = "noLongerTrade"; break;
                        case 375 : s = "cowsNeeded"; break;
                        case 376 : s = "goodsNeeded"; break;
                        case 377 : s = "drought"; break;
                        case 378 : s = "penterestClan"; break;
                        case 379 : s = "eurmalBounces"; break;
                        case 380 : s = "ducksOnHook"; break;
                        case 381 : s = "noPayClan"; break;
                        case 382 : s = "challenger"; break;
                        case 383 : s = "madClanAlly"; break;
                        case 384 : s = "duckTribeDeal"; break;
                        case 385 : s = "goodvoice"; break;
                        case 386 : s = "legal"; break;
                        case 387 : s = "warrior"; break;
                        case 388 : s = "tribeTooSmall"; break;
                        case 389 : s = "protoTribeName"; break;
                        case 390 : s = "protoTribe"; break;
                        case 391 : s = "caravanBonus"; break;
                        case 392 : s = "mapsJumbled"; break;
                        case 393 : s = "snakeLabel"; break;
                        case 394 : s = "snakeCheck"; break;
                        case 395 : s = "snakeTreasures"; break;
                        case 396 : s = "ourWarriorsVendreffed"; break;
                        case 397 : s = "horseTreasures"; break;
                        case 398 : s = "praxTreasures"; break;
                        case 399 : s = "newtLabel"; break;
                        case 400 : s = "dragonCheck"; break;
                        case 401 : s = "newtTreasures"; break;
                        case 402 : s = "tarshLabel"; break;
                        case 403 : s = "tarshCheck"; break;
                        case 404 : s = "ovartCheck"; break;
                        case 405 : s = "yaranCheck"; break;
                        case 406 : s = "tarshTreasures"; break;
                        case 407 : s = "stinkLabel"; break;
                        case 408 : s = "stinkCheck"; break;
                        case 409 : s = "stinkTreasures"; break;
                        case 410 : s = "beastLabel"; break;
                        case 411 : s = "nonTrespassAgreement"; break;
                        case 412 : s = "beastCheck"; break;
                        case 413 : s = "beastTreasures"; break;
                        case 414 : s = "keroCheck"; break;
                        case 415 : s = "spiritAllies"; break;
                        case 416 : s = "directionOfGrazelands"; break;
                        case 417 : s = "grazeFinder"; break;
                        case 418 : s = "caravanSize"; break;
                        case 419 : s = "haveQuested"; break;
                        case 420 : s = "forceBanditAttack"; break;
                        case 421 : s = "newFeudClan"; break;
                        case 422 : s = "clanR299"; break;
                        case 423 : s = "kingResigned"; break;
                        case 424 : s = "deadKing"; break;
                        case 425 : s = "telKing"; break;
                        case 426 : s = "tarshie"; break;
                        case 427 : s = "status"; break;
                        case 428 : s = "contestant"; break;
                        case 429 : s = "winner"; break;
                        case 430 : s = "winnerPeople"; break;
                        case 431 : s = "loserA"; break;
                        case 432 : s = "loserAPeople"; break;
                        case 433 : s = "loserB"; break;
                        case 434 : s = "loserBPeople"; break;
                        case 435 : s = "loser"; break;
                        case 436 : s = "skel"; break;
                        case 437 : s = "skelClan"; break;
                        case 438 : s = "vic"; break;
                        case 439 : s = "vicClan"; break;
                        case 440 : s = "skelDeathNews"; break;
                        case 441 : s = "skel437"; break;
                        case 442 : s = "skel438"; break;
                        case 443 : s = "skelDead"; break;
                        case 444 : s = "beatSkel"; break;
                        case 445 : s = "newChiefClan"; break;
                        case 446 : s = "newKingTribe"; break;
                        case 447 : s = "biggestMilitaryClan"; break;
                        case 448 : s = "marlestaProphesied"; break;
                        case 449 : s = "finder"; break;
                        case 450 : s = "unlucky"; break;
                        case 451 : s = "grouser"; break;
                        case 452 : s = "blasphemer"; break;
                        case 453 : s = "fqClan"; break;
                        case 454 : s = "feudQuest"; break;
                        case 455 : s = "mythPick"; break;
                        case 456 : s = "priestess"; break;
                        case 457 : s = "smiter"; break;
                        case 458 : s = "moodDude"; break;
                        case 459 : s = "moodF"; break;
                        case 460 : s = "axer"; break;
                        case 461 : s = "armer"; break;
                        case 462 : s = "rivalF"; break;
                        case 463 : s = "rivalM"; break;
                        case 464 : s = "kidmaker"; break;
                        case 465 : s = "elmalHorseOffer"; break;
                        case 466 : s = "kilnClanCritics"; break;
                        case 467 : s = "didMadClanI"; break;
                        case 468 : s = "didMadClan2"; break;
                        case 469 : s = "didMadClan3"; break;
                        case 470 : s = "didMadClan4"; break;
                        case 471 : s = "didMadClan5"; break;
                        case 472 : s = "didMadClan6"; break;
                        case 473 : s = "prosperousClanCritics"; break;
                        case 474 : s = "ucOffer"; break;
                        case 475 : s = "stillSmall"; break;
                        case 476 : s = "stillLarge"; break;
                        case 477 : s = "warClanOffer"; break;
                        case 478 : s = "femaleChief"; break;
                        case 479 : s = "vingaSuggest"; break;
                        case 480 : s = "R7Result"; break;
                        case 481 : s = "soldGoldeneye"; break;
                        case 482 : s = "swapGame"; break;
                        case 483 : s = "swapGoods"; break;
                        case 484 : s = "goodsForIvory"; break;
                        case 485 : s = "goodsForGreenware"; break;
                        case 486 : s = "goodsForGems"; break;
                        case 487 : s = "goodsForIron"; break;
                        case 488 : s = "R429Clan"; break;
                        case 489 : s = "R429Free"; break;
                        case 490 : s = "R429Feud"; break;
                        case 491 : s = "ucYes"; break;
                        case 492 : s = "scrollClanHonor"; break;
                        case 493 : s = "goodsForRocks"; break;
                        case 494 : s = "sacredClodOffer"; break;
                        case 495 : s = "smashedClan"; break;
                        case 496 : s = "sc1"; break;
                        case 497 : s = "sc2"; break;
                        case 498 : s = "dontSmashUs"; break;
                        case 499 : s = "smashReason"; break;
                        case 500 : s = "kilnMonopoly"; break;
                        case 501 : s = "pigClanAcorns"; break;
                        case 502 : s = "pigClanOnCouncil"; break;
                        case 503 : s = "hogCrisis"; break;
                        case 504 : s = "potClanHerbs"; break;
                        case 505 : s = "plowClanMonopoly"; break;
                        case 506 : s = "plowClanFertility"; break;
                        case 507 : s = "templeClanFortify"; break;
                        case 508 : s = "templeClanShareMyth"; break;
                        case 509 : s = "survivorClanTreasure"; break;
                        case 510 : s = "tradeClanBanditOath"; break;
                        case 511 : s = "scrollClanMakeMap"; break;
                        case 512 : s = "huntClanTreasure"; break;
                        case 513 : s = "eccentricWarriors"; break;
                        case 514 : s = "earlyClanObligations"; break;
                        case 515 : s = "teachSunMagic"; break;
                        case 516 : s = "joinedClansCows"; break;
                        case 517 : s = "kilnDeficit"; break;
                        case 518 : s = "mralotaSacrifice"; break;
                        case 519 : s = "pigClanGives"; break;
                        case 520 : s = "joinedClansMagic"; break;
                        case 521 : s = "blackSpearInTribe"; break;
                        case 522 : s = "rockClanSacrifice"; break;
                        case 523 : s = "bonusFirstCombatTests"; break;
                        case 524 : s = "weCompensateTavernClan"; break;
                        case 525 : s = "trollTributeToWarClan"; break;
                        case 526 : s = "weCompensateTrolls"; break;
                        case 527 : s = "crossPropitiation"; break;
                        case 528 : s = "crossBlessing"; break;
                        case 529 : s = "esraPenalty"; break;
                        case 530 : s = "templeClanNearEnemies"; break;
                        case 531 : s = "R59Treasures"; break;
                        case 532 : s = "deadClan"; break;
                        case 533 : s = "formerTribe"; break;
                        case 534 : s = "rebelClans"; break;
                        case 535 : s = "schismaticClans"; break;
                        case 536 : s = "rebelStart"; break;
                        case 537 : s = "schismStart"; break;
                        case 538 : s = "exClans"; break;
                        case 539 : s = "R232Q"; break;
                        case 540 : s = "allyTribe"; break;
                        case 541 : s = "originalWildland"; break;
                        case 542 : s = "landClearingPromise"; break;
                        case 543 : s = "foxBluff"; break;
                        case 544 : s = "needElection"; break;
                        case 545 : s = "magnetism"; break;
                        case 546 : s = "magicCaught"; break;
                        case 547 : s = "vsSavvyBonus"; break;
                        case 548 : s = "craftBonus"; break;
                        case 549 : s = "oldCattle"; break;
                        case 550 : s = "noCropMagic"; break;
                        case 551 : s = "bonusAgainstUs"; break;
                        case 552 : s = "noHerdMagic"; break;
                        case 553 : s = "oldKeroCheck"; break;
                        case 554 : s = "clanMagicReduced"; break;
                        case 555 : s = "milkBonus"; break;
                        case 556 : s = "questAttempts"; break;
                        case 557 : s = "noWarMagic"; break;
                        case 558 : s = "oldTarshCheck"; break;
                        case 559 : s = "oldTreasureCount"; break;
                        case 560 : s = "mockedLately"; break;
                        case 561 : s = "S1Clan"; break;
                        case 562 : s = "groom"; break;
                        case 563 : s = "bride"; break;
                        case 564 : s = "sora"; break;
                        case 565 : s = "dad"; break;
                        case 566 : s = "mom"; break;
                        case 567 : s = "memberAnotherClan"; break;
                        case 568 : s = "clan4"; break;
                        case 569 : s = "widow"; break;
                        case 570 : s = "penterest"; break;
                        case 571 : s = "father"; break;
                        case 572 : s = "hauntedFarmer"; break;
                        case 573 : s = "resistance"; break;
                        case 574 : s = "p218"; break;
                        case 575 : s = "e12"; break;
                        case 576 : s = "h12"; break;
                        case 577 : s = "i12"; break;
                        case 578 : s = "ghostSheep"; break;
                        case 579 : s = "ourGuy"; break;
                        case 580 : s = "ourGuyRight"; break;
                        case 581 : s = "ourGuyWrong"; break;
                        case 582 : s = "bonusNextTests"; break;
                        case 583 : s = "delayDrought"; break;
                        case 584 : s = "recentFlood"; break;
                        case 585 : s = "droughtLength"; break;
                        case 586 : s = "recentDrought"; break;
                        case 587 : s = "dagaSacrifices"; break;
                        case 588 : s = "droughtSeverity"; break;
                        case 589 : s = "S16"; break;
                        case 590 : s = "nextHeroquest"; break;
                        case 591 : s = "angryCarl"; break;
                        case 592 : s = "outlaw"; break;
                        case 593 : s = "raidBonusCount"; break;
                        case 594 : s = "huntingRights"; break;
                        case 595 : s = "huntingCows"; break;
                        case 596 : s = "brooHousecarls"; break;
                        case 597 : s = "S20Again"; break;
                        case 598 : s = "S20"; break;
                        case 599 : s = "R34Again"; break;
                        case 600 : s = "S21Again"; break;
                        case 601 : s = "darknessVictory"; break;
                        case 602 : s = "valindSacrifices"; break;
                        case 603 : s = "S22"; break;
                        case 604 : s = "ordangmar"; break;
                        case 605 : s = "ordangmarClan"; break;
                        case 606 : s = "offended"; break;
                        case 607 : s = "chief23"; break;
                        case 608 : s = "telmoriAlliance"; break;
                        case 609 : s = "noStrayTelmori"; break;
                        case 610 : s = "telResponse"; break;
                        case 611 : s = "meanThane"; break;
                        case 612 : s = "S26Again"; break;
                        case 613 : s = "thane"; break;
                        case 614 : s = "suitor"; break;
                        case 615 : s = "daughter"; break;
                        case 616 : s = "penaltyNextMagicTests"; break;
                        case 617 : s = "heroMagnet"; break;
                        case 618 : s = "salmonFood"; break;
                        case 619 : s = "salmonMagic"; break;
                        case 620 : s = "ritualist"; break;
                        case 621 : s = "feudingClan"; break;
                        case 622 : s = "followers34"; break;
                        case 623 : s = "p34"; break;
                        case 624 : s = "snowflower"; break;
                        case 625 : s = "farmer"; break;
                        case 626 : s = "cousin"; break;
                        case 627 : s = "nephew"; break;
                        case 628 : s = "boughtJar"; break;
                        case 629 : s = "politician"; break;
                        case 630 : s = "complainer"; break;
                        case 631 : s = "S52Again"; break;
                        case 632 : s = "rabblerouser"; break;
                        case 633 : s = "everMocked"; break;
                        case 634 : s = "duckChampion"; break;
                        case 635 : s = "duckCombatBonus"; break;
                        case 636 : s = "fakeCondition"; break;
                        case 637 : s = "manless"; break;
                        case 638 : s = "goodGuy"; break;
                        case 639 : s = "pop102"; break;
                        case 640 : s = "holyUglyMen"; break;
                        case 641 : s = "uglyMenSeeker"; break;
                        case 642 : s = "pleader"; break;
                        case 643 : s = "vowBreaker"; break;
                        case 644 : s = "dontHurtUsTribe"; break;
                        case 645 : s = "dwarfMine"; break;
                        case 646 : s = "necklaceOfAxes"; break;
                        case 647 : s = "justDontGetIt"; break;
                        case 648 : s = "shamans"; break;
                        case 649 : s = "knowingTribalClan"; break;
                        case 650 : s = "asker"; break;
                        case 651 : s = "clanS114"; break;
                        case 652 : s = "pal"; break;
                        case 653 : s = "antiElf"; break;
                        case 654 : s = "destiny"; break;
                        case 655 : s = "stompedUs"; break;
                        case 656 : s = "gameOverApocalypse"; break;
                        case 657 : s = "gameOverNoCattle"; break;
                        case 658 : s = "gameOverNoPeople"; break;
                        case 659 : s = "farClan"; break;
                        case 660 : s = "gameOverRebels"; break;
                        case 661 : s = "finalRing"; break;
                        case 662 : s = "duckTribute"; break;
                        case 663 : s = "beastfolkHaveWarned"; break;
                        case 664 : s = "stormBull"; break;
                        case 665 : s = "R11Again"; break;
                        case 666 : s = "triceratops"; break;
                        case 667 : s = "aWarrior"; break;
                        case 668 : s = "illator"; break;
                        case 669 : s = "tarshHousecarls"; break;
                        case 670 : s = "tarshForce"; break;
                        case 671 : s = "warLeaderAway"; break;
                        case 672 : s = "ducksTookOpportunity"; break;
                        case 673 : s = "fallingHills"; break;
                        case 674 : s = "lunarVisits"; break;
                        case 675 : s = "illatorsHunt"; break;
                        case 676 : s = "worriedCarl"; break;
                        case 677 : s = "sneaky"; break;
                        case 678 : s = "didR23"; break;
                        case 679 : s = "r23again"; break;
                        case 680 : s = "R23a"; break;
                        case 681 : s = "didR68"; break;
                        case 682 : s = "explorer"; break;
                        case 683 : s = "highestHunter"; break;
                        case 684 : s = "dryClan"; break;
                        case 685 : s = "lostErnalda"; break;
                        case 686 : s = "cattleTradePromise"; break;
                        case 687 : s = "aggrievedCarl"; break;
                        case 688 : s = "R208q"; break;
                        case 689 : s = "departingWarriors"; break;
                        case 690 : s = "r60Bonus"; break;
                        case 691 : s = "fromR32"; break;
                        case 692 : s = "skip44a"; break;
                        case 693 : s = "hurtGuy"; break;
                        case 694 : s = "woman"; break;
                        case 695 : s = "eme"; break;
                        case 696 : s = "emeClan"; break;
                        case 697 : s = "R33Again"; break;
                        case 698 : s = "t36"; break;
                        case 699 : s = "wolfWealth"; break;
                        case 700 : s = "clans"; break;
                        case 701 : s = "imploring"; break;
                        case 702 : s = "saveMe"; break;
                        case 703 : s = "wyrmDead"; break;
                        case 704 : s = "longVictory"; break;
                        case 705 : s = "ensnared"; break;
                        case 706 : s = "admission"; break;
                        case 707 : s = "repeatR41"; break;
                        case 708 : s = "unwise"; break;
                        case 709 : s = "repeat42"; break;
                        case 710 : s = "walkingWaves"; break;
                        case 711 : s = "tribeNamed"; break;
                        case 712 : s = "grainFinder"; break;
                        case 713 : s = "mourning"; break;
                        case 714 : s = "victim"; break;
                        case 715 : s = "killer"; break;
                        case 716 : s = "horror"; break;
                        case 717 : s = "actuallyMourned"; break;
                        case 718 : s = "R49Again"; break;
                        case 719 : s = "killerLivesHere"; break;
                        case 720 : s = "cure"; break;
                        case 721 : s = "skirt"; break;
                        case 722 : s = "impetuous"; break;
                        case 723 : s = "outraged"; break;
                        case 724 : s = "concerned"; break;
                        case 725 : s = "romantic"; break;
                        case 726 : s = "R58Again"; break;
                        case 727 : s = "challengerWager"; break;
                        case 728 : s = "ourWager"; break;
                        case 729 : s = "delayPeaceOverture"; break;
                        case 730 : s = "traitorClan"; break;
                        case 731 : s = "peacebond"; break;
                        case 732 : s = "clan62"; break;
                        case 733 : s = "troubleMaker"; break;
                        case 734 : s = "troubleSequence"; break;
                        case 735 : s = "troubleMakerSeries"; break;
                        case 736 : s = "clanList"; break;
                        case 737 : s = "R65Again"; break;
                        case 738 : s = "undeadLeader"; break;
                        case 739 : s = "upland"; break;
                        case 740 : s = "undeadWarriors"; break;
                        case 741 : s = "disqualified"; break;
                        case 742 : s = "weLostBecauseKingSteppedDown"; break;
                        case 743 : s = "weResigned"; break;
                        case 744 : s = "R70Again"; break;
                        case 745 : s = "t71"; break;
                        case 746 : s = "z71"; break;
                        case 747 : s = "tribePoints"; break;
                        case 748 : s = "clanPoints"; break;
                        case 749 : s = "confederationPoints"; break;
                        case 750 : s = "sideSwitching"; break;
                        case 751 : s = "weKilledKing"; break;
                        case 752 : s = "betweenKings"; break;
                        case 753 : s = "R291Again"; break;
                        case 754 : s = "vinganQueenIn4"; break;
                        case 755 : s = "trackMaleKing"; break;
                        case 756 : s = "forceFemaleChief"; break;
                        case 757 : s = "predecessor"; break;
                        case 758 : s = "marriageProposed"; break;
                        case 759 : s = "R104k"; break;
                        case 760 : s = "R104t"; break;
                        case 761 : s = "rebellionPending"; break;
                        case 762 : s = "firstKingOnce"; break;
                        case 763 : s = "survivorClanSupport"; break;
                        case 764 : s = "vinganClanPissed"; break;
                        case 765 : s = "pigNeighbor"; break;
                        case 766 : s = "hogClanNeighbors"; break;
                        case 767 : s = "plowClanBargain"; break;
                        case 768 : s = "ernaldaSeat"; break;
                        case 769 : s = "asreliaSeat"; break;
                        case 770 : s = "earlyClanSecret"; break;
                        case 771 : s = "issariesSeat"; break;
                        case 772 : s = "noBanditOath"; break;
                        case 773 : s = "humaktSeat"; break;
                        case 774 : s = "thunderBrothersSeat"; break;
                        case 775 : s = "lhankorMhySeat"; break;
                        case 776 : s = "literateKings"; break;
                        case 777 : s = "uzProposal"; break;
                        case 778 : s = "trollTribute"; break;
                        case 779 : s = "thinksAhead"; break;
                        case 780 : s = "tavernClanTrollPeace"; break;
                        case 781 : s = "tavernClanHall"; break;
                        case 782 : s = "trollPromise"; break;
                        case 783 : s = "R89"; break;
                        case 784 : s = "tutor"; break;
                        case 785 : s = "magicLost"; break;
                        case 786 : s = "beastWar"; break;
                        case 787 : s = "regaliaSearch"; break;
                        case 788 : s = "regaliaParty"; break;
                        case 789 : s = "tribalRegaliaTheft"; break;
                        case 790 : s = "wife"; break;
                        case 791 : s = "stolen"; break;
                        case 792 : s = "clan96"; break;
                        case 793 : s = "stolenLeader"; break;
                        case 794 : s = "stolenWarriors"; break;
                        case 795 : s = "angryChieftain"; break;
                        case 796 : s = "R98Again"; break;
                        case 797 : s = "waveringClans"; break;
                        case 798 : s = "R132tribe"; break;
                        case 799 : s = "R98k"; break;
                        case 800 : s = "rebellion"; break;
                        case 801 : s = "lost2Housecarls"; break;
                        case 802 : s = "survivorsAdopted"; break;
                        case 803 : s = "R103Again"; break;
                        case 804 : s = "warTribe"; break;
                        case 805 : s = "R104Again"; break;
                        case 806 : s = "noKingChange"; break;
                        case 807 : s = "trollPeace"; break;
                        case 808 : s = "weStartWar"; break;
                        case 809 : s = "enemyTribe"; break;
                        case 810 : s = "WBTribe"; break;
                        case 811 : s = "cwTribe"; break;
                        case 812 : s = "potentialTribe"; break;
                        case 813 : s = "tribeFounded"; break;
                        case 814 : s = "attaWay"; break;
                        case 815 : s = "mrzClan"; break;
                        case 816 : s = "pendingR141"; break;
                        case 817 : s = "timeForAChange"; break;
                        case 818 : s = "tribesSettledDown"; break;
                        case 819 : s = "R108Again"; break;
                        case 820 : s = "hogPig"; break;
                        case 821 : s = "hogCrop"; break;
                        case 822 : s = "R110Found"; break;
                        case 823 : s = "R111Again"; break;
                        case 824 : s = "banditryPenalty"; break;
                        case 825 : s = "dwarfMineExplored"; break;
                        case 826 : s = "R114Leader"; break;
                        case 827 : s = "R114HC"; break;
                        case 828 : s = "R114FM"; break;
                        case 829 : s = "clan114"; break;
                        case 830 : s = "hero"; break;
                        case 831 : s = "clan116"; break;
                        case 832 : s = "triedDwarfFood"; break;
                        case 833 : s = "guiltyClan"; break;
                        case 834 : s = "angryMan"; break;
                        case 835 : s = "furiousWoman"; break;
                        case 836 : s = "fhq"; break;
                        case 837 : s = "vendref"; break;
                        case 838 : s = "vendrefRefugees"; break;
                        case 839 : s = "vendrefThralls"; break;
                        case 840 : s = "clan118"; break;
                        case 841 : s = "civilRoyalStatus"; break;
                        case 842 : s = "R119Tribe"; break;
                        case 843 : s = "windWarriors"; break;
                        case 844 : s = "R122Again"; break;
                        case 845 : s = "R122Guards"; break;
                        case 846 : s = "tavernClanCompensation"; break;
                        case 847 : s = "R123Again"; break;
                        case 848 : s = "R124Again"; break;
                        case 849 : s = "ct"; break;
                        case 850 : s = "clanRegaliaTheft"; break;
                        case 851 : s = "shocked"; break;
                        case 852 : s = "w125"; break;
                        case 853 : s = "time125"; break;
                        case 854 : s = "leader"; break;
                        case 855 : s = "clanR127"; break;
                        case 856 : s = "axeMaiden"; break;
                        case 857 : s = "R128Again"; break;
                        case 858 : s = "kallyrEloquence"; break;
                        case 859 : s = "decapKing"; break;
                        case 860 : s = "weLostBecauseKingDied"; break;
                        case 861 : s = "tribalAggressor"; break;
                        case 862 : s = "loyalists"; break;
                        case 863 : s = "loyalistClans"; break;
                        case 864 : s = "bhtHouseCarls"; break;
                        case 865 : s = "bhtElites"; break;
                        case 866 : s = "dwarfMachine"; break;
                        case 867 : s = "v144"; break;
                        case 868 : s = "vendreffedABC"; break;
                        case 869 : s = "clan147"; break;
                        case 870 : s = "participatingClans"; break;
                        case 871 : s = "participants"; break;
                        case 872 : s = "R152Tribe"; break;
                        case 873 : s = "R153Again"; break;
                        case 874 : s = "clan154"; break;
                        case 875 : s = "raidClan"; break;
                        case 876 : s = "likelyToRaid"; break;
                        case 877 : s = "moreForGrain"; break;
                        case 878 : s = "penaltyNextTests"; break;
                        case 879 : s = "w156"; break;
                        case 880 : s = "clan156"; break;
                        case 881 : s = "t156"; break;
                        case 882 : s = "c156"; break;
                        case 883 : s = "g156"; break;
                        case 884 : s = "grazerPromise"; break;
                        case 885 : s = "stillNeedToRescue"; break;
                        case 886 : s = "grazerHC"; break;
                        case 887 : s = "R157Again"; break;
                        case 888 : s = "bonus159"; break;
                        case 889 : s = "skyfallLabel"; break;
                        case 890 : s = "trollkinPikes"; break;
                        case 891 : s = "R163Again"; break;
                        case 892 : s = "excluded"; break;
                        case 893 : s = "trollThralls"; break;
                        case 894 : s = "buyerClan"; break;
                        case 895 : s = "trollkinPrice"; break;
                        case 896 : s = "merchant"; break;
                        case 897 : s = "buyerClans"; break;
                        case 898 : s = "donorClans"; break;
                        case 899 : s = "dragonewtBody"; break;
                        case 900 : s = "dragonewtBodyGivenClan"; break;
                        case 901 : s = "dragonewtBodyTradedClan"; break;
                        case 902 : s = "orlkensorClan"; break;
                        case 903 : s = "noRandomScenes"; break;
                        case 904 : s = "marlestaStartingTribe"; break;
                        case 905 : s = "marlestaRoyalStatus"; break;
                        case 906 : s = "marlestaYear"; break;
                        case 907 : s = "antiMarlestaTribe"; break;
                        case 908 : s = "ravagedClan"; break;
                        case 909 : s = "jaldonNailedUs"; break;
                        case 910 : s = "tribeDisintegrated"; break;
                        case 911 : s = "timesDisintegrated"; break;
                        case 912 : s = "didRightQuests"; break;
                        case 913 : s = "availableTribes"; break;
                        case 914 : s = "R177Again"; break;
                        case 915 : s = "noGloat"; break;
                        case 916 : s = "from180"; break;
                        case 917 : s = "R210Tribe"; break;
                        case 918 : s = "victimTribe"; break;
                        case 919 : s = "inhumanAllies"; break;
                        case 920 : s = "R181Again"; break;
                        case 921 : s = "trollkinEmissary"; break;
                        case 922 : s = "R182aDeja"; break;
                        case 923 : s = "dragonSkinSeq"; break;
                        case 924 : s = "foolDragonClans"; break;
                        case 925 : s = "tubeGiven"; break;
                        case 926 : s = "accuser"; break;
                        case 927 : s = "defendant"; break;
                        case 928 : s = "marked"; break;
                        case 929 : s = "rrStarted"; break;
                        case 930 : s = "rrWed"; break;
                        case 931 : s = "rrSplit"; break;
                        case 932 : s = "rrClans"; break;
                        case 933 : s = "rrThreatened"; break;
                        case 934 : s = "mostRecentRRClan"; break;
                        case 935 : s = "clan217"; break;
                        case 936 : s = "newBride"; break;
                        case 937 : s = "aggrieved"; break;
                        case 938 : s = "philanderer"; break;
                        case 939 : s = "korolClan"; break;
                        case 940 : s = "joratorClan"; break;
                        case 941 : s = "korol"; break;
                        case 942 : s = "jorator"; break;
                        case 943 : s = "suitorClan"; break;
                        case 944 : s = "suitorForEonislara"; break;
                        case 945 : s = "backForTreasure"; break;
                        case 946 : s = "robbedClan"; break;
                        case 947 : s = "stolenTreasure"; break;
                        case 948 : s = "robbedClan1"; break;
                        case 949 : s = "robbedClan2"; break;
                        case 950 : s = "robbedClan3"; break;
                        case 951 : s = "robbedClan4"; break;
                        case 952 : s = "whichStolenTreasure"; break;
                        case 953 : s = "marlestaTribe"; break;
                        case 954 : s = "yamTribe"; break;
                        case 955 : s = "marlesta"; break;
                        case 956 : s = "marlestaClans"; break;
                        case 957 : s = "codeR202Count"; break;
                        case 958 : s = "aggressor"; break;
                        case 959 : s = "aid206"; break;
                        case 960 : s = "antiJaldonLoot"; break;
                        case 961 : s = "derikDenied"; break;
                        case 962 : s = "antiJaldonForce"; break;
                        case 963 : s = "antiJaldonMagic"; break;
                        case 964 : s = "R208_wb"; break;
                        case 965 : s = "R208v"; break;
                        case 966 : s = "victimR209"; break;
                        case 967 : s = "inhumans"; break;
                        case 968 : s = "patsyClan"; break;
                        case 969 : s = "foolClan"; break;
                        case 970 : s = "aggrievedClan"; break;
                        case 971 : s = "clanFromAlly"; break;
                        case 972 : s = "redistribution"; break;
                        case 973 : s = "R213Again"; break;
                        case 974 : s = "bundalini"; break;
                        case 975 : s = "bundaliniClan"; break;
                        case 976 : s = "weddingClan"; break;
                        case 977 : s = "uninvolvedClans"; break;
                        case 978 : s = "flamalDisputeFixed"; break;
                        case 979 : s = "agitated"; break;
                        case 980 : s = "sneak"; break;
                        case 981 : s = "accused"; break;
                        case 982 : s = "scrollAdopted"; break;
                        case 983 : s = "joratorSorry"; break;
                        case 984 : s = "monsterMash"; break;
                        case 985 : s = "jumbleFault"; break;
                        case 986 : s = "grandbread"; break;
                        case 987 : s = "grandbreadPaid"; break;
                        case 988 : s = "grandbreadFault"; break;
                        case 989 : s = "R229Again"; break;
                        case 990 : s = "R229ignored"; break;
                        case 991 : s = "R229tribute"; break;
                        case 992 : s = "R229threat"; break;
                        case 993 : s = "R237Warned"; break;
                        case 994 : s = "reserveForce"; break;
                        case 995 : s = "fromR230"; break;
                        case 996 : s = "R232Bonus"; break;
                        case 997 : s = "marlestaResult"; break;
                        case 998 : s = "R234c"; break;
                        case 999 : s = "tribeFussSettled"; break;
                        case 1000 : s = "t237"; break;
                        case 1001 : s = "R237c"; break;
                        case 1002 : s = "bonus241"; break;
                        case 1003 : s = "derikWarriors"; break;
                        case 1004 : s = "derikFootmen"; break;
                        case 1005 : s = "sickWarriors"; break;
                        case 1006 : s = "R243Again"; break;
                        case 1007 : s = "shakesBroken"; break;
                        case 1008 : s = "R244King"; break;
                        case 1009 : s = "R244Bonus"; break;
                        case 1010 : s = "R244Penalty"; break;
                        case 1011 : s = "fuming"; break;
                        case 1012 : s = "t247"; break;
                        case 1013 : s = "mallian"; break;
                        case 1014 : s = "germy"; break;
                        case 1015 : s = "firstMallian"; break;
                        case 1016 : s = "malliaCure"; break;
                        case 1017 : s = "hunter"; break;
                        case 1018 : s = "trespasser"; break;
                        case 1019 : s = "poacher"; break;
                        case 1020 : s = "feisty"; break;
                        case 1021 : s = "returner"; break;
                        case 1022 : s = "bully"; break;
                        case 1023 : s = "appealer"; break;
                        case 1024 : s = "walktaTries"; break;
                        case 1025 : s = "beans"; break;
                        case 1026 : s = "desecratedTemple"; break;
                        case 1027 : s = "troubled"; break;
                        case 1028 : s = "capturedCarls"; break;
                        case 1029 : s = "weakClans"; break;
                        case 1030 : s = "bsKing"; break;
                        case 1031 : s = "bsTribe"; break;
                        case 1032 : s = "spearWarning"; break;
                        case 1033 : s = "R260Again"; break;
                        case 1034 : s = "blackSpearOwners"; break;
                        case 1035 : s = "desertion"; break;
                        case 1036 : s = "spearBlessing"; break;
                        case 1037 : s = "R262Again"; break;
                        case 1038 : s = "R262"; break;
                        case 1039 : s = "vampSlap"; break;
                        case 1040 : s = "kallyrQuery"; break;
                        case 1041 : s = "scowly"; break;
                        case 1042 : s = "kolating"; break;
                        case 1043 : s = "captured"; break;
                        case 1044 : s = "kolatAgain"; break;
                        case 1045 : s = "shovingSettled"; break;
                        case 1046 : s = "R266Again"; break;
                        case 1047 : s = "vingan"; break;
                        case 1048 : s = "wyrmClan"; break;
                        case 1049 : s = "noWyrm"; break;
                        case 1050 : s = "wyrmScene"; break;
                        case 1051 : s = "aftermath"; break;
                        case 1052 : s = "shooer"; break;
                        case 1053 : s = "R272"; break;
                        case 1054 : s = "animalFoodEaten"; break;
                        case 1055 : s = "barleyEaten"; break;
                        case 1056 : s = "conked"; break;
                        case 1057 : s = "logger"; break;
                        case 1058 : s = "dueler"; break;
                        case 1059 : s = "ugly"; break;
                        case 1060 : s = "uglyTries"; break;
                        case 1061 : s = "brideOfUgly"; break;
                        case 1062 : s = "rejections"; break;
                        case 1063 : s = "fakeFace"; break;
                        case 1064 : s = "t277"; break;
                        case 1065 : s = "brothersInProgress"; break;
                        case 1066 : s = "larry"; break;
                        case 1067 : s = "darryl"; break;
                        case 1068 : s = "otherDarryl"; break;
                        case 1069 : s = "brotherTrouble"; break;
                        case 1070 : s = "R278Again"; break;
                        case 1071 : s = "haughty"; break;
                        case 1072 : s = "ickyHosts"; break;
                        case 1073 : s = "R280Satire"; break;
                        case 1074 : s = "thrall"; break;
                        case 1075 : s = "dead"; break;
                        case 1076 : s = "thadartSequence"; break;
                        case 1077 : s = "refugee"; break;
                        case 1078 : s = "R285Thralls"; break;
                        case 1079 : s = "giver"; break;
                        case 1080 : s = "tribeR289"; break;
                        case 1081 : s = "royalR289"; break;
                        case 1082 : s = "effigyTemple"; break;
                        case 1083 : s = "japed"; break;
                        case 1084 : s = "literacy"; break;
                        case 1085 : s = "breathless"; break;
                        case 1086 : s = "clanR298"; break;
                        case 1087 : s = "R299r"; break;
                        case 1088 : s = "R299raider"; break;
                        case 1089 : s = "clanR300"; break;
                        case 1090 : s = "R301Clan"; break;
                        case 1091 : s = "elmalBoon"; break;
                        case 1092 : s = "R300Again"; break;
                        case 1093 : s = "waitForRepeatElves"; break;
                        case 1094 : s = "capturedElves"; break;
                        case 1095 : s = "matriarchComplaintSettled"; break;
                        case 1096 : s = "matriarchal"; break;
                        case 1097 : s = "patriarchal"; break;
                        case 1098 : s = "R304Again"; break;
                        case 1099 : s = "patriarchComplaintSettled"; break;
                        case 1100 : s = "R305Again"; break;
                        case 1101 : s = "seller"; break;
                        case 1102 : s = "hawker"; break;
                        case 1103 : s = "vendor"; break;
                        case 1104 : s = "spendthriftRevoked"; break;
                        case 1105 : s = "R308Again"; break;
                        case 1106 : s = "miserlyRevoked"; break;
                        case 1107 : s = "poet310"; break;
                        case 1108 : s = "spiritsMollified"; break;
                        case 1109 : s = "clan312"; break;
                        case 1110 : s = "R314Clan"; break;
                        case 1111 : s = "swiped"; break;
                        case 1112 : s = "fairyFriend"; break;
                        case 1113 : s = "fairyScene"; break;
                        case 1114 : s = "feud"; break;
                        case 1115 : s = "R316Again"; break;
                        case 1116 : s = "vengeful"; break;
                        case 1117 : s = "orig317clan"; break;
                        case 1118 : s = "crispy"; break;
                        case 1119 : s = "burner"; break;
                        case 1120 : s = "slayer"; break;
                        case 1121 : s = "clan317"; break;
                        case 1122 : s = "p317"; break;
                        case 1123 : s = "w317"; break;
                        case 1124 : s = "r317"; break;
                        case 1125 : s = "resignation"; break;
                        case 1126 : s = "R319Again"; break;
                        case 1127 : s = "r320Again"; break;
                        case 1128 : s = "prev320"; break;
                        case 1129 : s = "indie"; break;
                        case 1130 : s = "chalanaFavor"; break;
                        case 1131 : s = "humaktMission"; break;
                        case 1132 : s = "R329Again"; break;
                        case 1133 : s = "R329"; break;
                        case 1134 : s = "R330Again"; break;
                        case 1135 : s = "sickCattle"; break;
                        case 1136 : s = "r330"; break;
                        case 1137 : s = "uraldansGone"; break;
                        case 1138 : s = "saveHuntingBonus"; break;
                        case 1139 : s = "gorProtect"; break;
                        case 1140 : s = "dogNix"; break;
                        case 1141 : s = "R339"; break;
                        case 1142 : s = "yinkinFavor"; break;
                        case 1143 : s = "frightened"; break;
                        case 1144 : s = "hubby"; break;
                        case 1145 : s = "r341Again"; break;
                        case 1146 : s = "R341f"; break;
                        case 1147 : s = "R341hc"; break;
                        case 1148 : s = "R341p"; break;
                        case 1149 : s = "one"; break;
                        case 1150 : s = "two"; break;
                        case 1151 : s = "three"; break;
                        case 1152 : s = "prized"; break;
                        case 1153 : s = "randyThread"; break;
                        case 1154 : s = "rescueBotch"; break;
                        case 1155 : s = "oracled"; break;
                        case 1156 : s = "huntingReduction"; break;
                        case 1157 : s = "reporter"; break;
                        case 1158 : s = "distantWarfare"; break;
                        case 1159 : s = "hadDream"; break;
                        case 1160 : s = "totObligationsOwedTo"; break;
                        case 1161 : s = "totFavorsDueUs"; break;
                        case 1162 : s = "peaceFailed"; break;
                        case 1163 : s = "brokenTalks"; break;
                        case 1164 : s = "threatFailed"; break;
                        case 1165 : s = "mediationFailed"; break;
                        case 1166 : s = "payoffFailed"; break;
                        case 1167 : s = "getOutOfLoop"; break;
                        case 1168 : s = "R374Again"; break;
                        case 1169 : s = "R375Again"; break;
                        case 1170 : s = "baksheesh"; break;
                        case 1171 : s = "town"; break;
                        case 1172 : s = "hauberkPlea"; break;
                        case 1173 : s = "R352Again"; break;
                        case 1174 : s = "townDeal"; break;
                        case 1175 : s = "R353Bonus"; break;
                        case 1176 : s = "R353B"; break;
                        case 1177 : s = "wolfDelegate"; break;
                        case 1178 : s = "wolfForce"; break;
                        case 1179 : s = "R356Again"; break;
                        case 1180 : s = "t356"; break;
                        case 1181 : s = "grazeForce"; break;
                        case 1182 : s = "nameDeal"; break;
                        case 1183 : s = "ambush"; break;
                        case 1184 : s = "bribe"; break;
                        case 1185 : s = "wolfWin"; break;
                        case 1186 : s = "spartacus"; break;
                        case 1187 : s = "billed"; break;
                        case 1188 : s = "antiDuck"; break;
                        case 1189 : s = "antiDuckClan"; break;
                        case 1190 : s = "R366Again"; break;
                        case 1191 : s = "cycle"; break;
                        case 1192 : s = "beard"; break;
                        case 1193 : s = "barber"; break;
                        case 1194 : s = "clan367"; break;
                        case 1195 : s = "slain"; break;
                        case 1196 : s = "crazy"; break;
                        case 1197 : s = "halfPate"; break;
                        case 1198 : s = "R368Again"; break;
                        case 1199 : s = "R368"; break;
                        case 1200 : s = "andAnotherClan"; break;
                        case 1201 : s = "chimes"; break;
                        case 1202 : s = "clock"; break;
                        case 1203 : s = "pardon"; break;
                        case 1204 : s = "birth"; break;
                        case 1205 : s = "magicTelKing"; break;
                        case 1206 : s = "finForce"; break;
                        case 1207 : s = "cowspeaker"; break;
                        case 1208 : s = "magician"; break;
                        case 1209 : s = "tribeScare"; break;
                        case 1210 : s = "telCows"; break;
                        case 1211 : s = "weLostBecauseOurNumbersWereBad"; break;
                        case 1212 : s = "R394FreedThralls"; break;
                        case 1213 : s = "righteous"; break;
                        case 1214 : s = "thumped"; break;
                        case 1215 : s = "offender"; break;
                        case 1216 : s = "extorter"; break;
                        case 1217 : s = "R400Again"; break;
                        case 1218 : s = "colDif"; break;
                        case 1219 : s = "colTrib"; break;
                        case 1220 : s = "colPay"; break;
                        case 1221 : s = "failedColymarPetition"; break;
                        case 1222 : s = "colNope"; break;
                        case 1223 : s = "R401Again"; break;
                        case 1224 : s = "colymarWarned"; break;
                        case 1225 : s = "rebel"; break;
                        case 1226 : s = "striker"; break;
                        case 1227 : s = "versus"; break;
                        case 1228 : s = "praxianAllies"; break;
                        case 1229 : s = "vsBargainingBonus"; break;
                        case 1230 : s = "vsCustomBonus"; break;
                        case 1231 : s = "rubble"; break;
                        case 1232 : s = "caveBlock"; break;
                        case 1233 : s = "eurRodent"; break;
                        case 1234 : s = "hireRodent"; break;
                        case 1235 : s = "warRodent"; break;
                        case 1236 : s = "sagaClan"; break;
                        case 1237 : s = "ht"; break;
                        case 1238 : s = "R421"; break;
                        case 1239 : s = "thadart"; break;
                        case 1240 : s = "kistraldClan"; break;
                        case 1241 : s = "thadartFate"; break;
                        case 1242 : s = "pickClans"; break;
                        case 1243 : s = "pickTribalClans"; break;
                        case 1244 : s = "resClan"; break;
                        case 1245 : s = "yikes"; break;
                        case 1246 : s = "skelRelation"; break;
                        case 1247 : s = "vicImage"; break;
                        case 1248 : s = "R433Again"; break;
                        case 1249 : s = "landGrab"; break;
                        case 1250 : s = "R434Again"; break;
                        case 1251 : s = "buyer"; break;
                        case 1252 : s = "huHosedClan"; break;
                        case 1253 : s = "huUserClan"; break;
                        case 1254 : s = "huHoWounded"; break;
                        case 1255 : s = "litigious"; break;
                        case 1256 : s = "sagacious"; break;
                        case 1257 : s = "R439Again"; break;
                        case 1258 : s = "telCow"; break;
                        case 1259 : s = "iR439"; break;
                        case 1260 : s = "antiWolf"; break;
                        case 1261 : s = "knowingClan"; break;
                        case 1262 : s = "nixClan"; break;
                        case 1263 : s = "warner"; break;
                        case 1264 : s = "halfPeaceClan"; break;
                        case 1265 : s = "R459Again"; break;
                        case 1266 : s = "R459Clan"; break;
                        case 1267 : s = "maliaSacrifices"; break;
                        case 1268 : s = "R460"; break;
                        case 1269 : s = "R460a"; break;
                        case 1270 : s = "ringMakeupBonus"; break;
                        case 1271 : s = "arokaWarriors"; break;
                        case 1272 : s = "bH1"; break;
                        case 1273 : s = "painWound"; break;
                        case 1274 : s = "issariesRole"; break;
                        case 1275 : s = "uroxRole"; break;
                        case 1276 : s = "gods"; break;
                        case 1277 : s = "mysteryBonus"; break;
                        case 1278 : s = "bH2"; break;
                        case 1279 : s = "elmalProtector"; break;
                        case 1280 : s = "lostPriestess"; break;
                        case 1281 : s = "horseMortality"; break;
                        case 1282 : s = "bH3"; break;
                        case 1283 : s = "aldryamiFriend"; break;
                        case 1284 : s = "barntarRescued"; break;
                        case 1285 : s = "esraRescued"; break;
                        case 1286 : s = "highCost"; break;
                        case 1287 : s = "uraldaRescued"; break;
                        case 1288 : s = "lostWounds"; break;
                        case 1289 : s = "stillLost"; break;
                        case 1290 : s = "noDrought"; break;
                        case 1291 : s = "bH4"; break;
                        case 1292 : s = "uraldaPenalty"; break;
                        case 1293 : s = "bH5"; break;
                        case 1294 : s = "msb"; break;
                        case 1295 : s = "sacPoints"; break;
                        case 1296 : s = "twoLegAffront"; break;
                        case 1297 : s = "twoLegWatch"; break;
                        case 1298 : s = "wounds"; break;
                        case 1299 : s = "omen"; break;
                        case 1300 : s = "juju"; break;
                        case 1301 : s = "hoodoo"; break;
                        case 1302 : s = "bH7"; break;
                        case 1303 : s = "h8monster"; break;
                        case 1304 : s = "hitPoints"; break;
                        case 1305 : s = "elmalPatrols"; break;
                        case 1306 : s = "fortificationBonus"; break;
                        case 1307 : s = "bH9"; break;
                        case 1308 : s = "yinkinSpirit"; break;
                        case 1309 : s = "yinkinHunting"; break;
                        case 1310 : s = "yinkinMilk"; break;
                        }
                        s = SPrintf(s, "%s=%i·%i·%i", s, v.Value, v.Short, v.Bool);
                        return s;
                        }

                        string TREASUREread (TREASURE &t) { return TreasureIdx(t.Idx, t.Qt); }
                        string ONSALEread (ONSALE &t) { return TreasureIdx(t.Idx, t.Qt); }

                        string TreasureIdx (int Idx, int Qt) { string s;
                        switch (Idx) {
                        case 1 : s = "Alynx Log"; break;
                        case 2 : s = "Amulet of Consolation"; break;
                        case 3 : s = "Arim's Cup"; break;
                        case 4 : s = "Bag of Friendship"; break;
                        case 5 : s = "Bag of Winds"; break;
                        case 6 : s = "Bagpipes of Ronskei"; break;
                        case 7 : s = "Band of One Hundred"; break;
                        case 8 : s = "Earthshaker Battle Unit"; break;
                        case 9 : s = "Beard of Lhankor Mhy"; break;
                        case 10 : s = "Bell of Uralda"; break;
                        case 11 : s = "Bit of Kargzant"; break;
                        case 12 : s = "Bit That Bound Vivamort"; break;
                        case 13 : s = "Blacktail the Bull"; break;
                        case 14 : s = "Black Spear"; break;
                        case 15 : s = "Board of Nails"; break;
                        case 16 : s = "Bullroarer"; break;
                        case 17 : s = "Burning Standard"; break;
                        case 18 : s = "Captured Spirit"; break;
                        case 19 : s = "Clay Cow"; break;
                        case 20 : s = "Darkwind"; break;
                        case 21 : s = "Dragon Cart"; break;
                        case 22 : s = "Dragonewt Armor"; break;
                        case 23 : s = "Dragontooth Spear"; break;
                        case 24 : s = "Dwarf Containers"; break;
                        case 25 : s = "Eiritha's Paps"; break;
                        case 26 : s = "Eiritha's Switch"; break;
                        case 27 : s = "Elmal's Amber"; break;
                        case 28 : s = "Ernalda's Boots"; break;
                        case 29 : s = "Ernalda's Oven"; break;
                        case 30 : s = "Esra's Basket"; break;
                        case 31 : s = "Eurmal's Balls"; break;
                        case 32 : s = "Eurmal's Shield"; break;
                        case 33 : s = "Eye Mirror"; break;
                        case 34 : s = "Farwalk Sandals"; break;
                        case 35 : s = "Fear Spirits"; break;
                        case 36 : s = "First Arrow"; break;
                        case 37 : s = "Flesh Man"; break;
                        case 38 : s = "Footprints of the Wyrm"; break;
                        case 39 : s = "Son of Blacktail"; break;
                        case 40 : s = "Garland of Reeds"; break;
                        case 41 : s = "Glass Coin"; break;
                        case 42 : s = "Godbone"; break;
                        case 43 : s = "Goldeneye Horse"; break;
                        case 44 : s = "Golden Horseshoes"; break;
                        case 45 : s = "Golden Wheat Sheaf"; break;
                        case 46 : s = "Grey Net"; break;
                        case 47 : s = "Greysage Mask"; break;
                        case 48 : s = "Gustbran's Wheel"; break;
                        case 49 : s = "Hammer of Urox"; break;
                        case 50 : s = "Hate Torch"; break;
                        case 51 : s = "Head of Markanth"; break;
                        case 52 : s = "Helm of Karse"; break;
                        case 53 : s = "Heort's Balm"; break;
                        case 54 : s = "Heort's Stone"; break;
                        case 55 : s = "Horse Skull"; break;
                        case 56 : s = "Horse-Spawn Bowl"; break;
                        case 57 : s = "Humakt's Helm"; break;
                        case 58 : s = "Humakt's Raven Banner"; break;
                        case 59 : s = "Humakt's Shield"; break;
                        case 60 : s = "Humakt's Sword"; break;
                        case 61 : s = "Humakt's Warning Rune"; break;
                        case 62 : s = "Hunting Alynx"; break;
                        case 63 : s = "Hunting Horn"; break;
                        case 64 : s = "Ironhoof's Chain"; break;
                        case 65 : s = "Iron Plow"; break;
                        case 66 : s = "Iron Spike"; break;
                        case 67 : s = "Jar of Gods' Earth"; break;
                        case 68 : s = "Kero Fin Ice"; break;
                        case 69 : s = "Kero Fin Kite"; break;
                        case 70 : s = "Klanth of Orlanth"; break;
                        case 71 : s = "Lead Eyes"; break;
                        case 72 : s = "Magnet of Mostal"; break;
                        case 73 : s = "Many-Birthing Cow"; break;
                        case 74 : s = "Mist Paper"; break;
                        case 75 : s = "Moldy Book"; break;
                        case 76 : s = "Motion Rune Banner"; break;
                        case 77 : s = "Necklace of Axes"; break;
                        case 78 : s = "Orlanth's Rattle"; break;
                        case 79 : s = "Perpetual Flour"; break;
                        case 80 : s = "Poem Which Must Be Eaten"; break;
                        case 81 : s = "Quivin's Torc"; break;
                        case 82 : s = "Ralian Jewelry"; break;
                        case 83 : s = "Red Leather Mask"; break;
                        case 84 : s = "Ring Made From Vingkot's Crown"; break;
                        case 85 : s = "Sacred Clod"; break;
                        case 86 : s = "Sacred Mark of Vingkot"; break;
                        case 87 : s = "Scarf of Seven Runes"; break;
                        case 88 : s = "Shifting Statue"; break;
                        case 89 : s = "Shimmering Cloak"; break;
                        case 90 : s = "Silver Dragon"; break;
                        case 91 : s = "Silver Lips of Anriar"; break;
                        case 92 : s = "Silver Sheep"; break;
                        case 93 : s = "Silver Tongue"; break;
                        case 94 : s = "Son of Blacktail"; break;
                        case 95 : s = "Sorcerous Implements"; break;
                        case 96 : s = "Speaking Cone"; break;
                        case 97 : s = "Spirit Fetch"; break;
                        case 98 : s = "Splendorbread"; break;
                        case 99 : s = "Staff of Fortune"; break;
                        case 100 : s = "Strong Man's Toothpick"; break;
                        case 101 : s = "Tarshite Woad"; break;
                        case 102 : s = "Thanestriker"; break;
                        case 103 : s = "Three Bean Broth"; break;
                        case 104 : s = "Tiger's Eye Necklace"; break;
                        case 105 : s = "Torc of Honor"; break;
                        case 106 : s = "Tornado Rope"; break;
                        case 107 : s = "Earthshaker Plow Team"; break;
                        case 108 : s = "Tube of Truth-Seeking"; break;
                        case 109 : s = "Uralda's Milk Pot"; break;
                        case 110 : s = "Vargast's Ring"; break;
                        case 111 : s = "Veil of Chalana Arroy"; break;
                        case 112 : s = "Vinga's Comb"; break;
                        case 113 : s = "Voriof's Flute"; break;
                        case 114 : s = "Voss Varainu Tapestry"; break;
                        case 115 : s = "Whirlwind Jar"; break;
                        case 116 : s = "White Calf"; break;
                        case 117 : s = "Widebrew"; break;
                        case 118 : s = "Winking Sapphire"; break;
                        case 119 : s = "Wolfbane Bush"; break;
                        case 120 : s = "Wyter's Staff"; break;
                        }
                        if (Qt>0) s = "+ " + s;
                        else if (Qt==0) s = "- " + s;
                        return s;
                        }

                        string QUEread (QUE &e) { string s = SPrintf(s, "%i:%s", e.Turns, EventIdx(e.EventIdx)); return s; }
                        string EVENTread (EVENT &e) { string s = SPrintf(s, "%s=%i·%X", EventIdx(e.Idx+1), Events.Times.Event[e.Idx].Value, Events.Years.Event[e.Idx].Value); return s;}

                        string EventIdx (short Idx) { string s;
                        switch (Idx) {
                        case 1 : s = "code_InitialResults"; break;
                        case 2 : s = "news_Battle"; break;
                        case 3 : s = "news_NoBattle"; break;
                        case 4 : s = "news_CattleRaidFailure"; break;
                        case 5 : s = "news_CattleRaidWin"; break;
                        case 6 : s = "code_CattleRaidRepercussions"; break;
                        case 7 : s = "news_DarkSeasonFailure"; break;
                        case 8 : s = "news_EarthSeasonRefusal"; break;
                        case 9 : s = "news_SeaSeasonRefusal"; break;
                        case 10 : s = "news_TooFewRaiders"; break;
                        case 11 : s = "news_CattleRaided"; break;
                        case 12 : s = "news_CattleRaidedWhileRaiding"; break;
                        case 13 : s = "news_DistantRaid"; break;
                        case 14 : s = "news_Prisoners"; break;
                        case 15 : s = "news_RansomOffer"; break;
                        case 16 : s = "news_ThrallmakingComplaint"; break;
                        case 17 : s = "news_WeakBattleMagic"; break;
                        case 18 : s = "battle_AlliesInTrouble"; break;
                        case 19 : s = "code_AlliesBreakOff"; break;
                        case 20 : s = "news_AlliesBreakOff"; break;
                        case 21 : s = "battle_Alone"; break;
                        case 22 : s = "battle_ChanceToHeal"; break;
                        case 23 : s = "code_AllBetter"; break;
                        case 24 : s = "battle_DitchWar"; break;
                        case 25 : s = "news_DitchResignation"; break;
                        case 26 : s = "battle_ElmalDefender"; break;
                        case 27 : s = "battle_EnemyFlyer"; break;
                        case 28 : s = "battle_HesGoneBerserk"; break;
                        case 29 : s = "battle_HorseSpawn"; break;
                        case 30 : s = "battle_HumaktiDuel"; break;
                        case 31 : s = "battle_HumaktsRavenBanner"; break;
                        case 32 : s = "code_HeroismOK"; break;
                        case 33 : s = "battle_JavelinDuel"; break;
                        case 34 : s = "battle_OneChanceForGlory"; break;
                        case 35 : s = "battle_SneakyHorseSpawn"; break;
                        case 36 : s = "code_TenPathBattle"; break;
                        case 37 : s = "battle_TenPathBattle"; break;
                        case 38 : s = "battle_TenPathBattle_2"; break;
                        case 39 : s = "battle_ThereHeIs"; break;
                        case 40 : s = "code_Trolls"; break;
                        case 41 : s = "battle_Trolls"; break;
                        case 42 : s = "battle_WeSkirmishAndGetAShot"; break;
                        case 43 : s = "battle_WeWaver"; break;
                        case 44 : s = "battle_WoundedHero"; break;
                        case 45 : s = "news_CaptiveExchange"; break;
                        case 46 : s = "news_WeBlastedEarth"; break;
                        case 47 : s = "news_WePlaguedThem"; break;
                        case 48 : s = "news_BitterlyColdWinter"; break;
                        case 49 : s = "news_BoughtPigs"; break;
                        case 50 : s = "news_BoughtSheep"; break;
                        case 51 : s = "news_CowTrouble"; break;
                        case 52 : s = "news_FarmersFound"; break;
                        case 53 : s = "news_FarmersNotFound"; break;
                        case 54 : s = "news_HarvestBad"; break;
                        case 55 : s = "news_HarvestAverage"; break;
                        case 56 : s = "news_HarvestGood"; break;
                        case 57 : s = "news_InsufficientFood"; break;
                        case 58 : s = "news_NoEmissary"; break;
                        case 59 : s = "news_NoExploring"; break;
                        case 60 : s = "news_NoFarmWorkers"; break;
                        case 61 : s = "news_NoFieldWorkers"; break;
                        case 62 : s = "news_NoHerdWorkers"; break;
                        case 63 : s = "news_NoHeroquest"; break;
                        case 64 : s = "news_NotEnoughWildland"; break;
                        case 65 : s = "news_CantSupportTrade"; break;
                        case 66 : s = "news_NoTrade"; break;
                        case 67 : s = "news_PigTrouble"; break;
                        case 68 : s = "news_NewHero"; break;
                        case 69 : s = "news_OldAge"; break;
                        case 70 : s = "news_ShrineDisrepair"; break;
                        case 71 : s = "news_Starvation"; break;
                        case 72 : s = "news_SummonsOfEvil"; break;
                        case 73 : s = "code_ClearSummonsOfEvil"; break;
                        case 74 : s = "news_TempleDisrepair"; break;
                        case 75 : s = "news_ThrallsLeave"; break;
                        case 76 : s = "news_ThrallsStay"; break;
                        case 77 : s = "news_FavorCattle"; break;
                        case 78 : s = "news_DuckCattle"; break;
                        case 79 : s = "mission_FavorCattle"; break;
                        case 80 : s = "mission_AllyCattle"; break;
                        case 81 : s = "mission_FavorFood"; break;
                        case 82 : s = "mission_AllyFood"; break;
                        case 83 : s = "news_FavorFood"; break;
                        case 84 : s = "mission_FavorInformation"; break;
                        case 85 : s = "news_FavorInformation"; break;
                        case 86 : s = "mission_FavorMagic"; break;
                        case 87 : s = "mission_AllyMagic"; break;
                        case 88 : s = "news_FavorMagic"; break;
                        case 89 : s = "code_DemandTribute"; break;
                        case 90 : s = "news_NeverTribute"; break;
                        case 91 : s = "news_PayingTribute"; break;
                        case 92 : s = "scene_NoAnnualTribute"; break;
                        case 93 : s = "mission_DemandTribute"; break;
                        case 94 : s = "news_GiveGifts"; break;
                        case 95 : s = "news_GiftsToFeuders"; break;
                        case 96 : s = "mission_ProposeAlliance"; break;
                        case 97 : s = "news_DuckAlliance"; break;
                        case 98 : s = "news_ProposeAlliance"; break;
                        case 99 : s = "mission_ResolveFeud"; break;
                        case 100 : s = "mission_TradeTreasure"; break;
                        case 101 : s = "news_DuckTreasure"; break;
                        case 102 : s = "news_EmissaryAttacked"; break;
                        case 103 : s = "news_Exploration"; break;
                        case 104 : s = "news_TricksterEmissary"; break;
                        case 105 : s = "news_ExplorationAtHome"; break;
                        case 106 : s = "news_ExplorationAmulets"; break;
                        case 107 : s = "news_ExplorationGems"; break;
                        case 108 : s = "news_ExplorationGreenware"; break;
                        case 109 : s = "news_ExplorationIron"; break;
                        case 110 : s = "news_ExplorationIvory"; break;
                        case 111 : s = "news_ExplorationAttacked"; break;
                        case 112 : s = "news_ExplorationLost"; break;
                        case 113 : s = "news_LostPartyFound"; break;
                        case 114 : s = "news_FoundBagpipes"; break;
                        case 115 : s = "news_FoundBullroarer"; break;
                        case 116 : s = "news_FoundCrystal"; break;
                        case 117 : s = "news_FoundFearSpirits"; break;
                        case 118 : s = "news_FoundHead"; break;
                        case 119 : s = "news_FoundNet"; break;
                        case 120 : s = "news_FoundStandard"; break;
                        case 121 : s = "news_FF2ExploringSnakepipeHollow"; break;
                        case 122 : s = "news_FF3ExploringGrazelands"; break;
                        case 123 : s = "news_FF4ExploringPrax"; break;
                        case 124 : s = "news_FF5ExploringDragonewtWildlands"; break;
                        case 125 : s = "news_FF6ExploringTarsh"; break;
                        case 126 : s = "news_FF6TarshNewsB"; break;
                        case 127 : s = "news_FF6TarshGossip"; break;
                        case 128 : s = "news_FF7ExploringStinkingForest"; break;
                        case 129 : s = "news_FF8ExploringBeastValley"; break;
                        case 130 : s = "news_FF9ExploringKeroFin"; break;
                        case 131 : s = "news_FF10SoloExploration"; break;
                        case 132 : s = "news_FF37GrazerNotMetExploration"; break;
                        case 133 : s = "news_FF37GrazerNotMetCaptured"; break;
                        case 134 : s = "news_FF38HorseSpawnNamed"; break;
                        case 135 : s = "news_TricksterTrade"; break;
                        case 136 : s = "news_Trade"; break;
                        case 137 : s = "news_CaravanRobbed"; break;
                        case 138 : s = "mission_CaravanBanditAttack"; break;
                        case 139 : s = "mission_EmissaryBanditAttack"; break;
                        case 140 : s = "news_CaravanInWinter"; break;
                        case 141 : s = "news_EmissaryInWinter"; break;
                        case 142 : s = "mission_ExplorationBanditAttack"; break;
                        case 143 : s = "mission_CaravanClanAttack"; break;
                        case 144 : s = "mission_EmissaryClanAttack"; break;
                        case 145 : s = "news_FeudStarted"; break;
                        case 146 : s = "news_HumanSacrificeComplaint"; break;
                        case 147 : s = "news_HumanSacrificeResignation"; break;
                        case 148 : s = "news_NeedNewKing"; break;
                        case 149 : s = "news_NoChief"; break;
                        case 150 : s = "news_NoPatrols"; break;
                        <br/><br/>(Message over 64 KB, truncated)
                      • Alexander G. M. Smith
                        ... I wonder how the original authors came up with all those names. Were there some rules inspired by real world clan names? Names of adventurers in games of
                        Message 11 of 18 , Nov 4 6:14 PM
                          outis02 wrote on Wed, 04 Nov 2009 15:10:35 +0000:
                          > Might as well just post the whole thing. Here is the included KoDPinc.bt,
                          > which is just a list of variable names, event tags, treasures and names.
                          > [...]
                          > string FEMALEread (FEMALE &n) { string s;
                          > switch (n.Idx) {
                          > case 0 : s = "Aransanda"; break;
                          > case 1 : s = "Arene"; break;
                          > case 2 : s = "Arkilla"; break;
                          > case 3 : s = "Beneva"; break;
                          > case 4 : s = "Brenna"; break;
                          > case 5 : s = "Desrada"; break;

                          I wonder how the original authors came up with all those names. Were there
                          some rules inspired by real world clan names? Names of adventurers in games
                          of RuneQuest?

                          - Alex

                          P.S. Googling for Aransanda Arene Arkilla Beneva Brenna Desrada lead me to
                          http://mythologic.info/questlines/namegen.html (and a page where someone
                          posted their KoDP log text). Guess that partly answers my question.
                        • David Dunham
                          Alex ... I think they all came from King of Sartar, which was then the definitive sourcebook on the Dragon Pass region. -- David Dunham A Sharp, LLC
                          Message 12 of 18 , Nov 5 7:56 AM
                            Alex

                            >I wonder how the original authors came up with all those names. Were there
                            >some rules inspired by real world clan names? Names of adventurers in games
                            >of RuneQuest?

                            I think they all came from King of Sartar, which was then the
                            definitive sourcebook on the Dragon Pass region.
                            --

                            David Dunham A Sharp, LLC
                            Voice/Fax: 206 783 7404 http://a-sharp.com
                            Efficiency is intelligent laziness.
                          • Charles
                            ... 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
                            Message 13 of 18 , Dec 8, 2009
                              > 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
                            • outis02
                              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
                              Message 14 of 18 , Dec 8, 2009
                                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.


                                --- In KingOfDragonPass@yahoogroups.com, "Charles" <usetex@...> wrote:
                                > 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" :->

                                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
                              • David Dunham
                                ... If you look at a detailed map of Dragon Pass (like in the HQ products Dragon Pass or Sartar), those are the names of the places. -- David Dunham
                                Message 15 of 18 , Dec 11, 2009
                                  >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.

                                  If you look at a detailed map of Dragon Pass (like in the HQ products
                                  Dragon Pass or Sartar), those are the names of the places.
                                  --

                                  David Dunham Creator of Jigami, a unique game
                                  for iPhone/iPod touch http://a-sharp.com/jigami/
                                • outis02
                                  This is the updated KoDP savegame template file, for anyone interested. It s now slightly better formatted for viewing. As with before, please ignore all the
                                  Message 16 of 18 , Jan 24, 2010
                                    This is the updated KoDP savegame template file, for anyone interested. It's now slightly better formatted for viewing. As with before, please ignore all the SetColor functions.

                                    *********************************

                                    BigEndian(); BitfieldRightToLeft();
                                    enum <byte> BOOL { False, True=0xFF};
                                    local int i = 0;

                                    ////////////////////////////////////////////////////////////////STR////////////////////////////////////////////////////////////////
                                    typedef struct {
                                    SetForeColor(cPurple);
                                    short len;
                                    SetForeColor(cDkPurple);
                                    local int64 pos = FTell();
                                    if (len) uchar Str[len];
                                    SetForeColor(cNone);
                                    } STR <read=STRread, write=STRwrite>;

                                    ////////////////////////////////////////////////////////////////ARRAY////////////////////////////////////////////////////////////////
                                    typedef struct { local int64 pos = FTell();
                                    SetForeColor(cWhite);
                                    short ct;
                                    SetForeColor(cDkBlue);
                                    if (ct) short Int[ct] <format=hex>;
                                    SetForeColor(cNone);
                                    } ARRAY <optimize=false, read=ARRAYread>;

                                    ////////////////////////////////////////////////////////////////POP////////////////////////////////////////////////////////////////
                                    typedef struct { short Healthy, Absent, Sick, Wounded; } POP <read=POPread>;

                                    ////////////////////////////////////////////////////////////////GODS////////////////////////////////////////////////////////////////
                                    typedef struct { local int64 pos = FTell();
                                    long :1, Ancestors :1, ArganArgar:1, Barntar :1, ChalanaArroy:1, Elmal :1, Ernalda :1, Eurmal :1,
                                    Humakt :1, Issaries :1, KeroFin :1, LhankorMhy:1, Malia :1, MaranGor:1, Odayla :1, Orlanth :1,
                                    TarardRiel:1, Uralda :1, Urox :1, Vinga :1, WindSpirits :1;
                                    } GODS <read=GODSread>;

                                    ////////////////////////////////////////////////////////////////RAID////////////////////////////////////////////////////////////////
                                    typedef struct {
                                    typedef short CLANIDX <read=CLANIDXread>;
                                    CLANIDX ClanIdx;
                                    enum <short> { Cattle=0xFFF7, Battle=0xFFFC } Type <format=hex>;
                                    typedef short DATE <read=DATEread>;
                                    DATE Date;
                                    enum <short> { disengaged, win_caught, loss_stole=0xFFFF } Result <format=hex>;
                                    } RAID <read=RAIDread>;

                                    ////////////////////////////////////////////////////////////////BALANCE////////////////////////////////////////////////////////////////
                                    enum <short> BALANCE { War, Balanced, Peace };

                                    ////////////////////////////////////////////////////////////////TRAIT////////////////////////////////////////////////////////////////
                                    typedef struct { local int64 pos = FTell();
                                    // Trait=sure, trait=not sure about the name, _trait=not sure at all
                                    long AntiAldryami:1, AntiUndead:1,
                                    _bully:1, //bully? ;war: raid feuding neighbours; diplo: we can survive alone; reorg: the ring needs me; die in rage trifles
                                    _Courageous:1, //dictatorial, tribute: contest; kallyr: toast; reorg: the ring needs me; die great adventure
                                    _confident:1, //reorg: I can...; die surprised longevity
                                    Coward:1, //tribute: avoid contest; trade: fear of ambush; magic: nervous of gods; die lost heart; blackspear search: must give blessing
                                    _17:1, //forgetful? Illator: reminds...sorry
                                    critical:1, //die admit enjoy; Einarth: anti-tribe; offend king event?

                                    crybaby:1, //tribute: can't win contest; die foolish worry; Robarth: this is my fault; farm: "we failed our ppl"
                                    _22:1, //daring?; Einarth: new isn't bad
                                    _23:1, //cites lore?
                                    _24:1,
                                    Matriarchal:1, mindless:1, //say crazy things, proverbial
                                    Miserly:1, Patriarchal:1,

                                    peaceful:1, //peaceful? skull: trade to foster harmony
                                    Pious:1, Poet:1, pragmatic:1, //tribute: don't threaten; die no trouble
                                    ProDragonewt:1, Proverbial:1,
                                    royal:1, //royal? diplo: gift neighbours to form tribe; trade: less trade, go explore (per omens); tribute: if break vow>disastrous; Einarth: hurry!
                                    Spendthrift:1,

                                    _scornful:1, //stupid? spiteful? stubborn?;lousy XXX!; tribute: "whatever"
                                    _42:1, //blackspear search: if bless->all go->forbid
                                    _43:1, //spiritual?; alliance: worship; magic: build more temple
                                    told:1, //"told you..."; war: "told you XXX were gonna raid us!"
                                    _trader:1, //trade: more treasure
                                    _tribelike:1, //alliance: tribe
                                    warmonger:1, //die outlive enemy; clan: reorg as war clan; surprise feud event
                                    _48:1;
                                    //duck attitude? literate? impious? //magic?
                                    } TRAIT <read=TRAITread>;

                                    string TRAITread (TRAIT &t) { string s;
                                    if (t.AntiAldryami) s += "·xA"; if (t.AntiUndead) s += "·xU";
                                    if (t._bully) s += "·?bul"; if (t._Courageous) s += "·?crg";
                                    if (t._confident) s += "·cf"; if (t.Coward) s += "·Cw";
                                    if (t._17) s += "·17"; if (t.critical) s += "·?crt";

                                    if (t.crybaby) s += "·?cry"; if (t._22) s += "·22";
                                    if (t._23) s += "·23"; if (t._24) s += "·24";
                                    if (t.Matriarchal) s += "·Ma"; if (t.mindless) s += "·Md";
                                    if (t.Miserly) s += "·Ms"; if (t.Patriarchal) s += "·Pa";

                                    if (t.peaceful) s += "·Pc"; if (t.Pious) s += "·Pi";
                                    if (t.Poet) s += "·Pt"; if (t.pragmatic) s += "·Pg";
                                    if (t.ProDragonewt) s += "·oD"; if (t.Proverbial) s += "·Pv";
                                    if (t.royal) s += "·R"; if (t.Spendthrift) s += "·Sp";

                                    if (t._scornful) s += "·?sc"; if (t._42) s += "·42";
                                    if (t._43) s += "·?tmpl"; if (t.told) s += "·to";
                                    if (t._trader) s += "·?trd"; if (t._tribelike) s += "·?trb";
                                    if (t.warmonger) s += "·W"; if (t._48) s += "·48";
                                    return s = SubStr(s, 1);
                                    }

                                    ////////////////////////////////////////////////////////////////LEADER////////////////////////////////////////////////////////////////
                                    typedef struct {
                                    SetBackColor(cDkGray);
                                    short Age;
                                    SetBackColor(cLtPurple);
                                    CLANIDX ClanIdx;
                                    enum <short> { Male=1, Female } Gender;
                                    short TurnsUnavailable; //gone from tula or other reasons, cannot work
                                    BOOL Heroic; //GoodNews "heroic level"
                                    enum <short> { Home, emissary, explorer=13, caravan=16, enthralled=18, Dead } Location; //enthralled by horsespawn
                                    STR Name;
                                    char Picture[12];
                                    GODS Religion;
                                    short Seat, Sick;
                                    typedef struct { SetForeColor(cDkBlue); LittleEndian();
                                    double Animals, Bargaining, Combat, Custom, Leadership, Magic, Plant;
                                    BigEndian(); } SKILLS <read=SKILLSread>;
                                    SKILLS Skills;
                                    enum <short> { Alive, Dead_tmp1, Dead_tmp2, Dead_perm } State;
                                    SetBackColor(cDkRed);
                                    TRAIT Trait;
                                    SetBackColor(cLtPurple);
                                    enum <short> { craft=1, farm, heal, hunter, law, magic, noble, trader, trick, war } Type;
                                    short Wounded, YearsOnRing;
                                    } LEADER <optimize=false, read=LEADERread, write=LEADERwrite>;

                                    ////////////////////////////////////////////////////////////////RITUAL////////////////////////////////////////////////////////////////
                                    typedef struct {
                                    struct { byte Divinition, Protection, SummonsOfEvil, _, _; } Ancestors;
                                    struct { byte _, _, _, _, _; } ArganArgar;
                                    struct { byte Plowsong, Vigor, _, _, _; } Barntar;
                                    struct { byte Curing, Healing, Resurrection, Hope, Mysteries; } ChalanaArroy;
                                    struct { byte Horsefriend, Shield, Steadfast, Sun, Mysteries; } Elmal;
                                    struct { byte BlessChildren, BlessCrops, Preserve, SwineBlessing, Mysteries; } Ernalda;
                                    struct { byte Bless, Curse, _, _, _; } Eurmal;
                                    struct { byte BattleLuck, Morale, Oath, Truesword, Mysteries; } Humakt;
                                    struct { byte Silvertongue, Market, SpareGrain, Trading, Mysteries; } Issaries;
                                    struct { byte MaternalWard, _, _, _, _; } KeroFin;
                                    struct { byte Divination, ClanLore, LawSpeaker, Literacy, Mysteries; } LhankorMhy;
                                    struct { byte Curing, CausePlague, Immunity, _, _; } Malia;
                                    struct { byte BlastEarth, Earthblood, _, _, _; } MaranGor;
                                    struct { byte SureShot, Tracking, FriendOfYinkin, _, _; } Odayla;
                                    struct { byte Lightning, Rain, Thunderstone, Woad, Mysteries; } Orlanth;
                                    struct { byte Watchfulness, _, _, _, _; } TarardRiel;
                                    struct { byte CalfBlessing, MilkBlessing, _, _, Mysteries; } Uralda;
                                    struct { byte Berserker, SenseChaos, SmiteChaos, _, _; } Urox;
                                    struct { byte Fyrdwomen, Pathfinder, _, _, _; } Vinga;
                                    struct { byte _, ListeningWind, SeeingWind, UnderstandingWind, _; } WindSpirits;
                                    } RITUAL <optimize=false>;

                                    //////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
                                    ////////////////////////////////////////////////////////////////HEADER////////////////////////////////////////////////////////////////
                                    //////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
                                    struct {
                                    char Opal[4];
                                    byte __, __, __, __, __, __, __, __;
                                    short Omens, //Omens or seed?
                                    __;
                                    enum <short> { Short=1, Long } Length;
                                    DATE Date;
                                    short Harvest; //1 to 7
                                    } Header;

                                    ////////////////////////////////////////////////////////////////VARS////////////////////////////////////////////////////////////////
                                    local int VarIdx = 0;
                                    struct {
                                    SetForeColor(cWhite);
                                    short ct;
                                    typedef struct {
                                    local int Idx = VarIdx++;
                                    SetForeColor(cBlue);
                                    enum <short> { Leader=0x7FF2, clan, tribe, treasure, leaders=0x7FFA, clans, tribes, treasures, neg=0xFFFF } Class <format=hex>;
                                    SetForeColor(cGray);
                                    short Value, Short;
                                    BOOL Bool;
                                    STR String;
                                    } VAR <optimize=false, read=VARread>;
                                    VAR Var[ct];
                                    } Vars;

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

                                    ////////////////////////////////////////////////////////////////TREASURES////////////////////////////////////////////////////////////////
                                    SetBackColor(cNone);
                                    struct {
                                    short Total;
                                    i = 1;
                                    typedef struct {
                                    local int Idx = i++;
                                    short Qt;
                                    } ONSALE <optimize=false, read=ONSALEread, write=ONSALEwrite>;
                                    ONSALE OnSale[120];
                                    } Treasures;

                                    ////////////////////////////////////////////////////////////////ARRAYS////////////////////////////////////////////////////////////////
                                    struct { ARRAY Array[12]; } __arrays; //randomized at gamestart, all empty arrays for Tutorial and Opal

                                    ////////////////////////////////////////////////////////////////LEADERNAMES////////////////////////////////////////////////////////////////
                                    struct { i = 0;
                                    short females;
                                    typedef struct { local int Idx = i++; short Used; } FEMALE <optimize=false, read=FEMALEread>;
                                    if (females) FEMALE Female[females];
                                    short males;
                                    typedef struct { local int Idx = i++ - females; short Used; } MALE <optimize=false, read=MALEread>;
                                    if (males) MALE Male[males];
                                    } LeaderNames;

                                    ////////////////////////////////////////////////////////////////CLANS////////////////////////////////////////////////////////////////
                                    struct {
                                    SetBackColor(cLtBlue);
                                    short ct;
                                    SetForeColor(cNone);
                                    ////////////////////////////////////////////////////////////////CLAN A-L////////////////////////////////////////////////////////////////
                                    typedef struct {
                                    SetBackColor(cLtBlue);
                                    struct {
                                    BOOL __Exists;
                                    SetForeColor(cDkGreen);
                                    short __xAB; //short, alternates 1/0 from the first clan
                                    SetForeColor(cNone);
                                    short Barley;
                                    BOOL BasicClan; //True for the starting 26 human clans
                                    short Cattle;
                                    typedef struct { enum <short> { low=1, mid, high, pc=0xCDCD } ChiefDaring, ChiefGenerosity, ChiefGuile, ChiefPiety; } CHIEF <read=CHIEFread>;
                                    CHIEF Chief;
                                    typedef struct { short Children[15]; } CHILDREN <read=CHILDRENread>;
                                    CHILDREN Children;
                                    enum <short> { Player, Orlanthi, Foreigner } ClanClass; //guessed, affects whether borders are displayed on map
                                    CLANIDX ClanIdx;
                                    BALANCE ClanType;
                                    POP Crafters;
                                    short Cropland;
                                    enum <short> { possible, failed, joined } TribeForm;
                                    STR Description;
                                    POP Farmers;
                                    short Food;
                                    struct { short Ditch:1, Hillfort:1, Ramparts:1, StakePerimeter:1, WoodenStockade:1, StoneWall:1, WatchTower:1, ImprovedStoneWall:1; } Fortifications;
                                    short Goods;
                                    GODS GreatTemples;
                                    short Harvest;
                                    SetForeColor(cDkGreen);
                                    short __xH; //is short
                                    SetForeColor(cNone);
                                    short Horses;
                                    POP Housecarls; //Weaponthanes; //Housecarls
                                    POP Hunters;
                                    SetForeColor(cDkGreen);
                                    short __xHI[20]; //short
                                    SetForeColor(cNone);
                                    short InnerPatrol, KingIdx, KingshipReputation;
                                    SetForeColor(cDkGreen);
                                    short __xKL1; //short
                                    byte __xKL2[10]; //byte
                                    SetForeColor(cNone);
                                    struct { RAID LastRaided, LastRaidedBy; } LastRaids;
                                    SetForeColor(cDkGreen);
                                    short __xL; //LastPeace? 2=marriage alliance, 3=beaten/warned, decreases over time
                                    } AtoL;

                                    ////////////////////////////////////////////////////////////////LEADERS////////////////////////////////////////////////////////////////
                                    struct { SetBackColor(cNone);
                                    short ct;
                                    if (ct) LEADER Leader[ct];
                                    } Leaders;

                                    ////////////////////////////////////////////////////////////////DATA M-R////////////////////////////////////////////////////////////////
                                    struct {
                                    SetBackColor(cLtAqua);
                                    short MaranGorEarthblood;
                                    struct { byte Children, Crops, Diplomacy, Health, Herds, Hunting, Mysteries, Quests, Trade, War, Destiny, Heroism; } Magics;
                                    enum <short> { Ancestors=1, ArganArgar, Barntar, ChalanaArroy, Elmal, Ernalda, Eurmal, Humakt, Issaries, KeroFin, LhankorMhy, Malia, MaranGor, Odayla, Orlanth, TarardRiel, Uralda, Urox, Vinga, WindSpirits } MainDeity;
                                    struct { short Clan, Farmer, Warrior; } Mood;
                                    STR Name;
                                    POP Nobles;
                                    SetForeColor(cDkGreen);
                                    short __xNO; //short
                                    SetForeColor(cNone);
                                    short OuterPatrol, Pasture, Pigs;
                                    struct { short Farmers, Oxen; } Planted;
                                    BOOL PlayerHasThralls;
                                    STR Plural;
                                    short PowerPointsMagic;
                                    struct { enum <byte> { disabled=0xFF } Plain, Fancy, Amulets, Gems, Greenware, Iron, Ivory; } Production;
                                    GODS Protection; //sacrifice to Chalana->toggles Malia
                                    struct {
                                    struct RAIDS {
                                    short ct;
                                    if (ct) RAID Raid[ct];
                                    } Raided;
                                    RAIDS RaidedBy;
                                    } Raids;
                                    short __VictoryScore; //increase over time? increase per raid?
                                    } MtoR;

                                    ////////////////////////////////////////////////////////////////RELATIONS////////////////////////////////////////////////////////////////
                                    SetBackColor(cLtYellow);
                                    struct {
                                    short ct;
                                    typedef struct {
                                    CLANIDX ClanIdx;
                                    short Attitude, __always0, FavorsDueUs, Alliance, Feud;
                                    BOOL Trade, Near, Neighbour; //Near=canRaid (N), Neighbour=canSeize
                                    short __SlightsTribal,
                                    TimesRaidedBy, //negative
                                    __, TimesRaided, __, Slights;
                                    struct { short __wePayTribute, Cattle, Food, Goods; } Tribute;
                                    short __FavorsTribal,
                                    __Flag; //changes whether a clan is displayed
                                    } RELATION <optimize=false, read=RELATIONread, write=RELATIONwrite>;
                                    if (ct) RELATION Relation[ct];
                                    } Relations;
                                    SetBackColor(cNone);

                                    ////////////////////////////////////////////////////////////////DATA R-W////////////////////////////////////////////////////////////////
                                    i = 0;
                                    struct {
                                    SetColor(cNone,cLtAqua);
                                    short RingMemberIdx[7];
                                    BOOL RoyalClan;
                                    short __RoyalJealousy, //=1 upon Einarth Milk-Eyes prophecy, =1/2 upon new npc tribes formation, =0 upon moot for new king
                                    Rye;
                                    struct { RITUAL Sacrifice, Known; } Rituals;
                                    struct { byte Ancestors, ArganArgar, Barntar, ChalanaArroy, Elmal, Ernalda, Eurmal, Humakt, Issaries, KeroFin, LhankorMhy, Malia, MaranGor, Odayla, Orlanth, TarardRiel, Uralda, Urox, Vinga, WindSpirits; } Sacrificed;
                                    short Sheep;
                                    GODS Shrines;
                                    short __shrine__; //shorts
                                    short __shrine__; //shorts
                                    SetColor(cNone,cLtGreen);
                                    RITUAL ShrinePermanent;
                                    SetColor(cNone,cLtAqua);
                                    GODS Temples;
                                    POP Thralls;
                                    BOOL ThrallsOkay;
                                    struct { i = 1;
                                    short ct;
                                    typedef struct { local int Idx = i++; short Qt, WearerIdx; } TREASURE <optimize=false, read=TREASUREread, write=TREASUREwrite>;
                                    if (ct) TREASURE Treasure[ct];
                                    } Treasures;
                                    short TribeIdx,
                                    __xTW,
                                    Wildlands, Wheat;
                                    } RtoW;
                                    ARRAY Zones; //display only
                                    ////////////////////////////////////////////////////////////////HISTORY////////////////////////////////////////////////////////////////
                                    if (AtoL.ClanIdx==1) struct { //all data lengths confirmed
                                    SetBackColor(cNone);
                                    short GoodsProduced;
                                    enum <short> { ancestors=1, elmal, urox, odayla, ernalda, orlanth, issaries, lhankormhy, chalanaarroy, uralda } Awakened;
                                    SetForeColor(cDkGreen);
                                    short __, __; //short
                                    SetForeColor(cNone);
                                    GODS DeitiesKnown;
                                    enum <short> { Battle_of_Extinguishing_Field=1, Hundred_Day_Hunt, Jesteds_Settlement, Procession_of_Animals, Harnessed_Oxen, Hidden_Place, Marking_Bone, First_Pot, Clan_Making_Dance } EarliestEvent;
                                    DATE EmissaryLast, ExploreLast;
                                    BOOL FirstYear;
                                    struct { short Ate, Produced, Spoilage; } Food;
                                    BOOL EarthRaided;
                                    SetForeColor(cDkGreen);
                                    BOOL __bool, __bool;
                                    SetForeColor(cNone);
                                    DATE LastHunterAssign, LastCarlShortage;
                                    enum <short> { needed=1, more, lots, huge } LandClaim;
                                    DATE __LastMission; //last diplo/trade mission, not sure
                                    short __YearNow; //short
                                    enum <short> { merits=1, generous, enemies, friends } TribePolicy;
                                    SetForeColor(cDkGreen);
                                    short __; //short
                                    SetForeColor(cNone);
                                    short BabiesBorn;
                                    BALANCE ClanType;
                                    SetForeColor(cDkGreen);
                                    short __; //short
                                    DATE __DateLastTrade; //not sure
                                    SetForeColor(cNone);
                                    BOOL SeaRaided;
                                    struct { short Cattle,
                                    __food, __goods, //both always 0xCDCD, just guessing from context
                                    Horses, Pigs, Population, Sheep; } Resources;
                                    SetForeColor(cDkGreen);
                                    long __long; //long
                                    SetForeColor(cNone);
                                    DATE LastHeroQuest;
                                    struct { BOOL ChalanaArroy, Elmal, Ernalda, Humakt, Issaries, LhankorMhy, StormTribe, Orlanth, Uralda; } HeroQuest;
                                    SetForeColor(cDkGreen);
                                    BOOL __bool;
                                    SetForeColor(cNone);
                                    short MarketProfit;
                                    SetForeColor(cDkGreen);
                                    DATE __GameStart;
                                    short __; //short
                                    SetForeColor(cNone);
                                    struct { enum <short> { simple=1, full, deeper=4 } HowBegan, SwordStory, Contests, StormAge, StormTribe, Humakt, Issaries, LhankorMhy, Orlanth, JusticeBringer, ChalanaArroy, GreatDarkness, Elmal, Uralda, Ernalda; } Myth;
                                    //local string s = SPrintf(s, "History= %i, %i", __[0], __[2]); Printf(s);
                                    } History;
                                    } CLAN <optimize=false, read=CLANread, write=CLANwrite>;
                                    if (ct) CLAN Clan[ct] <optimize=false>;
                                    } Clans;
                                    SetBackColor(cNone);

                                    //////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
                                    struct {
                                    short __LunarWar, //=0 gamestart, =2 upon Tarsh Illastor recruit event for Lunar war
                                    __; //=-1 always
                                    } __shorts;

                                    ////////////////////////////////////////////////////////////////CLANNAMES////////////////////////////////////////////////////////////////
                                    struct {
                                    typedef struct { short Name; } CLANNAME <optimize=false, read=CLANNAMEread>;
                                    struct {
                                    short ct;
                                    if (ct) CLANNAME Clan[ct];
                                    } ClanName;

                                    short count;
                                    byte __byte[7];
                                    STR __array;
                                    struct {
                                    short ct;
                                    if (ct) CLANNAME Clan[ct];
                                    } ClanPlural;
                                    } ClanNames;

                                    ////////////////////////////////////////////////////////////////TRIBES////////////////////////////////////////////////////////////////
                                    SetBackColor(cLtRed);

                                    struct {
                                    short ct;
                                    typedef struct {
                                    DATE LastElection;
                                    BOOL __hasKing;
                                    STR Name;
                                    CLANIDX RoyalClanIdx;
                                    short __short; //always0
                                    struct {
                                    local int64 pos = FTell();
                                    short ct;
                                    if (ct) struct {
                                    CLANIDX ClanIdx;
                                    DATE DateJoined;
                                    } Clan[ct];
                                    } Tulas;
                                    short __short; //always0
                                    VAR Var;
                                    } TRIBE <optimize=false, read=TRIBEread>;
                                    TRIBE Tribe[ct];
                                    } Tribes;
                                    SetBackColor(cNone);

                                    ////////////////////////////////////////////////////////////////?////////////////////////////////////////////////////////////////
                                    //struct {
                                    typedef struct {
                                    SetBackColor(cLtYellow);
                                    short __[5]; //tribes related? _x1[0]==-1 until tribe formed
                                    } __SHORT <read=SHORTread>;
                                    __SHORT __short_5;
                                    typedef struct {
                                    SetBackColor(cLtPurple);
                                    BOOL __[53];
                                    } __BOOL <read=BOOLread>;
                                    __BOOL __bool_53;
                                    //SetBackColor(cNone);
                                    //} _static; //always same value at gamestart (not randomized)

                                    ////////////////////////////////////////////////////////////////EVENTS////////////////////////////////////////////////////////////////
                                    SetBackColor(cLtBlue);
                                    struct {
                                    SetForeColor(cWhite);
                                    short ct;
                                    SetForeColor(cNone);
                                    typedef struct {
                                    short EventIdx;
                                    enum <short> { code, _, explore=0xFFF8, trade=0xFFFA, diplo, raid, event=0xFFFE } Mission <format=hex>;
                                    short Turns, __, LeaderIdx;
                                    CLANIDX ClanIdx;
                                    short __;
                                    struct {
                                    short Weaponthane, Weaponthane, Fyrd, Cattle, Horses, Goods, Food;
                                    enum <short> { Slowly=1, Normally, Quickly } Travel;
                                    short Treasure;
                                    } Convoy;
                                    struct {
                                    short TargetX, TargetY;
                                    enum <short> { ask_cattle_route=1, ask_food, ask_info, ask_magic, tribute, gift, alliance, peace } Goal;
                                    enum <short> { Small=1, Medium, Large, Pathfinder=15328 } Caravan;
                                    } Objective;
                                    } QUE <optimize=false, read=QUEread, write=QUEwrite>;
                                    if (ct) QUE Que[ct];

                                    local int EventIdx = 0;
                                    typedef struct {
                                    local int Idx = EventIdx++;
                                    short Value;
                                    } EVENT <optimize=false, read=EVENTread>;
                                    SetBackColor(cLtGreen);
                                    struct { EventIdx = 0; EVENT Event[1579]; } Times; //how many times it happened?
                                    SetBackColor(cLtAqua);
                                    struct { EventIdx = 0; EVENT Event[1579]; } Years; //upon event, usually set to 0x7FFF, -1 per year

                                    } Events;

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

                                    #include "KoDPinc.bt"
                                  • jtj_pro13
                                    There s a bit of a problem in that the anti-word wrapping line breaking function (thingy) has broken the code, and it s a bit of a bother to sort through that
                                    Message 17 of 18 , Dec 23, 2010
                                      There's a bit of a problem in that the anti-word wrapping line breaking function (thingy) has broken the code, and it's a bit of a bother to sort through that humongous wall of text and remove the line breaks.

                                      --- In KingOfDragonPass@yahoogroups.com, "outis02" <uly@...> wrote:
                                      >
                                      > This is the updated KoDP savegame template file, for anyone interested. It's now slightly better formatted for viewing. As with before, please ignore all the SetColor functions.
                                      > Wall of Code Text
                                    • outis02
                                      Sorry, but I can t help it. Newsgroups are limited this way. The code itself isn t linebreak-sensitive, so you could just remove all line breaks, and then add
                                      Message 18 of 18 , Dec 23, 2010
                                        Sorry, but I can't help it. Newsgroups are limited this way.

                                        The code itself isn't linebreak-sensitive, so you could just remove all line breaks, and then add line breaks to all semicolons. It's easy enough with a decent text editor (such as 010 Editor that I used).

                                        --- In KingOfDragonPass@yahoogroups.com, "jtj_pro13" <jtj_pro13@...> wrote:
                                        >
                                        > There's a bit of a problem in that the anti-word wrapping line breaking function (thingy) has broken the code, and it's a bit of a bother to sort through that humongous wall of text and remove the line breaks.
                                        >
                                        > --- In KingOfDragonPass@yahoogroups.com, "outis02" <uly@> wrote:
                                        > >
                                        > > This is the updated KoDP savegame template file, for anyone interested. It's now slightly better formatted for viewing. As with before, please ignore all the SetColor functions.
                                        > > Wall of Code Text
                                        >
                                      Your message has been successfully submitted and would be delivered to recipients shortly.