Game Systems & Plugin Wiki
Developer documentation for modular game logic, event dispatchers, and plugin integration.
Architecture Overview
The engine utilizes a modular plugin architecture that decouples core gameplay systems from peripheral mechanics. Custom modules register against an event bus and execute within isolated lifecycle steps.
| Module Name | Type | Default Status | Dependencies |
|---|---|---|---|
Core.Combat |
Gameplay | Active | PhysicsEngine |
Core.Inventory |
Data/State | Active | PersistenceManager |
Network.StateSync |
Networking | Active | CoreEngine |
Tools.Profiler |
Diagnostic | Disabled (Prod) | None |
Plugin Directory Structure
Custom compiled plugins and configuration manifests must reside in the dedicated plugin folder on the server:
/game-server/
├── server_executable
├── configs/
│ └── game_rules.json
└── plugins/
├── CombatPlugin/
│ ├── plugin.manifest
│ └── CombatPlugin.dll
└── CustomItems/
├── plugin.manifest
└── config.json
Lifecycle & Hook Execution
Every plugin inherits from IGamePlugin and must implement standard lifecycle callbacks:
public class CustomGamePlugin : IGamePlugin
{
public void OnLoad()
{
// Allocate resources, read config files
Logger.Info("Plugin loaded successfully.");
}
public void OnTick(float deltaTime)
{
// Frame/Tick-based logic updates
}
public void OnUnload()
{
// Teardown event bindings and release memory
}
}
Console & Debug Commands
Custom commands exposed via registered game modules:
| Command | Arguments | Permission | Description |
|---|---|---|---|
/plugins list |
None | All | Outputs all currently loaded plugins and versions. |
/plugin reload |
<PluginName> |
Admin (Level 4) | Hot-reloads binary and config without stopping server. |
/combat debug-hitboxes |
[true|false] |
Developer (Level 2) | Draws bounding boxes and rays in the viewport. |
Configuration Schema (JSON)
Example definition for plugins/CustomItems/config.json:
{
"plugin_name": "CustomItems",
"version": "1.0.4",
"enable_durability": true,
"max_stack_size": 64,
"drop_rate_multiplier": 1.25,
"blacklisted_zones": [
"safe_zone_hub",
"arena_spectator"
]
}