Page 1 of 1

Export normal item stack?

Posted: Sat Jul 10, 2021 7:03 pm
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