-
Notifications
You must be signed in to change notification settings - Fork 63
ProjectileExtension
juanosarg edited this page Jun 3, 2026
·
2 revisions
ProjectileExtension is a def extension that adds new functionality for projectiles
public int beamLifetimeTicks = 30;
public int beamSkyFadeInTicks = 0;
public int beakSkyHoldTikcs = 25;
public int beakSkyFadeOutTicks = 5;
public float flashIntensity = -1f;
public FleckDef hitFleck;
public EffecterDef attachedEffecter;
public FleckDef attachedFleck;
public float fleckScale = 1;
public int fleckRefreshInterval = 10;
/// A filth that will be spawned if the projectile misses without hitting anything (and isn't intercepted by, for example, shields)
public ThingDef filthOnMiss;
/// A chance that <see cref="filthOnMiss"/> will be spawned.
public float filthOnMissChance;
/// The amount of <see cref="filthOnMiss"/> to spawn.
public IntRange filthOnMissCount;
//This static collection is accessed for external mods, for example as a projectile blacklist in Alpha Armoury
public bool excludeFromStaticCollection = false;This Def Extension is added to the ThingDef of the projectile you want to add it to.
If you aren't sure if the ThingDef 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, the eyeblast in Vanilla Psycasts Expanded
<modExtensions>
<li Class="VEF.Weapons.ProjectileExtension">
<flashIntensity>100</flashIntensity>
<hitFleck>VPE_EyeBlast</hitFleck>
</li>
</modExtensions>- Abilities
- Animal Behaviours
- Apparels
- Buildings
- Cooking
- Factions
- Genes
- Global
- Graphics
- Hediffs
- Maps
- Memes
- OptionalFeatures
- Pawns
- Planet
- Plants
- Storyteller
- Things
- Weapons
- Weathers
- PipeSystem basics
- Resource
- Resource storage
- Resource processor
- Resource to thing
- Resource to power
- Thing to resource
- Resource trader
- Refill building with pipes
- Pipe valve
- Advanced Resource Processor
- 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