Configuring the Exp System
Configuring the Experience (EXP) System
This guide shows you how to adjust the core EXP progression formula and customize individual EXP pickups in the RGame RoguelikeKit.
1. Adjust Level-Up Requirements
In Unity’s Project window, navigate to:
Assets/RGame/RoguelikeKit/ScriptableObjects/DataSO/Exp/ExpConfig.asset
Select ExpConfig.asset and inspect its two properties:
Base Experience: EXP required to reach Level 1.
Experience Increment: Additional EXP required per level.
Formula:
EXP required for Level n = Base Experience + Experience Increment × (n – 1)
Example: Base = 100, Increment = 50
Level 1 → 100 + 50×(1–1) = 100
Level 2 → 100 + 50×(2–1) = 150
Level 3 → 100 + 50×(3–1) = 200
Adjust Base Experience and Experience Increment to tune progression pacing.
2. Create or Modify EXP Pickup Prefabs
Navigate to the EXP prefab folder:
Assets/RGame/RoguelikeKit/Prefabs/DropOut/Exp40.prefab
Select Exp40.prefab. In the Inspector, you’ll find the Exp property. This value determines how much EXP the player gains when collecting it.
To create a new pickup:
Duplicate Exp40.prefab (CTRL +D or right-click → Duplicate).
Rename (e.g., Exp200.prefab).
Modify its Exp field to your desired amount.
3. Register Your EXP Pickup with the Object Pool
Open the pool configuration asset:
Assets/RGame/RoguelikeKit/ScriptableObjects/RuntimeDataSO/Pool/Pool.asset
In the Inspector, click the + button under Pool Entries.
Assign your new prefab:
Key: A unique string identifier (e.g.,
Exp200
)Prefab: Drag your Exp200.prefab here.
This registers the pickup with the object-pooling system.
4. Assign EXP Pickups to Enemies
Choose any enemy prefab (e.g.):
Assets/RGame/RoguelikeKit/Prefabs/Enemy/CherryMonster.prefab
In the Inspector, locate the DropOutKeys list.
Add your EXP key (
Exp200
) to this list. On enemy death, the pool will spawn your custom EXP pickup.
With these steps, you can fully control both the level-up curve and how much EXP each pickup grants. Happy tuning!
Last updated