al2f/umbrella
1
2
Fork
You've already forked umbrella
0
3 Items
al2f edited this page 2023年04月29日 15:23:44 +09:30
Table of Contents

Items in the game are usually stored with their template name and amount. When using items, or checking their properties, the name is looked up in items/items.txt to get the full information on that item.

An item stored in the inventory would look like:

{
"amount": 4,
"type": "fungus"
}

Whereas the item information when looked up would be:

fungus={
	"id": 0,
	"on_eat": {
		"hp": [2]
	}
}

Properties

Items have various properties for apply their effects.

  • on_eat triggered on eating (unimplemented)
    • hp list of possible hp values, random value is picked when eating
    • hp_display string to display in the inventory in place of average of the hp list
  • on_drink triggered on drinking (unimplemented)
  • on_helmet triggered when wearing item on head (unimplemented)
  • on_cape triggered when wearing item on body (unimplemented)
  • on_glove triggered when wearing item on hands (unimplemented)
  • on_boot triggered when wearing item on feet (unimplemented)

Additionally, each item has its id and a corporeal flag (unimplemented). Items with the corporeal flag will count towards the inventory item limit, whereas items with corporeal set to false will not.

Stacking

The maximum number of items in a stack is defined in items/items.txt under [info] -> stacks, using item ids.

Descriptions

Item descriptions are stored in items/items.txt under [info] -> descriptions, using item ids.