Documentation: ConfigExplosion
Jump to navigation
Jump to search
Name | Type | Initial Value | Example Range | Description |
---|---|---|---|---|
Members | ||||
never_cache | bool | true | if set, won't ever cache and the explosion happens that frame. Used for projectiles | |
explosion_radius | float | 20 | Explosion radius, used to find the peasants and physics bodies that are thrown into the air | |
explosion_sprite | std::string | data/particles/explosion_032.xml | sprite animation of the explosion that we play | |
explosion_sprite_emissive | bool | false | if 1, sprite is emissive | |
explosion_sprite_additive | bool | false | if 1, sprite is additive | |
explosion_sprite_random_rotation | bool | true | if true, rotates the sprite to random 90 degrees | |
explosion_sprite_lifetime | float | 0 | [0, 3.5] | if 0, finds the lifetime based on the rect animation currently playing. If not 0 it is seconds how long does the explosion sprite stay in the world |
damage | float | 5 | [0, 10] | how much damage does this do to living entities |
camera_shake | float | 7.5 | [0, 100] | camera shake - how much we shake the camera |
particle_effect | bool | true | Should we use the ParticleEffect::DoExplosion() | |
load_this_entity | std::string | if set, this entity is loaded when the explosion is queued | ||
light_enabled | bool | true | Should the explosion emit light to its surroundings? | |
light_fade_time | float | 0.08 | The time it takes for the light flash to fade out | |
light_r | unsigned int | 255 | [0, 255] | Color red 0-255 |
light_g | unsigned int | 217 | [0, 255] | Color green 0-255 |
light_b | unsigned int | 180 | [0, 255] | Color blue 0-255 |
light_radius_coeff | float | 8 | The radius of the light will be explosion_radius * light_radius_coeff | |
hole_enabled | bool | true | Do we remove ground, creata a crater | |
destroy_non_platform_solid_enabled | bool | true | Do we remove solid cells that aren't platforms? | |
electricity_count | int | 0 | How many electricity entitities should we create? | |
min_radius_for_cracks | int | 10 | Cracks are created if explosion_radius is larger than this | |
crack_count | int | 10 | How many crack entitities should we create? | |
knockback_force | float | 1 | How far do entities get thrown if a knockback occurs? final_knocback = explosion_radius * knockback_force * target.inv_normalized_distance_from_explosion / target.mass | |
hole_destroy_liquid | bool | false | Do we destroy the liquid cells we ran into, or do we just throw them into to the air? | |
hole_destroy_physics_dynamic | bool | true | Do we destroy the dynamic physics cells we encountered? | |
create_cell_material | std::string | fire | The material destroyed cells might turn into. | |
create_cell_probability | int | 5 | The probability a destroyed cell is turned into 'create_cell_material' | |
background_lightning_count | int | 0 | Parallax background lightning count is set to this on explosion | |
spark_material | std::string | spark | spark material, TODO moved these to use a special Serializer | |
material_sparks_min_hp | int | 10000 | [0, 100] | How many sparks are we creating (rand max) |
material_sparks_probability | int | 5 | [0, 100] | How many sparks are we creating (rand max) |
material_sparks_count_min | int | 7 | [0, 100] | How many sparks are we creating (rand min) |
material_sparks_count_max | int | 20 | [0, 100] | How many sparks are we creating (rand max) |
material_sparks_enabled | bool | false | Should we create few fire particles around the explosion | |
material_sparks_real | bool | false | if the spark particles created are real or fake | |
material_sparks_scale_with_hp | bool | false | if true, will create more sparks the harder the material | |
sparks_enabled | bool | true | Should we create few fire particles around the explosion | |
sparks_count_min | int | 7 | [0, 100] | How many sparks are we creating (rand min) |
sparks_count_max | int | 20 | [0, 100] | How many sparks are we creating (rand max) |
sparks_inner_radius_coeff | float | 0.333 | If 'sparks_enabled', Sparks are created in the area between circles defined by 'explosion_radius'*'sparks_inner_radius_coeff' and 'explosion_radius' | |
stains_enabled | bool | true | Should we stain the ground and other particles | |
stains_radius | float | 0 | The distance from the edge of the hole to the edge of the stained area, 0.0f for default which is 0.3 * explosion_radius | |
ray_energy | int | 20000 | This is the energy we have per ray. Could be called 'penetration power' or something like that. If cells have a hp of 20 rays with 100 energy can penetrate 5 cells | |
max_durability_to_destroy | int | 10 | When destroying cells only cells with a durability <= max_durability_to_destroy will be affected | |
gore_particle_count | int | 1 | How many particles to create in case we do gore stuff? | |
shake_vegetation | bool | true | Should we shake vegetation around the explosion (uses the area of stain_image to find vegetation) | |
damage_mortals | bool | true | Look for peasants and throw them into the air? Remember to enabled physics_throw as well if you want them to actually fly | |
physics_throw_enabled | bool | true | Should we throw physics objects into the air, also peasants | |
physics_multiplier_ragdoll_force | float | 1 | [0, 100] | treat the ragdolls a bit differently from other physics objects, to get them to fly nicely |
cell_explosion_power | float | 1 | [0, 100] | used when a solid cell explodes as the multiplier to how big the radius is going to be |
cell_explosion_radius_min | float | 5 | [0, 10] | when cell explodes, this is the minimum radius that explosion is made of |
cell_explosion_radius_max | float | 150 | [0, 10] | when cell explodes, this is the minimum radius that explosion is made of |
cell_explosion_velocity_min | float | 0 | [0, 10] | cell explodes only when body velocity is greater than this |
cell_explosion_damage_required | float | 100 | [0, 1024] | how much fire damage is required before this explodes |
cell_explosion_probability | float | 0 | this is used when there's a tiny contact that doesn't cause an explosion, in those cases this is used as a random to check if we should explode or not | |
cell_explosion_power_ragdoll_coeff | float | 0.75 | [0, 2] | ragdoll cells destruction power is multiplied with this |
pixel_sprites_enabled | bool | true | if enabled will carve out the pixel sprites | |
is_digger | bool | false | if 1, we apply some special digger logic to this explosion | |
audio_enabled | bool | true | Do we play an explosion sound? | |
audio_event_name | std::string | Name of audio event in 'explosion' audio bank. If not set, will default to 'explosion' or 'explosion_small' based on explosion radius. | ||
audio_liquid_amount_normalized | float | 0 | value of the 'liquid_amount' parameter passed to the explosion's audio event | |
explosion_delay_id | int | -1 | [-1, 1024] | for delayed barrel explosions... this has to be set and has to be the same for the explosions for there to be a delay |
not_scaled_by_gamefx | bool | false | If 1, DAMAGE_MULTIPLIER etc don't affect this explosion | |
Objects | ||||
damage_critical | ConfigDamageCritical | critical damage config. NOTE: must be already calculated ('chance' does nothing). | ||
Custom data types | ||||
physics_explosion_power | ValueRange | [0, 0.2] | how hard do we throw physics objects | |
delay | ValueRangeInt | [0, 0] | if > 0, the explosion occurs with a delay chosen randomly from this range and is never buffered | |
Privates | ||||
who_is_responsible | EntityID | the entity that caused the explosion | ||
null_damage | bool | false | if set, will not call DamageModelSystem::TakeDamage() | |
dont_damage_this | EntityID | if set, this entity doesn't receive damage from the explosion | ||
impl_send_message_to_this | EntityID | |||
impl_position | types::vector2 | (0, 0) | ||
impl_delay_frame | int32 | 0 |