Page 1 of 1

Map Reveal help

Posted: Thu Oct 19, 2023 8:28 am
by dtoxic
Is there a way to completely disable map reveal by the player only? radars and similar items should remain unaffected.

any code for that?

Re: Map Reveal help

Posted: Tue Dec 05, 2023 5:05 pm
by mrvn
What is supposed to happen when the player walks off the revealed map?

Re: Map Reveal help

Posted: Tue Dec 05, 2023 5:22 pm
by dtoxic
nothing,like have wrote no map reveal by walking/driving unless you have some sort of a radar with you...i am trying to make a mod that would allow you to equip a portable radar so you can reveal the map (in the map view) if you don't have it and don't have any radars placed the map view would remain black

Re: Map Reveal help

Posted: Wed Dec 06, 2023 12:06 am
by mrvn
And then I can drive over water because I don't yet know that the black chunk has water there? Or aliens? Or do you want the black to be impassable?


What you could to is catch the either of these events

https://lua-api.factorio.com/latest/eve ... _generated
or
https://lua-api.factorio.com/latest/eve ... nk_charted

and replace the chunk with out-of-map tiles. They are black and impassable then.

Then also catch

https://lua-api.factorio.com/latest/eve ... or_scanned

to get where radar looks at and restore those chunks to their original content if you have them blacked out.

So a player revealing a chunk would get all out-of-map tiles while the radar reveal restores it to the real map. Expect some side effects with pollution going into the deep dark behaving differently or no more aliens coming out of the deep dark to spread into charted regions or to attack you.

Re: Map Reveal help

Posted: Wed Dec 06, 2023 8:06 am
by Qon
dtoxic wrote:
Thu Oct 19, 2023 8:28 am
Is there a way to completely disable map reveal by the player only? radars and similar items should remain unaffected.
I was going to suggest starting with setting character prototype radar_range to 0, but turns out data.raw doesn't contain anything using the radar_range field, so for the character it seems to be un-removable and hard coded in the engine (but you probably can set it and have an overlapping longer range).

So it looks from documentation that it would be easy to just set radar_range to 0, but that probably doesn't do anything :(