How to modify Placement Range

Place to get help with not working mods / modding interface.
Post Reply
Bastonete
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Aug 18, 2014 2:39 pm
Contact:

How to modify Placement Range

Post by Bastonete »

I've been looking into the code to make a few modifications but I haven't been able to find where the value for the placement distance is stored. I'd like to increase it a bit.

Thanks in advance.

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: How to modify Placement Range

Post by FreeER »

I'm fairly sure that it's actually hard coded in C++...
While you could probably fake it by using control.lua to create the entity when the player tries to place an item that would very likely destroy the ability for other mods to detect entity placement (game.createentity does not raise the onentitybuilt event, and while you can raise it manually you can't pass a 'Factorio rich' object like an entity reference to the event), so... probably not worth it.

Bastonete
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Aug 18, 2014 2:39 pm
Contact:

Re: How to modify Placement Range

Post by Bastonete »

Oh, I see. That's too bad. :( Thanks for the quick reply.

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: How to modify Placement Range

Post by FreeER »

Bastonete wrote:Oh, I see. That's too bad. :(
Yeah, I'm not sure if there's a reason for it being hard coded at this point (probably was for simplicity in the beginning), so it's possible you could make a request in Modding interface requests and ask the devs to make it possible (though they are a bit busy with multiplayer so it could be a while).

Post Reply

Return to “Modding help”