All Docs Documentation Version: Base (Free) Influence System Ultimate
Simple Attribute Forge Ultimate

Quick Start Guide

Get up and running with the Modifier System and Character Templates in minutes.

Prerequisites

Before You Start: You need a generated attribute system from the Base tier. If you haven't created one yet, use Window > Simple Attribute Forge > Attribute Wizard first.

Required

Optional (Recommended)

Part 1: Create Your First Modifier

We'll create a simple "Strength Potion" modifier that adds +10 Strength for 30 seconds.

1 Open the Modifier Wizard
Go to Window > Simple Attribute Forge > Modifier Wizard
2 Step 1: Select Attribute Data
3 Step 2: Configure Modifier
4 Add Attribute Modification
5 Step 3: Configure Generation Settings
6 Step 4: Generate Code
Generated! You now have StrengthPotionAsset.cs, StrengthPotionComponent.cs, and StrengthPotionHelper.cs, plus a StrengthPotion.asset file ready to use.

Using Your Modifier

Option 1: Using the Helper Class (Code)

using MyGame.Modifiers; public class ItemUseHandler : MonoBehaviour { public void UseStrengthPotion(GameObject target) { // Apply the modifier StrengthPotionHelper.ApplyStrengthPotion(target); } public void DispelStrengthPotion(GameObject target) { // Remove the modifier StrengthPotionHelper.RemoveStrengthPotion(target); } }

Option 2: Using the Component (Inspector)

  1. Create a new GameObject (or use existing item)
  2. Add the StrengthPotionComponent script
  3. Configure in Inspector:
    • Apply On Start: Check if you want it to apply immediately
    • Remove On Destroy: Check to auto-remove when destroyed
    • Target Override: Leave empty to target self, or assign a specific target
  4. Call ApplyStrengthPotion() from your code or use context menu

Option 3: Using the Asset (ScriptableObject)

public class ItemSystem : MonoBehaviour { [SerializeField] private StrengthPotionAsset strengthPotionAsset; public void UseItem(GameObject target) { // Apply using the asset's method strengthPotionAsset.ApplyStrengthPotion(target); } }

Part 2: Create a Conditional Modifier

Now let's create "Berserker Rage" - a buff that only activates when Health is below 25%.

1 Add New Modifier in Wizard
2 Add Conditional Modification
3 Add Attribute Condition
4 Generate and Test
Condition Check in Generated Code
// Generated helper includes condition checking public static bool CanApplyBerserkerRage(GameObject target) { var container = target.GetComponent(); if (container == null) return false; var healthAttr = GetAttributeHybrid(container, "Health"); if (healthAttr == null) return false; // Check: Health < 25% if (!(healthAttr.GetPercentage() < 25f)) return false; return true; }

Part 3: Create a Character Template

Let's create two character classes: Warrior and Mage with different starting stats.

1 Open the Character Template Wizard
Go to Window > Simple Attribute Forge > Character Template Wizard
2 Step 1: Select Attribute Data
Select the same AttributeData source you used for modifiers.
3 Step 2: Define Character Classes
Add Warrior Class: Add Mage Class:
4 Step 3: Configure Generation Settings
5 Step 4: Generate Code
Click "Generate" and wait for compilation.
Generated! You now have [SystemName]CharacterTemplateEnum.cs, [SystemName]CharacterTemplateManager.cs, [SystemName]CharacterTemplatesHelper.cs, plus .asset files for Warrior and Mage. Replace [SystemName] with your configured system name.

Using Character Templates

Apply Template at Character Creation

using UnityEngine; using SimpleAttributeForge.CharacterTemplate; // Use your generated namespace, e.g.: // using Soulslike.CharacterTemplates; // using MyGame.CharacterTemplates; public class CharacterCreation : MonoBehaviour { public void CreateWarrior(GameObject character) { // Find template by name and apply to GameObject var template = CharacterTemplatesHelper.FindTemplateByName("Warrior"); CharacterTemplatesHelper.ApplyTemplateToGameObject(character, template); } public void CreateMage(GameObject character) { var template = CharacterTemplatesHelper.FindTemplateByName("Mage"); CharacterTemplatesHelper.ApplyTemplateToGameObject(character, template); } }

Get Template Data

// Get all available templates (static helper method) var allTemplates = CharacterTemplatesHelper.GetAllTemplates(); foreach (var template in allTemplates) { Debug.Log($"Available class: {template.templateName}"); Debug.Log($"Description: {template.description}"); } // Find a specific template by name var warriorTemplate = CharacterTemplatesHelper.FindTemplateByName("Warrior"); if (warriorTemplate != null) { Debug.Log($"Found: {warriorTemplate.templateName}"); } // Get attribute value from a template float strength = CharacterTemplatesHelper.GetAttributeValue(warriorTemplate, "Strength");
Note: The Helper class is static and can be called from anywhere. The Manager class is an optional MonoBehaviour component you can attach to GameObjects for Inspector-based template management.

Complete Integration Example

Here's how all systems work together:

using UnityEngine; using SimpleAttributeForge; using SimpleAttributeForge.CharacterTemplate; using SimpleForgeFramework; // Use your generated namespaces, e.g.: // using Soulslike.CharacterTemplates; // using Soulslike.Modifiers; public class RPGCharacter : MonoBehaviour { [SerializeField] private string characterClassName = "Warrior"; [SerializeField] private SimpleCharacterTemplateData startingTemplate; private ISimpleAttributeDataSource attributes; void Start() { attributes = GetComponent<ISimpleAttributeDataSource>(); // Option 1: Apply template from serialized reference if (startingTemplate != null) { CharacterTemplatesHelper.ApplyTemplateToGameObject(gameObject, startingTemplate); } // Option 2: Apply template by name else { var template = CharacterTemplatesHelper.FindTemplateByName(characterClassName); if (template != null) { CharacterTemplatesHelper.ApplyTemplateToGameObject(gameObject, template); } } // Apply permanent passive modifier BerserkerRageHelper.ApplyBerserkerRage(gameObject); } public void UseStrengthPotion() { // Apply temporary buff StrengthPotionHelper.ApplyStrengthPotion(gameObject); } public void TakeDamage(float damage) { var health = attributes.GetRuntimeAttribute("Health"); health.currentValue -= damage; // Berserker Rage conditions are evaluated when the modifier was applied } public void CheckActiveBuffs() { // Query active modifiers var activeModifiers = SimpleModifierTracker.GetActiveModifiers(attributes); foreach (var modifier in activeModifiers) { Debug.Log($"Active: {modifier.name} ({modifier.tag})"); } // Check for specific modifier if (SimpleModifierTracker.HasModifierByName(attributes, "Strength Potion")) { Debug.Log("Strength potion is active!"); } } }

Next Steps

Learn About Conditions

Explore all 12 comparison types, percentage vs absolute checks, and condition chaining with AND/OR/NOT.

Regen Modifiers

Learn how to modify regeneration rates, add delays, or completely disable regeneration.

Master the Wizard

Deep dive into all wizard options including behavior flags, requirements, and JSON import/export.

API Reference

Complete documentation of all classes, methods, and enums in the Ultimate system.