scene_add_currency
Define a custom currency in a copied save and add a backpack to every character to hold it, with an optional starting amount.
Instructions
Define a currency (货币) in a copy of a save and give every character a backpack that can hold it, optionally with a starting amount. Currency is the platform's own money: a graph reads and changes it with f.getInventoryCurrencyQuantity(character, currencyId) and f.modifyInventoryCurrencyQuantity(character, currencyId, change), whenTheQuantityOfInventoryCurrencyChanges fires on the character, and shops, item prices and drops are all counted in it. The holder is the character entity (the backpack component is put on the character template), not the player entity. If the map has no backpack template, one of ten slots is made. icon is the number of a currency icon (100001 is the default one, 100007 the Mora coin). The records written are byte for byte those of the official sample 货币与商店. Writes a new .gil in the workspace; the official save is not touched. Verified in play on 2026-10-10: the starting amount is there, and the change event also fires once when the level starts, for the starting amount.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| icon | No | ||
| name | Yes | ||
| mapPath | No | ||
| outputName | No | ||
| startAmount | No |