[Freeciv-Dev] Re: (PR#2748) 3 mapgen patches now through rt (sorry about
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
At 09:45 AM 03/01/09 -0800, kayeats@xxxxxxxxxxxxxxxxxxxxxxxxx via RT wrote:
>
>> Mapgenerators 2-4 already
>> treat rivers as percent.
>
>Really? I just looked at the code and all they seem to do in gens 2-4 is
>divide by 10 everwhere. Maybe I'm not looking closely enough.
>
>Anyway, once I saw all the dividing by 10 that was already there I was
>convinced that my initial instinct to change the maximum of
>map.riverlength to be 100 like all the other terrain parameters was the
>right solution. Attached is the new version of the patch. I also
>followed your polar suggestion (sort-of, it isn't quite so simple as
>simply replacing everywhere because you have to compute differently with
>fixed values, so the only use of it is for clarity and hence I only used
>it local to adjust_terrain_param). Hopefully my third patch will go
>in as well and it won't matter one bit.
>
>If I'm misunderstanding how this will interact with gens 2-4 please
>correct me.
Except for rivers, mapgenerator works in percents, so everything is
fine here.
A better fix than the divide by 10 hack is to take the percent from
riverlength/total_land_tiles. Since most users won't understand the
screwiness of riverlength, and the system should be percents everywhere
anyway, the final tweak is to assume riverlength < 50 is already in
percent.
Conversely :-), assume it is now always in percent and for backwards
compatibility take anything greater than 50 as a real river length.
Anything much over 25% or 1 tile in 4 is bad for rivers producing
canal networks that look like AI road systems rather than single
flow reality. You certainly don't want 100% rivers except for some
wierd case.
>Karen
Cheers,
RossW
=====
This is how it generates the bucket counts. If you look carefully it
treats rivers/10 exactly the same way it treats mountain percent.
i *= tilefactor;
if (terrain_control.river_style==R_AS_TERRAIN) {
riverbuck += map.riverlength / 10 * i;
fill_island(1, &riverbuck,
1,1,1,1,
T_RIVER, T_RIVER, T_RIVER, T_RIVER,
pstate);
}
if (terrain_control.river_style==R_AS_SPECIAL) {
riverbuck += map.riverlength / 10 * i;
fill_island_rivers(1, &riverbuck, pstate);
}
mountbuck += map.mountains * i;
fill_island(20, &mountbuck,
3,1, 3,1,
T_HILLS, T_MOUNTAINS, T_HILLS, T_MOUNTAINS,
pstate);
If you look at the adjust_parameters you need to read the comment
carefully and then understand that the adjustment is based on
percent (and map.generator 1 is never adjusted).
/*!PS: I don't have the time to have several test runs */
/* to find a mapping from percents to generator 1 settings. */
if(map.generator==1){
/*map.riverlength*= 10; */
/*I leave this out, people will get too upset
if they have to change all their scripts */
return;
}
map.riverlength/= 10;/* left in */
total = map.riverlength + map.mountains + map.deserts
+ map.forestsize + map.swampsize + map.grasssize;
- [Freeciv-Dev] Re: (PR#2748) 3 mapgen patches now through rt (sorry about that) --- 1 of 3, rwetmore@xxxxxxxxxxxx via RT, 2003/01/07
- [Freeciv-Dev] Re: (PR#2748) 3 mapgen patches now through rt (sorry about that) --- 1 of 3, Gregory Berkolaiko via RT, 2003/01/08
- [Freeciv-Dev] Re: (PR#2748) 3 mapgen patches now through rt (sorry about that) --- 1 of 3, kayeats@xxxxxxxxxxxxxxxxxxxxxxxxx via RT, 2003/01/08
- [Freeciv-Dev] Re: (PR#2748) 3 mapgen patches now through rt (sorry about that) --- 1 of 3, kayeats@xxxxxxxxxxxxxxxxxxxxxxxxx via RT, 2003/01/09
- [Freeciv-Dev] Re: (PR#2748) 3 mapgen patches now through rt (sorry about that) --- 1 of 3,
rwetmore@xxxxxxxxxxxx via RT <=
- [Freeciv-Dev] Re: (PR#2748) 3 mapgen patches now through rt (sorry about that) --- 1 of 3, kayeats@xxxxxxxxxxxxxxxxxxxxxxxxx via RT, 2003/01/14
|
|