Table of Contents

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

  1. 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)
  2. 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.

  3. 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.
  4. Lifecycle Integration
    Aspects are typically accessed through a central AspectManager (registered during plugin initialization). The AspectManager ensures each Aspect is correctly initialized and ready to use after RisingV’s Initialize → Load → Ready sequence.

  5. EventBridge Coordination
    Some Aspects internally publish or subscribe to events via the shared EventBridge. For example, BuffAspect may listen for buff-application events, while VBloodAspect publishes events when V Blood is consumed. This event-driven design enables reactive, decoupled plugin logic.

How to Use Aspects

  1. Inject or Retrieve Aspects from AspectManager
    In your plugin’s Awake or OnEnable method, obtain references to needed Aspects:

    private CharacterAspect _characterAspect;
    
    public void SomeEntityMethod(Entity playerEntity)
    {
        _characterAspect = playerEntity.As<CharacterAspect>();
        _unitAspect = playerEntity.As<UnitAspect>();
    }
    
  2. 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);
    
  3. 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:

For complete details on each Aspect (method signatures, parameters, return values), refer to the official API documentation:

🔗 RisingV.Core.Aspects API Reference


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.