Skip to content

ModExt_Requirements

flango edited this page Mar 5, 2023 · 1 revision

×× Equipment with requirements ××

Lets you add requirements or restrictions to weapons and apparel.
For example, pawns can equip a certain weapon only while wearing any apparel from a list (similar to warcaskets).
Items with requirements will be dropped once the required apparel is no longer equipped.

🟡 TODO: Add hediff and other checks.

preview

Options:

  • <kindDefs> - A list of PawnKindDefs required to equip the item.
  • <apparelDefs> - A list of apparel required to equip the item.
  • <hediffDefs> - A list of hediffs required to equip the item.
  • <traitDefs> - A list of traits required to equip the item.
  • <skillRequirements> - Skill levels required to equip the item.
  • <mustBeCapableOf> - A list of WorkTags required to equip the item. (Violent, Constructing, Social, etc)
  • <geneDefs> - A list of genes required to equip the item.
  • <gender> - Only one gender can equip the item. (Default: None)
  • <anyItemInCategories> - Any item from these categories satisfies the requirement: None, Apparel, Hediffs, Traits, Genes, All. (Default: None)
  • <anyCategory> - Anything satisfies the requirement. (Default: false)

Performance impact: 🟩 Negligible

Type: ModExtension

XML Node: ThingDef/modExtensions/li


Example:

<modExtensions>
    <li Class="flangoCore.ModExt_Requirements">
        <anyItemInCategories>Apparel</anyItemInCategories>
        <apparelDefs>
            <li>XCOM_Apparel_EXOSuit</li>
            <li>fc_Apparel_WARSuit</li>
        </apparelDefs>
        <mustBeCapableOf>
            <li>Violent</li>
        </mustBeCapableOf>
        <skillRequirements>
            <Shooting>8</Shooting>
        </skillRequirements>
    </li>
</modExtensions>

🦩 Home

🚧 - 404 Page not found.
🖼 - Preview needed.

🟡 - Works but has some TODOs.
🟠 - Basic functionality implemented.
🔴 - Not working properly.
❓ - Not tested.


--== XML ==--

💡 Abilities

General

Ability Givers

Equipment Abilities

🟡 Should recode some stuff 🟡

🌳 Skill Trees

🟠 WIP, work/kill XP gain not implemented 🟠

Defs

Comps

🏘 Buildings

⚙ Comps

🏹 Equipment

General

Weapons

Projectiles

🧪 Hediffs

🧍‍♂‍ Pawn behaviors

📊 Stats

🎲 Misc

🧔 Vanilla Expanded

✨ Debug (Dev Mode)


--== C# ==--

📂 Shared Classes

🧬 Patches


Clone this wiki locally