-
Notifications
You must be signed in to change notification settings - Fork 37
Graphic by Terrain
juanosarg edited this page May 20, 2024
·
4 revisions
CompGraphicByTerrain makes an animal change graphic when it steps on some terrains
//CompGraphicByTerrain changes a creature's graphic depending on the terrain it is positioned at
public int changeGraphicsInterval = 240;
//These three lists need to be the same length, as they are accessed by their indexes
public List<string> terrains = null;
public List<string> suffix = null;
public List<string> hediffToApply = null;
//This will ignore the terrain and just check if "IsWater"
public bool waterOverride = false;
public string waterSuffix = "_Winter";
public string waterHediffToApply = "";
public int waterSeasonalItemsIndex = 0;
//This will ignore the terrain and just check if temperature is less than temperatureThreshold
public bool lowTemperatureOverride = false;
public int temperatureThreshold = -10;
public string lowTemperatureSuffix = "_Winter";
public string lowTemperatureHediffToApply = "";
public int lowTemperatureSeasonalItemsIndex = 0;
//This will ignore the terrain and just check if there is snow on it
public bool snowOverride = false;
public string snowySuffix = "_Winter";
public string snowyHediffToApply = "";
public int snowySeasonalItemsIndex = 0;
//This goes in tandem with CompAnimalProduct to allow different animal products depending on terrain
public bool provideSeasonalItems = false;
public List<int> seasonalItemsIndexes = null;
It is a comp class, so you just add it in XML in the <comps>
tag. For example, this allows the Chameleon Yak in Alpha Animals to change its pelt
<comps>
<li Class="AnimalBehaviours.CompProperties_GraphicByTerrain">
<changeGraphicsInterval>240</changeGraphicsInterval>
<terrains>
<li>Ice</li>
<li>MossyTerrain</li>
<li>MarshyTerrain</li>
<li>SoilRich</li>
<li>Sand</li>
<li>SoftSand</li>
</terrains>
<suffix>
<li>_Winter</li>
<li>_Jungle</li>
<li>_Jungle</li>
<li>_Jungle</li>
<li>_Desert</li>
<li>_Desert</li>
</suffix>
<hediffToApply>
<li>AA_WinterPelt</li>
<li>AA_JunglePelt</li>
<li>AA_JunglePelt</li>
<li>AA_JunglePelt</li>
<li>AA_DesertPelt</li>
<li>AA_DesertPelt</li>
</hediffToApply>
<waterOverride>true</waterOverride>
<waterSuffix>_Jungle</waterSuffix>
<waterHediffToApply>AA_JunglePelt</waterHediffToApply>
<waterSeasonalItemsIndex>2</waterSeasonalItemsIndex>
<lowTemperatureOverride>true</lowTemperatureOverride>
<temperatureThreshold>-10</temperatureThreshold>
<lowTemperatureSuffix>_Winter</lowTemperatureSuffix>
<lowTemperatureHediffToApply>AA_WinterPelt</lowTemperatureHediffToApply>
<lowTemperatureSeasonalItemsIndex>1</lowTemperatureSeasonalItemsIndex>
<snowOverride>true</snowOverride>
<snowySuffix>_Winter</snowySuffix>
<snowyHediffToApply>AA_WinterPelt</snowyHediffToApply>
<snowySeasonalItemsIndex>1</snowySeasonalItemsIndex>
<provideSeasonalItems>true</provideSeasonalItems>
<seasonalItemsIndexes>
<li>1</li>
<li>2</li>
<li>2</li>
<li>2</li>
<li>3</li>
<li>3</li>
</seasonalItemsIndexes>
</li>
</comps>
You will also need to add a PawnRenderNode to the animal, AnimalBehaviours.PawnRenderNode_GraphicByTerrain
- 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