Before You Begin
Important: The Ultimate system extends the base Simple Attribute Forge system. You must have the base system installed and at least one attribute container generated before proceeding.
Prerequisites Checklist
- Simple Attribute Forge (base system) installed
- Attribute container generated (e.g., CharacterAttributes.cs)
- AttributeData ScriptableObject created
- GameObject with attribute container component
Verify Your Base System
Check that your attribute container has the three-tier value system:
// Your generated component should look like this:
public class CharacterAttributes : MonoBehaviour, ISimpleAttributeDataSource
{
public SimpleRuntimeAttribute health;
public SimpleRuntimeAttribute mana;
public SimpleRuntimeAttribute strength;
public SimpleRuntimeAttribute intelligence;
// Three-tier values available:
// health.baseValue - Base value
// health.formulaBonus - Pro system calculations
// health.totalValue - Final combined value
}
Complete Tutorial: RPG Character Progression
We'll create a complete RPG character system where Level affects Health, and Strength affects Damage, with breakpoint bonuses.
1
Open the Influence Wizard
Navigate to Window → Simple Attribute Forge → Influence Wizard
The Influence Wizard is a 4-step process: Setup → Formulas → Configuration → Generate
2
Setup Tab: Connect Your Attributes
- Click the Setup tab
- In Attribute Data Source, select your AttributeData ScriptableObject
- Verify your attributes appear in the "Available Attributes" list
Available Attributes Found:
• Health (Vital)
• Mana (Vital)
• Strength (Basic)
• Intelligence (Basic)
• Level (Resource)
3
Formulas Tab: Create Your First Formula
Formula 1: Level Affects Health
- Click the Formulas tab
- Click Add Formula
- Set Name: "LevelHealth"
- Set Target Attribute: "Health"
- Set Start Mode: "Zero"
- In Flat Bonuses, click Add Row
- Set Source: "Level", Operation: "Add", Value: 20
- Set Apply Mode: "Add to Base"
Formula 2: Strength Affects Damage
- Click Add Formula again
- Set Name: "StrengthDamage"
- Set Target Attribute: "Damage" (if you have it, or any Basic attribute)
- In Flat Bonuses, add: Source "Strength", Value 1.5
- In Post-Flat Bonuses, add: Label "Base Damage", Amount 10
4
Test Your Formulas
Use the Test Preview panel on the right side of the Formulas tab:
- Set test values for your attributes (Level: 5, Strength: 10)
- Select your formula in the list
- View the real-time calculation breakdown
The test panel shows live calculations as you adjust values, letting you validate formulas before generation.
5
Configuration Tab: System Settings
- Click the Configuration tab
- Set System Name: "CharacterInfluence"
- Set Namespace: "MyGame" (optional)
- Keep default paths or customize output locations
- Set Update Mode: "Smart" (recommended)
6
Generate Tab: Create Your System
- Click the Generate tab
- Review the generation summary
- Click Generate System
- Wait for compilation to complete
Generated Files:
- CharacterInfluence.cs - Orchestrator MonoBehaviour
- Formula assets in Assets/Generated/InfluenceSystem/
- Backup JSON export for version control
Integration with Your GameObject
Add the Orchestrator
- Select your GameObject with the CharacterAttributes component
- Click Add Component
- Search for and add CharacterInfluence
- In the inspector, assign the Attribute System field to your CharacterAttributes component
- The Formulas list should auto-populate with your created formula assets
// Your GameObject now has:
CharacterAttributes (Base System)
├── health.baseValue = 100
├── strength.baseValue = 10
└── level.baseValue = 5
CharacterInfluence (Pro System)
├── LevelHealth.asset
└── StrengthDamage.asset
Test the Integration
- Enter Play mode
- Check your attribute values in the inspector
- Modify the Level attribute's baseValue
- Watch Health's formulaBonus update automatically
Success! Your formulas are now automatically calculating and integrating with your attribute system.
Using in Your Code
Accessing Calculated Values
public class PlayerController : MonoBehaviour
{
private CharacterAttributes attributes;
void Start()
{
attributes = GetComponent<CharacterAttributes>();
}
void AttackEnemy()
{
// Use totalValue for gameplay calculations
// This includes base + formula + modifier bonuses
float damage = attributes.strength.totalValue * weaponMultiplier;
// For Vitals, show current/max
if (attributes.health.behaviorType == SimpleBehaviorType.Vital)
{
healthUI.text = $"{attributes.health.currentValue}/{attributes.health.totalValue}";
}
}
void LevelUp()
{
// Modify baseValue for permanent changes
attributes.level.baseValue += 1;
// Formulas automatically recalculate in Smart mode
// health.formulaBonus will update automatically
}
}
Manual Recalculation
public class TurnBasedManager : MonoBehaviour
{
private CharacterInfluence orchestrator;
void Start()
{
orchestrator = GetComponent<CharacterInfluence>();
// Set to Manual mode for turn-based games
orchestrator.recalculationMode = RecalculationMode.Manual;
}
void EndTurn()
{
// Apply all stat changes during turn
ApplyEquipmentChanges();
ApplyLevelUps();
ApplyBuffs();
// Single recalculation at turn end
orchestrator.RecalculateAll();
}
}
Common First Questions
Q: Can I modify formula assets after generation?
A: Yes! Formula assets are ScriptableObjects that can be edited in the Inspector. Changes take effect immediately in Smart mode or on next manual recalculation.
Q: How do I add temporary buffs?
A: Use the modifierBonus field on attributes for temporary effects. The Ultimate system only manages formulaBonus.
// Temporary buff example
attributes.strength.modifierBonus += 5; // +5 STR buff
// Remove after duration
StartCoroutine(RemoveBuffAfter(attributes.strength, 5, 30f));
Q: Can formulas reference other formulas?
A: Formulas read from baseValue and write to formulaBonus, preventing direct formula-to-formula references. Use execution order for formula dependencies.
Q: What happens if I change attribute names?
A: Regenerate your influence system after changing attribute names. The wizard will detect missing references and prompt for updates.