[Freeciv-Dev] Re: [Freeciv] Re: Nations + Feeling
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Jason Dorje Short [07/11/2001 17:51] dijo/said:
>Raimar Falke wrote:
>The problem doesn't end there, though. The nation is stored (and save
>in savegames, and transferred server-client) as an index into the list
>of nations (at least, so the ruleset claims). This means any change to
>the list of nations will seemingly make all saved games incompatible.
What about changing the nation index to a nation ID calculated as a
hash function of the nation's name? (for example: "spanish" -->
75623). This way, the only change that would break the backward
compatibility would be if the nation's name were changed (to
"spaniard", to follow the example)
This hash function should be specially wired so that currently
existing nations get an ID that is equal to the current index.
BTW: raising the max number of nations calls for another issue: the
size of the "select nation" dialog box will be waaaaay bigger.
MIGUEL FARAH // miguel@xxxxx
#include <disclaimer.h> // http://www.nn.cl/~miguel
"God created Arruckus to irritate humanity."
- from "The Wit and Wisdom of Mauve'bib", by the Princess Serutan