About Item Request Proxy Events
From Factorio Mod PortalUtility mod for item-request-proxy events.
This mod was designed for detecting when modules are added/removed from crafting machines by construction robots or space platforms, or when modules spoil inside a crafting machine. However, the API works for any type of item and any type of entity.
It is already possible to detect when a player directly adds/removes items from an entity with only a few events:
defines.events.on_player_fast_transferreddefines.events.on_player_dropped_item_into_entitydefines.events.on_player_cursor_stack_changed
There are, however, no built-in events for items being added/removed by construction robots or space platforms. In order to detect these cases, this mod adds lifecycle events for item-request-proxy entities. Using this mod's API, it is possible for a mod to receive events any time an item is added or removed from an entity by construction robots or space platforms. This mod also has an API that allows mods to receive events whenever items of any registered prototype spoil.
Cases this mod does not cover:
- Items added/removed from entities by inserters.
- Items added/removed from entities by logstic robots.
- Items added/removed from entities by script.
- Proxy containers.
Item Request Proxy Events
This API allows mods to receive events for items being added/removed from entities by construction robots and space platforms.
Subscribe to Creation Events
Covers creation of all item-request-proxy entities:
script.on_event("item-request-proxy-created", function(event)
-- Logic to run upon item-request-proxy creation
end)
Subscribe to Destruction Events
Covers both fulfillment and cancellation of all item-request-proxy entities:
script.on_event("item-request-proxy-removed", function(event)
-- Logic to run upon item-request-proxy removal
end)
Subscribe to Update Events
__Note: This does have a small on_tick cost.__ By default, the mod checks (up to) 4 item request proxies per tick. In my local testing, the worst-case update time was ~0.085ms.
Register specific item-request-proxy entities to fire events when updated:
script.on_event("item-request-proxy-created", function(event)
if matches_some_criteria(event) then
remote.call("item-request-proxy-events", "register_item_request_proxy_updated", event.unit_number)
end
end)
Subscribe to the update events:
script.on_event("item-request-proxy-updated", function(event)
-- Logic to run upon item-request-proxy update
end)
EventData
The event data for all three event types is the same:
tick:intThe game tick when theitem-request-proxyentity was created/removed/updated.name:stringThe name of the event.unit_number:intTheLuaEntity.unit_numberof theitem-request-proxyentity; mostly useful for deduplication and callingregister_item_request_proxy_updated.proxy_target:LuaEntityThe entity that theitem-request-proxyis targeting; after being removed, when theitem-request-proxyentity itself is no longer valid, theproxy_targetwill still be valid. If theproxy_targetentity was also removed, this wil benil.
Item Spoiled Events
This API allows mods to receive events for items spoiling inside entities.
Register a Prototype
In the data stage:
local spoilable_items = require("__item-request-proxy-events__.spoilable-items")
spoilable_items.register_item_spoiled_event(data.raw.module["my-module"])
Subscribe to Events
In the runtime stage:
script.on_event("item-spoiled", function(event)
-- Logic to run upon item spoiling
end)
EventData
The event data for this event is:
tick:intThe game tick when the item spoiled.name:stringThe name of the event.entity:LuaEntityThe entity in which the item spoiled (if there is no such entity the event will not be fired).
More Information
Adding to an Existing Save
When a save is loaded after this mod has been added to it, the mod will fire "catch-up" events for all existing item-request-proxy entities.
Issues
This is a new mod, and should still be considered experimental. So far it has only been tested with Rigor Module. Use at your own risk.
Highlights
From source dataGame versions
Built for Factorio 2.1.
Footprint
Rated a light load on a server.
License
Published under GNU LGPLv3.
Item Request Proxy Events on Nxeon
From our catalogue- One-click install
- Supported on Nxeon Factorio servers. We download it from Factorio Mod Portal, place it, and restart the server.
- Server side
- Required on the server
- Server load
- light
- Smallest plan we suggest
- Factorio — 2 GB (2 GB RAM). This follows our own load rating above, not a benchmark.
- Latest build
- 0.4.1, released 2026-09-03
Run Item Request Proxy Events on a Factorio server
Pick a server or deploy a new one above; it is installed in one click.
What kind of mod it is
From the catalogWeapons, items & crafting
New weapons, gear, items and the recipes to make them.
Runs on your server
From source side supportFactorio Mod Portal lists Item Request Proxy Events as required on the server. Check its Factorio Mod Portal page to see whether players need it too.
Compatibility
- Game
- Factorio
- Runs on
- Serverrequired on the server
- Game versions
- 2.1
Verified at the source
- ✓Factorio Mod PortalOfficial listing, checked 2026-10-08Open ↗
- ✓Authorthremtopod, as published on Factorio Mod Portal
- ✓LicenseGNU LGPLv3Free
