-
Notifications
You must be signed in to change notification settings - Fork 41
Expandable projectiles
KylianB edited this page Dec 23, 2020
·
2 revisions
Expandable projectile def can be used to create flames or other liquid-shaped projectiles that need to expand in size. The basic XML example is:
<VFECore.ExpandableProjectileDef ParentName="BaseBullet">
<defName>Flamethrower</defName>
<label>flamethrower</label>
<thingClass>VFECore.FlamethrowProjectile</thingClass> <!-- this class inherited from the ExpandableProjectile class, it inherits the DoDamage method, which is responsible for the appearance of fire and damaging all things under the projectile -->
<graphicData>
<texPath>Flamer</texPath> <!-- main texture series, it's just a folder with textures. it sorts them alphabetically, there is no need to fill in A-Z at the end and you are also not limited to all letters of the alphabet, 01, 02 will do -->
<texPathFadeOut>FlamerFadeOut</texPathFadeOut> <!-- optional, if set, fading out textures will be used in final projectile moments -->
<shaderType>MoteGlow</shaderType> <!-- optional, if not set, it will use defaul shader>
<color></color> <!--optional, you can set the opacity via alpha channel -->
</graphicData>
<projectile> <!-- vanilla projectile field -->
<damageDef>Flame</damageDef>
<speed>25</speed>
<damageAmountBase>1</damageAmountBase>
<explosionRadius>0.1</explosionRadius >
<ai_IsIncendiary>true</ai_IsIncendiary>
</projectile>
<drawOffscreen>true</drawOffscreen> <!-- needed to draw them properly -->
<lifeTimeDuration>70</lifeTimeDuration> <!-- total life time duration, the counter counts every tickFrameRate property -->
<widthScaleFactor>0.75</widthScaleFactor> <!-- optional, will scale the width of the projectile textures -->
<heightScaleFactor>1</heightScaleFactor> <!-- optional, will scale the heigth of the projectile textures -->
<startingPositionOffset>(0, 0, -1)</startingPositionOffset> <!-- if you need to position starting projectile position (for big dragons and flamethrowers etc -->
<totalSizeScale>1.15</totalSizeScale> <!-- optional, will scale the size of projectile textures. was needed in order to scale Oskars textures properly to fit them after the shooter -->
<tickFrameRate>3</tickFrameRate> <!-- speed of changing textures per ticks -->
<finalTickFrameRate>9</finalTickFrameRate> <!-- speed of changing fade out textures per ticks -->
<tickDamageRate>1</tickDamageRate> <!-- determines through which each tick the damage is done by the custom class (fire class for example) -->
<minDistanceToAffect>2</minDistanceToAffect> <!-- can be set to ignore the affected cells nearby (useful if you do not need to burn sandbags or other buildings)
</VFECore.ExpandableProjectileDef>
- 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