Expandable projectiles - Vanilla-Expanded/VanillaExpandedFramework GitHub Wiki
Expandable projectile def can be used to create flames or other liquid-shaped projectiles that need to expand in size.
public int lifeTimeDuration = 100;
public float widthScaleFactor = 1f;
public float heightScaleFactor = 1f;
public Vector3 startingPositionOffset = Vector3.zero;
public float totalSizeScale = 1f;
public new ExpandableGraphicData graphicData;
public int tickFrameRate = 1;
public int finalTickFrameRate = 0;
public int tickDamageRate = 60;
public float minDistanceToAffect;
public bool disableVanillaDamageMethod;
public bool dealsDamageOnce;
public bool reachMaxRangeAlways;
public bool stopWhenHit = true;
public float arcSize = 2.5f;
public float stopAtBuildingWithCover = 1f;
public bool debugMode;
public bool wideAtStart;
public List<string> stopWhenHitAt = new List<string>();ExpandableGraphicData is a container class:
public Type graphicClass;
public ShaderTypeDef shaderType;
public List<ShaderParameter> shaderParameters;
public Color color = Color.white;
public Color colorTwo = Color.white;
public bool drawRotated = true;
public bool allowFlip = true;
public float flipExtraRotation;
public ShadowData shadowData;
public string texPath;
public string texPathFadeOut;The basic XML example is:
	<VEF.Weapons.ExpandableProjectileDef ParentName="BaseBullet">
		<defName>Flamethrower</defName>
		<label>flamethrower</label>
		<thingClass>VEF.Weapons.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)
	</VEF.Weapons.ExpandableProjectileDef>thingClass can be ExpandableProjectile, ExpandableBullet, FlamethrowProjectile or GaussProjectile