Props are the most important building block of the game. The architecture sets the world that is populated by props. This system describes what props do, what they are capable of and what kinds of props there are
Systems
- Many props can be moved around as physics objects. This depends on their Movement mode:
- None - the prop cannot be moved
- Light - the prop is moved as if it was a light object, similar to how hl2 and gmod does it (Eg: chairs, pots, computers)
- Heavy - the prop is dragged from the closest two of several drag pivots to the player to simulate him physically dragging a large prop. Requires manually placing points on locations where they make sense
- Any prop has built-in multi-interact functionality. This allows for more complex interactions, like being able to both move around and drag ovens as well as opening their inner inventory and turning them on, or being able to sleep on couches
- The system works by defining InteractionVolumes, which when looked at will display a set action that can be performed. These volumes should contextually be placed where the action makes sense (Eg: Near the knobs of an oven to toggle it on/off, the door to open the oven door or the cord on the back to pick up the cord)
- Holding E on any action will instead try to activate a Pick Up Prop action and pick up the prop, unless the prop movement mode is set to None. Pressing Shift and then E will do the same thing
- All props are breakable and have an HP value for simplicity sake. When broken they run a specified LootTable and spawn scraps
BaseProp (BaseSmartProp)
The base prop is the foundation of any prop. It allows for the player to interact with it and has built-in prop movement functionality and multi-interact frameworks. On top of this system other props are built
This system is intended to be built on top of via inheritance, yet should not be used too much as to not overwhelm the player with choices.
BaseContainer
This is the base for all props that contain an inventory inside of themselves. Useful for all kinds of boxes, drawers and other more complex props that require an inventory
BaseLootbox
The base class for all lootboxes that could act as props. Child class of the BaseContainer. For more info refer to Loot & Lootbox System [REFACTOR PLAN]
BaseMultiContainer
This one has the framework for multiple containers at once, with the player focusing on them by hovering their mouse on them, or interacting with the specific inventory of their choice
BaseVehicle
This prop allows the player to take control of it. Despite its name it’s usually used for items that resemble carts, like shopping carts, dollies and etc.
Interfaces
Props can also set up one or more interfaces to interact with the world around it: