Aspects Overview
The RisingV.Core.Aspects namespace defines a set of “Aspect” classes that provide high-level, domain-specific facades for interacting with various gameplay systems in V Rising. By encapsulating common operations—such as manipulating character stats, handling inventory, or querying world entities—these Aspects promote a modular, maintainable approach to plugin development. Instead of directly calling low-level game APIs, plugin authors can use Aspect methods to perform complex tasks with minimal boilerplate.
Purpose and Responsibilities
Modular Facades for Game Domains
Each Aspect class groups related functionality around a specific gameplay concept:- Character & Unit Management:
CharacterAspect
,UnitAspect
,PlayerAspect
,NpcAspect
,MinionAspect
- Combat & Buff Systems:
CombatAspect
,BuffAspect
,VBloodAspect
- Inventory & Items:
InventoryAspect
,ItemAspect
,EquipmentAspect
- World & Entities:
EntityAspect
,MoveableAspect
,StructureAspect
,GatherableAspect
- Networking & Hybrid Models:
NetworkAspect
,HybridModelAspect
- AI & Behaviour Trees:
BehaviourTreeAspect
- Miscellaneous:
ComponentMonolith
(a central registry for component-driven operations)
- Character & Unit Management:
Simplified API
By exposing clear, domain-focused methods (e.g.,Health
,AddItem
,Spawn
, etc.), Aspects allow plugin developers to quickly implement features without needing to understand low-level ECS or networking code.Consistency & Reusability
- All Aspect classes follow a consistent naming pattern and design philosophy, making it easy to discover relevant methods.
- Common patterns—such as querying an
Entity
by its ID, retrieving related components, or sending networked RPCs—are abstracted behind Aspect methods, reducing duplicate code across multiple plugins.
Lifecycle Integration
Aspects are typically accessed through a centralAspectManager
(registered during plugin initialization). TheAspectManager
ensures each Aspect is correctly initialized and ready to use after RisingV’sInitialize → Load → Ready
sequence.EventBridge Coordination
Some Aspects internally publish or subscribe to events via the sharedEventBridge
. For example,BuffAspect
may listen for buff-application events, whileVBloodAspect
publishes events when V Blood is consumed. This event-driven design enables reactive, decoupled plugin logic.
How to Use Aspects
Inject or Retrieve Aspects from AspectManager
In your plugin’sAwake
orOnEnable
method, obtain references to needed Aspects:private CharacterAspect _characterAspect; public void SomeEntityMethod(Entity playerEntity) { _characterAspect = playerEntity.As<CharacterAspect>(); _unitAspect = playerEntity.As<UnitAspect>(); }
Call High‐Level Methods
Use Aspect methods to perform domain-specific operations:// Retrieve a player’s current health float currentHealth = _characterAspect.Health.Value // Add an item to a player’s inventory _inventoryAspect.AddItem("IronSword", 1); // Move an entity to a destination _moveableAspect.MoveTo(destinationPosition);
Extend or Override Aspects
If customization is required, you can:- Subclass an Aspect to add specialized methods or override behavior.
- Wrap an Aspect: Implement a decorator that intercepts calls to apply additional logic.
- Use Harmony Patches: For edge cases where direct Aspect methods are insufficient, patch underlying systems. However, prefer Aspect calls to maintain consistency.
Available Aspect Classes
Below is a categorized list of Aspects provided by RisingV.Core. Click each name to view its detailed API reference:
Character & Unit Management
– CharacterAspect
– PlayerAspect
– NpcAspect
– MinionAspect
– UnitAspectCombat & Buff Systems
– CombatAspect
– BuffAspect
– VBloodAspectInventory & Items
– InventoryAspect
– ItemAspect
– EquipmentAspectWorld & Entities
– EntityAspect
– MoveableAspect
– StructureAspect
– GatherableAspectNetworking & Hybrid Models
– NetworkAspect
– HybridModelAspectAI & Behaviour Trees
– BehaviourTreeAspectMiscellaneous
– ComponentMonolith
– CombatAspect
For complete details on each Aspect (method signatures, parameters, return values), refer to the official API documentation:
Summary
The Aspect layer in RisingV.Core offers a powerful, intuitive interface for plugin authors:
- Encapsulate common gameplay operations behind clearly named methods.
- Promote code reuse and reduce boilerplate.
- Provide consistency across different plugins by using a shared API.
- Simplify debugging and maintenance by centralizing domain logic into dedicated classes.
By leveraging these Aspects, you can accelerate development, ensure compatibility with future RisingV updates, and focus on creative mod features rather than low‐level game mechanics.