VanishedOne 546 Posted March 14, 2019 Report Share Posted March 14, 2019 (edited) Spinning this topic off from discussion in NDRQs. I've been looking at Springheel's powder keg entity class; this is what I've currently got: entityDef moveable_powderkeg { "inherit" "atdm:entity_base" "editor_color" "0 .5 .8" "editor_mins" "-16 -16 0" "editor_maxs" "16 16 48" "editor_rotatable" "1" "editor_displayFolder" "Moveables/Junk" "editor_usage" "Moveable barrel. Works just like a func_moveable. However the barrel" "editor_usage1" "has special handling to make it appear more round. This version also explodes when damaged enough." "editor_usage2" "Only add model, model_detonate or model_burn or health to override defaults" "editor_var burn" "number of seconds to burn before exploding." "editor_model model_damage" "model to leave as damaged base" "editor_model model_detonate" "ips model to switch to for explosion." "editor_model model_burn" "ips model to show when on fire." "editor_var def_debris" "add as many as you like, debris1, debris2, etc.. " "editor_var health" "how much health the barrel has, default is 5. If burn is set to 1, the health is effectively doubled so you have to kill it twice to get the explosion" "editor_var respawn" "if non zero the number of seconds to respawn after killed" "editor_var respawn_range" "no player in distance range to actually respawn - default 256" "editor_var respawn_again" "try again in seconds if player in range - default 10" "editor_bool triggerTargets" "if set to 1 will trigger targets after being killed" "editor_material mtr_lightExplode" "light shader to use for explosion" "editor_material mtr_lightBurn" "light shader to use for burning" "spawnclass" "idExplodingBarrel" "density" "0.02" "friction" "0.2" "bouncyness" "0.4" "mass" "45" // Copied from an empty barrel, so realistically should be higher "notPushable" "0" "frobable" "1" "grabable" "1" "damage_explosion" "damage_explosion" "def_splash_damage" "damage_explodingbarrel" "model" "models/darkmod/containers/barrell_med_closed.lwo" "def_debris" "debris_generic1" //FIXME: change to something more suitable than ceramic shards "def_debris1" "debris_generic1" "def_debris2" "debris_generic1" "model_burn" "barrelfire.prt" "snd_burn" "element_fire_bonfire" "burn" "3" "model_detonate" "mine_cloud.prt" // "skin" "skins/exp_barrel_red" "mtr_lightexplode" "lights/barrelexplode" "light_radius" "300" "health" "5" // sound of shatter on impact or destroyed "snd_explode" "mine_explode_2" // "model_damage" "models/darkmod/junk/barrell_broken04.lwo" "mtr_burnmark" "textures/decals/ballburn01" // propogated sound on impact or destroyed "sprS_explode" "mine_explode_2" "snd_bounce" "metal_barrel_impact" "clipmodel" "models/darkmod/misc/clipmodels/barrell_med_cm.lwo" "solid" "1" "sr_class_1" "R" "sr_type_1" "STIM_FIRE" "sr_state_1" "1" "sr_effect_1_1" "effect_kill" "sr_effect_1_1_arg1" "_SELF" } entityDef debris_generic1 { "inherit" "atdm:entity_base" "spawnclass" "idDebris" "mins" "-3 -3 -3" "maxs" "3 3 3" "editor_displayFolder" "x doom3 junk/Debris" "model" "models/darkmod/junk/generic_shards/ceramicflind04.ase" //"skin" "skins/exp_barrel_red" "health" "0" // amount of damage projectile can take if damaged (0 means it can't be destroyed) "velocity" "100 100 00" // how fast the projectile leaves the gun (or distance if fuse is 0) "random_velocity" "1" "angular_velocity" "1 -1 1" // how the projectile is rotating when it leaves the gun "thrust" "50" // the rate of acceleration (always in the direction of the projectiles model) "thrust_start" "50" // when to start accelerating "thrust_end" "0" // when to stop accelerating "linear_friction" "0.8" // "air" friction "angular_friction" "1.1" "contact_friction" "0.9" "bounce" "0.1" // how much speed a projectile retains when it bounces off of objects (coefficient of restitution). 0 means no bounce. "mass" "4" "gravity" "266" // how much gravity affects the trajectory. gravity direction is same as the entity that fired it. "fuse" "15" // how long before the projectile is removed or self-detonates. Use 0 for beam weapons (velocity == distance). "detonate_on_fuse" "1" // whether projectile should detonate when it's fuse runs out "detonate_on_death" "0" // whether projectile should detonate when it's "killed" (health runs out) "detonate_on_world" "0" // whether projectile should detonate when it hits an obstacle "detonate_on_actor" "0" // whether projectile should detonate when it hits a character in the game "smoke_fly" "imp_trail2" // particle effect while in the air // parametric particles -- temp "model_detonate" "" "smoke_detonate" "" // particle effect when detonates "smoke_fuse" "" "smoke_bounce" "" } Moving a slow match or a candle next to the barrel only ignites it because it's so sensitive to being pushed by moveables (see below). They don't have enough of a stim radius to reach the origin (and something weird's up with the candle flame: I had to move a light_candleflame entity right next to the origin to ignite it, regardless of radius). I fixed this on a slow match by giving it "sr_use_bounds" "1", but that has to be set on the stimming entity, not the response entity. Are we concerned about this? See also http://bugs.thedarkmod.com/view.php?id=1727Fire arrows, on the other hand, are so effective that even before I set up the fire Response, detonating one near a powder keg would skip the burn phase and go straight to its explosion.It's weirdly easy to set it off just by throwing objects at it or even pushing them against it: if something does any damage at all on collision, it can whittle the barrel's health down, even if it's a small object. (It might be possible to disable damage altogether and respond to fire stims alone if the enableDamage(float enable) script event is inherited; I haven't tried. [scratch that; it's for dealing damage.] Would we be happy if fire was the only way to set it off?)On the other hand, you can chuck the barrel around all you like. I think this code change from D3XP (Resurrection of Evil) might be to change that. If it does, and we want it, someone would have to copy it over (and make sure it didn't make the things lethal just to move around).Are we likely to want a long burning stage (id had 2.5 secs or nothing, I've currently set 3)? It raises questions of how to activate a fire stim when the burning stage starts, and whether water stims should stop the burning. (A function to stop burning was another D3XP addition, but I didn't notice a way to invoke it from outside C++ code, so we'd need that too...) Otherwise, we just need a fire stim to go with the explosion; I haven't tried the invisible debris idea yet.You can set a model to switch to when the barrel explodes, but it vanishes pretty abruptly after a few seconds, which doesn't look great with TDM's broken barrel models; I think you're stuck with the same collision model even if you've switched to a much smaller visual model; and D3 physics strike again, in that anything that lands on the new model is likely to hover in mid-air after it vanishes. Edited March 14, 2019 by VanishedOne 3 Quote Some things I'm repeatedly thinking about... - louder scream when you're dying Link to post Share on other sites
Springheel 4645 Posted March 14, 2019 Report Share Posted March 14, 2019 Wait a minute. Doesn't Kingsal have working powder kegs in Volta 2? Quote TDM Missions: A Score to Settle * A Reputation to Uphold * A New Job * A Matter of Hours Video Series: Springheel's Modules * Speedbuild Challenge * New Mappers Workshop * Building Traps Link to post Share on other sites
Amadeus 360 Posted March 14, 2019 Report Share Posted March 14, 2019 Wait a minute. Doesn't Kingsal have working powder kegs in Volta 2? Yep Quote FMs: A Good Neighbor Link to post Share on other sites
VanishedOne 546 Posted March 14, 2019 Author Report Share Posted March 14, 2019 (edited) Appears to be Obsttorte's work: //++++++++++++++++++++++++Explosive Urn++++++++++++++++++++++++++++++ // Obsttorte: Explosive Urn Object that doesn't require additional setup in DR . This isnt used in Cauldron do it not providing an impulse on explosion. entityDef atdm:explosive_urn { "inherit" "atdm:moveable_kitchen_breakable_base" "spawnclass" "idBarrel" "editor_displayFolder" "interactables/crates/explosive" "mass" "18" "health" "150" "model" "models/volta/urn_explosive.ASE" "def_flinder" "explodingCrate_flinder_medium" "def_flinder1" "explodingCrate_flinder_small" "def_flinder2" "explodingCrate_flinder_small" "flinder_count" "2" "flinder_count1" "3" "flinder_count2" "3" "flinder_offset" "-10 -10 -10" "flinder_offset1" "10 -10 -10" "flinder_offset2" "10 10 10" "scriptobject" "tdm_explosive_urn" "def_attach1" "light_exploding_urn" "pos_attach1" "light" "attach_pos_name_1" "light" "attach_pos_origin_1" "0 0 30" "def_attach2" "crate_shooter" "pos_attach" "origin" } //Depricated version that uses S and R. Do not use. entityDef explosive_urn { "inherit" "atdm:moveable_kitchen_breakable_base" "spawnclass" "idBarrel" "editor_displayFolder" "interactables/crates/explosive" "mass" "18" "health" "75" "model" "models/volta/urn_explosive.ASE" //"spr_object_hardness" "hard" //"spr_object_size" "large" "sprS_bounce" "urn_bounce" "snd_bounce" "tdm_impact_large_ceramic" "snd_bounce_wood" "tdm_ceramic_on_wood" "snd_bounce_dirt" "tdm_impact_dirt_hard" "snd_bounce_grass" "tdm_impact_dirt_hard" "def_flinder" "urn_flinder1" "def_flinder1" "urn_flinder2" "def_flinder2" "urn_flinder3" "flinder_count" "1" "flinder_count1" "1" "flinder_count2" "1" "flinder_offset" "0 6 0" "flinder_offset1" "6 -6 0" "flinder_offset2" "0 0 0" //Example SR set up // "sr_class_1" "R" // "sr_class_2" "R" // "sr_class_3" "R" // "sr_effect_1_1" "effect_kill" // "sr_effect_1_1_arg1" "_SELF" // "sr_effect_2_1" "effect_trigger" // "sr_effect_2_1_arg1" "trigger_timer" // "sr_effect_2_2" "effect_add_target" // "sr_effect_2_2_arg1" "trigger_timer" // "sr_effect_2_2_arg2" "explosive_urn" // "sr_effect_2_3" "effect_light_ignite" // "sr_effect_2_3_arg1" "light_exploding_urn" // "sr_effect_3_1" "effect_clear_targets" // "sr_effect_3_1_arg1" "trigger_timer" // "sr_effect_3_2" "effect_light_extinguish" // "sr_effect_3_2_arg1" "light_exploding_urn" // "sr_state_1" "1" // "sr_state_2" "1" // "sr_state_3" "1" // "sr_type_1" "STIM_TRIGGER" // "sr_type_2" "STIM_FIRE" // "sr_type_3" "STIM_WATER" // "sr_radius_2" "30" } entityDef sprGS_urn_bounce { "inherit" "atdm:propagated_sound_base" "vol" "48" "dur" "100" "alert_factor" "2" // AI can hear footsteps at a distance but don't react strongly to just one "alert_max" "40" "editor_usage" "Propagated footstep sounds from the player" } //Light bound to urn entitydef light_exploding_urn { "inherit" "atdm:light_base" "editor_displayFolder" "interactables/crates/explosive/base" "clipmodel_contents" "131072" // CONTENTS_RESPONSE "mins" "-6 -6 -6" "maxs" "6 6 24" "model_lit" "torchflame_movable.prt" "model_extinguished" "tdm_smoke_torchout.prt" "extinguished" "1" "snd_lit" "element_fire_torch" "snd_extinguished" "machine_steam01" "falloff" "0" "texture" "lights/volta_light_spot01_flickering_flames" "_color" "0.835 0.427 0.157" "light_radius" "42 42 42" "scriptobject" "light_ext" "AIuse" "AIUSE_SUSPICIOUS" "ext_hide_delay" "6" } //Flinders used by urn. Currently using wood flinders. entityDef urn_flinder1 { "editor_displayFolder" "interactables/crates/explosive/base/flinder" "inherit" "atdm:moveable_small_base" "model" "models/volta/urn_shard1.ASE" "mass" "3" "bouncyness" "0.2" "solid" "0" "spr_object_hardness" "hard" "spr_object_size" "small" "frobable" "1" "noshadows" "1" "gravity" "700" "friction" "0.1" "snd_bounce" "tdm_impact_junk_plank_shorter" } entityDef urn_flinder2 { "editor_displayFolder" "interactables/crates/explosive/base/flinder" "inherit" "atdm:moveable_small_base" "model" "models/volta/urn_shard2.ASE" "mass" "3" "bouncyness" "0.2" "solid" "0" "spr_object_hardness" "hard" "spr_object_size" "small" "frobable" "1" "noshadows" "1" "gravity" "700" "friction" "0.1" "snd_bounce" "tdm_impact_junk_plank_shorter" } entityDef urn_flinder3 { "editor_displayFolder" "interactables/crates/explosive/base/flinder" "inherit" "atdm:moveable_small_base" "model" "models/volta/urn_shard3.ASE" "mass" "3" "bouncyness" "0.2" "solid" "0" "spr_object_hardness" "hard" "spr_object_size" "small" "frobable" "1" "noshadows" "1" "gravity" "700" "friction" "0.1" "snd_bounce" "tdm_impact_junk_plank_shorter" } //Func_shooter bound to urn. entityDef crate_shooter { "inherit" "atdm:func_shooter" "spawnclass" "tdmFuncShooter" "editor_displayFolder" "interactables/crates/explosive/base/projectile" "editor_mins" "-12 -12 -12" "editor_maxs" "12 12 12" "ammo" "1" "def_projectile" "atdm:projectile_explodingCrate" "fire_interval" "10" "fire_interval_fuzzyness" "0" "pitch" "-90" "start_off" "1" } //Projectile used to create explosion. Basically a firearrow that explodes immediately. entityDef atdm:projectile_explodingCrate { "inherit" "atdm:projectile_arrow" "model" "models/darkmod/weapons/volta_firearrow.ASE" "editor_displayFolder" "interactables/crates/explosive/base/projectile" "editor_usage" "The projectile fired by exploding crate" "def_damage" "atdm:damage_explodingCrate_direct" "def_splash_damage" "atdm:damage_explodingCrate_splash" "impact_gib" "1" // whether projectile can gib a character or not (for example: bullets don't gib, but rockets do) "mtr_detonate" "textures/decals/ballburn01" "decal_size" "100" "velocity" "0" "fuse" "0.0001" //"smoke_fly" "imp_trail2.prt" // particle effect while in the air "mtr_explode_light_shader" "lights/volta_light_spot01" "explode_light_color" "0.906 0.627 0.447" "explode_light_radius" "120" "explode_light_fadetime" ".2" "detonate_on_fuse" "1" "detonate_on_death" "1" "detonate_on_world" "1" "detonate_on_actor" "1" /* "debris_count" "3" "def_debris" "debris_largeshrapnel" "def_shrapnel" "debris_shrapnel" */ "has_result" "1" "def_result" "atdm:result_explodingCrate" // grayman #1104 - for when arrow hits water "detonate_on_water" "1" // whether projectile should detonate when it hits a water surface "def_result_water" "atdm:result_explodingCrate_water" "def_damage_water" "atdm:damage_none" // don't hurt the water "no_water_splash_damage" "1" // no splash damage when detonating on water // Crispy: Most arrows should not raise visual alerts in flight, but fire arrows are an exception "AIUse" "AIUSE_SUSPICIOUS" // grayman #1327 } //Damage entityDef atdm:damage_explodingCrate_direct { "inherit" "atdm:damage_base" "editor_displayFolder" "interactables/crates/explosive/base/damage" //Damage "damage" "200" "radius" "75" "push" "2000" "mtr_wound_flesh" "textures/decals/hurt02" "mtr_splat_flesh" "" "gib" "1" "smoke_wound_flesh" "bloodwound.prt" } entityDef atdm:damage_explodingCrate_splash { "inherit" "atdm:damage_base" "editor_displayFolder" "interactables/crates/explosive/base/damage" //Damage "damage" "75" "radius" "150" "knockback" "50" "push" "1500" "attackerDamageScale" "1.0" "attackerPushScale" "1.0" "gib" "1" } // Dummy result for stims entityDef atdm:result_explodingCrate { "inherit" "atdm:result_arrow_base" "editor_displayFolder" "interactables/crates/explosive/base/projectile" "model_dud" "volta_explodingCrate_fx.prt" "dud_align_surface" "1" "snd_dud" "urn_explosion" // propagated sound "sprS_dud" "mine_explode_2" "copy_bind" "0" "remove_delay" "15" "sr_type_1" "1" // STIM_FIRE -> script/tdm_stim_response.script "sr_radius_1" "35" // expand from 10 units "sr_radius_final_1" "110" // to 70 units "sr_falloffexponent_1" "1" "sr_duration_1" "250" // stim duration 250 ms "sr_time_interval_1" "45" // stim check is made roughly every 45 ms } // Water explosion entityDef atdm:result_explodingCrate_water { "inherit" "atdm:result_arrow_base" "editor_displayFolder" "interactables/crates/explosive/base/projectile" "model_dud" "tdm_smoke_torchout.prt" "dud_align_surface" "1" "snd_dud" "machine_steam01" "copy_bind" "0" "remove_delay" "5" } #ifndef EXPLOSIVE_URN #define EXPLOSIVE_URN object tdm_explosive_urn { void init(); void explode(float explosionDelay); void LightsOn(); float onFire; void updateLoop(); }; void tdm_explosive_urn::init() { onFire=0; thread updateLoop(); } void tdm_explosive_urn::updateLoop() { while(1) { sys.waitFrame(); if (onFire) explode(4.0); } } void tdm_explosive_urn::explode(float explosionDelay) { sys.println("Urn explodes in "+explosionDelay); entity shooter; shooter=getBindChild(1);; sys.wait(explosionDelay); if (!onFire) return; shooter.shooterFireProjectile(); } void tdm_explosive_urn::LightsOn() { onFire=1; } void tdm_explosive_urn::LightsOff() { onFire=0; } #endif I assume this from the map file is the 'additional setup' referred to in the top comment: { "classname" "explosive_urn" "name" "explosive_urn_11" "origin" "1607.7 -6797.02 -3326.44" "rotation" "0.0509955 0.458469 0.887246 -0.986941 0.159055 -0.0254631 -0.152795 -0.874362 0.460593" "sr_class_1" "R" "sr_class_2" "R" "sr_class_3" "R" "sr_effect_1_1" "effect_kill" "sr_effect_1_1_arg1" "_SELF" "sr_effect_2_1" "effect_trigger" "sr_effect_2_1_arg1" "trigger_timer_14" "sr_effect_2_2" "effect_add_target" "sr_effect_2_2_arg1" "trigger_timer_14" "sr_effect_2_2_arg2" "explosive_urn_11" "sr_effect_2_3" "effect_light_ignite" "sr_effect_2_3_arg1" "light_exploding_urn_11" "sr_effect_3_1" "effect_clear_targets" "sr_effect_3_1_arg1" "trigger_timer_14" "sr_effect_3_2" "effect_light_extinguish" "sr_effect_3_2_arg1" "light_exploding_urn_11" "sr_radius_2" "45" "sr_state_1" "1" "sr_state_2" "1" "sr_state_3" "1" "sr_type_1" "STIM_TRIGGER" "sr_type_2" "STIM_FIRE" "sr_type_3" "STIM_WATER" "target" "atdm_func_shooter_11" } It would be interesting to know what the problems were with getting an impulse, and why it uses such a complex set-up with a bound shooter (func_explosion would be the first thing I'd have tried, which makes me wonder whether it was tried and had problems; or if the idea is to launch a projectile, there's a script event for that, and the FX system might be another way). (For that matter, you can invoke impulses in scripts: it's how my speed and slowfall potions work. Though it's the kind of workaround you need if you're reliant on scripting to do the job, and was initially severely bugged.) Edited March 14, 2019 by VanishedOne 1 Quote Some things I'm repeatedly thinking about... - louder scream when you're dying Link to post Share on other sites
RPGista 603 Posted March 14, 2019 Report Share Posted March 14, 2019 (edited) Can I still post about my own experiments here as well? I was able to successfully create a fractured bottle. I ported a simple model, created a fractured version comprised of 5 pieces, both sharing the same uvs. Since all the pieces are sharing the same origin point with the original model, the flinders function swaps the normal bottle for the broken bottle on the exact same coordinates, which is what I wanted. Check it out here:https://1drv.ms/u/s!AtiNx4pGNqbmb-SbSEurYpQmLRs Put it into your map and hit it a couple of times. The only, major problem is that theres no "falling apart" moment at the breaking point. When the health of the bottle reachs zero, the physics doest act on it, it simply cracks, but remains frozen in place. Not even a fire arrow can displace it. Once cracked, the broken bottle will behave normally (meaning, its standing there all cracked, and if you hit again the pieces will all fly off). I wonder what could be causing it, maybe its something to do with the way physics work in game. Maybe we need to artificially script a push force to get the pieces moving once the objects health reaches zero - following the main vector - just like the arrow pieces. Or maybe I did something wrong with my collision models, and the pieces are getting stuck somehow? PS: Two other things to note: - Throwing the bottle against the walls and floors do not damage it. Nor jumping on top of it. Or throwing objects at it. It should break from anything more than a gentle tap on a hard surface. - The fire arrow explosion does not cast light. The fire ball should illuminate a fair area. Now that I think of it, the fire arrow itself could cast a small light, like a very small candle. You should probably be able to see it casting this light as it flies. Edited March 14, 2019 by RPGista Quote Link to post Share on other sites
VanishedOne 546 Posted March 14, 2019 Author Report Share Posted March 14, 2019 The physics limitations sound like the flinder problem raised in the other thread. I wonder whether these spawnargs would let us invoke a script to break a moveable when it collides with something: fxCollide = spawnArgs.GetString( "fx_collide" ); nextCollideFxTime = 0; // tels: m_scriptCollide = spawnArgs.GetString( "script_collide" ); m_nextCollideScriptTime = 0; m_collideScriptCounter = spawnArgs.GetInt( "collide_script_counter", "1" ); Quote Some things I'm repeatedly thinking about... - louder scream when you're dying Link to post Share on other sites
duzenko 659 Posted March 15, 2019 Report Share Posted March 15, 2019 I am interested in investigating the idBarrel class.Can we have a test map for the OP issues? 2 Quote Link to post Share on other sites
VanishedOne 546 Posted March 15, 2019 Author Report Share Posted March 15, 2019 I am interested in investigating the idBarrel class.Can we have a test map for the OP issues?Okay, I'll put one together later. Quote Some things I'm repeatedly thinking about... - louder scream when you're dying Link to post Share on other sites
RPGista 603 Posted March 15, 2019 Report Share Posted March 15, 2019 (edited) Thats awesome, duzenko. The breakable-bottle moveable entities also use the barrel class. I will setup a simple map when I get back home, if you get a chance to take a look at that. Edited March 15, 2019 by RPGista Quote Link to post Share on other sites
VanishedOne 546 Posted March 15, 2019 Author Report Share Posted March 15, 2019 (edited) Okay, here's a test map for the powder keg from the OP. I've supplied some moveables to throw at it or push against it, a candle, a slow match, broadheads and fire arrows.If you want to test the damage model feature I mention in the OP's last bullet point, uncomment this line in the def: It turns out you won't need to; I forgot to remove the spawnarg from the entity. // "model_damage" "models/darkmod/junk/barrell_broken04.lwo" powderkeg.map.txt Edited March 15, 2019 by VanishedOne Quote Some things I'm repeatedly thinking about... - louder scream when you're dying Link to post Share on other sites
kingsal 591 Posted March 15, 2019 Report Share Posted March 15, 2019 Yeah so those urns were kind of hacky. Obs script worked well, but as mentioned it couldnt provide an impulse to send the flinders flying once the barrel exploded. I reverted back the the duct taped version with a bound light and func_shooter because sending the flinders flying through the air was super satisfying IMO. It would be awesome if you guys figure out a way to provide an impulse to the flinders in the object script. Generally this could be applied to breakable crates, doors, ect. Maybe something could be pulled from the func_fracture class? 1 Quote FMs: Volta and the Stone, Volta II: Cauldron of the GodsSnowed Inn Link to post Share on other sites
VanishedOne 546 Posted March 15, 2019 Author Report Share Posted March 15, 2019 There seems to be a general problem with flinders spawning without velocity, not just a scripting problem: I don't know whether you saw the discussion of http://bugs.thedarkmod.com/view.php?id=4230 in Newbie DR Questions. Now that you mention func_fractures, I do remember this bug that sounds a bit similar: http://bugs.thedarkmod.com/view.php?id=4181 Quote Some things I'm repeatedly thinking about... - louder scream when you're dying Link to post Share on other sites
RPGista 603 Posted March 15, 2019 Report Share Posted March 15, 2019 (edited) Heres another map. Ive placed several of the breakable bottle entities Ive been working on, as well as the independent pieces scattered around the floor, plus a few moveables you can use to interact with them. https://1drv.ms/u/s!AtiNx4pGNqbmcBXMyNCu2M12MmM Just install the mission as you would normally. A simple way to observe the issue is to shoot a fire arrow against the opposite wall you are facing on map start. There are bottlles and pieces next to it. The pieces will be blown away as expected, but the bottles will not move at all. They should be broken now so if you fire a second fire arrow, they should (mostly) fall apart as well. It might take a third hit to do it. The main issue seems to be that force is not transfered between the original moveable and the flinder moveables that are spawned once it is hit. Also, it seems force transfer between moveables in inconsistent - theres a pile of breakable bottles on floor to the right, and they will fall apart and crumble on top of each other only after theyve been all damaged and broken as you would expect, but the force that broke all of them (the explosion) does not push them against each other upon impact. They just "break" in place and then fall down vertically due to gravity. The same can be said of a single bottle. Once broken (Im guessing the flinders are still in "rest" state), its possible to see further explosions taking away a few pieces of the group but leaving others in place, as it appears pieces can "shield" others from the impact altogether. Edited March 15, 2019 by RPGista Quote Link to post Share on other sites
duzenko 659 Posted March 16, 2019 Report Share Posted March 16, 2019 I am traveling today and should have the time for the test map tomorrow.Just want to say that there's some C++ code behind the exploding barrel so it's not all in the script (good for me because D3 scripting is not my native language LOL) Quote Link to post Share on other sites
duzenko 659 Posted March 17, 2019 Report Share Posted March 17, 2019 Okay, here's a test map for the powder keg from the OP. I've supplied some moveables to throw at it or push against it, a candle, a slow match, broadheads and fire arrows. If you want to test the damage model feature I mention in the OP's last bullet point, uncomment this line in the def: It turns out you won't need to; I forgot to remove the spawnarg from the entity. // "model_damage" "models/darkmod/junk/barrell_broken04.lwo" Does not load the barrel for me Spawning entities WARNING:Unknown classname 'moveable_powderkeg' on 'moveable_powderkeg_1'. Quote Link to post Share on other sites
duzenko 659 Posted March 17, 2019 Report Share Posted March 17, 2019 Heres another map. Ive placed several of the breakable bottle entities Ive been working on, as well as the independent pieces scattered around the floor, plus a few moveables you can use to interact with them. https://1drv.ms/u/s!AtiNx4pGNqbmcBXMyNCu2M12MmM Just install the mission as you would normally. A simple way to observe the issue is to shoot a fire arrow against the opposite wall you are facing on map start. There are bottlles and pieces next to it. The pieces will be blown away as expected, but the bottles will not move at all. They should be broken now so if you fire a second fire arrow, they should (mostly) fall apart as well. It might take a third hit to do it. The main issue seems to be that force is not transfered between the original moveable and the flinder moveables that are spawned once it is hit. Also, it seems force transfer between moveables in inconsistent - theres a pile of breakable bottles on floor to the right, and they will fall apart and crumble on top of each other only after theyve been all damaged and broken as you would expect, but the force that broke all of them (the explosion) does not push them against each other upon impact. They just "break" in place and then fall down vertically due to gravity. The same can be said of a single bottle. Once broken (Im guessing the flinders are still in "rest" state), its possible to see further explosions taking away a few pieces of the group but leaving others in place, as it appears pieces can "shield" others from the impact altogether. ------------- Warnings --------------- during test_break... WARNING:Couldn't load gui: 'guis/map_of.gui' WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_1'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_10'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_11'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_12'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_13'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_2'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_3'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_4'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_5'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_6'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_7'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_8'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_9'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1p1' on 'atdm_moveable_custom_breakable_glassbottle_frac1p1_1'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1p2' on 'atdm_moveable_custom_breakable_glassbottle_frac1p2_1'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1p2' on 'atdm_moveable_custom_breakable_glassbottle_frac1p2_2'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1p3' on 'atdm_moveable_custom_breakable_glassbottle_frac1p3_1'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1p3' on 'atdm_moveable_custom_breakable_glassbottle_frac1p3_2'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1p4' on 'atdm_moveable_custom_breakable_glassbottle_frac1p4_1'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1p4' on 'atdm_moveable_custom_breakable_glassbottle_frac1p4_2'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1p5' on 'atdm_moveable_custom_breakable_glassbottle_frac1p5_1'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1p5' on 'atdm_moveable_custom_breakable_glassbottle_frac1p5_2'. 23 warnings What am I missing? I'm on assets svn trunk Quote Link to post Share on other sites
VanishedOne 546 Posted March 17, 2019 Author Report Share Posted March 17, 2019 Does not load the barrel for me Spawning entities WARNING:Unknown classname 'moveable_powderkeg' on 'moveable_powderkeg_1'. The map uses the defs in the OP. Save the spoilered text in the OP to /def/powderkeg.def By the way, I found another bug: snd_burn never gets cleared, so you can still hear burning after the explosion. Maybe id assumed it wouldn't be a looping sound. Quote Some things I'm repeatedly thinking about... - louder scream when you're dying Link to post Share on other sites
duzenko 659 Posted March 17, 2019 Report Share Posted March 17, 2019 The map uses the defs in the OP. Save the spoilered text in the OP to /def/powderkeg.defIt works! So what needs to be fixed? It looks pretty good already. Quote Link to post Share on other sites
RPGista 603 Posted March 17, 2019 Report Share Posted March 17, 2019 (edited) ------------- Warnings --------------- during test_break... WARNING:Couldn't load gui: 'guis/map_of.gui' WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_1'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_10'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_11'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_12'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_13'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_2'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_3'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_4'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_5'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_6'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_7'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_8'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1' on 'atdm_moveable_custom_breakable_glassbottle_frac1_9'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1p1' on 'atdm_moveable_custom_breakable_glassbottle_frac1p1_1'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1p2' on 'atdm_moveable_custom_breakable_glassbottle_frac1p2_1'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1p2' on 'atdm_moveable_custom_breakable_glassbottle_frac1p2_2'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1p3' on 'atdm_moveable_custom_breakable_glassbottle_frac1p3_1'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1p3' on 'atdm_moveable_custom_breakable_glassbottle_frac1p3_2'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1p4' on 'atdm_moveable_custom_breakable_glassbottle_frac1p4_1'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1p4' on 'atdm_moveable_custom_breakable_glassbottle_frac1p4_2'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1p5' on 'atdm_moveable_custom_breakable_glassbottle_frac1p5_1'. WARNING:Unknown classname 'atdm:moveable_custom_breakable_glassbottle_frac1p5' on 'atdm_moveable_custom_breakable_glassbottle_frac1p5_2'. 23 warnings What am I missing? I'm on assets svn trunk I dont know what the svn trunk is, but it should work if you put the pk4 in your fms folder and "install" it... Im not sure what else to do. You could also place the bottles pk4 inside your base project folder ( https://1drv.ms/u/s!AtiNx4pGNqbmb-SbSEurYpQmLRs) ,but you would have to do inside DarkRadiant and place the entities in your test map as well. Edited March 17, 2019 by RPGista Quote Link to post Share on other sites
VanishedOne 546 Posted March 17, 2019 Author Report Share Posted March 17, 2019 (edited) It works! So what needs to be fixed? It looks pretty good already.I think things that can definitely be considered bugs are: It's so sensitive to moveable damage, you can set it alight by rubbing a loaf of bread against it.The burning sound never turns off.Fire stims (e.g.from a candle or slow match) often fail to set it aflame, presumably because they've been set up with a short radius and it's a big barrel, so the stim radius gets nowhere near the entity origin. This is an instance of http://bugs.thedarkmod.com/view.php?id=1727More of a nice-to-have: ideally the model it switches to on exploding could have its own clipmodel (I've set it up to use a broken barrel that's much shorter than the intact barrel), and anything touching it when it disappears would drop to the floor. Edit: or it might be better just to stop the broken barrel vanishing, since it looks pretty bad when it just disappears. The rest is more a question of quite how we want it to behave. If we want a keg that can be 'killed' by throwing things at it, then it makes sense for it to explode from being thrown or dropped (more than a short distance) too, which doesn't seem to happen. (Also, how we get it working with TDM's Stim/Response system. We might not need a code change to create a fire stim for the explosion: the idea was, we'd spawn an invisible piece of debris that would carry the stim like a projectile result. I haven't tried that yet. The burning phase could complicate matters (shouldn't it have a fire stim? shouldn't water stims stop the burning?) but it probably won't matter if we only want a short fuse.) Edited March 18, 2019 by VanishedOne Quote Some things I'm repeatedly thinking about... - louder scream when you're dying Link to post Share on other sites
Springheel 4645 Posted March 17, 2019 Report Share Posted March 17, 2019 If it's going to be exploding and causing damage, we don't want it to be too sensitive. Just throwing a bottle or loaf of bread shouldn't do it. Hitting it with an arrow or sword, setting it on fire, or dropping or throwing it should set it off. Quote TDM Missions: A Score to Settle * A Reputation to Uphold * A New Job * A Matter of Hours Video Series: Springheel's Modules * Speedbuild Challenge * New Mappers Workshop * Building Traps Link to post Share on other sites
VanishedOne 546 Posted March 18, 2019 Author Report Share Posted March 18, 2019 How about the blackjack? I think what's probably going on is that if the barrel receives any damage at all, repeating that over time will whittle its health down. Maybe it should lose health only when dealt damage above a threshold amount in a single blow...? Quote Some things I'm repeatedly thinking about... - louder scream when you're dying Link to post Share on other sites
Springheel 4645 Posted March 18, 2019 Report Share Posted March 18, 2019 I don't think a blackjack should do it...that's meant to be a cushioned blow. Maybe it should lose health only when dealt damage above a threshold amount in a single blow...? Hmm, that might be reasonable, though it could affect crushing damage. 1 Quote TDM Missions: A Score to Settle * A Reputation to Uphold * A New Job * A Matter of Hours Video Series: Springheel's Modules * Speedbuild Challenge * New Mappers Workshop * Building Traps Link to post Share on other sites
VanishedOne 546 Posted March 23, 2019 Author Report Share Posted March 23, 2019 A couple of thoughts about AI: Should human AI react on noticing the burning phase? (Alarm, fleeing out of proximity...) That would require them to be able to see it.What happens if a powder keg blocks an AI's path? We presumably don't want them kicking kegs out of the way if the kegs are going to explode from being kicked. Quote Some things I'm repeatedly thinking about... - louder scream when you're dying Link to post Share on other sites
Springheel 4645 Posted March 23, 2019 Report Share Posted March 23, 2019 A couple of thoughts about AI: Should human AI react on noticing the burning phase? (Alarm, fleeing out of proximity...) That would require them to be able to see it.What happens if a powder keg blocks an AI's path? We presumably don't want them kicking kegs out of the way if the kegs are going to explode from being kicked. 1. I don't think so. They will react automatically to the sound of it exploding. Having them run before that happens would require extra coding work, and reduces the point of setting them off in the first place (presumably players will want to use them to try to kill AI).2. AI don't kick movables, they just walk into them, which shouldn't cause any damage. Presumably the kegs will be too heavy to go flying after contact with an AI. Given that there will be considerable noise and damage from a keg exploding, I think we should make sure they are designed in a way that makes them not likely to go off accidentally. We don't want AI setting them off when the player isn't around, potentially alerting half the map or failing no-kill objectives. Quote TDM Missions: A Score to Settle * A Reputation to Uphold * A New Job * A Matter of Hours Video Series: Springheel's Modules * Speedbuild Challenge * New Mappers Workshop * Building Traps Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.