Question about reveal map...

gameguy540

Chieftain
Joined
May 22, 2015
Messages
2
Hi all, hoping someone can help me out. My favorite part of the game is exploring the map, and recently my friends and I had a fun idea that we would take a Civ5 map and try to create a fantasy story based on the map. So what I need to do is be able to see the entire map so that we can move around and see the details of the geography, including the resources.

I have a save file that I want to use (actually I have a save file from turn 0 and from when I beat the game) and I saved the map from the game menu. I modified the config.ini file to turn on the debug panel so that I could restart from turn 0 and click "reveal all", but that still doesn't show the resources or yield icons. Of course I could just use the totally explored map from when I beat that game, but a lot of the stuff is really hard to see because of all the cities, units, and tile improvements.

I have also downloaded the SDK to use the world builder, but the tiles and resources are very small, not ideal viewing for my friends who aren't very familiar with the game. Does anyone have any suggestions or ideas on how to view the entire map? Thanks!
 
So, you want to start the game with all the tiles on the map revealed, but still covered by the fog of war, and for all players?
 
So, you want to start the game with all the tiles on the map revealed, but still covered by the fog of war, and for all players?[/QUOTE

Is this even possible? I can reveal the map that is easy. However, it would remove the fog of war.
 
Good news for you: that's not too hard then.

Use this function to reveal a specific plot on the map, use a loop to go through a list of plots (so if you want the entire map revealed, have a list with all the plots!):

Code:
bool CvPlot::setRevealed(TeamTypes eTeam, bool bNewValue, bool bTerrainOnly, TeamTypes eFromTeam)

Use this after you finish revealing plots to update the Fog of War.

Code:
void CvMap::updateDeferredFog()

Both of these C++ functions are already exposed to Lua by default :)


Is this even possible? I can reveal the map that is easy. However, it would remove the fog of war.

Think about how embassies and ancient ruin maps in the base game work - you get knowledge of the terrain/features/cities/resources of the area, but with no "vision" on what's actually going on.

Really Advanced Setup already proves this can be done, as you have the option to reveal tiles in an X radius around your starting location, with another option that covers the entire map.
 
Yeah, that's why I asked - you can make use of the Plot:SetRevealed() method to do this over the entire map.

However, it will trigger discovery of all Natural Wonders and Ancient Ruins immediately, but this is the same as if you were to reveal the map with IGE.

The basic code would be something like this:
Code:
iMaxX, iMaxY = Map.GetGridSize()
iTeam = Players[iPlayer]:GetTeam()
for x = 1, iMaxX do
	for y = 1, iMaxY do
		pPlot = Map.GetPlot(x, y)
		if pPlot then
			pPlot:SetRevealed(iTeam, true)
		end
	end
end

Then you can further refine it so that it is only called for either a specific player, or all players, and refine it further so that it only runs once.

Edit:
It looks like ThorHammerz's code section is indicating that adding a third parameter to SetRevealed might bypass the natural wonder and ancient ruins notifications, but I haven't tested that. Oddly, that boolean doesn't appear to be on the Modiki.
 
Back
Top Bottom