making Stone-Rock visible on map

Place to get help with not working mods / modding interface.
robertpaulson
Long Handed Inserter
Long Handed Inserter
Posts: 92
Joined: Sun Jun 18, 2017 2:21 pm
Contact:

making Stone-Rock visible on map

Post 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?
robertpaulson
Long Handed Inserter
Long Handed Inserter
Posts: 92
Joined: Sun Jun 18, 2017 2:21 pm
Contact:

Re: making Stone-Rock visible on map

Post 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.
robertpaulson
Long Handed Inserter
Long Handed Inserter
Posts: 92
Joined: Sun Jun 18, 2017 2:21 pm
Contact:

Re: making Stone-Rock visible on map

Post 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.
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3749
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: making Stone-Rock visible on map

Post by DaveMcW »

Code: Select all

data.raw["simple-entity"]["stone-rock"].flags = {"placeable-neutral", "placeable-off-grid"}
robertpaulson
Long Handed Inserter
Long Handed Inserter
Posts: 92
Joined: Sun Jun 18, 2017 2:21 pm
Contact:

Re: making Stone-Rock visible on map

Post 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
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: making Stone-Rock visible on map

Post 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.

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

Return to “Modding help”