-
Notifications
You must be signed in to change notification settings - Fork 9
Ammo Properties
You can delete sections that will not be needed/used. The only special consideration is DamageScales. If you don't need it, set NoGridOrArmorScaling = true and then delete away. For example, this is the smallest possible ammo definition that will still fire and do damage:
private AmmoDef Sample_Ammo => new AmmoDef
{
AmmoMagazine = "Energy",
BaseDamage = 12345,
NoGridOrArmorScaling = true,
Trajectory = new TrajectoryDef
{
DesiredSpeed = 123,
MaxTrajectory = 456,
},
};
- You do not need to make a Magazine named "Energy", there is an "Energy" AmmoMagazine entry in WeaponCore itself. Do not override it.
- Health is the projectile's HP pool when facing point-defense weapons or AntiSmart EWAR. Projectiles with a Health of 0 are NOT targetable or interceptable by AntiSmart EWAR.
- Typical projectile health values range from 1-5 for rockets/small missiles, 6-20 for heavier "torpedoes," and upwards of 80 for drones.
- The "damage" done in projectile on projectile hits is derived from the HealthHitModifier, not BaseDamage
- Mass is kilograms, and is multiplied by velocity upon impact. Shape diameter has no impact, as we're not modelling point loads.
- BackKickForce is in newtons, and is applied to the firing grid from the muzzle.
Fragments, or shrapnel, are spawned upon the death of the current projectile. There are many options to control the quantity and distribution of fragments, detailed at the Ammo - Fragment Properties page.
Damage Scales are modifiers that alter how much damage is applied to various items, block types, or shields. For full details please visit Ammo - Damage Scales
These effects can apply damage to a range of blocks based upon custom settings. They can be thought of as blast, explosive, splash, etc. Consult Ammo - AOE Properties for specifics.
There is an additional group of effects, collectively called EWAR, that can be utilized as well. IF ANY EWAR SETTING IS USED, BASE OR AOE DAMAGE WILL NOT BE APPLIED! They go above and beyond basic damage, with unique alterations to block or grid behavior. Full details can be found on the Ammo - Electronic Warfare System (EWAR) page.
- Weapon RPM should be 3600 for "laser" type constant effects.
- VirtualBeams and OneParticle should be used (true) for optimal performance
- Beams require a tracer & trail to function properly
- Please set a MaxLifeTime! Since projectiles inherit ship velocities, you can accidentally make a projectile that sits in space "forever"
- TotalAcceleration is essentially dV, used for both accel and turning
- GravityMultiplier >0 will allow a projectile to experience gravity. Low values, like 0.20, can be used to have a projectile slowly fall, whereas higher values can give a greatly exaggerated arc. Artificial gravity does nothing to projectiles. Because Keen gravity falls off to the seventh power, "normal" gravity arc math is adopted by WC. This means the gravity amount/direction can't be updated after firing.
Visit the Ammo - Guidance System (Homing, Mines, Self-Guided) for details on smarts and guidance types.
These are the audio and visual components of your ammo, and include hit effects. Consult Ammo - Audio Visual for specifics.
If you have suggestions or implementations, please raise them in the Discord! Thank you!
Please donate to DarkStar's Patreon!
WeaponCore Quick Links
Weapon Properties (Page in Progress)
Multi-Turret Creation (Page in Progress)
Weapon - Targeting & Hardpoint
Weapon - Critical Reactions/Warheads
Weapon - Minimal Configurations
Ammo - Electronic Warfare System (EWAR)
Ammo - Guidance System (Homing, Mines, Self-Guided)
Armor System (Page in Progress)