Mercurial > malikania
changeset 167:efb28047f568
Docs: add inventory.md specifications
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 19 Jul 2018 12:25:00 +0200 |
parents | 0f1f4919792e |
children | bc450538a6c4 |
files | doc/specs/inventory.md |
diffstat | 1 files changed, 52 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/specs/inventory.md Thu Jul 19 12:25:00 2018 +0200 @@ -0,0 +1,52 @@ +# Inventory + +This document describes the inventory system in Malikania's Kingdom. + +# Synopsis + +The inventory is a persistent component where user stores its objects. It can be +equipments, drinks, foods and so on. As Malikania tries to follow some concepts +in real life, the inventory has limited size to avoid storing ten thousands of +objects. + +# Slots + +Inventory is composed of slots, you can think this as a cell in a grid. The user +inventory has 16 slots. Each slot can only have one type of object but may have +multiple amount of the same object in it. + +Example: + ++---+---+---+---+---+---+---+---+ +| E | P | R | | | | | | ++---+---+---+---+---+---+---+---+ +| | | | | | | | | ++---+---+---+---+---+---+---+---+ + +Here we have E, P and R types of object which can be anything, a drink, a food +or an equipment. + +Note: equipped gears are not in inventory! + +# Amount + +Since not all objects are created equal, the amount by type is different. For +example, one may have dozen of the same biscuit in a slot but only have one +sword per slot. This means that an item must define a maximum amount. + +Example: + +- biscuits (A): maximum amount to 64 +- sword (B): maximum amount to 1 +- drinks (C): maximum amount to 8 + +Then, if user wants to carry 10 drinks (C), 1 sword (B) and 120 biscuits (A), +the stack will look like: + ++-----+-----+-----+-----+-----+-----+-----+-----+ +| A | A | B | C | C | | | | +| x56 | x64 | x1 | x8 | x2 | | | | ++-----+-----+-----+-----+-----+-----+-----+-----+ +| | | | | | | | | +| | | | | | | | | ++-----+-----+-----+-----+-----+-----+-----+-----+