Hello all,
I am trying to figure out how to reliably calculate the bounding box of a blueprint on the surface when it is being placed down by the player during the on_pre_build event. The reason for this is that I need to apply some operations on any number of ghost entities that occupy the ...
Search found 37 matches
- Thu Mar 27, 2025 4:00 pm
- Forum: Modding help
- Topic: Blueprint bounding box during on_pre_build event with relative snap-to-grid
- Replies: 0
- Views: 28
- Tue Nov 12, 2024 6:05 pm
- Forum: Modding help
- Topic: [2.0] Get blueprint in cursor on_pre_build
- Replies: 3
- Views: 461
Re: [2.0] Get blueprint in cursor on_pre_build
And to anyone else who might face-palm like myself, at least for the inventory book access , active blueprint from the blueprint book held in inventory can be grabbed with:
stack.get_inventory(defines.inventory.item_main)[stack.active_index]
I just failed to realise that books expose their ...
stack.get_inventory(defines.inventory.item_main)[stack.active_index]
I just failed to realise that books expose their ...
- Wed Nov 06, 2024 12:44 am
- Forum: Modding help
- Topic: [2.0] Get blueprint in cursor on_pre_build
- Replies: 3
- Views: 461
Re: [2.0] Get blueprint in cursor on_pre_build
In fact, from what I can tell, it is not possible to do anything similar with the LuaItemCommon (when a BlueprintBookItem) either. We do have a LuaItemCommon.active_index if it is a blueprint book, but nothing to do with it? 
Best regards,
Branko

Best regards,
Branko
- Wed Nov 06, 2024 12:25 am
- Forum: Modding help
- Topic: [2.0] Get blueprint in cursor on_pre_build
- Replies: 3
- Views: 461
Re: [2.0] Get blueprint in cursor on_pre_build
I am actually baffled by this one as well. There are multiple mods I have which heavily depend on being able to access blueprint entities no matter where they are stored, and this kinda kills off a lot of their usability.
This surely must be some kind of oversight? It would be useful even if we ...
This surely must be some kind of oversight? It would be useful even if we ...
- Tue Nov 05, 2024 9:45 pm
- Forum: Resolved Problems and Bugs
- Topic: [Rseding91] [2.0.13] Space platforms trying to construct ghosts belonging to different force
- Replies: 3
- Views: 954
Re: [Rseding91] [2.0.13] Space platforms trying to construct ghosts belonging to different force
Always a pleasure, thank you for addressing this one. 

- Tue Nov 05, 2024 4:50 pm
- Forum: Bug Reports
- Topic: [2.0.14] Build events not triggered for ghost underground belts during super-forced build
- Replies: 1
- Views: 267
[2.0.14] Build events not triggered for ghost underground belts during super-forced build
Description
When a player is placing an entity ghost in midst of transport belts while using super-forced build, the game automatically deconstructs underlying entities, and places down ghost undergrounds on either side of the newly-placed ghost entity in order to ensure the transport belt line ...
When a player is placing an entity ghost in midst of transport belts while using super-forced build, the game automatically deconstructs underlying entities, and places down ghost undergrounds on either side of the newly-placed ghost entity in order to ensure the transport belt line ...
- Mon Nov 04, 2024 4:47 pm
- Forum: Assigned
- Topic: [Lou][2.0.13] Inconsistent behaviour (belt vs others) when changing ghost entity force during super-forced builds
- Replies: 1
- Views: 297
Re: [Lou][2.0.13] Inconsistent behaviour (belt vs others) when changing ghost entity force during super-forced builds
In the meantime I have figured out why the crash started to happen in the mod - there were some changes to event properties that I did not adjust the code for - so some of the code that was supposed to switch back the force for unapproved ghost just before a new ghost gets pasted in never kicked in ...
- Mon Nov 04, 2024 4:22 pm
- Forum: Resolved Problems and Bugs
- Topic: [Lou][2.0.14] Spidertron ghosts are not snap-placed to existing ghost entitties when using blueprints
- Replies: 1
- Views: 630
[Lou][2.0.14] Spidertron ghosts are not snap-placed to existing ghost entitties when using blueprints
[2.0.14] Spidertron ghosts are not snap-placed to existing ghost entitties when using blueprints
Description
When trying to place a spidertron ghost on top of an existing spidretron ghost using a blueprint, the new ghost entity will not snap to existing one (effectively refusing to place ...
Description
When trying to place a spidertron ghost on top of an existing spidretron ghost using a blueprint, the new ghost entity will not snap to existing one (effectively refusing to place ...
- Mon Nov 04, 2024 3:58 pm
- Forum: Assigned
- Topic: [lou] [2.0.14] Vehicle-like inventory slot filters not overwritten with forced pasting
- Replies: 0
- Views: 168
[lou] [2.0.14] Vehicle-like inventory slot filters not overwritten with forced pasting
Description
Vehicle-like inventory slot filters are not overwritten when using forced/super-forced pasting on top of existing vehicle ghost entities.
Reproductions steps
Place down a car ghost.
Set any number of inventory slot filters on the placed car ghost.
Create a blueprint with the ...
Vehicle-like inventory slot filters are not overwritten when using forced/super-forced pasting on top of existing vehicle ghost entities.
Reproductions steps
Place down a car ghost.
Set any number of inventory slot filters on the placed car ghost.
Create a blueprint with the ...
- Mon Nov 04, 2024 3:11 pm
- Forum: Modding interface requests
- Topic: Expose entity-ghost Inventory Filters to Lua
- Replies: 2
- Views: 1115
Re: Expose entity-ghost Inventory Filters to Lua
With the 2.0 game release, the player can now modify placed ghost entities - including recipes, filters etc. However... It looks like we still cannot programmatically easily access the "inventories" of ghost entities (primarily for the ability to modify the slot filters as mentioned by the original ...
- Fri Nov 01, 2024 7:31 pm
- Forum: Assigned
- Topic: [Lou][2.0.13] Inconsistent behaviour (belt vs others) when changing ghost entity force during super-forced builds
- Replies: 1
- Views: 297
[Lou][2.0.13] Inconsistent behaviour (belt vs others) when changing ghost entity force during super-forced builds
Description
When a player tries to do a super-forced build over existing ghost entities, there is a difference in behaviour, depending on ghost type, when the ghost entity's force is changed during the on_built_entity event.
Described scenario is a bit unusual, and probably not something that ...
When a player tries to do a super-forced build over existing ghost entities, there is a difference in behaviour, depending on ghost type, when the ghost entity's force is changed during the on_built_entity event.
Described scenario is a bit unusual, and probably not something that ...
- Fri Nov 01, 2024 4:43 pm
- Forum: Resolved Problems and Bugs
- Topic: [Rseding91] [2.0.13] Space platforms trying to construct ghosts belonging to different force
- Replies: 3
- Views: 954
[Rseding91] [2.0.13] Space platforms trying to construct ghosts belonging to different force
Description
When a ghost entity is placed on a space platform that does not match the space platform's force, the platform will keep "trying" to construct the said entity, including requesting the missing item for entity's construction. If the item is available, the platform will start the audio ...
When a ghost entity is placed on a space platform that does not match the space platform's force, the platform will keep "trying" to construct the said entity, including requesting the missing item for entity's construction. If the item is available, the platform will start the audio ...
- Thu Oct 31, 2024 2:23 pm
- Forum: Modding interface requests
- Topic: Events for LuaRecipe object modificatons
- Replies: 0
- Views: 158
Events for LuaRecipe object modificatons
Hello,
Would it be possible to introduce some additional events related to changes being made to the LuaRecipe objects?
While most of the usual recipe-related changes (like technology unlocks) are already covered by research-related events, mods can still change a couple of properties that do not ...
Would it be possible to introduce some additional events related to changes being made to the LuaRecipe objects?
While most of the usual recipe-related changes (like technology unlocks) are already covered by research-related events, mods can still change a couple of properties that do not ...
- Thu Oct 31, 2024 1:42 pm
- Forum: Won't implement
- Topic: Entity filter for player.disable_alert()?
- Replies: 3
- Views: 516
Re: Entity filter for player.disable_alert()?
To chime in on this one since I have been maintaining a fork of the mentioned mod and faced similar issues as well (hello ceresward :) ), it would be even better if we could tell the game during runtime to ignore specific ghosts for bot-based construction. This would quite probably also trivialise ...
- Sun Oct 27, 2024 9:31 pm
- Forum: Resolved Problems and Bugs
- Topic: [Rseding91] [2.0.10] LuaRecord.deconstruct_area does not deconstruct ghosts/order entity deconstruction
- Replies: 2
- Views: 748
Re: [Rseding91] [2.0.10] LuaRecord.deconstruct_area does not deconstruct ghosts/order entity deconstruction
Thank you for fixing it this quickly 

- Sat Oct 26, 2024 10:53 am
- Forum: Modding help
- Topic: on_pre_build not triggering when quick-building rails
- Replies: 0
- Views: 128
on_pre_build not triggering when quick-building rails
Does anyone know if quick-building rails (as opposed to building individual rails) is meant not to trigger the on_pre_build event? Is this really on purpose or probably a bug within the game?
- Fri Oct 25, 2024 1:25 pm
- Forum: Resolved Problems and Bugs
- Topic: [Rseding91] [2.0.10] LuaRecord.deconstruct_area does not deconstruct ghosts/order entity deconstruction
- Replies: 2
- Views: 748
[Rseding91] [2.0.10] LuaRecord.deconstruct_area does not deconstruct ghosts/order entity deconstruction
Description
Using deconstruction planner from player's library to deconstruct an area via player.cursor_record.deconstruct_area invocation has no effect.
Reproduction steps
Start a new game, and place some belts and belt ghosts in vicinity of the shipwreck.
Create a deconstruction planner ...
Using deconstruction planner from player's library to deconstruct an area via player.cursor_record.deconstruct_area invocation has no effect.
Reproduction steps
Start a new game, and place some belts and belt ghosts in vicinity of the shipwreck.
Create a deconstruction planner ...
- Sun Jun 30, 2024 11:55 am
- Forum: Resolved Problems and Bugs
- Topic: [Rseding91] [1.1.109] "Request from buffer chest" not preserved when changing the force
- Replies: 1
- Views: 1472
[Rseding91] [1.1.109] "Request from buffer chest" not preserved when changing the force
Description
When changing the force of a requester chest entity, Request from buffer chests option is not preserved.
Reproduction steps
Start a new game, enable the cheat mode.
Create a new (friendly) force using the console:
/c player_ally = game.create_force("player.ally")
/c player ...
When changing the force of a requester chest entity, Request from buffer chests option is not preserved.
Reproduction steps
Start a new game, enable the cheat mode.
Create a new (friendly) force using the console:
/c player_ally = game.create_force("player.ally")
/c player ...
- Wed Jun 26, 2024 11:11 am
- Forum: Modding interface requests
- Topic: Button for downloading all missing dependencies
- Replies: 0
- Views: 480
Button for downloading all missing dependencies
Hello,
Would it be possible to introduce some form of button/functionality to the mods management user interface that would allow player (modpack developer) to download all missing dependencies for the mod(pack) with a single click?
The main use-case for this would be the ability to easily work ...
Would it be possible to introduce some form of button/functionality to the mods management user interface that would allow player (modpack developer) to download all missing dependencies for the mod(pack) with a single click?
The main use-case for this would be the ability to easily work ...
- Thu Oct 26, 2023 10:58 pm
- Forum: Modding help
- Topic: Please Help with multiplayer error message
- Replies: 4
- Views: 1623
Re: Please Help with multiplayer error message
Since I just got hit by this one, maybe I can at least try to shed some light on what I think happens. And in some ways, I am doing something similar where I register event handler for on_nth_tick, but only when required (my mod does some processing of delivered equipment, and if there's nothing ...