Include surface_index in on_pre_build

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Zelaron
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Feb 14, 2026 1:18 pm
Contact:

Include surface_index in on_pre_build

Post by Zelaron »

When a player places a blueprint, the 'on_pre_build' event contains no surface information.

We get the player_index (but player surface can differ from the blueprints) and the map position, which is not enough if we don't know the surface.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16586
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Include surface_index in on_pre_build

Post by Rseding91 »

The player surface won't differ from the built blueprint. The player surface is directly used to build the blueprint.
If you want to get ahold of me I'm almost always on Discord.
Zelaron
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Feb 14, 2026 1:18 pm
Contact:

Re: Include surface_index in on_pre_build

Post by Zelaron »

Thanks for the reply. I should have tried that. I just assumed it would use the surface the player character was on.
Post Reply

Return to “Modding interface requests”