Skip to content

Damage Scales

BDCarrillo edited this page Dec 1, 2022 · 1 revision
            DamageScales = new DamageScaleDef
            {
                MaxIntegrity = 0f, // Blocks with integrity higher than this value will be immune to damage from this projectile; 0 = disabled.
                DamageVoxels = false, // Whether to damage voxels.
                SelfDamage = false, // Whether to damage the weapon's own grid.
                HealthHitModifier = 0.5, // How much Health to subtract from another projectile on hit; defaults to 1 if zero or less.
                VoxelHitModifier = 1, // Voxel damage multiplier; defaults to 1 if zero or less.
                Characters = -1f, // Character damage multiplier; defaults to 1 if zero or less.
                // For the following modifier values: -1 = disabled (higher performance), 0 = no damage, 0.01f = 1% damage, 2 = 200% damage.
                FallOff = new FallOffDef
                {
                    Distance = 0f, // Distance at which damage begins falling off.
                    MinMultipler = 0.5f, // Value from 0.0001f to 1f where 0.1f would be a min damage of 10% of base damage.
                },
                Grids = new GridSizeDef
                {
                    Large = -1f, // Multiplier for damage against large grids.
                    Small = -1f, // Multiplier for damage against small grids.
                },
                Armor = new ArmorDef
                {
                    Armor = -1f, // Multiplier for damage against all armor. This is multiplied with the specific armor type multiplier (light, heavy).
                    Light = -1f, // Multiplier for damage against light armor.
                    Heavy = -1f, // Multiplier for damage against heavy armor.
                    NonArmor = -1f, // Multiplier for damage against every else.
                },
                Shields = new ShieldDef
                {
                    Modifier = 1f, // Multiplier for damage against shields.
                    Type = Default, // Damage vs healing against shields; Default, Heal
                    BypassModifier = -1f, // If greater than zero, the percentage of damage that will penetrate the shield.
                },
                DamageType = new DamageTypes // Damage type of each element of the projectile's damage; Kinetic, Energy
                {
                    Base = Kinetic, // Base Damage uses this
                    AreaEffect = Energy,
                    Detonation = Energy,
                    Shield = Energy, // Damage against shields is currently all of one type per projectile. Shield Bypass Weapons, always Deal Energy regardless of this line
                },
                Deform = new DeformDef
                {
                    DeformType = HitBlock,
                    DeformDelay = 30,
                },
                Custom = new CustomScalesDef
                {
                    SkipOthers = NoSkip, // Controls how projectile interacts with other blocks in relation to those defined here, NoSkip, Exclusive, Inclusive.
                    Types = new[] // List of blocks to apply custom damage multipliers to.
                    {
                        new CustomBlocksDef
                        {
                            SubTypeId = "Test1",
                            Modifier = -1f,
                        },
                        new CustomBlocksDef
                        {
                            SubTypeId = "Test2",
                            Modifier = -1f,
                        },
                    },
                },
            },

This is the Damage Scales & Damage Modifier Section, this handles damage multiplication.

MaxIntegrity = 0f, // 0 = disabled, 1000 = any blocks with currently integrity above 1000 will be immune to damage.
                DamageVoxels = false, // true = voxels are vulnerable to this weapon
                SelfDamage = false, // true = allow self damage.
				HealthHitModifier = 1, // defaults to a value of 1, this setting modifies how much Health is subtracted from a projectile per hit (1 = per hit).

MaxIntegrity, means the HP of the targeted block, if above the given value, will be immune to this Projectile: Block HP is measured in Hundreds.

DamageVoxels, controls if the Projectile will delete voxels on contact.

Self-Damage, allows the weapon to damage the parent grid.

HealthHitModifier, is the AMS Value, for the Projectile: On contact with a Projectile that has Health, this value is removed from that HP.

Projectile HP ranges typically in low numbers, such as 1-3, HealthHitModifier follows this trend: Please keep these values Low.

Beam Weapons, apply their AMS Value per tick: a Value of 1 on a Beam, is 60xValue per Second.

 FallOff = new FallOffDef
                {
                    Distance = 5000f, // Distance at which max damage begins falling off.
                    MinMultipler = 1f, // value from 0.0f to 1f where 0.1f is equal to a min damage of 10% of max damage.
                },

Fall-off Range is measured in Meters, away from the Projectile's Origin (Typically your Weapon), and is the start point for Fall-Off to begin.

MinMultiplier, is the lowest % that your Projectile's death can reach, at the furthest range.


 Characters = -1f,
                Grids = new GridSizeDef
                {
                    Large = 0.5f,
                    Small = -1f,
                },
                Armor = new ArmorDef
                {
                    Armor = -1f,
                    Light = 0.5f,
                    Heavy = 0.1f,
                    NonArmor = 0.1f,
                },

These are the most common Damage Modifiers: -1, is default unchanged, 1 is 1x, 2x is double damage, 0.5f is 50% damage reduction.

Characters, are Player & NPC Character objects.

Large & Small Grid, damage is modified by these values.

  • Armor, is basic armor blocks.
  • Light is the Light type of Armor blocks
  • Heavy, is the Heavy Armor type; Keep in mind, Cube Heavy Armor has a natural 50% Damage resistance by default, before this modifier is applied.

Non-Armor, is any block (such as Turrets, Engines, Cockpits), that is not an Armor-Block.

    Shields = new ShieldDef
                {
                    Modifier = -1f,
                    Type = Kinetic,
				

Shields, is a special modifier.

It allows either Energy or Kinetic for Type, which can be modulated by the Ship. The addition of BypassModifier = 0.5f to this section, allows the projectile to bypass shields with a damage reduction indicated by the value.

  • 0.5f is 50%
  • 0.75f is 25% damage reduction
  • 1.0f is 0% damage reduction

Damage reduced in this fashion, is dealt to the Shield as Energy Type Damage.

Damage Modifiers

Damage Modifiers, are multipliers that increase, or decrease damage to specific target types, block types, or to change behavior against Shields (Defense Shields Specifically)

These Modifiers, primarily are multiplying your Projectile's BaseDamage Value.

  • An Projectile with a BaseDamage of 100 (1 Steel Plate's worth), against an block of Light armor, with no modifier deals 100 Damage
  • An Projectile with a BaseDamage of 100 (1 Steel Plate's worth), against an block of Light armor, with 1.5f modifier deals 150 Damage
  • An Projectile with a BaseDamage of 100 (1 Steel Plate's worth), against an block of Light armor, with 0.5f modifier deals 50 Damage

This is the basic concept.


Characters = -1f,
                Grids = new GridSizeDef
                {
                    Large = -1f,
                    Small = -1f,
                },
                Armor = new ArmorDef
                {
                    Armor = -1f,
                    Light = -1f,
                    Heavy = -1f,
                    NonArmor = -1f,
                },

This is a basic Modifier section, with no Modifier bonuses or penalties to any type of grid, or armor.

Shields have their own area, which will be explained in another part of this page.


Grids

   Large = -1f,
   Small = -1f,

These are the Grid Type Modifiers.

Small-Grid is given additional resistance, than Large-Grid by default, that this setting further adds onto; Primarily, this added resistance is on weaponry, listed as NonArmor.


Armor

Armor = -1f, This is the General Armor Modifier; It affects armor blocks.

Armor, when dealt increasing high force, will deform increasingly quickly, which can trigger unintended Keen armor deformation damages, which can break nearby blocks.

Light = -1f, This is specific to blocks classified (by Keen, or by MasterConfig files) as Light Armor.

Light Armor has no special characteristics, to account for, unless additional mods are added.

Heavy = -1f, This is specific to blocks classified (by Keen or by MasterConfig files) as Heavy Armor.

Heavy Armor, has a natural 50% Resistance to Damage, (in vanilla, specific to cubes only), keep this in mind, when adjusting this value.

NonArmor = -1f, This is the general modifier for all blocks not classified as a type of armor, this means Thrusters, Cockpits, Turrets, Guns, Reactors, and more.

As this includes Turrets & other Weapons, which can have their own increased Damage Mitigation, keep aware of what the intended target is when setting this.

 Armor = new ArmorDef
                {
                    Armor = -1f,
                    Light = -1f,
                    Heavy = 0.25f,
                    NonArmor = -1f,
                },

In This example, the projectile will deal 100% of damage against Light armor, and 75% reduced damage against HeavyArmor, this damage is then further Reduced by 50% due to HeavyArmor's natural resistances.

A Projectile of 100 Damage, if used for this example will do;

  • 100 Damage to Light Armor
  • 25 Damage to Heavy Armor (12.5, after Resistances)
  • 100 Damage to Non Armor
 Armor = new ArmorDef
                {
                    Armor = -1f,
                    Light = 2f,
                    Heavy = -1f,
                    NonArmor = 3f,
                },

In This example, the projectile will deal 200% of damage against Light armor, and 100% damage against HeavyArmor, this damage is then Reduced by 50% due to HeavyArmor's natural resistances.

In this example, NonArmor also will take 300% of the Projectile's Damage, due to the NonArmor = 3f, changes.

A Projectile of 100 Damage, if used for this example will do;

  • 200 Damage to Light Armor
  • 100 Damage to Heavy Armor (50, after Resistances)
  • 300 Damage to Non Armor
 Armor = new ArmorDef
                {
                    Armor = -1f,
                    Light = -1f,
                    Heavy = 0f,
                    NonArmor = 0.5f,
                },

In This example, the projectile will deal 100% of damage against Light armor, and 100% reduced damage against HeavyArmor, this damage is then further Reduced by 50% due to HeavyArmor's natural resistances.

In this example, NonArmor also will take only 50% of the Projectile's Damage, due to the NonArmor = 0.5f, changes.

A Projectile of 100 Damage, if used for this example will do;

  • 100 Damage to Light Armor
  • 0 Damage to Heavy Armor (0, after Resistances)
  • 50 Damage to Non Armor

Shields

Shields take damage in 2 types (Energy & Kinetic), this is paired to the Shield Modulation capabilities, Shields modulated reduce & increase damage from your Projectile, based on your Damage Type (Bypass deals Energy Damage to the shield, when it splits damage, the remaining damage is dealt to the grid using your BaseDamage's type).

Shield Modifiers are for their specific projectile, and will not be inherited by spawned Shrapnel.

Shields = new ShieldDef
                {
                    Modifier = -1f,
                    Type = Kinetic,
				

This is an "Kinetic" Type, that has no modifiers to projectile shield damage.

Shields = new ShieldDef
                {
                    Modifier = 0.25f,
                    Type = Kinetic,
				

This is an example, of an "Kinetic" Type, that reduces projectile shield damage by 50% (0.5x)

Shields = new ShieldDef
                {
                    Modifier = 5f,
                    Type = Energy,
				

This is an example, of an "Energy" Type, that increases projectile shield damage by 500% (5x)

Shields = new ShieldDef
                {
                    Modifier = -1f,
                    Type = Energy,
BypassModifier = 0.5f
				

This is an example of an "Energy" Type, that ignores the Shield at a cost of 50% of its damage being delivered to the shield, and the rest to the Ship\Station under the Shield: Shrapnel is not affected by this Modifier, and if spawned on impact, from a shield-piercing projectile, will not be reduced by this %

Shields = new ShieldDef
                {
                    Modifier = -1f,
                    Type = Energy,
BypassModifier = -1f
				

This is an example, of an intact Bypass line, that is disabled.


Clone this wiki locally