• Civilization 7 has been announced. For more info please check the forum here .

Teh Flowering Counter

Maniac

Apolyton Sage
Joined
Nov 27, 2004
Messages
5,588
Location
Gent, Belgium
Ellestar, is it possible to code the stuff not written in Italic?
Things written in italic is stuff that is too imprecise yet to be programmed, but I thought I'd mention them anway, in case someone has ideas to concretize them.

Flowering Counter upon game startup

X = number of plots the map has, minus all plots Fungus can't ever possibly grow on, even not with a Counter of 100.
For each plot covered by Xenofungus or Sea Fungus or Hybrid Forest, 100/X is added to the Counter.

I'm not exactly sure about the X's and Z's, what's currently coded in the DLL.

Stuff that affects the Flowering Counter during the game

Z = number of plots the map has

1) For each tile xenofungus/sea fungus/hybrid forest (henceforth simply referred to as "fungus" unless specified otherwise) appears on, no matter how it happens (through natural growth, planting or fungal bloom), the Flowering Counter raises by 100/X. The other way around, for each fungus tile removed, the Counter decreases by 100/X.

2) For each Condenser worked by a base which has the Atmospheric Processor base facility, the Flowering Counter decreases by Y/Z each turn. What Y should be I can only tell through experimenting (some number much smaller than 100 of course). May I therefore suggest, for easier modding, to make a new define in GlobalDefines.xml for Y?

3) Use of a weapon of mass destruction - nuclear weapons and planet busters - increases the Flowering Counter. Rather vague as we don't even have planet busters defined yet.

4) building certain buildings related to moving towards Transcendence gives a one-time increase in the Flowering Counter

5) Researching the Terraforming tech gives a decrease to the Counter.

6) Researching the Eudaimonia tech gives an increase to the Counter??

7) The more Fungal Towers, the higher the Flowering Counter?

8) For each Transcend Great Person born, the Flowering Counter increases somewhat.

9) Melt Polar Caps/Launch Solar Shade Planetary Council voting options which directly or indirectly lower/increase the Flowering Counter[/i]

Stuff that the Flowering Counter affects

1) an XML tag under Promotions which gives a combat strength percentage bonus equal to the Flowering Counter. (precise bonus all subject to testing of course)

2) A minimum Flowering Counter level (suggestion to try out: 30) should be reached before randomly spawned native life can enter factional borders. Once this level has been reached native life can always move into cultural borders, even if the counter later drops under again.

3) Farms should upgrade to Farm->Outpost->Settlement(->Human Zone)->Eden. The lower the Flowering Counter, the faster they should upgrade. Some formula needed which leads to an absolute stop of growth at Counter 100, but still makes it take some turns for these improvements to grow at Counter 0.
Possible implementation:
Spoiler :
Code:
int CvPlayer::getImprovementUpgradeRate() const
{
	int iRate;

	iRate = 1; // XXX

	iRate *= std::max(0, (getImprovementUpgradeRateModifier() + 100));
	iRate /= 100;

	return iRate;
}

iRate is (100 + improvementupgraderatemodifier - 2*Flowering Counter)/100, with of course an assurance the rate is minimum zero.

Since the Terraformed Ecology civic gives +100 ImprovementUpgradeRateModifier, this would mean Farms don't upgrade at all for them at Flowering Counter level 100, and that it would be beneficial for Terraformers to get the Counter as low as possible.


4) There is a minimum Counter level C before Fungus can grow into Highlands at all through natural <iGrowth> (so seperate from Fungal Blooms).

5) A minimum Counter level E should be reached before Fungus can grow inside factional territory.

6) Standard Civ4 rules are that features can only grow into empty tiles. I'd like to deviate from that in three cases.
a) as in SMAC, forests (not hybrid forests) should be able to grow over fungus (not hybrid forests). At a lower probability than growing into empty tiles though.
For Planetfall, I'd also like Planetmind to return the favour though. :evilgrin: Therefore:
b) Provided the Counter is above a certain minimum level F, fungus can grow over forests.
c) Provided the Counter is above a certain minimum level G, fungus can grow over (Monsoon) Jungle.

7) The higher the Flowering Counter, the more diplomatic polarization between Hybrid and Terraformed ecologists.

I'm thinking the following might not be such a good idea anymore:

8) Only farms on Highlands should upgrade if the conditions under 3) are met. Farms on Lowlands should have a maximum Counter A allowed above which they don't grow at all.

9) The <iGrowth> tag of all fungus features should be affected by the Flowering Counter. At Counter 0 growth should be zero. Not sure what formula to use.

10) Fungus <iGrowth> should also always be affected by the elevation level of the plot to grow into. Chance for growth in Highlands is always smaller than chance for growth in Lowlands and water terrains.

11) At very low Counter levels, forest growth should be increased. No difference at medium or high Counter levels though.



To provide the big picture, what I'm hoping for with all this, is that there could be a true battle for control over the fertile land (and waters...) between the player and Planetmind. The Highlands, the Monsoon Jungle and Polar areas can serve as a sanctuary for humans where they're less bothered with native life, because it doesn't thrive well in the climactic and atmospheric conditions of those terrains. For this to work, there should be more Highlands than just a sole peak here and there like it is now. More like a couple true highland plateaus. Requires work on mapscripts. If even the Highlands are overrun by Fungus, the player can always retreat to polar areas. Perhaps having a "Launch Solar Shade" Planetary Council option as in SMAC, which here increases the Polar area, would be neat, increasing the fungus free land. :D Though of course the Polar areas can't support as much human life as you can only build Greenhouses here, not Farms. If you want to gain more economic power but don't want to go Green and side with Planet, you'll have to try and keep the Flowering Counter low and expand into the fungus infested Lowlands. Then as a reward, you'll be able to upgrade your farms towards a human Eden even on Lowlands, plus build Boreholes there (can't be built on Midland and Highlands).
 
Ellestar, would it be possible to code the stuff not written in Italic?
I think yes, italics ones looks ok too.

Any idea what this would give for the initial counter with the current CvMapGeneratorUtil.py?
No idea, probably around 20-25.

2) For each Condenser worked by a base which has the Atmospheric Adjuster base facility, the Flowering Counter decreases by Y/X each turn. What Y should be I can only tell through experimenting (some number much smaller than 100 of course). May I therefore suggest, for easier modding, to make a new define in GlobalDefines.xml for Y?
Shouldn't it depend on a map size too?

3) Upon researching Ecological Engineering the Farms (*4) of the team having that tech should start to upgrade to Farm->Outpost->Settlement(->Human Zone)->Eden. The lower the Flowering Counter, the faster they should upgrade. Some formula needed which leads to an absolute stop of growth at Counter 100, but still makes it take some turns for these improvements to grow at Counter 0.
Linear function or not?

8) A minimum Counter level E should be reached before Fungus can grow inside factional territory.
Hmm, fungus cares about factions? In FFH you can say it's magic but in SMAC human development is represented by roads and land improvements. By the way, should fungus grow over roads?

9) Standard Civ4 rules are that features can only grow into empty tiles. I'd like to deviate from that in three cases.
a) as in SMAC, forests (not hybrid forests) should be able to grow over fungus (not hybrid forests). At a lower probability than growing into empty tiles though.
For Planetfall, I'd also like Planetmind to return the favour though. :evilgrin: Therefore:
b) Provided the Counter is above a certain minimum level F, fungus can grow over forests.
c) Provided the Counter is above a certain minimum level G, fungus can grow over (Monsoon) Jungle.
Should this one (or others, for that matter) depend on a difficulty level?

For this to work, there should be more Highlands than just a sole peak here and there like it is now. More like a couple true highland plateaus. Requires work on mapscripts.
And IMHO we should fix graphics somehow if we want to use Highlands more than now.

If even the Highlands are overrun by Fungus, the player can always retreat to polar areas.
Well, you can always destroy fungus. And fungus doesn't overrun land improvements. So, it's not like a fungus growth can overrun anyone. Maybe pops can do the job though, but that's another mechanics.
 
Shouldn't it depend on a map size too?

It does. Y/X instead of just Y. Though while I still think it would be best if the initial Flowering Counter only takes into account the non-polar/ice terrain, I'm wondering if it would be best for all Counter changes after that to take into account the whole map. Otherwise you might get the strange situations if we're gonna have a Planetary Council motion to increase the polar caps.

So X = number of plots the map has, minus sea plots covered by the Ice feature and land plots of the three polar types, basically minus all plots Fungus can't ever possibly grow on, even not with a Counter of 100.
While Z = number of plots the map has

Flowering Counter upon game startup
For each plot covered by Xenofungus or Sea Fungus or Hybrid Forest, 100/X is added to the Counter.

Stuff that affects the Flowering Counter during the game

1) For each tile xenofungus/sea fungus/hybrid forest appears on, no matter how it happens (through natural growth, planting or fungal bloom), the Flowering Counter raises by 100/Z. The other way around, for each fungus tile removed, the Counter decreases by 100/Z.

2) For each Condenser worked by a base which has the Atmospheric Adjuster base facility, the Flowering Counter decreases by Y/Z each turn.

Linear function or not?

Good question. ;)
Perhaps something like this instead?:
Flowering Counter at 0: <iUpgradeTime> in CIV4ImprovementInfos.xml not modified
Flowering Counter at 25: <iUpgradeTime> doubled
Flowering Counter at 50: <iUpgradeTime> tripled
Flowering Counter at 75: <iUpgradeTime> quadrupled
With continuous modifiers in between.
On values above 75 the improvements don't upgrade at all.

Hmm, fungus cares about factions? In FFH you can say it's magic but in SMAC human development is represented by roads and land improvements.

I was thinking from the human perspective. At low Counter levels you could say factions are able to keep the natural growth of the fungus within their territory easily in check without much effort. At higher levels not => fungus can grow within factional borders.

By the way, should fungus grow over roads?

I'd say yes. Same with forests btw. IIRC currently in Civ4 features can't expand in terrain with routes, no?

Should this one (or others, for that matter) depend on a difficulty level?

I'm not very fond of all kinds of stuff working differently on different difficult levels: it's impossible to create a balanced game on a wide variety of settings. Ideally IMO difficulty level should only affect the strength and bonuses of your opponents.
However I'm hoping there can be a setting in the mapscript where you can set how much percent of the map is covered by fungus at the start of the game. That would automatically affect the Flowering Counter and the strength of native life (through the promotion that gives a combat bonus dependent on the Counter).

And IMHO we should fix graphics somehow if we want to use Highlands more than now.

Let's ask AA about it. :D

Well, you can always destroy fungus. And fungus doesn't overrun land improvements. So, it's not like a fungus growth can overrun anyone. Maybe pops can do the job though, but that's another mechanics.

Yep. I'd like fungal blooms on highlands to be impossible before a certain Counter height is reached. If there's a fungal bloom event, but no valid plots to bloom into, the Counter should rise instead. Which reminds me, is there a python integer for the value of the Flowering Counter? And is there the ability to increase/decrease the Counter through python?


Some random suggestions for numbers btw. Will most likely change after some playtesting.

5) The <iGrowth> tag of all fungus features should be affected by the Flowering Counter. At Counter 0 growth should be zero. Not sure what formula to use.

<iGrowth> = value of the Flowering Counter?

<iGrowth> should also always be affected by the elevation level of the plot to grow into. Chance for growth in Highlands is always smaller than chance for growth in Midlands than chance for growth in Lowlands (and water terrains).

Midlands = <iGrowth> / 2
Highlands = <iGrowth> / 3
?

10) At very low Counter levels, forest growth should be increased. No difference at medium or high Counter levels though.

Perhaps <iGrowth> for Forest should be zero on Counter levels 34 and above, but increase by one for each number below? Counter 33 => <iGrowth> 1. Counter 32 => <iGrowth> 2. Counter 0 => <iGrowth> 34.

a) as in SMAC, forests (not hybrid forests) should be able to grow over fungus (not hybrid forests). At a lower probability than growing into empty tiles though.

At half the chance or something?
 
Noticed you added some Flowering Counter stuff. Starting on small maps, the counter is around 80 at the start though. :confused: How is the counter calculated?
 
Noticed you added some Flowering Counter stuff. Starting on small maps, the counter is around 80 at the start though. :confused: How is the counter calculated?
Some parts of the code aren't tested yet and i'm not sure what exactly happens during the map generation so it's not a surprise that it doesn't always work as expected. In other words, it's not finished yet.
 
I honestly like a bit of randomness with the Counter. Should it always start at zero? Can we have an option for a zero start and also a 0-X start?
 
Actually the idea is exactly for the initial Flowering level to depend on how much fungus is on the map (so it won't be zero). :) In other words: great idea of yours! :mischief:
 
Actually the idea is exactly for the initial Flowering level to depend on how much fungus is on the map (so it won't be zero). :) In other words: great idea of yours! :mischief:

Yeah, yeah, yeah, but even with that I think there should be a random value simply to spice up how Planet is feeling that game.

And I had no idea people were using my ideas before I said them! :p
 
I'm hoping that in some far future we could select map options for Sparse/Normal/Abundant/Random native life, which would affect the initial Flowering Counter. Is that what you want? I'm not sure at this point if it would make any sense to start with little fungus but a high flowering counter, or with lots of fungus but a small counter, given how they're related. In any case, if desired I assume it should be fairly to just slap a random [-5, 5] or something on the initial counter.
 
I guess I'm not associating the Flowering Counter with just fungus. No big deal either way.

Are we planning on Events were the counter is raised +20 or so for X number of turns?
 
I guess I'm not associating the Flowering Counter with just fungus. No big deal either way.

What do you want to associate the Flowering Counter with? I'm eager for more ideas. :D

Is there stuff in the initial post which you would want to occur more or less without having more/less fungus too?

Are we planning on Events were the counter is raised +20 or so for X number of turns?

Would be cool. (though wouldn't know right now how to do this)
 
Would it surprise anyone if I admitted I hadn't read the first post in 56 days? :blush:

For some Flower affecting Events...should we have an events only thread?

Anything along the lines of...

Seedlings found:

A - Nurture, germinate and plant fungus (1 tile deal) - subtract gold from treasury and lower counter
B - Do nothing
C - Eradicate seedlings or study them to further assault on planet - Boost to research, but raising of FC.

I'm sure there are endless variations on this theme.
 
Would it surprise anyone if I admitted I hadn't read the first post in 56 days? :blush:

That's what I assumed. I often wonder when reading some post if people have even opened Planetfall the last two months or so. :mischief:

For some Flower affecting Events...should we have an events only thread?

You made an Events thread a while ago. All kinds of event ideas could be gathered there. It's always good to collect lots of ideas in advance. Though considering we haven't even implemented many of our core mechanics, I don't consider events a priority to implement.
 
What's the 54200 number in those pics taken before and after loading the same game?
It's a sum of all <iPlanetValue100> from features and improvements. I'm not sure if we need to show it but it's useful for testing and maybe balancing too.
Number of plots is already fixed in the code.
 
Number of plots is already fixed in the code.

If you mean by that, that the Flowering Counter should remain the same at the start of the game and after loading a save, unfortunately this is not the case (though IIRC the difference pre/post-load is smaller these days).
I've tried looking at the SDK code, but I can't figure it out, since the relevant parts are spread out over so many files. :crazyeye: So I'm wondering, could you please describe how currently the initial Flowering Counter at the start of the game is determined, and how it evolves from there?
 
If you mean by that, that the Flowering Counter should remain the same at the start of the game and after loading a save, unfortunately this is not the case (though IIRC the difference pre/post-load is smaller these days).

I've tried looking at the SDK code, but I can't figure it out, since the relevant parts are spread out over so many files. :crazyeye: So I'm wondering, could you please describe how currently the initial Flowering Counter at the start of the game is determined, and how it evolves from there?
I mean, number of habitable plots should stay the same if you save and immediately load the game. Flowering Counter can't possibly remain the same compared to the start of the game because fungus has a chance to spread each turn.

Well, at the start of the game/save each plot is considered unhabitable and number of habitable map plots is equal to zero. Each time you change terrain type, plot type or feature type, number of habitable map plots is being updated: +1 if that plot wasn't habitable but now it is and -1 if it was habitable but now it isn't. Since terrain type should be set for every plot, it will be updated for all plots when map is created or loaded from a save.
 
I mean, number of habitable plots should stay the same if you save and immediately load the game. Flowering Counter can't possibly remain the same compared to the start of the game because fungus has a chance to spread each turn.

When I start a game the Flowering Counter is at 22 for instance. I save that game, and immediately reload, and the Counter has changed to 19, despite no terrains or features or anything having changed.

The initial Flowering Counter should IMO be based on 100 * (# of plots covered by fungus / # of plots that can be covered by fungus at Flowering Counter 0 = the habitable plots at that time). Let's call this formula A.

Reason why the initial Flowering Counter should be based only on the habitable plots at Counter 0, is to prevent the situation where you generate a map with lots of plots/terrain/features on which fungus initially can't grow, meaning the Counter would be very low, and also meaning that the Counter would never be able to get high enough to expand into previously inaccessible terrain.

During the game the Flowering Counter should evolve with the spreading of fungus. The formula being 100 * (1 per plot / total # of plots that the map has). Let's call this formula B.

Reason why the evolving Flowering Counter during the game should not be based only on the habitable plots of that time but on the entire map, is to prevent the counterintuitive situations of the Flowering Counter slowing down its increase or decreasing because MORE plots become habitable, or the reverse: the Flowering Counter increasing because less plots become habitable. Eg with the current <iPlanetValue100> implementation of evolving the Counter, using formula A here would result in a sudden Counter drop when the Counter became high enough to expand into Highlands.

So does the initial Flowering Counter use formula A or B?
100 * (# of plots covered by fungus / # of plots that can be covered by fungus at Flowering Counter 0 = the habitable plots at that time)
or
100 * (# of plots covered by fungus / total # of plots that the map has)
or
something else? :confused:

And when fungus grows on a tile, does the Counter increase by:
100 / # of fungus-habitable plots at that time
or
100 / total # of plots that the map has
or
something else? :confused:
I believe this is determined by <iPlanetValue100>?

Also Formula A and Formula B give a different number. Does the game after reloading a save remember the initial Flowering Counter calculation, which would result in a higher Counter than if the Counter were solely determined by <iPlanetValue100>? In other words, the Counter at any point in the game should if I understand corectly consist of the sum of:

1) A remnant of the initial calculation, which remains the same for the whole game:

100 * [(# of plots covered by fungus at game start / # of habitable plots at Counter 0) - (# of plots covered by fungus at game start / total # of map plots)]

PLUS

2) A dynamic part based on your implementation of <iPlanetValue100>, which if I understand correctly is: (edit: or wait, I believe it's based on habitable plots instead? :confused: )

100 * (# of plots covered by fungus at this particular moment / total # of map plots)


Anyway, I know what I'm saying here is technically incorrect. In this formula, read "fungus" as FEATURE_XENOFUNGUS, FEATURE_SEA_FUNGUS, FEATURE_HYBRID_FOREST, which all have <iPlanetValue100>100</iPlanetValue100>.
 
Forget about what was there, plot was initialized twice so that misguided me about where to put my initialization.

Formula is sum of all iPlanetValue100 divided by a number of plots that can possibly be habitable no matter what the current planet value is (in other words, all plots but the ones which are never habitable - like ice or polar). That way number of plots doesn't depend on itself, like with the formula (A).

So, when everything possible is covered by fungus, planet value from features/improvements will be
100 (it's <iPlanetValue100> for fungus)*habitable plots / habitable plots = 100.
 
Top Bottom