Skip to content

Electrified

juanosarg edited this page May 20, 2024 · 2 revisions

CompElectrified makes creatures recharge batteries nearby

    //This comp class makes creatures recharge batteries nearby

    public int electroRate = 0;
    public int electroRadius = 0;
    public int electroChargeAmount = 1;
    public List<string> batteriesToAffect = null;

How do I use this code?

It is a comp class, so you just add it in XML in the <comps> tag. For example, this allows Tetraslugs in Alpha Animals to recharge batteries

<comps>
	<li Class="AnimalBehaviours.CompProperties_Electrified">
		<electroRate>40</electroRate>
		<electroRadius>5</electroRadius>
		<batteriesToAffect>
			<li>Battery</li>
			<li>Battery_Silver</li>
			<li>Battery_Gold</li>
			<li>Battery_Plasteel</li>
			<li>Battery_Uranium</li>
			<li>Battery_Advanced</li>
			<li>Battery_Vanometric</li>
			<li>Battery4k</li>
			<li>Battery16k</li>
			<li>Battery64k</li>
			<li>Battery256k</li>
			<li>ChargeBack_Battery_Prototype</li>
			<li>ChargeBack_Battery</li>
			<li>SpeedCharge_Battery</li>
			<li>ResonanceCell_Battery</li>
			<li>VoidCell_Battery</li>
			<li>VFE_LargeBattery</li>
			<li>VFE_SmallBattery</li>
			<li>VFE_AdvancedBattery</li>
			<li>VFE_LargeAdvancedBattery</li>
			<li>AA_BlueGelBattery</li>
			<li>AA_HexaGelBattery</li>
			<li>ShipCapacitor</li>
			<li>ShipCapacitorSmall</li>
		</batteriesToAffect>			
	</li>
</comps>

VFE Core

General Comp classes

General DefModExtensions

Item Processor

PipeSystem

Custom Structure Generation

Multi Verb Combat Framework - MVCF

Animal Behaviours

Genes

Apparel

Cuisine

Furniture

Plants

Deprecated

Clone this wiki locally