Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2001:
[Freeciv-Dev] citymindist patch (V1.0)
Home

[Freeciv-Dev] citymindist patch (V1.0)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] citymindist patch (V1.0)
From: Karl-Ingo Friese <kif@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 27 Jul 2001 15:09:31 +0200 (CEST)

Hello there,

several players complained that the minimum distance between two
cities can only be set via ruleset, making it impossible to change
it "on the fly" in one of the metaserver games. The most common
question before a game starts is: "Is this a non-smallpox server?"
and the most common reason it does not start it all that it isnt.
Usualy the players try to switch to another server, find out that
all non-small-poxes are full, try to gather again on the old,
discover that only half of them (and the ones who were afk and
never left at all) made it back ... well, I guess you understand
the problem now.

With some help of Thue I looked into this problem. Right now, there
are some options one can change as a server variable and some as a
rule  setting. This difference is unnessary and confusing.

However, unifying this and turning all ruleset variables to server
variables which are loaded at server starting (not game starting!)
time, is surely post 1.12.0 stuff. To find a practical solution for
the players, I made a patch that tries to change as less as possible
to the existing system and can count as "a first step" to the
"post 1.12.0"-solution.

A short description of the patch:

It invents a new server (and game) variable called citymindist:

 o citymindist can be only set before a game started
 o range is 0-5 (we use this variable in our LAN games since one year.
   Everything above 5 is unplayable)
 o if citymindist is between 1 and 5, the corresponding ruleset variable
   will be ignored and set to citymindist instead.
 o if citymindist is 0 (default) the variable will be ignored and the
   default variable of the current ruleset will be used.

Example: If citymindist is set to 3 (the best value for interesting
games), there have to be at least two empty fields between to cities
in every direction.

Affected files are:
  common/game.h (server variable, default settings)
  common/game.c (setting default value)
  server/ruleset.c (ignoring ruleset if citymindist!=0)
  server/stdinhand.c (server variable + explain text)
  server/savegame.c (load & save)

I made the (new) patch against the latest CVS and tested it
out _quickly_  ... will do a little more testing now.

It is not very pretty but I cant think of a better solution
without the already mentioned post-1.12.0 one. If you have any
suggestions  how to do things better, I would appreciate if you
let me know!

Hoping it will make it to CVS,
Ingo

PS: I am sorry that there are some unnessary lines in the
    patch file; the editor replaced tabs by spaces.

-- 

Karl-Ingo Friese
kif@xxxxxxxxxxxxxxxxxxxxxxxxxx

Attachment: citymindist.patch
Description: Text document


[Prev in Thread] Current Thread [Next in Thread]