Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2004:
[Freeciv-Dev] (PR#10722) Not enough glasslands/plains
Home

[Freeciv-Dev] (PR#10722) Not enough glasslands/plains

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: mburda@xxxxxxxxx, miky40@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#10722) Not enough glasslands/plains
From: "Mateusz Stefek" <mstefek@xxxxxxxxx>
Date: Fri, 5 Nov 2004 06:45:17 -0800
Reply-to: rt@xxxxxxxxxxx

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

 
> i will try to do a tmp fix for it in some days, later , when 
> gen-terrains will be finised some code will be tuned in ruleset. 
>  
> about the balck box, anyway the actual placing systems for final 
> terrains as to be completly rewrited for gen-terrinas, even in the 
> latest patch, and even some part of characteristic code maybe need to 
> be tuned. anything is for a 2.1 version 
>  
> Marcelo 
>  
For main branch we can wait, but if there's no fix in few days I will
commit something like attached patch into S2_0 branch.
I have played few games lately and I have to admit that this is really a
big problem.
Attached patch takes 33% forests and 33% jungles and changes them into
grassland and plains.


--
mateusz
Index: mapgen.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/generator/mapgen.c,v
retrieving revision 1.15
diff -u -r1.15 mapgen.c
--- mapgen.c    15 Oct 2004 09:39:06 -0000      1.15
+++ mapgen.c    5 Nov 2004 14:40:31 -0000
@@ -414,6 +414,7 @@
   int alt_deserts_count = 0;
   int plains_count = 0;
   int swamps_count = 0;
+  int more_grassland_hack = 0;
 
   whole_map_iterate(ptile) {
     if (not_placed(ptile)) {
@@ -423,13 +424,17 @@
 
   forests_count = total * forest_pct / (100 - mountain_pct);
   jungles_count = total * jungle_pct / (100 - mountain_pct);
+  more_grassland_hack += forests_count * 3 / 10;
+  forests_count -= forests_count * 3 / 10;
+  more_grassland_hack += jungles_count * 3 / 10;
+  jungles_count -= jungles_count * 3 / 10;
  
   deserts_count = total * desert_pct / (100 - mountain_pct); 
   swamps_count = total * swamp_pct  / (100 - mountain_pct);
 
   /* grassland, tundra,arctic and plains is counted in plains_count */
   plains_count = total - forests_count - deserts_count
-      - swamps_count - jungles_count;
+      - swamps_count - jungles_count + more_grassland_hack;
 
   /* the placement loop */
   do {

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