Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2001:
[Freeciv-Dev] Re: settler_worker_cost patch
Home

[Freeciv-Dev] Re: settler_worker_cost patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: <freeciv-dev@xxxxxxxxxxx>, <arien_malec@xxxxxxxxx>
Subject: [Freeciv-Dev] Re: settler_worker_cost patch
From: "Michael Kiermaier" <michael.kiermaier@xxxxxxx>
Date: Wed, 7 Mar 2001 11:18:50 +0100

Arien Malec wrote:

>Attached is a patch implementing part of the ICS defeating strategies
>recently discussed: upping the cost of making settlers.

i was very surprised to read that in fact someone implemented the anti-ics
idea i voted for. because i really didn's t believe that anyone is going to
do this, i tried it by myself.

>This patch adds
>a game.ruleset variable:
>settler_worker_cost

>that makes it possible to adjust how expensive it is, in terms of city
>works, to create settlers/engineers.

>(I think ultimately this should be a function of units.rulesets, but it
>was simpler to put it in games.rulesets for now).

my solution is to add a variable "unit_cost_pop" to each unit in
untis.ruleset which determines how many population points a unit costs and
contains.
furthermore, i introduced a unit flag "AddToCity". a unit with this flag can
add its population points to a city.
notice that with this flag it is possible to create a "refugee" unit that
can add to a city but cannot build a new city or land improvements.

a question:
i fear that adding variables and flags to unit.ruleset breaks compatibility.
is this a problem? if yes, what should be done instead?

>To implement the patch, I also made city_auto_remove_worker to take a
>parameter of the number of workers to remove, and to actually decrement
>city size. I think this is more modular and cleaner, but is not
>actually necessary to change the Freeciv behavior.

this is exactly what i did first. but then i realized that there are
function calls of city_auto_remove_worker without a directly preceeding
pcity->size--. i did not think too much about it, maybe these function can
also be changed in a suitable way.
 so i prefered not change city_auto_remove_worker, but i added
city_auto_remove_workers with an additional parameter.

>I've tested the game with the patch: it changes the game dynamic quite
>radically, even with a settler_worker_cost of 2 (note that you could
>set the worker cost to 0 which would be ICS ++++).

yes, ics is much weaker.

>I would also recommend creating a light terraforming unit (roads,
>irrigation), to rebalance the increased settler cost (I tested game
>play reusing the Elephants unit as a light terraforming unit, but of
>course, one would want to create a new unit).

i used the elephants picture for my refugee unit and the crusaders for a
terraforming unit :)

>Have fun.

at the moment i have a problem:
i changed the can_unit_add_to_city function according to my new
F_ADD_TO_CITY flag. when i click on the menu item "add to city" or "build
city" everything works fine.
but pressing the "b" key only adds F_CITIES (or F_SETTLERS?) units to a city
and not all units with the F_ADD_TO_CITY flag.

can anyone imagine a reason for this behavior? where can i find the code
that handles keyboard inputs?

~michael










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