Ability to mark non-interactive areas/zones

User avatar
Godmave
Long Handed Inserter
Long Handed Inserter
Posts: 89
Joined: Tue Nov 15, 2016 3:52 pm
Contact:

Ability to mark non-interactive areas/zones

Post by Godmave »

I would like to mark one or multiple areas/zones defined by (for starters) a square, without needing to place down concrete or something similar via (soft-)mod.
Visually I would prefer a not too in your face border. Maybe a definable tint of the border tiles.

surface.addZone(x1,y1,x2,y2,tint={r,g,b,a}, fill=bool) : returns zoneId
surface.removeZone(zoneId)

or for polygonal markings:
surface.addZone(area=[{x,y},{x,y},{x,y},{x,y},..],tint={r,g,b,a}, fill=bool) : returns zoneId

instead of fill you could do flags={fill=true/false, flash=true/false, show_on_map=true/false etc.}

My use-case: Mark zones that allow building a specific building, or give buildings specific abilities if they are in a specific zone. In my case a train-stop gets the ability to teleport. I can implement the zones, but the player has to guess where the zones are, which is not very user friendly. But placing down concrete looks ugly, conflicts with stuff on the map and has complications when changing the zones dimensions later.

Possible use-case for you: Use it in tutorials to highlight stuff for the current tutorial step. "Go here and mine zone iron ore".
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Ability to mark non-interactive areas/zones

Post by eradicator »

Additional possible usecase:
Minecraft had zone-based permissions (vanilla, modded? don't remember) so that players could "own" plots of lands where other players were not allowed to build. For PvP this could for example be used to enforce that team A only builds west of {0,0} and team B only east of {0,0}. Visually a sort of striped border like hazard concrete but much thinner and semi-transparent would be nice, and there should probably be a button to toggle it on and off.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14911
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Ability to mark non-interactive areas/zones

Post by Rseding91 »

This seems completely outside of what the base game should be doing. All of that can be done with mods.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Godmave
Long Handed Inserter
Long Handed Inserter
Posts: 89
Joined: Tue Nov 15, 2016 3:52 pm
Contact:

Re: Ability to mark non-interactive areas/zones

Post by Godmave »

Well, the point was not to have to resort to mods. And using hundreds or thousands of sprites to draw the border marker does not really sound like a performant solution.
I am not aware of way to just draw a semi-transparent colored line (not using sprites) on a surface via mods either. If there is, I would be thankful for a pointer in the right direction.
Bilka
Factorio Staff
Factorio Staff
Posts: 3314
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Ability to mark non-interactive areas/zones

Post by Bilka »

I implemented this for 0.17: https://lua-api.factorio.com/0.17.0-pre ... ering.html It allows you to simply draw the zones using the rectangle or by using multiple dashed lines, if you want to get fancy :)
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Implemented mod requests”