Export normal item stack?

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Honktown
Filter Inserter
Filter Inserter
Posts: 798
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Export normal item stack?

Post by Honktown »

Code: Select all

export_stack() → string

Export a supported item (blueprint, blueprint-book, deconstruction-planner, upgrade-planner, item-with-tags) to a string

Return value
The exported string
I was wondering if maybe we could get this for other items? Currently if one wants to store an item temporarily, one needs to make a script inventory and move the item in. It can work, but in unlikely events, the script inventory is too small, the inventory could get laggy, or another mod can interact with it.

If an item were exported to a string or table it'd be easier to store, transfer, even copy/paste to provide an exact item (armor, item-with-entity-data, etc) and state for script code, or to show some behavior / combination in another game. A modder could probably do this all in code, but every item type and property would need to be known and safely set all of it when assigning... the game already has all (almost all?) this handled
I have mods! I guess!
Link

Post Reply

Return to “Modding interface requests”