Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

Exploding Hatcher

juanosarg edited this page Jan 25, 2021 · 1 revision

CompExplodingHatcher is a comp class that is added to an "egg" item, making it explode when it hatches, but not damaging the hatched pawn

    public float hatcherDaystoHatch = 1f;
    public PawnKindDef hatcherPawn;
    public float range = 3f;
    public int damage = 10;
    public string damageDef = "Flame";
    public string soundDef = "AA_GooPop";

How do I use this code?

It is a comp class, so you just add it in XML in the <comps> tag of an item that you want to act as an egg. For example, this allows eggs in Dragons: Race to the Rim to explode when hatching

<comps>
	<li Class="AnimalBehaviours.CompProperties_ExplodingHatcher">
		<hatcherDaystoHatch>10</hatcherDaystoHatch>
		<hatcherPawn>RttR_Fury</hatcherPawn>
		<range>4</range>
		<damageDef>Flame</damageDef>
		<damage>20</damage>
		<soundDef>Explosion_Flame</soundDef>
	</li>
</comps>

VFE Core

General Comp classes

General DefModExtensions

Item Processor

PipeSystem

Custom Structure Generation

Multi Verb Combat Framework - MVCF

Animal Behaviours

Apparel

Cuisine

Furniture

Plants

Clone this wiki locally