Page 1 of 1
making Stone-Rock visible on map
Posted: Tue Jun 27, 2017 3:32 pm
by robertpaulson
Hi. I have been trying to make Stone-Rock visible on map with the following code:
Code: Select all
data.raw["simple-entity"]["stone-rock"].map_color = {r = 255, g = 255, b = 0}
However it doesn't work.
This seems to work for electric poles or ore-resources but they are already visible on the map, I just hoped it would work for any entity. Is there a way to trigger map color for entities that do not have it to start with?
Re: making Stone-Rock visible on map
Posted: Tue Jun 27, 2017 9:22 pm
by robertpaulson
What my code actually does is that now Stone-Rocks have "base > OreMapColor" in yellow, in there description. Anyone has any clue why?
My apologies if these are trivial questions, I'm very new to even the idea of modding.
Re: making Stone-Rock visible on map
Posted: Tue Jun 27, 2017 9:53 pm
by robertpaulson
OK I found that Rocks have "not-on-map" property in the decorative lua, I wasn't sure how to properly handle it via mod script so i just deleted that from the lua. (I did make a backup of Decorative.lua).
It seems to work as they do show on map now! However they still have the yellow font in their description.
This is the line I changed
Code: Select all
name = "stone-rock",
flags = {"placeable-neutral", "placeable-off-grid", "not-on-map"}
If someone can tell me how to nill it via mod file that would be great but for now I will play with my "edited" main game lua.
Cheers.
Re: making Stone-Rock visible on map
Posted: Tue Jun 27, 2017 10:18 pm
by DaveMcW
Code: Select all
data.raw["simple-entity"]["stone-rock"].flags = {"placeable-neutral", "placeable-off-grid"}
Re: making Stone-Rock visible on map
Posted: Tue Jun 27, 2017 10:25 pm
by robertpaulson
DaveMcW wrote:Code: Select all
data.raw["simple-entity"]["stone-rock"].flags = {"placeable-neutral", "placeable-off-grid"}
Well that's embarrassing lol
Thank you for help nonetheless, chhers
Re: making Stone-Rock visible on map
Posted: Tue Jun 27, 2017 11:01 pm
by darkfrei
robertpaulson wrote:Code: Select all
name = "stone-rock",
flags = {"placeable-neutral", "placeable-off-grid", "not-on-map"}
If someone can tell me how to nill it via mod file that would be great but for now I will play with my "edited" main game lua
info-mod 0.0.3
With this mod you can open
factorio-current.log and find this text:
Code: Select all
data.raw.simple-entity.stone-rock.flags.3 = not-on-map
It must be replaced with
Code: Select all
data.raw["simple-entity"]["stone-rock"].flags.3 = nil
or
Code: Select all
data.raw["simple-entity"]["stone-rock"].flags = {"placeable-neutral", "placeable-off-grid"} -- here is no third flag
Place this string into data.lua and your mod is complete.

Minuses are not allowed and you must replace
.name-with-minus with
["name-with-minus"].