Changing plots during a game

IlMatteo

Chieftain
Joined
Jul 5, 2014
Messages
5
So at the moment, I am working on something that is essentially global warming: plots are converted to ocean at intervals throughout the game.

Code:
function FloodDestroy(p)
	p:SetImprovementType(-1);
	p:SetTerrainType(6, false, true);
end

And later, I use Map.RecalculateAreas() to check if it should be coast, lake, or ocean.

The issue is, when the code executes, it changes the tile to ocean/lake/coast, destroys the improvement, and then doesn't update graphically. I can mouse over the tile and it shows it being Ocean and having the yields of Ocean, I can't move units on it, and it shows up on the minimap as ocean, but its actual model appearance doesn't change.

From the modding wiki, it states:
Use to set the terrain on a given plot.
Graphics will refresh only after a save, exit to main menu and reload
Is there any way to get around this? Is there a way to force a reload?
 
What you've run into is the same limitations that DonQuiche ran into in the In-Game Editor (IGE) mod. No one has found a work-around that I'm aware of. Unfortunately, as I understand it, DonQuiche is no longer modding other than to "curate" his mod to keep it up to date with latest expansions / patches issued by Firaxis.
 
What you've run into is the same limitations that DonQuiche ran into in the In-Game Editor (IGE) mod. No one has found a work-around that I'm aware of. Unfortunately, as I understand it, DonQuiche is no longer modding other than to "curate" his mod to keep it up to date with latest expansions / patches issued by Firaxis.

It's critical to the scenario, so I suppose a popup of "please save and load" will have to suffice for now.

Thanks for the help.
 
Or tell them to play with the SV map, as that does update immediately
 
Could be they (Firaxis) broke it in a patch then. It used update immediately when SetPlotType() was called
 
Back
Top Bottom