Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2002:
[Freeciv-Dev] Re: Civ 2 Style Waste: A RFC
Home

[Freeciv-Dev] Re: Civ 2 Style Waste: A RFC

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Cc: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>, freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Civ 2 Style Waste: A RFC
From: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Date: Fri, 29 Nov 2002 21:09:42 -0500

At 06:50 AM 02/11/29 -0800, Raahul Kumar wrote:
>
>This is an implementation of Civ 2 style waste. Waste is corruption for
>shields. Now cities that are far away from your palace lose not merely trade,
>but also shields. This makes ICS more difficult. 
>
>Taken from Ross's Corecleanups, modified by me to include a gui-gtk city
>display showing waste.
>
>All Civ 2 purists should check my algorithm. I have no clue as to how exactly
>Civ 2 waste worked. Anyone with more information should speak up.
>
>>   val = CLIP(trade_penalty, val, trade);
>
>Ross, this function makes me nervous. It is rather misleading to call the
>values trade penalty and trade, when shields are also penalised. It seems
>misleading. Your implementation also makes fulltradesize/notradesize affect
>shields. I do not think that is a good idea.

My waste was pretty much a prototype hack on corruption with as few changes 
as possible. I looked at tradesize, and decided it would work and I didn't
have to clone the function to do it.

But the CVS patch and official upgrade should go the RFC route, get the 
feedback and err on the side of doing it right, however that gets defined.

I'm all for moving to finish coding Civ rules into things and this will put
a dent in ICS, especially if one cranks up the distance penalties. At the
moment, Republic is as nearly as good as Democracy for normal map sizes :-).

The other direction is to penalize total population counts, whether it be
by vertical city growth or spread. Thus ICSers will not be able to escape
all waste effects by in effect having no cities large enough to be
penalized.

This needs to be investigated more.

Cheers,
RossW
=====

>So I suggest going with the function city_waste(instead of city_corruption),
>which is further down in this email. What do you think?
>
>>   /* TODO: Civ2 rules check */
>>   pcity->shield_waste = city_corruption(pcity, pcity->shield_prod);
>>   pcity->shield_prod -= pcity->shield_waste;
>> }
>
>
>int city_waste(struct city *pcity, int shields)
>{
>  struct government *g = get_gov_pcity(pcity);
>  struct city *capital;
>  int dist;
>  int val, shield_penalty = 0;
>
>  if (g->corruption_level == 0) {
>    return shield_penalty;
>  }
>  if (g->fixed_corruption_distance != 0) {
>    dist = g->fixed_corruption_distance;
>  } else {
>    capital = find_palace(city_owner(pcity));
>    if (!capital)
>      dist = 36;
>    else {
>      int tmp = map_distance(capital->x, capital->y, pcity->x, pcity->y);
>      dist = MIN(36, tmp);
>    }
>  }
>  dist =
>      dist * g->corruption_distance_factor + g->extra_corruption_distance;
>
>  /* Ordered to reduce integer roundoff errors */
>  val = shields * dist;
>  val *= g->corruption_level;
>  val /= g->corruption_modifier;
>  val /= 100;
>
>  if (city_got_building(pcity, B_COURTHOUSE)
>   || city_got_building(pcity, B_PALACE)) {
>    val /= 2;
>  }
>  val = CLIP(shield_penalty, val, shields);
>  return val;
>}
>
>
>Aloha,
>RK. 




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