Learn Skill - KonradHeinser/EBSGFramework GitHub Wiki
This ability comp allows you to change the amount of experience a pawn has in various skills. While the increases are affected by passion levels, experience gained through this comp is not added to the daily total. The basic ability comp should look like this:
<comps>
<li Class="EBSGFramework.CompProperties_AbilityLearnSkill">
</li>
</comps>
This comp gives three special lists that you can use to increase skills. They use the SkillDef for the tag, and the value inside for the experience. For random skills, use Random instead. For examples of how these look in the comp, check the abilities at the bottom of this page
- skillsToGiveXP : This is the list applied to both, or just the caster if the target is the caster
- casterskillsToGiveXP : This list is always applied to the caster
- targetSkillsToGiveXP : This list is always applied to the target, even if the target is the caster
- preventRepeatsForRandoms : Default (True) : If there are random skills to select, this makes it avoid picking skills that it's previously picked. It will not check for future items on the lists, so try to organize them accordingly
Generic examples of a skill stealer (target loses xp while the caster gains xp) and a combat leveler (the caster gains xp in shooting and melee, but loses xp in two other random skills):
<AbilityDef>
<defName>CombatSkillStealer</defName>
<label>combat skill stealer</label>
<description>.</description>
<iconPath>Things/Mote/SpeechSymbols/Speech</iconPath>
<cooldownTicksRange>60</cooldownTicksRange>
<hostile>false</hostile>
<verbProperties>
<verbClass>Verb_CastAbility</verbClass>
<range>30</range>
<warmupTime>0.5</warmupTime>
<requireLineOfSight>False</requireLineOfSight>
</verbProperties>
<comps>
<li Class="EBSGFramework.CompProperties_AbilityLearnSkill">
<casterskillsToGiveXP>
<Shooting>10000</Shooting>
<Melee>10000</Melee>
</casterskillsToGiveXP>
<targetSkillsToGiveXP>
<Shooting>-10000</Shooting>
<Melee>-10000</Melee>
</targetSkillsToGiveXP>
</li>
</comps>
</AbilityDef>
<AbilityDef>
<defName>CombatLeveler</defName>
<label>combat leveler</label>
<description>.</description>
<iconPath>Things/Mote/SpeechSymbols/Speech</iconPath>
<cooldownTicksRange>60</cooldownTicksRange>
<hostile>false</hostile>
<targetRequired>False</targetRequired>
<verbProperties>
<verbClass>Verb_CastAbility</verbClass>
<range>0.9</range>
<warmupTime>0.5</warmupTime>
<requireLineOfSight>False</requireLineOfSight>
<targetParams>
<canTargetSelf>True</canTargetSelf>
</targetParams>
</verbProperties>
<comps>
<li Class="EBSGFramework.CompProperties_AbilityLearnSkill">
<skillsToGiveXP>
<Shooting>10000</Shooting>
<Melee>10000</Melee>
<Random>-10000</Random>
<Random>-10000</Random>
</skillsToGiveXP>
</li>
</comps>
</AbilityDef>