Map Fog of War Decay Modmod

calvitix

C2C Dev Team
Joined
Mar 23, 2010
Messages
237
Location
France
Hi,

I developed a small modmod that gradually decays plot visibility in the fog of war over time, in a somewhat random manner. It’s purely a visual modmod, so no data is stored in the savegame (meaning that the entire discovered map will be fully visible again when a save is reloaded).


Each time a plot becomes visible (due to a city or a unit), its decay counter is reset.


Certain technologies will slow down the decay, extending it from just 1–2 turns up to as much as 30 turns (progressing through Trails → Tracking → Hunting → Pictographs → Ideograms → Exploration). Finally, researching Writing will completely cancel the effect.


(A second version will expand the feature to include sea plots as well, needing compass and other tech to improve the persistance.)

Example of the decay with EarthMap, Gengis Khan has discovered the entire asian continent after 400 turns :
Map_10turns.jpgMap_15turns.jpgMap_20turns.jpgMap_25turns.jpg
Map_30turns.jpg
 

Attachments

  • Map_full.jpg
    Map_full.jpg
    63.2 KB · Views: 53
Last edited:
Love the idea, but seems maybe a little weird to have so random internal gaps.

Have you tried only applying the effect if the tile is adjacent to an undiscovered tile? That way longer distance exploration would be "forgotten first", on average.
 
Yeah, I'm thinking of something like that. My first update is to maintain the plots with freshwater, with bonuses, or other point of views longer as the others. a distance exploration is a good idea, but will need the use of path, with is time consuming. Will test how I can handle it.

Here as example, the plots that remains have interest, bonus,...
1757948530646.png
 
Yeah using a calculated plot distance would be most "realistic", but probably computationally comparatively expensive.

If however you chose only tiles that are adjacent to one that is undiscovered, that will naturally tend to circularize the discovered region, aka doing an effective filter by distance (is my suggestion at least).

E: Also, why is it visual only? If you're already editing dll, should be easy enough to hook into CvMap::doTurn, no?
 
Last edited:
It's uploaded on https://github.com/Calvitix/Caveman2Cosmos. (still work in progress, Branch AI-Test-Attack-City)
Mainly CvPlot::updateFog, InitFogDecay and getVisibilityDecayBonus. (and CvTeamAI for TechBonus).
I'm trying to do some updates, with SetReveal() instead of only BlackenVisibility(getFOWIndex());
 
Last edited:
Euh...
As a modmod, if you don't like the feature, just don't use it .

If it will be integrated in the main mod, i'll add an option to activate it
 
Last edited:
As y'all may know if you've been around for a long while, this is a project dear to me too - I want this to be an option as soon as we can. Creating a game option out of it would be super easy. I feel like before the next version it should be. There are LOTS of ideas to go with it that extend on both the unit plan (Soon tm) and even into the Developing Leaders project as an extension. But one step at a time here. Glad to see lots of support already going this way.
Yeah using a calculated plot distance would be most "realistic", but probably computationally comparatively expensive.

If however you chose only tiles that are adjacent to one that is undiscovered, that will naturally tend to circularize the discovered region, aka doing an effective filter by distance (is my suggestion at least).

E: Also, why is it visual only? If you're already editing dll, should be easy enough to hook into CvMap::doTurn, no?
You know what could be done with this thinking is to create more erosion likelihood (or reduce odds rather) for every 'forgotten' plot around an unforgotten one. That would make regions of erosion tend towards batching.
 
One thing that will need to be considered for adjacency erosion though is ordering effects, specifically that if you just check and apply to each plot in sequence there will be a tendency to forget plots faster in two directions. Player might not notice, but, should that style be implemented, you'll need to build a list of what to do on each plot and then do a second loop applying that logic, or something like that.
 
This is interesting!
 
One thing that will need to be considered for adjacency erosion though is ordering effects, specifically that if you just check and apply to each plot in sequence there will be a tendency to forget plots faster in two directions. Player might not notice, but, should that style be implemented, you'll need to build a list of what to do on each plot and then do a second loop applying that logic, or something like that.
Howdy Blazenclaw! Good to see u post.
 
The new version
Could you provide mod-mod installation instructions for noobs like me?
I would love to try it with the latest SVN version. I love the Civ exploration phase and this could be like a little gift that keeps on giving :)
 
Could you provide mod-mod installation instructions for noobs like me?
I would love to try it with the latest SVN version. I love the Civ exploration phase and this could be like a little gift that keeps on giving :)
Hi,

It's included in latest SVN, you can activate the option in the BUG menu, C2C tab, in the right panel
 
Is it still visual only or have you had any progress in altering the reveal state of the tile?

This is one of the most interesting additions to the mod since the massive remake of combat with size matters and hide and seek (in my book)
 
Is it still visual only or have you had any progress in altering the reveal state of the tile?

This is one of the most interesting additions to the mod since the massive remake of combat with size matters and hide and seek (in my book)
It's both : after the dedicated amount of turns, depending on technologies already discovered and randomisation,
The tile is first "blacked", but are still considered as revealed by the game, (for Trade connection For example).

After, five Additionnal Turns, it is set as unrevealed, as it was never discovered (that means you'll have a second Time the natural wonder discovrry popup for example).

As a compromise to not breaking saves, the number of decay turns is not stored, only the reveal/unreveal status. There could be some minor changes on load (few tiles could "re-appear")
 
It's both : after the dedicated amount of turns, depending on technologies already discovered and randomisation,
The tile is first "blacked", but are still considered as revealed by the game, (for Trade connection For example).

After, five Additionnal Turns, it is set as unrevealed, as it was never discovered (that means you'll have a second Time the natural wonder discovrry popup for example).

As a compromise to not breaking saves, the number of decay turns is not stored, only the reveal/unreveal status. There could be some minor changes on load (few tiles could "re-appear")
That sounds great! So, if I understand you correctly. If the socind threshold is passed for a tile (setting it as unrevealed) ir will be blacked iut after save/load as well?
 
Yes, exactly.

Another thing : the mini nb of default decay turns can be set as parameter. But some tiles have "bonus" that delay the decay, simulating the "memory" of the specific tile : Natural Wonder is +40, Cities (barbs or another civ) is +10, oasis +10, tiles with revealed goods have +10, rivers/fresh water +3,.....
The Points of Interest are keeped longer than "normal" forest tiles.
 
Back
Top Bottom