Vehem
Modmod Monkey
- Joined
- Nov 22, 2005
- Messages
- 3,219
Vehem's Quick and Dirty Map Decay
There have been numerous discussions regarding the fact that a couple of scouts can explore the whole continent pre-AD and that explorers generally have little purpose. Given that accurate map-making of large geographical areas was a rather late development, I put together the following to represent the "forgetfulness" of a Civilisation in the pre-cartography era.
As coded, this will "unreveal" a map-tile that is currently non-visible by any unit with a chance per turn of 20%. This chance is halved (to 10%) by the discovery of Writing and negated by the discovery of Paper.
The net result is that if you don't visit an area for a period of time, you will forget what is over there. Naturally the player will have a recollection of what he saw there, but will probably need to re-explore in order to make any firm plan regarding expansion in that area.
In my personal collection of Mods, I have also renamed Paper to Cartography as this tech now controls both Map Trading and Map Decay. Incidentally, I have also added the Sentry promotion to Explorers to aid rapid re-exploration when needed.
The AI explore algorithm tends to double back on itself to re-explore forgotten regions, quite frequently before Writing is discovered. This means that if you rely on clicking the "Automate Explore" button to uncover the map, you may find your first few scouts working hard just to keep the local area up-to-date. Additional automated scouts or taking an active role in exploration will counter this effect (which is intentional). AI players are not significantly impacted by this mod (beyond the scouting behaviour) as they tend to cheat a little when it comes to selecting city locations anyway.
There have been numerous discussions regarding the fact that a couple of scouts can explore the whole continent pre-AD and that explorers generally have little purpose. Given that accurate map-making of large geographical areas was a rather late development, I put together the following to represent the "forgetfulness" of a Civilisation in the pre-cartography era.
Spoiler Python Code :
Added to OnBeginPlayerTurn in CvEventManager.py
Code:
# Vehem Quick and Dirty Map Decay START
pPlayer = gc.getPlayer(CyGame().getActivePlayer())
eTeam = gc.getTeam(pPlayer.getTeam())
aTeam = CyGame().getActiveTeam()
if (not eTeam.isHasTech(gc.getInfoTypeForString('TECH_PAPER'))):
if (eTeam.isHasTech(gc.getInfoTypeForString('TECH_WRITING'))):
iMapDecayPercentage = 10
else:
iMapDecayPercentage = 20
for i in range (CyMap().numPlots()):
pPlot = CyMap().plotByIndex(i)
if (not pPlot.isVisible(aTeam, false)):
if (CyGame().getSorenRandNum(100, "MapDecay") <= iMapDecayPercentage):
pPlot.setRevealed(aTeam, false, false, TeamTypes.NO_TEAM)
pPlot.updateVisibility()
# Vehem Quick and Dirty Map Decay END
As coded, this will "unreveal" a map-tile that is currently non-visible by any unit with a chance per turn of 20%. This chance is halved (to 10%) by the discovery of Writing and negated by the discovery of Paper.
The net result is that if you don't visit an area for a period of time, you will forget what is over there. Naturally the player will have a recollection of what he saw there, but will probably need to re-explore in order to make any firm plan regarding expansion in that area.
In my personal collection of Mods, I have also renamed Paper to Cartography as this tech now controls both Map Trading and Map Decay. Incidentally, I have also added the Sentry promotion to Explorers to aid rapid re-exploration when needed.
The AI explore algorithm tends to double back on itself to re-explore forgotten regions, quite frequently before Writing is discovered. This means that if you rely on clicking the "Automate Explore" button to uncover the map, you may find your first few scouts working hard just to keep the local area up-to-date. Additional automated scouts or taking an active role in exploration will counter this effect (which is intentional). AI players are not significantly impacted by this mod (beyond the scouting behaviour) as they tend to cheat a little when it comes to selecting city locations anyway.