Jump to content

Recommended Posts

Posted
On 23/04/2025 at 06:13, Kurdes said:

Hello! Since the "Smoke Mod" isn't compatible anymore with the recent versions of DCS, is there a possibility to enhance the smoke from destroyed vehicles with this script? Make them bigger and higher in the air etc. ? This would be great!

Hi there.  The script can add an additional smoke effect to kick off where it detects a specific vehicle has been destroyed.  It will show some odd clipping when you look closely, but from a distance you'll see the additional smoke effect more.

Right now its only for specific vehicles.  For example from the code I adjusted the 2 vehicles::

 

--[[
flamesize: 1 = small smoke and fire
 2 = medium smoke and fire
 3 = large smoke and fire
 4 = huge smoke and fire
 5 = small smoke
 6 = medium smoke 
 7 = large smoke
 8 = huge smoke 
]]--    
 

    --3) Refueler ATZ-10
    ["ATZ-10"] = {
        cargoExplosion = true,
        cargoExplosionMult = 2,
        cargoExplosionPower = 200,
        cargoCookOff = false,
        cookOffCount = 0,
        cookOffPower = 0,
        cookOffDuration = 0,
        cookOffRandomTiming = false,
        cookOffPowerRandom = 50,
        isTanker = true,
        flameSize = 6,
        flameDuration = 70,
    },

    --4) Refueler ATZ-5 
    ["ATZ-5"] = {
        cargoExplosion = true,
        cargoExplosionMult = 1.8,
        cargoExplosionPower = 200,
        cargoCookOff = false,
        cookOffCount = 0,
        cookOffPower = 0,
        cookOffDuration = 0,
        cookOffRandomTiming = false,
        cookOffPowerRandom = 50,
        isTanker = true,
        flameSize = 5,
        flameDuration = 70,
    },

 

Left is flamesize 5 (small smoke) and right flamesize 6 (medium smoke).  You can also set the duration size.

PeyjRet.png

 

If you need it for a specific vehicle you can adjust the vehicle table in the code as needed.  If it's for all vehicles, it's something I can look to add in the future but would want your input on smoke size and duration.

 

1 hour ago, Gunfreak said:

I don't get a "script file running" like i did with 2.0.

Is this correct?

If you set the game messages option in the script to true I think you'll then see this message.

    ["game_messages"] = true, --enable some messages on screen

  • Like 2
Posted
On 17/04/2025 at 22:18, Northbeard said:

Amazing work!

I assume this does not work with existing map structures/buildings? I tried it and with debugging on it doesn't seem to find any "units" in the area of the blast.

Context: Friend and I are messing around with the StrategicTargetStrikeDispatcher system on the Caucaus map in multiplayer. This script/missions gives you random existing map objects to destroy.

I've taken a look, and I believe I can track these - given that building damage is bumped already I think and bombs etc already have additional explosions - what further effect are you seeking exactly?

Posted
25 minutes ago, stevey666 said:

Hi there.  The script can add an additional smoke effect to kick off where it detects a specific vehicle has been destroyed.  It will show some odd clipping when you look closely, but from a distance you'll see the additional smoke effect more.

Right now its only for specific vehicles.  For example from the code I adjusted the 2 vehicles::

 

--[[
flamesize: 1 = small smoke and fire
 2 = medium smoke and fire
 3 = large smoke and fire
 4 = huge smoke and fire
 5 = small smoke
 6 = medium smoke 
 7 = large smoke
 8 = huge smoke 
]]--    
 

    --3) Refueler ATZ-10
    ["ATZ-10"] = {
        cargoExplosion = true,
        cargoExplosionMult = 2,
        cargoExplosionPower = 200,
        cargoCookOff = false,
        cookOffCount = 0,
        cookOffPower = 0,
        cookOffDuration = 0,
        cookOffRandomTiming = false,
        cookOffPowerRandom = 50,
        isTanker = true,
        flameSize = 6,
        flameDuration = 70,
    },

    --4) Refueler ATZ-5 
    ["ATZ-5"] = {
        cargoExplosion = true,
        cargoExplosionMult = 1.8,
        cargoExplosionPower = 200,
        cargoCookOff = false,
        cookOffCount = 0,
        cookOffPower = 0,
        cookOffDuration = 0,
        cookOffRandomTiming = false,
        cookOffPowerRandom = 50,
        isTanker = true,
        flameSize = 5,
        flameDuration = 70,
    },

 

Left is flamesize 5 (small smoke) and right flamesize 6 (medium smoke).  You can also set the duration size.

PeyjRet.png

 

If you need it for a specific vehicle you can adjust the vehicle table in the code as needed.  If it's for all vehicles, it's something I can look to add in the future but would want your input on smoke size and duration.

 

If you set the game messages option in the script to true I think you'll then see this message.

    ["game_messages"] = true, --enable some messages on screen

Thanks, this is great! And yes, i would make it for all vehicles. Will try what looks best then add it for all vehicles. An option to activate it for all vehicles is also a great idea, so everyone has the choice to use it or not. Thanks again for this superb script!

Posted (edited)
1 hour ago, Kurdes said:

Thanks, this is great! And yes, i would make it for all vehicles. Will try what looks best then add it for all vehicles. An option to activate it for all vehicles is also a great idea, so everyone has the choice to use it or not. Thanks again for this superb script!

I've updated this branch for now with changes to the code and options:
https://github.com/stephenpostlethwaite/DCSSplashDamageScript/blob/groundordnance/Splash_Damage_main.lua

    --Smoke Effect For All Vehicles
    ["smokeeffectallvehicles"] = true, -- Enable smoke effects for all ground vehicles not in cargoUnits vehicle table
    ["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 
    ["default_flame_duration"] = 60, -- Default smoke (called flame here in the code, but it's smoke) duration in seconds for non-cargoUnits vehicles

 

This will give you default extra smoke for units destroyed.  Please be aware though the limitation here is that they are destroyed outright by your bomb/missile or by the script's additional effects.   (The script takes a snapshot of the area before and after explosions, and applies cargo cook off or smoke effects to locations of now missing vehicles (aka dead vehicles).

Edited by stevey666
Posted
2 hours ago, stevey666 said:

I've updated this branch for now with changes to the code and options:
https://github.com/stephenpostlethwaite/DCSSplashDamageScript/blob/groundordnance/Splash_Damage_main.lua

    --Smoke Effect For All Vehicles
    ["smokeeffectallvehicles"] = true, -- Enable smoke effects for all ground vehicles not in cargoUnits vehicle table
    ["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 
    ["default_flame_duration"] = 60, -- Default smoke (called flame here in the code, but it's smoke) duration in seconds for non-cargoUnits vehicles

 

This will give you default extra smoke for units destroyed.  Please be aware though the limitation here is that they are destroyed outright by your bomb/missile or by the script's additional effects.   (The script takes a snapshot of the area before and after explosions, and applies cargo cook off or smoke effects to locations of now missing vehicles (aka dead vehicles).

That's amazing! Can't thank you enough!

  • Like 1
Posted (edited)

Hello stevey666!

I've tested it intensively and can say now that this brings the experience to a new level! If i were you i would highlight, that you integrated something like the smoke mod from tazz, into your splash-damage script. Many people are searching for this!

Thanks again!

Ps: would it be possible to add a choice to have random cookoffs on the destroyed vehicles also? 😉

Edited by Kurdes
Posted
2 hours ago, Kurdes said:

Hello stevey666!

I've tested it intensively and can say now that this brings the experience to a new level! If i were you i would highlight, that you integrated something like the smoke mod from tazz, into your splash-damage script. Many people are searching for this!

Thanks again!

Ps: would it be possible to add a choice to have random cookoffs on the destroyed vehicles also? 😉

I'll make note of it when i release 3.2 eventually!

For now, adding cookoffs is relatively minor, just need to adjust variables.  Won't give you random numbers of explosions as I don't want to change that much of the code atm but you can set the count.

Find the updated script here:

https://github.com/stephenpostlethwaite/DCSSplashDamageScript/blob/master/Splash_Damage_main.lua

options now contain:

    --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


Change the bolded ones to true to enable and adjust the other figures how you like.

Posted
8 minutes ago, stevey666 said:

I'll make note of it when i release 3.2 eventually!

For now, adding cookoffs is relatively minor, just need to adjust variables.  Won't give you random numbers of explosions as I don't want to change that much of the code atm but you can set the count.

Find the updated script here:

https://github.com/stephenpostlethwaite/DCSSplashDamageScript/blob/master/Splash_Damage_main.lua

options now contain:

    --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


Change the bolded ones to true to enable and adjust the other figures how you like.

Perfection! 👍

  • Like 1
Posted

Sorry if this question sounds stupid, but how do I execute a file script from mission editor?

DCS: A-10A Flaming Cliffs, A-10C II Tank Killer, AH-64D, Black Shark 3, F-4E Phantom II, F/A-18C, F-16C Viper, Fw 190 A-B, Mi-24P Hind, Mosquito FB VI, P-47D, P-51D - Afghanistan, Caucasus, CW Germany, Iraq, Kola, Marianas, Nevada, Normandy 2.0, Persian Gulf, Sinai, Syria, The Channel, South Atlantic - Combined Arms, WWII Assets

System: HP Z2 Tower, Win11 24H2, i9-14900K, 64GB RAM, 2TB SSD (M2) + 18TB HDD (Sata), GeForce RTX4070 TI Super 16GB VRAM, Samsung Odyssey 57" curved monitor (main screen) + BenQ 32" UW3270 (secondary screen), VKB Gunfighter Ultimate MK4 + S-TECS Throttle

Posted
17 minutes ago, TheBiggerBass said:

Sorry if this question sounds stupid, but how do I execute a file script from mission editor?

You have to add it as a trigger, see below:

kW79h93.png

1. Click on the triggers icon

2. Select New under the triggers box

3. Select Mission start as the type

4. Select new under the actions box

5. Select "DO SCRIPT FILE" as the action

6. Select a script lua file


Then save your mission, it will save a copy of the lua script file inside the .miz file.  If you want to make any changes to the script file you'll need to delete and re-add the script file action (from step 4) again so it adds a new copy into your miz file.

  • Thanks 1
Posted
18 hours ago, stevey666 said:

I've taken a look, and I believe I can track these - given that building damage is bumped already I think and bombs etc already have additional explosions - what further effect are you seeking exactly?

I wasn't sure if the increased blast damage was functioning with these buildings as I turned on debug messages and dropping a bomb near them stated that no units were found in area of the blast.

Posted
1 minute ago, Northbeard said:

I wasn't sure if the increased blast damage was functioning with these buildings as I turned on debug messages and dropping a bomb near them stated that no units were found in area of the blast.

Aha, got you.  Units being identified in the blast area is for the fireball/smoke/cookoff effect primarily.  As standard the script adds an extra explosion on top of your bomb with additional blastwave damage calculation for anything close by.  If its a structure and the blastwave damage is at least 0.1 then it will multiply the damage against the structure.

relevant code:

    ["static_damage_boost"] = 2000, --apply extra damage to Unit.Category.STRUCTUREs with wave explosions

                if damage_for_surface > splash_damage_options.cascade_damage_threshold then
                    local explosion_size = damage_for_surface
                    if obj:getDesc().category == Unit.Category.STRUCTURE then
                        explosion_size = intensity * splash_damage_options.static_damage_boost
 

 

So should be working as is, if it doesn't seem to be then maybe reduce the ["cascade_damage_threshold"] to 0.001, or increase the ["static_damage_boost"].  Let me know if there are issues and I can review further if you find some

Posted
9 minutes ago, stevey666 said:

Aha, got you.  Units being identified in the blast area is for the fireball/smoke/cookoff effect primarily.  As standard the script adds an extra explosion on top of your bomb with additional blastwave damage calculation for anything close by.  If its a structure and the blastwave damage is at least 0.1 then it will multiply the damage against the structure.

relevant code:

    ["static_damage_boost"] = 2000, --apply extra damage to Unit.Category.STRUCTUREs with wave explosions

                if damage_for_surface > splash_damage_options.cascade_damage_threshold then
                    local explosion_size = damage_for_surface
                    if obj:getDesc().category == Unit.Category.STRUCTURE then
                        explosion_size = intensity * splash_damage_options.static_damage_boost
 

 

So should be working as is, if it doesn't seem to be then maybe reduce the ["cascade_damage_threshold"] to 0.001, or increase the ["static_damage_boost"].  Let me know if there are issues and I can review further if you find some

Awesome, thanks, I'll give that a go.

Posted

I had 3.1 running on a mission today. And really didn't notice any differences neither to spalsh or extra effects. I fired lots of HE rockets into some woods with an ammo truck. Only with a direct hit did the ammo truck get any damge. And didn't see any cook off effects. Had 3.1(huge explosion) running 

i7 13700k @5.2ghz, GTX 3090, 64Gig ram 4800mhz DDR5, M2 drive.

Posted
9 minutes ago, Gunfreak said:

I had 3.1 running on a mission today. And really didn't notice any differences neither to spalsh or extra effects. I fired lots of HE rockets into some woods with an ammo truck. Only with a direct hit did the ammo truck get any damge. And didn't see any cook off effects. Had 3.1(huge explosion) running 

Can you confirm which HE rockets you were using and what the truck was?

If you set all the below debugs to true and re-add the script, that'll give some more info on whats going on:

  ["game_messages"] = true, --enable some messages on screen
    ["debug"] = true,  --enable debugging messages 
    ["weapon_missing_message"] = true, --false disables messages alerting you to weapons missing from the explTable
    ["track_pre_explosion_debug"] = true, --Toggle to enable/disable pre-explosion tracking debugging

These will also populate in your dcs.log file in C:\Users\[USER[\Saved Games\DCS\Logs 

Posted (edited)

Small and easily fixed bug - the Ural 4320 is still called "Ural-375" on the backend of DCS. As such, the cargo cook-off functionality does not work for it, as the script is checking for "Ural-4320" instead.

With debug enabled you can see the script print the real name of the vehicle when it is hit with a munition:
 

ap75fF9.png

Edited by tae.
  • Like 1
Posted
11 hours ago, tae. said:

Small and easily fixed bug - the Ural 4320 is still called "Ural-375" on the backend of DCS. As such, the cargo cook-off functionality does not work for it, as the script is checking for "Ural-4320" instead.

With debug enabled you can see the script print the real name of the vehicle when it is hit with a munition:
 

ap75fF9.png

Thanks! I've adjusted the main script and this will be part of 3.2

  • Like 2
Posted (edited)

I get a error using this script:

 

event:weapon_type=29242127,type=shot,initiatorPilotName=MiG-21Bis,t=481.61,initiator_unit_type=MiG-21Bis,linked_event_id=0,initiator_object_id=16798977,event_id=410,weapon=SPRD-99,initiator_coalition=1,initiator_ws_type1=1,initiatorMissionID=1,
2025-05-08 13:17:27.673 WARNING SCRIPTING (Main): Splash damage script error... gracefully caught! [string "l10n/DEFAULT/Splash_Damage_3.0.lua"]:1368: Unit doesn't exist
2025-05-08 13:18:35.491 INFO    Scripting (Main): event:weapon_type=29242127,type=shot,initiatorPilotName=MiG-21Bis,t=495.08,initiator_unit_type=MiG-21Bis,linked_event_id=0,initiator_object_id=16799233,event_id=412,weapon=SPRD-99,initiator_coalition=1,initiator_ws_type1=1,initiatorMissionID=1683,
2025-05-08 13:18:35.491 WARNING SCRIPTING (Main): Splash damage script error... gracefully caught! [string "l10n/DEFAULT/Splash_Damage_3.0.lua"]:1368: Unit doesn't exist
2025-05-08 13:18:35.499 INFO    DXGUI_WIN_ADAPTER (Main): resize main window to [2560, 2464]
2025-05-08 13:18:38.884 INFO    Scripting (Main): event:type=takeoff,initiatorPilotName=MiG-21Bis,place=Mineralnye Vody,t=501.55,placeDisplayName=Mineralnye Vody,initiator_unit_type=MiG-21Bis,initiator_object_id=16798977,linked_event_id=0,event_id=413,initiator_coalition=1,initiator_ws_type1=1,initiatorMissionID=1,

 Edit: It looks like the JATO (SPRD-99) launch rockets of the Mig-21Bis are declared as weapons and the script can't handle that.

Edited by maikchaos
Posted
47 minutes ago, maikchaos said:

I get a error using this script:

 

event:weapon_type=29242127,type=shot,initiatorPilotName=MiG-21Bis,t=481.61,initiator_unit_type=MiG-21Bis,linked_event_id=0,initiator_object_id=16798977,event_id=410,weapon=SPRD-99,initiator_coalition=1,initiator_ws_type1=1,initiatorMissionID=1,
2025-05-08 13:17:27.673 WARNING SCRIPTING (Main): Splash damage script error... gracefully caught! [string "l10n/DEFAULT/Splash_Damage_3.0.lua"]:1368: Unit doesn't exist
2025-05-08 13:18:35.491 INFO    Scripting (Main): event:weapon_type=29242127,type=shot,initiatorPilotName=MiG-21Bis,t=495.08,initiator_unit_type=MiG-21Bis,linked_event_id=0,initiator_object_id=16799233,event_id=412,weapon=SPRD-99,initiator_coalition=1,initiator_ws_type1=1,initiatorMissionID=1683,
2025-05-08 13:18:35.491 WARNING SCRIPTING (Main): Splash damage script error... gracefully caught! [string "l10n/DEFAULT/Splash_Damage_3.0.lua"]:1368: Unit doesn't exist
2025-05-08 13:18:35.499 INFO    DXGUI_WIN_ADAPTER (Main): resize main window to [2560, 2464]
2025-05-08 13:18:38.884 INFO    Scripting (Main): event:type=takeoff,initiatorPilotName=MiG-21Bis,place=Mineralnye Vody,t=501.55,placeDisplayName=Mineralnye Vody,initiator_unit_type=MiG-21Bis,initiator_object_id=16798977,linked_event_id=0,event_id=413,initiator_coalition=1,initiator_ws_type1=1,initiatorMissionID=1,

 Edit: It looks like the JATO (SPRD-99) launch rockets of the Mig-21Bis are declared as weapons and the script can't handle that.

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-99" then
                return
            end

            if splash_damage_options.debug then
                env.info("Weapon fired: [" .. typeName .. "]")
                debugMsg("Weapon fired: [" .. typeName .. "]")
            end

Can you please add the bolded bit in there?  I had no idea what this was til some googling, pretty fun feature.  The above should allow the script to ignore the booster.  I don't have the mig21 so can't test it.

Posted

I'm currently added in cargo boxes and barrels etc to the cook off list, i.e the below which is some fuel barrels:

        ["Cargo05"] = {
        cargoExplosion = true,
        cargoExplosionMult = 1,
        cargoExplosionPower = 100,
        cargoCookOff = false,
        cookOffCount = 5,
        cookOffPower = 1,
        cookOffDuration = 10,
        cookOffRandomTiming = true,
        cookOffPowerRandom = 50,
        isTanker = true,
        flameSize = 2,
        flameDuration = 30,
    },

does someone have a list of all the static unit types like this that would have a cookoff or fireball?  will be much helpful please and thank you

Posted

Unfortunately it does not work 

2025-05-08 16:24:25.180 WARNING SCRIPTING (Main): Splash damage script error... gracefully caught! [string "l10n/DEFAULT/Splash_Damage_3.0.lua"]:1368: Unit doesn't exist

 

nullimage.png

Posted (edited)
25 minutes ago, maikchaos said:

Unfortunately it does not work 

2025-05-08 16:24:25.180 WARNING SCRIPTING (Main): Splash damage script error... gracefully caught! [string "l10n/DEFAULT/Splash_Damage_3.0.lua"]:1368: Unit doesn't exist

 

nullimage.png

Do you have the full log there? or if its on caucuses, the replay?

edit - if that's all the messages you have, please enable debug mode and repeat it and supply the logs

Edited by stevey666
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...