[solved] Force update the map?

Place to get help with not working mods / modding interface.
Post Reply
kaijyuu
Burner Inserter
Burner Inserter
Posts: 8
Joined: Wed Jan 30, 2019 12:47 am
Contact:

[solved] Force update the map?

Post by kaijyuu »

So, my problem is thus: I made a mod that changes the map color of ores to make them more visible. It works fine in new games. However, it works oddly in old saves. And considering I made this so it'd be easier to see all the patches in my megabase save, I really need it to work on old saves.

Newly discovered ore patches will have the correct color on the map. Previously mapped patches act very inconsistently; I don't know what causes them to actually update. Walking near them doesn't work. Radars near them doesn't work either. Most patches still have their old color after an hour or so of play, and some look like this:
Image

Is there a way to force the entire map to update? Simply charting the chunk doesn't seem to work; I'm using the scanning radar mod (https://mods.factorio.com/mod/ScanningRadar) and it does NOT update the ore patchs map color when revealing chunks. So a full map refresh of some sort seems to be in order.
Last edited by kaijyuu on Wed Jan 30, 2019 7:34 pm, edited 1 time in total.

osldgoth
Long Handed Inserter
Long Handed Inserter
Posts: 93
Joined: Thu Feb 26, 2015 3:52 am
Contact:

Re: Force update the map?

Post by osldgoth »

game.forces.player.rechart()

like I use in my Enhanced Map Colors mod

kaijyuu
Burner Inserter
Burner Inserter
Posts: 8
Joined: Wed Jan 30, 2019 12:47 am
Contact:

Re: Force update the map?

Post by kaijyuu »

Works perfectly. Thank you!

Post Reply

Return to “Modding help”