Wiki source code of Looting System
Version 4.1 by Alexandros Mloukie on 2026/01/20 01:57
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | = 0 - Introduction = | ||
| 2 | |||
| 3 | The purpose of this document is to give a more detailed explanation on how Looting would work in the Mawforged MVP. Note that changes can be made to this system in the final game. Should the assigned programmer need any more information, contact {{mention reference="XWiki.AlexandrosMloukie" style="FULL_NAME" anchor="XWiki-AlexandrosMloukie-9xtdtf"/}} . | ||
| 4 | |||
| 5 | ---- | ||
| 6 | |||
| 7 | = 1 - Looting Process = | ||
| 8 | |||
| 9 | == 1.1 - Enemy Inventory == | ||
| 10 | |||
| 11 | For looting to be possible, the enemies need to have their own inventory components, similar to the ones the player has. This inventory also has to be populated with the enemy drops, which must be **changeable later using a designer-friendly approach**. | ||
| 12 | |||
| 13 | {{info}} | ||
| 14 | My suggestion would be the use of a Data Table, where each enemy will have an entry that holds an array of ItemStacks. The appropriate Data Table entry is then used on the enemy's to populate the enemy inventory. | ||
| 15 | {{/info}} | ||
| 16 | |||
| 17 | == 1.2 - Loot Display == | ||
| 18 | |||
| 19 | When interacting with the corpse of an enemy to loot them, both the player and enemy inventories must be displayed side by side: | ||
| 20 | |||
| 21 | == 1.3 - Item Movement == | ||
| 22 | |||
| 23 | With the looting engaged, the player can now move items from the enemy's inventory to their own. Items are only moved if they can fit in the inventory. | ||
| 24 | |||
| 25 | * Should the player attempt to move an item but ends the interaction with the enemy corpse, the item is not moved and retains its original place on the enemy's inventory. | ||
| 26 | * Items cannot be moved from the player's inventory to that of the enemy's. One-way only. | ||
| 27 | * Items cannot be placed onto the toolbar directly from the enemy inventory. | ||
| 28 | |||
| 29 | [[image:Looting Manual.png]] |