Hello guys, I’ve been working a lot in this project this past month, not many visual things to show though:
- Made a robust item structure, with Item configuration separated on a scriptableobject, item instance on its own class hierarchy (item instance isn’t a monobehaviour, so it don’t rely on a gameobject to exist, made this way so I can keep item instances inside containers without the additional overload), I also did a itemRepresentation class that takes care of displaying the item when it needs to;
- Added a Command structure that encapsulates the commands given to the survivors (such as walking, gathering resources, attacking etc.), now they can queue actions and can receive a small amount of IA through the commands system;
- Added a Simple skill structure;
- Created an Interaction system, now my entities (such as the animals and structures) inherits from the Interactable class, and they can hold a number of interactions, this way I can add multiple behaviours to entities, for example, an animal could: Be attacked, be cut, be befriended, be dragged, be inspected etc;
- Swapped the CameraRaycast system that relied on layers, to a system that relies on interactions, now I use RaycastAll and SphereOverlap to retrieve a number of interactables and choose an interaction accordingly to the player will, this will allow adding action wheels so the player can choose what he wants to do with the other entity;
- Created an Inventory system (each survivor have its own inventory), items can be stacked accordingly to its type, dropped in the floor, picked up and trade, the inventory grows accordingly to the number of items that the player is holding, and you can minimize/maximize it;
- Created a smart tooltip system, every interactable will return information about his name and the main interaction on mouse over, items on the inventory display more information such as weight, type etc., every item knows how to handle it’s own tooltip and the tooltip will shrink/grow in order to be in same size as the text it’s displaying.
This is a small video showing both the inventory system working and the tooltip system as well, the other systems are less visual, no much to be shown there:
Now I will work on the equipment system and on text feedback system, for things like showing a “+0.2kg of wood” when the player is gathering wood, or a message saying that the inventory is full if the player tries to add something to it while it’s already full.