Page 1 of 1

MapColors tag in map_fruitTypes and map_growth.xml

Posted: Sun Apr 07, 2024 11:29 am
by sablerock
I there documentation how the following

<mapcolors default=0.0956 0.3754 …..

Is converted to RGB values?
Or visa versa, if I have RGB values, how to convert to above?

Secondly: any documentation explaining meaning/effect of each tag in growth.xml ?

Or is it trial and error again?

Re: MapColors tag in map_fruitTypes and map_growth.xml

Posted: Sun Apr 07, 2024 2:44 pm
by LS-Lara
Translation formula for Giants "linear RGB" explained HERE and HERE.

Setup of "maps_growth.xml" seems pretty much self-explanatory. What's the issue there?

Re: MapColors tag in map_fruitTypes and map_growth.xml

Posted: Mon Apr 08, 2024 12:52 pm
by sablerock
Thanks for color info, probably write Python color wheel/picker code.
——————————————
Secondly: NOTHING is self explanatory when you try something for first time.

Examples, from growth.xml ,what do these tags do ingame?


State: These states refer to states defined in crop.xml, example state 1=invisible upto state 7=dead.

Sugarcane has 9 from invisible to dead.


Initialstate=5
I think this default state used by game when randomly populating lands

Index refers to specific period, thus index=5=mid summer to late summer

PLANTINGALLOWED self explanatory
UPDATE RANGE unclear to me
SET unclear

Some crops have more than 1 entry for UPDATE RANGE for same index - unclear to me (like sugarcane)

Another example: grass has comments “knock back to winter “ in index=9. Not clear how this works.

So everything self explanatory? NO

Re: MapColors tag in map_fruitTypes and map_growth.xml

Posted: Wed Apr 10, 2024 1:22 pm
by LS-Lara
UPDATE RANGE unclear to me
The "range" is equivalent to the current foliageState.

SET unclear
As the name indicates, it sets the foliageState to a specific value, in contrast to "add" which will increase by the given value.

Some crops have more than 1 entry for UPDATE RANGE for same index - unclear to me (like sugarcane)
If sugarCane is in state 1 during perion 1 or 2, it will transfer to state 2 (+1) on next update (normal growth). If it is in state 10 (harvested), it will transfer to state 2 instead (regrowing).

Another example: grass has comments “knock back to winter “ in index=9. Not clear how this works.
If grass is in state 4 (harvest ready) during period 9 (end of autumn), it will be reset to state 3 on next update (start of winter). It will no longer grow during winter periods 10, 11 and 12 and continue growing in period 1 (spring).

Re: MapColors tag in map_fruitTypes and map_growth.xml

Posted: Wed Apr 10, 2024 4:30 pm
by sablerock
This is MUCH better!! Many thanks.
Why can’t Giants have standard documentation like this?
Following on: my new crop in real life, harvests 6 tons/ha=roughly 3000 litres.
So I kept adjusting tab literspersqm in MAP_FRUITSTYPES.xml until I got desired harvest in liters.
Then I tested it on much bigger field and got total different liters/ha result.
Conditions were same for both fields.
Bit lost now

Re: MapColors tag in map_fruitTypes and map_growth.xml

Posted: Wed Apr 10, 2024 4:32 pm
by sablerock
Sorry 1 ton=3000 litres

Re: MapColors tag in map_fruitTypes and map_growth.xml

Posted: Thu Apr 11, 2024 4:54 pm
by Eische
For litersPerSqm:
read as liters per square meter. Knowing that 1ha (hectare) equals 10000 square meter makes it easier to understand yield per ha.
The value in the xml is the base value for your yield. Think about it as the worst field condition (no fertilizer, weeds all over, ...)
By doing all the steps for a perfect field (100% yield bonus) your final yield will turn out to 2x base value.
litersPerSqm = 0.89 --> 0.89 x 10000 x 2 = 17800 liters/ha on a perfect field

To set realistic values according to your own liking, you need to know the specific weight of your crop. There tables available for most common materials. For example here:
https://www.bpsvibes.com/bulk-material-density-guide/
As the game is using metric units, one example for barley on a perfect field would look like this:
desired yield per ha for perfect field: 9 tons = 9000 kg
bulk density: 0.61-0.69 (barley, whole) --> let's pick 0.65
desired yield in liters per ha: 9000 / 0.65 = 13846
litersPerSqm = 13846 / (2 x 10000) = 13846 / 20000 = 0.6923