stevey666 Posted Thursday at 07:19 PM Author Posted Thursday at 07:19 PM (edited) 2 hours ago, maikchaos said: Yes it is Caucasus. I can confirm the message and then the mission continoues. dcs.log 191.71 kB · 2 downloads Mig-21bis_error.trk 355.75 kB · 1 download thanks, I wasn't able to use the trk in the end as I didn't have your mods but luckily adding the mig in as an AI uses the SPRD replace this section: function onWpnEvent(event) if event.id == world.event.S_EVENT_SHOT then if event.weapon then local ordnance = event.weapon local typeName = trim(ordnance:getTypeName()) --Skip rocket boosters like SPRD-99 if typeName == "SPRD" then return end env.info("Weapon fired: [" .. typeName .. "]") debugMsg("Weapon fired: [" .. typeName .. "]") with this function onWpnEvent(event) if event.id == world.event.S_EVENT_SHOT then if event.weapon then local ordnance = event.weapon --verify isExist and getDesc local isValid = false local status, desc = pcall(function() return ordnance:isExist() and ordnance:getDesc() end) if status and desc then isValid = true end if not isValid then if splash_damage_options.debug then env.info("SplashDamage: Invalid weapon object in S_EVENT_SHOT") debugMsg("Invalid weapon object in S_EVENT_SHOT") end return end --Safely get typeName with pcall local status, typeName = pcall(function() return trim(ordnance:getTypeName()) end) if not status or not typeName then if splash_damage_options.debug then env.info("SplashDamage: Failed to get weapon typeName: " .. tostring(typeName)) debugMsg("Failed to get weapon typeName: " .. tostring(typeName)) end return end if splash_damage_options.debug then env.info("Weapon fired: [" .. typeName .. "]") debugMsg("Weapon fired: [" .. typeName .. "]") end - not been able to fix it specifically - but it will now put an error in the logs if debug mode is enabled, and it will not display an error popup anymore will include this in the 3.2 code when I release that soon Edited Thursday at 07:20 PM by stevey666 1
maikchaos Posted Friday at 06:52 AM Posted Friday at 06:52 AM Hi Stevey666, we were flying yesterday (without SPRD-99) . I'll try it out later. Just to clear up any confusion. For this to work, the splashdamage script needs to have ["debug"] = true, --enable debugging messages set?
stevey666 Posted Friday at 07:16 AM Author Posted Friday at 07:16 AM 21 minutes ago, maikchaos said: Hi Stevey666, we were flying yesterday (without SPRD-99) . I'll try it out later. Just to clear up any confusion. For this to work, the splashdamage script needs to have ["debug"] = true, --enable debugging messages set? You do not need debugging set to true. I was asking for that to get better logging to see what's going on, but for your specific issue the debug logging didn't give any more info when I got the AI to use the SPRD 1
stevey666 Posted Friday at 07:12 PM Author Posted Friday at 07:12 PM (edited) Splash Damage 3.2 Github: https://github.com/stephenpostlethwaite/DCSSplashDamageScript Feature Change: Giant Explosion The Giant Explosion triggering has been changed, and no longer requires a mission editor trigger. If a unit or an object is called GiantExplosionTarget[something] i.e GiantExplosionTarget1, GiantExplosionTargetBoomBox, it will be tracked and trigger a giant explosion. Also, I've added the option to trigger on unit damage as opposed to unit death. ["giantexplosion_ondamage"] = true, --Trigger explosion when unit is damaged ["giantexplosion_ondeath"] = true, --Trigger explosion when unit is destroyed New Feature: Ground Ordnance Disabled by default as it was a user request, this will allow the script to apply its effects to ground ordnance, i.e artillery shells fired by ground units --Ground Unit Ordnance ["track_groundunitordnance"] = false, --Enable tracking of ground unit ordnance (shells) ["groundunitordnance_damage_modifier"] = 1.0, --Multiplier for ground unit ordnance explosive power ["groundunitordnance_blastwave_modifier"] = 4.0, --Additional multiplier for blast wave intensity of ground unit ordnance I've also added the below shells in, so it's not fully complete. I'll need people to tell me what to add specifically if they want the specific shells tracking. I'm aware of tank shells not being in there - given it was a user request I'm not sure how many people actually want to make sure of this so have not spent additional time. --*** Shells *** ["weapons.shells.M_105mm_HE"] = { explosive = 12, shaped_charge = false, groundordnance = true }, --105mm HE shell, M119/M102 (~10-15 kg TNT equiv) ["weapons.shells.M_155mm_HE"] = { explosive = 60, shaped_charge = false, groundordnance = true }, --155mm HE shell, M777/M109 (~50-70 kg TNT equiv) ["weapons.shells.2A60_120"] = { explosive = 18, shaped_charge = false, groundordnance = true }, --120mm HE shell, 2B11 mortar (~15-20 kg TNT equiv) ["weapons.shells.2A18_122"] = { explosive = 22, shaped_charge = false, groundordnance = true }, --122mm HE shell, D-30 (~20-25 kg TNT equiv) ["weapons.shells.2A33_152"] = { explosive = 50, shaped_charge = false, groundordnance = true }, --152mm HE shell, SAU Akatsia (~40-60 kg TNT equiv) ["weapons.shells.PLZ_155_HE"] = { explosive = 60, shaped_charge = false, groundordnance = true }, --155mm HE shell, PLZ05 (~50-70 kg TNT equiv) ["weapons.shells.M185_155"] = { explosive = 60, shaped_charge = false, groundordnance = true }, --155mm HE shell, M109 (~50-70 kg TNT equiv) ["weapons.shells.2A64_152"] = { explosive = 50, shaped_charge = false, groundordnance = true }, --152mm HE shell, SAU Msta (~40-60 kg TNT equiv) New Feature: All Ground Unit Smoke and Cargo Cookoff Disabled by default as it was a user request. Enabling this will cause smoke and cookoff effects for all ground vehicles you destroy. --Smoke and Cookoff Effect For All Vehicles ["smokeandcookoffeffectallvehicles"] = false, --Enable effects for all ground vehicles not in cargoUnits vehicle table ["allunits_enable_smoke"] = false, ["allunits_enable_cookoff"] = false, ["allunits_explode_power"] = 50, --Initial power of vehicle exploding ["allunits_default_flame_size"] = 6, --Default smoke size (called flame here in the code, but it'll be smoke) 5 = small smoke, 6 = medium smoke, 7 = large smoke, 8 = huge smoke ["allunits_default_flame_duration"] = 60, --Default smoke (called flame here in the code, but it's smoke) duration in seconds for non-cargoUnits vehicles ["allunits_cookoff_count"] = 4, --number of cookoff explosions to schedule ["allunits_cookoff_duration"] = 30, --max time window of cookoffs (will be scheduled randomly between 0 seconds and this figure) ["allunits_cookoff_power"] = 10, --power of the cookoff explosions ["allunits_cookoff_powerrandom"] = 50, --percentage higher or lower of the cookoff power figure Release notes: 10 May 2025 (Stevey666) - 3.2 - New feature (user request): ground ordnance tracking, this tracks ground artillery etc if in the explosives table, set to false by default. - New feature (user request): option to create additional smoke and cargo cookoff effect for all ground vehicles initially destroyed by your ordnance or the script, set to false by default. - Adjusted blastwave explosion - Changes to debug output, ordering by vehicle distance - Thanks to tae. for the report, adjusted Ural-4320 in vehicle table, had incorrect name so wasn't triggering cook off. - Fixed error popup when using Mig 21's SPRD-99 - Added Cargo Cook off / fireball to some static objects i.e crates/barrels - Reworked Giant Explosion tracking - no mission editor trigger needed, just name static unit or unit "GiantExplosionTarget[X]" - Allow for Giant Explosion trigger on damage or on death Splash_Damage_3.2.lua Splash_Damage_3.2_debug.lua Edited Friday at 07:17 PM by stevey666 1 3
Kurdes Posted 8 hours ago Posted 8 hours ago Hello! Thanks for your continuous effort to make this script even better! Some names of the JF17 weapons have changed since ED integrated them in their files: ["C_701T"] = { explosive = 38, shaped_charge = false }, ["C_701IR"] = { explosive = 38, shaped_charge = false }, ["LS_6_100"] = { explosive = 45, shaped_charge = false }, ["LS_6"] = { explosive = 100, shaped_charge = false }, ["LS_6_500"] = { explosive = 274, shaped_charge = false }, These are the corrected names! The GB6's and BRM_90's are ok, but I haven't tested all weapons, maybe there are more... 1
Recommended Posts