-
Notifications
You must be signed in to change notification settings - Fork 37
Plants Def Extensions
juanosarg edited this page Sep 8, 2022
·
2 revisions
The VanillaPlantsExpanded module of Vanilla Expanded Framework adds a single Def Extension, DualCropExtension. This def allows plants to produce a secondary output.
public class DualCropExtension : DefModExtension
{
public ThingDef secondaryOutput;
public int outPutAmount;
public bool randomOutput = false;
public List<ThingDef> randomSecondaryOutput;
}
Def Extensions are added to the ThingDef of the plant you want to add them to.
If you aren't sure if the def ALREADY has an extension (for example, if you think another mod will add their own), always use XPATH (xml patching) to add an extension, as there is already a PatchOperationAddModExtension to ensure they don't collide.
For example, this makes Barley in Vanilla Plants Expanded - More Plants to produce flour and hay
<modExtensions>
<li Class="VanillaPlantsExpanded.DualCropExtension">
<secondaryOutput>Hay</secondaryOutput>
<outPutAmount>20</outPutAmount>
</li>
</modExtensions>
- QuestNode_GetFaction
- Expandable projectiles
- Faction Def Extension
- Toggable patches
- Recipes Inheritance
- Adding new backstories
- Spawning things on new generated maps
- ThoughtExtensions
- WeatherLetterExtensions
- WeatherOverlayExtension
- WeatherEffectsExtension
- ThingDefExtension
- Stuff commonality extension
- Biome extension
- PipeSystem basics
- Resource
- Resource storage
- Resource processor
- Resource to thing
- Resource to power
- Thing to resource
- Resource trader
- Refill building with pipes
- Pipe valve
- Update to KCSG 2.0
- Exporting buildings
- Customizing symbols
- Debug helpers options
- Custom faction settlement
- Custom structure and scenarios
- Custom structure in quests
- Custom structure in WorldObjects
- Biome based structures
- Spawning world object(s) at world generation
- Prevent settlement spawning for nomadic factions
- Animal Behaviours Basics
-
Animal Behaviours Comp Classes
- Acid Attacks and Acid Immunity
- Animal Resources
- Animal Resources On Caravan
- Apply Hediff When Bound
- Asexual Reproduction
- Auto Nutrition
- Blink
- Build Periodically
- Cause Incident
- Change Def if Not Unique
- Change Weather
- Corpse Decayer
- Destroy This Item
- Die After Period
- Die And Change Into Another Def
- Dig Periodically
- Dig When Hungry
- Disease Event Immunity
- Disease Immunity
- Diseases After Period
- Doesn't flee
- Draftability
- Drop on Death
- Eat Weird Food
- Electrified
- Enrage Other Pawns
- Exploding Hatcher
- Extreme Xenophobia
- Fertilizer
- Filth Producer
- Fixed Gender
- Floating
- Gas Producer
- Give Thoughts On Caravan
- Graphic by Style
- Graphic by Terrain
- Hediff Effecter
- Hediff When Fleeing
- Highly Flammable
- Infecter
- Initial Ability
- Initial Hediff
- Initial Mental State
- Last Stand
- Light Sustenance
- Metamorphosis
- Mind Effecter
- Nearby Effecter
- No Taming Decay
- Passive Regenerator
- Pawn Overlay
- Produces no filth
- Refueling
- Regeneration
- State After Health Loss
- Summon On Spawn
- Swallow Whole
- Thought Effecter
- Untameable
- Animal Behaviours Hediff Comp Classes
- Animal Behaviours Damage Workers
- Animal Behaviours Def Extensions
- Animal Behaviours Extra Defs
- Animal Behaviours Misc