Quick Start - Grim-/Talented GitHub Wiki

Setting Up Talented for Your Mod

Step 1: Add Talented as a Dependency

Add the Talented mod as a dependency for your mod to ensure compatibility and functionality.

Make sure Talented loads before your own Mod.

	<modDependencies>
		<li>
			<packageId>com.emo.talented</packageId>
			<displayName>Talented - Talent Tree Framework</displayName>
			<steamWorkshopUrl>steam://url/CommunityFilePage/3412307423</steamWorkshopUrl>
			<downloadUrl>https://github.com/Grim-/Talented</downloadUrl>
		</li>
	</modDependencies>

Step 2: Design Your Talent Tree

Visit the Talent Tree Web App to visually design your talent tree.

Please note trees made on the web app use auto generated names, this is not required.

Connect nodes together, configure their properties, and export the design as an XML file.

  • Save the Exported File: Place the exported XML file in your mod’s Defs directory.
  • Manual Creation Option: Alternatively, you can copy and modify the example talent tree XML definitions.

Here for example is a very simple <Talented.TalentTreeDef> it defines 4 nodes, using TalentDefs provided in Talented core files.

<?xml version="1.0" encoding="utf-8" ?>
<Defs>
  <Talented.TalentTreeDef>
    <defName>VerySimpleTree</defName>
    <dimensions>(600,400)</dimensions>
    <handlerClass>Talented.ActiveTreeHandler</handlerClass>
    <nodes>
      <li>Node_1737540185696_9332</li>
    </nodes>
    <availablePaths>
    </availablePaths>
    <displayStrategy>FixedPosition</displayStrategy>
    <talentPointFormula>PerLevel</talentPointFormula>
  </Talented.TalentTreeDef>

  <Talented.TalentTreeNodeDef>
    <defName>Node_1737540185696_9332</defName>
    <label>Root</label>
    <position>(276,262)</position>
    <type>Start</type>
    <upgrades>
      <li>ArmorUpgrade</li>
    </upgrades>
    <connections>
      <li>Node_1737540185696_4918</li>
      <li>Node_1737540185696_250</li>
      <li>Node_1737540185696_3426</li>
    </connections>
  </Talented.TalentTreeNodeDef>

  <Talented.TalentTreeNodeDef>
    <defName>Node_1737540185696_250</defName>
    <label>New Node</label>
    <position>(275,126)</position>
    <type>Normal</type>
    <upgrades>
      <li>WarriorStrengthUpgrade</li>
    </upgrades>
  </Talented.TalentTreeNodeDef>

  <Talented.TalentTreeNodeDef>
    <defName>Node_1737540185696_4918</defName>
    <label>New Node</label>
    <position>(374,224)</position>
    <type>Normal</type>
    <upgrades>
      <li>SwiftMovementUpgrade</li>
    </upgrades>
  </Talented.TalentTreeNodeDef>

  <Talented.TalentTreeNodeDef>
    <defName>Node_1737540185696_3426</defName>
    <label>New Node</label>
    <position>(174,226)</position>
    <type>Normal</type>
    <upgrades>
      <li>BattleFuryUpgrade</li>
    </upgrades>
  </Talented.TalentTreeNodeDef>

</Defs>

Step 3: Define a <Talented.TalentedGeneDef>

Define a <Talented.TalentedGeneDef> to manage and apply your talent tree.

This definition will handle the talent mechanics and ensure the Talent tab appears in the user interface if it’s not already visible.

Example :

<?xml version="1.0" encoding="utf-8" ?>
<Defs>

  <Talented.TalentedGeneDef>
      <defName>MyTalentGene</defName>
      <label>Talent Gene</label>
      <description>A gene with talent tree mechanics.</description>
      <!-- Tree Configuration -->
      <TalentTrees>
        <li>VerySimpleTree</li>
      </TalentTrees>

      <!-- Experience System -->
      <experienceFormula>Basic_LinearXP</experienceFormula>
      <experienceGainSettings>
          <experienceTypes>
              <!-- Combat XP -->
              <li Class="Talented.DamageDealtExperienceTypeDef">
                  <baseXP>10</baseXP>
                  <damageFactor>0.1</damageFactor>
              </li>

              <li Class="Talented.DamageTakenExperienceTypeDef">
                  <baseXP>10</baseXP>
                  <damageFactor>0.1</damageFactor>
              </li>

              <!-- Skill XP -->
              <li Class="Talented.SkillExperienceTypeDef">
                  <SkillDef>Shooting</SkillDef>
                  <baseXP>2</baseXP>
              </li>

              <!-- Job XP -->
              <li Class="Talented.JobExperienceTypeDef">
                  <SkillDef>HaulToCell</SkillDef>
                  <baseXP>1</baseXP>
              </li>

              <!-- Verb XP -->
              <li Class="Talented.VerbExperienceTypeDef">
                  <VerbClassName>Verb_BeatFire</VerbClassName>
                  <baseXP>1</baseXP>
              </li>
          </experienceTypes>
      </experienceGainSettings>

      <barColor>(3, 3, 138)</barColor>
      <resourceGizmoThresholds>
          <li>0.25</li>
          <li>0.5</li>
          <li>0.75</li>
      </resourceGizmoThresholds>

      <!-- UI Configuration -->
      <TabLabel>Talents</TabLabel>
  </Talented.TalentedGeneDef>
</Defs>

Step 4: Reference Your Talent Tree

In the <TalentTrees> list within your <Talented.TalentedGeneDef>, reference the <Talented.TalentTreeDef> that you created. You can include multiple talent trees, which will all be granted by this gene.


Step 5: Test Your Talent Gene

  1. Load the game with your mod enabled.
  2. Apply the newly created gene to a pawn.
  3. Verify that:
    • The Talent tab is visible in the pawn’s interface.
    • The talent trees from the applied gene are functioning correctly.

Notes:

Each talent tree maintains its own independent data (Experience, level and points), ensuring separation and modularity for complex setups.

⚠️ **GitHub.com Fallback** ⚠️