-
Notifications
You must be signed in to change notification settings - Fork 3
Alter Item
This ability comp changes various properties of most things, like their hp, biocoding, quality, or stuffing. This cannot change items while are presently equipped or otherwise not targetable by the ability:
<comps>
<li Class="EBSGFramework.CompProperties_AbilityAlterItem">
</li>
</comps>
These are the options available:
-
hpRestore : Default (0) : A static amount of hit points to give the item. If set to a negative number, this will reduce the hit points
-
maxHPPercentRestore : Default (0) : The amount of max hit points to restore (i.e. 0.1 on an item with 100 max hp will restore 10). If set to a negative number, this will reduce the hit points
-
requireHitPoints : Default (False) : Requires the targeted item uses hit points (i.e. this will render a stack of silver untargetable). You can add onlyTargetDamagedThings to the targetParams to restrict to only damaged items
-
uncode : Default (False) : If the item is biocoded, remove the biocoding
-
requireBiocode : Default (False) : Requires the targeted item be biocoded
-
untaint : Default (False) : If the item is tainted, remove the tainting
-
requireTaint : Default (False) : Requires the targeted item be tainted apparel
-
increaseQuality : Default (False) : Increments the quality of the item
-
maxQuality : Default (Legendary) : The highest quality an item can be increased to. The options are: Awful, Poor, Normal, Good, Excellent, Masterwork, and Legendary
-
decreaseQuality : Default (False) : Decrements the quality of the item
-
minQuality : Default (Awful) : The lowest quality an item can be decreased to. The options are: Awful, Poor, Normal, Good, Excellent, Masterwork, and Legendary
-
requireQuality : Default (False) : Requires the item have the quality comp
-
stuffingChange : A list of lists which designate progression for stuffing changes. The outer li's are used for individual progression paths, with the inner ones listing the ThingDefs to upgrade to. I recommend looking at the Reforge example because how this functions is probably a lot clearer with that
-
requireStuffing : Default (False) : Requires the item uses stuff instead of only using static items
-
requireAny : Default (False) : Makes it so the ability can only be used on items which this comp will change in some way, like the item being tainted while untaint is True, or one of the quality altering options are active and the max/min hasn't been reached yet. If any of the individual require options are used, this will not be useful
-
requireFinished : Default (True) : While true, unfinished items can't be targeted by the ability. This should usually remain True to avoid some weird results that could happen when trying to change an unfinished/unbuilt item, and if you do set it to False make sure to test thoroughly
Note : The individual require options (i.e. requireBiocode) can be used even if their related settings (i.e. uncode) are not used to make the comp a little more flexible (i.e. can create an ability that only repairs biocoded items)
These are examples from Superhero Genes which use most of the options available, with the first one being the base they all use to decrease the amount of code and the last one being a mash-up of all of them:
<AbilityDef Name="SHG_RePowerBase" Abstract="True">
<cooldownTicksRange>60000</cooldownTicksRange>
<casterMustBeCapableOfViolence>False</casterMustBeCapableOfViolence>
<aiCanUse>False</aiCanUse>
<verbProperties>
<requireLineOfSight>false</requireLineOfSight>
<range>4.9</range>
<drawAimPie>false</drawAimPie>
<targetParams>
<verbClass>Verb_CastAbility</verbClass>
<warmupTime>1</warmupTime>
<canTargetPawns>False</canTargetPawns>
<canTargetItems>True</canTargetItems>
<thingCategory>Item</thingCategory>
<mapObjectTargetsMustBeAutoAttackable>False</mapObjectTargetsMustBeAutoAttackable>
</targetParams>
</verbProperties>
</AbilityDef>
<AbilityDef ParentName="SHG_RePowerBase">
<defName>SHG_Refine</defName>
<label>refine</label>
<description>Improve the quality of a nearby item.</description>
<comps>
<li Class="EBSGFramework.CompProperties_AbilityAlterItem">
<increaseQuality>True</increaseQuality>
<requireQuality>True</requireQuality>
</li>
</comps>
</AbilityDef>
Note for refurbish, because it only messes with taint and biocoding, it sets canTargetBuildings to minimize the amount of work the ability needs to do to realize that the target is not valid. Also, it uses requireAny so that it can target non-tainted biocoded items or non-biocoded tainted items
<AbilityDef ParentName="SHG_RePowerBase">
<defName>SHG_Refurbish</defName>
<label>refurbish</label>
<description>Remove tainting and/or biocoding from a nearby item.</description>
<verbProperties>
<targetParams>
<canTargetBuildings>False</canTargetBuildings>
</targetParams>
</verbProperties>
<comps>
<li Class="EBSGFramework.CompProperties_AbilityAlterItem">
<requireAny>True</requireAny>
<uncode>True</uncode>
<untaint>True</untaint>
</li>
</comps>
</AbilityDef>
<AbilityDef ParentName="SHG_RePowerBase">
<defName>SHG_Repair</defName>
<label>repair</label>
<description>Remove all damage on an item.</description>
<verbProperties>
<targetParams>
<onlyTargetDamagedThings>True</onlyTargetDamagedThings>
</targetParams>
</verbProperties>
<comps>
<li Class="EBSGFramework.CompProperties_AbilityAlterItem">
<maxHPPercentRestore>1</maxHPPercentRestore>
<requireHitPoints>True</requireHitPoints>
</li>
</comps>
</AbilityDef>
Note for reforge, the may require could be moved to obsidian specifically if the player should still be able to go from slate blocks to plasteel. Another thing note, if a mod adds a steel alternative that needs to be added to this list, a new section would be added that would include that alternative and plasteel. If added to the existing list (i.e. Steel > Alternative Steel > Plasteel), then steel items would turn into the alternative, then the alternative to plasteel
<AbilityDef ParentName="SHG_RePowerBase">
<defName>SHG_Reforge</defName>
<label>reforge</label>
<description>Replace the metals used for the item with stuff of a better quality.</description>
<comps>
<li Class="EBSGFramework.CompProperties_AbilityAlterItem">
<requireStuffing>True</requireStuffing>
<stuffingChange>
<li>
<li>Steel</li>
<li>Plasteel</li>
</li>
<li>
<li>Silver</li>
<li>Gold</li>
</li>
<li MayRequire="Ludeon.Rimworld.Odyssey">
<li>BlocksSlate</li>
<li>Obsidian</li>
<li>Plasteel</li>
</li>
</stuffingChange>
</li>
</comps>
</AbilityDef>
<AbilityDef ParentName="SHG_RePowerBase">
<defName>SHG_Revitalizer</defName>
<label>revitalize</label>
<description>Restore all lost hit points, purify tainting, remove biocoding, upgrade quality, and improve materials all at the same time.</description>
<comps>
<li Class="EBSGFramework.CompProperties_AbilityAlterItem">
<requireAny>True</requireAny>
<maxHPPercentRestore>1</maxHPPercentRestore>
<uncode>True</uncode>
<untaint>True</untaint>
<increaseQuality>True</increaseQuality>
<stuffingChange>
<li>
<li>Steel</li>
<li>Plasteel</li>
</li>
<li>
<li>Silver</li>
<li>Gold</li>
</li>
<li MayRequire="Ludeon.Rimworld.Odyssey">
<li>BlocksSlate</li>
<li>Obsidian</li>
<li>Plasteel</li>
</li>
</stuffingChange>
</li>
</comps>
</AbilityDef>
- Ability Validator
- Add Things To Inventory
- Alter Genes
- Alter Xenotype (Ability)
- Blood Drain
- Blast Attacks
- Burst Attacks
- Change Faction
- Change Gender
- Change Ideology
- Change Traits
- Change Weather
- Charge Battery
- Create Items
- Create Linked Hediffs
- Deal Damage
- Destroy Corpse
- Destroy Filth
- Destroy Items
- Duplicate Pawn
- Fly to Map Tile
- Give Multiple Hediffs
- Instant Death
- Launch Projectile Burst
- Learn Skill
- Long Distance Teleport
- Love the Caster
- Offset Needs Ability
- Orbital Strike
- Push Target
- Reloadable Abilities
- Remove Multiple Hediffs
- Remove Things From Inventory
- Spawn Humanlike (Ability)
- Spawn Pawn Kinds
- Spew
- Stop Mental Break (No Psychic)
- Toggle Hediff
- Trigger Game Condition
- Abilities From Other Genes
- Additional Fertility by Age
- Additional Lovin' Results
- Aging Xenotype
- Biome Genes
- Butchery Changing Genes
- Coma Rest Genes
- Conflicting Genes
- Customizable Bloodclotting
- Damage Modifying Stats Extension
- EBSG Body
- Equip Restrict
- Evolving Genes
- Fertility by Age
- Gender by Age
- Genetic Romance Chance
- Hediff Adder
- Hediff on Consumption
- Hediffs at Age
- Hide Inactive
- Hive Mind Genes
- Inactive at Age
- Ingestible Dependency Genes
- Mutating Genes
- Pregnancy Replacing Genes
- Random Periodic Interaction
- Removed at Age
- Skill Changing Genes
- Spawn Age Limiter
- Thoughts on Down from Gene
- Vanishing Genes
- Various Conditional Stat Affecters
- Aging Hediff
- Alter Xenotype (Hediff)
- Attach Mote
- Create Items
- Create Other Hediffs
- Damage on Removal
- Damage Over Time
- Destroy on Death
- Display Severity
- Flip Gender Periodically
- Gender by Age Hediff
- Gene Randomizer
- Give Abilities at Severities
- Give Hediff to Killer
- Give Hediffs to Non-Allies
- Give Other Hediff Periodically
- Hediff on Kill
- Hediff While Moving
- Hediffs on Removal
- Hediffs While Drafted
- Hediffs While in Severity Ranges
- Hemogen on Kill
- Hemogen Regeneration
- Make Hediff Invisible at Stage
- Memory on Kill
- Modular Hediffs
- Multiple Lives
- Name Color Hediff
- Remove at Severities
- Remove/Damage Parts
- Remove on Faction Change
- Remove When Damaged
- Severity Change per Attack
- Severity Change When Hit
- Severity Per Day by Genes
- Severity per Interval by Terrain
- Shield Hediff
- Skill Change Hediffs
- Spawn Humanlike
- Spawn Pawn Kind on Removal
- Temporary Faction
- Temporary Genes
- Temporary Ideology
- Temporary Relation
- Terrain Cost Override
- Tiered Regeneration
- Various Explosion Hediff Comps
- Severity Setters
- Faction Bond
- Severity by Age
- Severity by Colony Genes
- Severity by Colony Wealth
- Severity by Equipped
- Severity by Gender
- Severity by Genes
- Severity by Light Level
- Severity by Map
- Severity by Mental State
- Severity by Nearby Pawns
- Severity by Need Level
- Severity by Other Hediff Severities
- Severity by Time of Day
- Severity When Downed
- Add or Append Hediff on Ingest
- Alter Genes on Ingest
- Alter Genes on Use
- Alter Xenotype on Ingest
- Alter Xenotype on Use
- Alter Xenotype on Use by Severity
- Damage Modifying Stats Extension
- Equip Restrict
- Flexible Entity Releaser
- Gatherer Spot
- Give Hediff Based on Severity
- Hediff on Damage
- Limited Charges
- Need Charger Buildings
- Projectile Impact Effects
- Random Shot
- Regenerating Things
- Shield Equipment
- Sleep Caskets
- Spawn Baby Thing Comp
- Turret Roof Blocked
- Weapon Trait Extension
- Desired Genes Precept
- Disliked in Faction
- Gene in Colony Mood Precept
- Gene in Colony Mood Toggle Precept
- Opinions About Genes
- People in the Colony
- Random Opinion
- Thought Mood by Hediff Severity
- Thought Multiplying Genes
- Thoughts About Water
- Xenophilobic Thoughts
- The Genes
- Resource Packs
- Craving and Overcharge Hediffs
- Resource Using Abilities
- Converting Resources
- Special DRG Abilities
- Special DRG Hediffs