Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] Re: (PR#9803) PATCH rm map.grasssize parameter
Home

[Freeciv-Dev] Re: (PR#9803) PATCH rm map.grasssize parameter

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: mburda@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#9803) PATCH rm map.grasssize parameter
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 25 Aug 2004 01:08:04 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9803 >

Mateusz Stefek wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=9803 >
> 
>>[mburda - Wed Aug 25 06:51:13 2004]:
>>
>>Not used and useless parameter deleted
>>
>>Marcelo
>>
> 
>    int polar = 5; /* FIXME: convert to a server option */
>  
> -  total = map.mountains + map.deserts + map.forestsize + map.swampsize 
> -    + map.grasssize;
> +  total = map.mountains + map.deserts + map.forestsize + map.swampsize;
> 
> Are you sure that it doesn't change the behavior ?
> Maybe map.grassize really means "the rest".

That's exactly what it means.  The values are intended to be percentages 
so they can only be changed one at a time.  Thus they're really only 
ratios that have value by comparison to each other.  Grassland could be 
scaled just like the others but it's safer to just subtract to avoid 
off-by-one errors.  This code was written by Karen - try cvs annotate to 
get more info about this.

The patch changes this so that they really are percentages.  Now 
grassland is just "the rest".  (That's why the != check is changed to a 
 > check: if it's < (which it should be) then no adjustment is needed 
and grassland really is "the rest".)  Is this better?  I don't think so. 
  For one thing is it's hard to tell that the percentages go together in 
this way.  Of course this should be documented better in the server 
option help (I'd consider the lack of documentation here a serious 
oversight).

Perhaps the biggest problem with the patch though is that it makes it 
very easy to end up with no grassland at all.  In the current server 
this is impossible since the minimum "grass" value is 20.

Eventually I'd like to get rid of all these values, replacing them with 
moisture/temperature/slope variables.  But I don't think this patch 
really helps that.

jason




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