Rectangular Roboport Zones?

Place to post guides, observations, things related to modding that are not mods themselves.
User avatar
SphynxLoL
Inserter
Inserter
Posts: 21
Joined: Tue Apr 25, 2017 3:32 am
Contact:

Rectangular Roboport Zones?

Post by SphynxLoL »

I have a fairly simple idea for a mod that I was thinking might be a good place to start learning/putting together my first mod. Essentially I wanted to make a roboport that was 2x2 with ONLY a construction zone that is about 6x18 (rotatable). This would be a great way to set up cheaper roboports along a wall to repair/replace any damage to your defenses. I poked around a few mods that dealt with Roboports and it seemed all of them had "squared". Is it possible to have a single rectangle zone? If not, is it possible for a single robotport to have multiple zones? ie 2 or 3 6x6 construction zones linked to a single robotport to make a rectangle.
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3733
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Rectangular Roboport Zones?

Post by DaveMcW »

It's not possible with a simple data.lua mod.

You can write a more advanced control.lua mod that listens for on_built events and adds invisible roboports to create the shape you want.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Rectangular Roboport Zones?

Post by bobingabout »

The reason you can't really do that is because the zone is defined as "Diameter", meaning, if you set it to 50, it extends by 5 north, south, each, and west, creating a 100x100 zone.

And that is the extent of your control of the zone.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
Post Reply

Return to “Modding discussion”