Jump to content

DML - Mission Creation Toolbox [no Lua required]


Recommended Posts

8 hours ago, speckfire said:

would you consider just the speedboat without the infantryman if it's becoming an issue?

I've got it working. Below are two replacements: one for csarManager, one for autoCSAR. This took a lot longer than I anticipated because of some idiosyncrasies inside the game engine: it does not invoke certain events that I was expecting when a parachutist reaches water (I reported that to ED to have them verify that it is expected behavior). 

The new version now supports CSAR generation with CSARzones in open water just like on land (changes to csarManager). Also, Player and AI planes - when ejecting over open water - create a CSAR mission with the evacuee sitting up to their neck in the water (changes to autoCSAR).

Unfortunately, there's a slightly annoying side effect and with sea-CSARS:

  • the CSAR is generated when the player or AI ejects over open water, not when the parachute reaches the ground . So for a brief time (a few seconds to two minutes), you'll be able to see both the parachute making it's way down (which will vanish after hitting the water), and the evacuee in the water. 

Please let me know if this is what you were looking for.

Cheers,

-ch

 

autoCSAR.lua csarManager2.lua


Edited by cfrag
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Hi Cfrag,

Quick Question. We have a mission with standard ME created LATE Activation troops. (we  have a base mission with tree large zones, that can be activated depending on what phase of the operation we are in. We are also using the recon module. The recon module is reporting troop activities for forces that haven't even been activated yet. Is this a bug or is the recon module seeing forces put in the ME even if they are late activation.

 

In the pic below I am in GM mode. I can see a few statics, and the blue forces. The red forces are not activated yet, but recon module is reporting what they are doing.  This is during a multiplayer mission. Thanks.

 

Los

reconInvestigate.png

Link to comment
Share on other sites

AN interesting observation. If you eject in DCS and you go to external view you see a Pilot model. If you land in parachute the pilot model remains and you can actually walk around in him using WASD (sometimes we wait for the csar to land and we walk onto the helo) So there should be a pilot model somewhere in teh game that we can use instead of an infantryman for the CSAR without resulting to a mod. But I haven't been able to find that model.

 

Link to comment
Share on other sites

18 minutes ago, Los said:

The red forces are not activated yet, but recon module is reporting what they are doing.

Huh. I knew that recon script was godlike, but this is a bit unanticipated and unwanted. 🙂

Please allow me to take a look, I'll get back to you asap.

4 minutes ago, Los said:

So there should be a pilot model somewhere in teh game that we can use instead of an infantryman for the CSAR without resulting to a mod. But I haven't been able to find that model.

Indeed. One of DCS's unicorns. Even if you intercept the pilot's unit, you can't get at its model. For some reason, this one has been walled off quite effectively. 

Link to comment
Share on other sites

39 minutes ago, Los said:

The recon module is reporting troop activities for forces that haven't even been activated yet.

Confirmed. I think I can fix that fairly easy, a (hopefully) simple oversight in the unit detection code. 

Link to comment
Share on other sites

16 hours ago, Sinclair_76 said:

Realistic Battle Damage Assessment is lacking within DCS. Is that something that could be included? Have BDA report by friendly units within vicinity of destroyed target?

I personally have no experience with how BDA is performed in reality, so will have to research it a bit first. That being said, at first blush it seems definitely possible, but quite performance intensive, depending on what and when BDA should be reported, or how it should work. I need answers for questions like:

  • when is BDA reported? Whenever a unit is hit/damaged or killed? This can be a potential performance killer, and litter your screen with messages
  • who reports this, and how do you request BDA? If you can designate units to report BDA, there must be a way to request from them and this can be a very taxing UI problem (we only have that over-used communications-->other mechanic in the game)
  • How long after a kill will units be able to perform BDA? If a kill must be able to be reported after it happens (say, your flight of A-10 bomb a convoy, and 10 minutes later a helo shows up for BDA), the BDA script must retain "book-keeping" data, so to speak

All possible, but something like this will require good upfront engineering and clear UI design before I can even attempt it. So, yes, possible, but I need good input from you and everyone else interested in this on how this should work (features and UI).

Link to comment
Share on other sites

People have expressed their interest in many of DML's 'big item' features, but are reluctant to add them to their mission because they feel uneasy they might be getting into deep water. So I made a video to try to allay their fears. So here's "KRAUT: the CSAR files" - a video tutorial in which my charming 'Noldi-accent' accompanies you through adding csarManager and autoCSAR to a mission.

 

  • Like 2
Link to comment
Share on other sites

Dear CFrag,

Many many thanx for your effort. I would be very much appreciated if you could assist me how to adapt DML to a PvP mission that we developed. The concept is that there are three neutral Airbases. The coalition that will manage to capture all of them and maintain occupation for a specific ammount of time (eg 45 minutes) will win. The countdown will start only when all airbases are occupied and will stop when one or more airbases is neutralized. 

My Hardware: ROG Strix X570-F Gaming - AMD 5600X @ 4.7 ghz - G.SKILL TRIDENT 32GB DDR4 3200 (14-14-14-34 CL) - GigaByte 3080ti OC 12gb - Corsair MP600 Force 1TB - 2 x EVO Nvme 500GB - Virpil Warbird Base T-50CM2 and TM Throttle + Trackhat + G25 + AOC AG271QG 27"

My Modules: JF-17, F-16C, AV-8N/A, F-18C, ASJ37, MiG-15Bis, MiG-21Bis, Fw-190D, Bf-109K, P-51D, F-86F, Ka-50 III, UH-1H, Mi-8MTV2, NS430, FC3, A-10C, Mirage 2000C, L-39, F-5E-3, SA342, Spitfire, AH-64, Mirage F-1CE.

My Maps: Nevada, Normandy, Persian Gulf, Syria, South Atlantic.

Link to comment
Share on other sites

Just now, Panthir said:

I would be very much appreciated if you could assist me how to adapt DML to a PvP mission that we developed. [interesting details removed]

That (your description of what you want to achieve) doesn't sound terribly out of the way, and well within DML's capabilities. Perhaps PM me with the points that currently give you pause, and I'm sure we can get things sorted quickly. And if we find something in DML that needs improvement, so much the better 🙂 

  • Like 1
Link to comment
Share on other sites

Version 1.2.5 - 20230316
Functional update, water CSAR, an ugly module appears 

This update brings a little more stability for some modules that crept up while I was working on the CSAR demo video, and other bugs that were reported by the kind community. Along the way, the CSAR modules picked up the ability to create open water CSAR missions: while before you could only create land-based rescue missions, the evacuees can now be fished from the sea (it requires a hover-rescue, which is far more difficult, and a welcome skill adjustment for those bored by less difficult things).

image.png

Coupled with autoSCAR, this makes plane guard duty possible for multiplayer servers that conduct carrier ops and/or training. 

Also, fireFX received a tiny, yet incredibly helpful update: you now can place smoke/flames above ground level to make those drilling rigs look more spectacular (and easy to navigate to)

image.png

This release also includes an early (albeit fully working) version of "TaxiPolice", a module that I was forced to develop (under protest!) because my group got a bit exasperated with guests on our server (it's usually closed but we had it open for a while). I'm no fan of imposing my will on my guests, and taxiPolice goes against some of my convictions: it enforces a speed limit on taxiways (to prevent people from re-purposing the taxiway as runways).

image.png

After a player commits more than a certain number of violations, every time they speed on taxiways, their planes receive a couple of tons extra weight, curtesy of their taxiway police. The module is highly performant though, and the code clever. It still goes against many of my beliefs and I feel a bit petty having to add such a module to my maps. Nevertheless, it did help to bring some order on the ground to our server last week-end. Unsurprisingly, I procrastinate long enough writing the documentation for this module, so it's currently entirely undocumented. Since it's a drop-in module, that should not deter those of you who are looking for similar relief: it automatically works on all maps, requires no set-up and only has to be included. Hopefully I'll get around writing the documentation in one of the next iterations.


All Changes: 

Manual
    - Main 
        - corrections, updates
    - Quick Ref 
        - corrections, updates 
        
Demos
    - Recon Mode Reloaded 
        - update
        
Modules 
    - autoCSAR 1.1.0
        - CSAR missions over open water 
        
    - reconMode 2.1.4
        - scouts no longer detect inactive units 
        
    - smokeZones 
        - new synonyms 'agl' and 'alt' for parity with fireFX 
        
    - cfxZones 3.0.6
        - added stability code 
        - new polygonal zone handling 
        - imporved polygon testing 
    
    - csarManager 2.2.3
        - support for water CSAR 
        - allow neutral pick-up 
        - simplification to attributes 
    
    - dcsCommon 2.8.4
        - new polygon and 2D rotation methods 
        - getClosestAirbase supports partial lists 
        
    - fireFX 1.1.1
        - new agl attribute 
        
    - taxiPolice 0.0.0 
        - new module (undocumented)

Enjoy,
-ch

  • Thanks 2
Link to comment
Share on other sites

I really did not want to bother you with this question because I thought I would figure it out on my own but alas, here I am. I am trying to make smoke markers appear in landing zones and then stop when I am done with the training event.  I have it where the smoke will start but I can't make it stop.  I'm using radio menu to send the flag but I might not be using the correct commands. 

Smoke zone.jpg

Radio Menu.jpg

Link to comment
Share on other sites

16 hours ago, Pavespawn said:

I have it where the smoke will start but I can't make it stop. 

Your setup is 99% correct. What is throwing you is the fact that I never got around to document the "stopSmoke?" attribute ("wipe" is not recognized by smokeZones). If you rename your 'wipe?' attribute to 'stopSmoke?' it should work in your mission (I now have updated thet docs and this will be reflected in the next update - thanks!). Note that unlike 'fireFX', a smoke effect in DCS can't be stopped immediately, it has to time out. In the worst case this means that it can take 5 minutes for the smoke to stop.

null

image.png

On a more personal note I recommend that you name your flags with something that you can more easily recognize, like 'smokeOn' instead of '86' - but that's a matter of taste 🙂 

 


Edited by cfrag
Link to comment
Share on other sites

  • 2 weeks later...

Seem to be having this eror: 

2023-03-29 14:14:47.830 ERROR   SCRIPTING (Main): Mission script error: [string "C:\Users\chris\AppData\Local\Temp\DCS.openbeta\/~mis000039C3.lua"]:200: attempt to index local 'theObject' (a nil value)
stack traceback:
    [C]: ?
    [string "C:\Users\chris\AppData\Local\Temp\DCS.openbeta\/~mis000039C3.lua"]:200: in function <[string "C:\Users\chris\AppData\Local\Temp\DCS.openbeta\/~mis000039C3.lua"]:181>

 

Someone seems to be associated with the delicates group as it doesn't occur when I turn off that module
Any idea how to debug this?
Play the mission, upon launch go to F10 and wait for the A20 bombers to drop the bombs on the northern flak

WWII Dawn Raid.miz

Link to comment
Share on other sites

40 minutes ago, crispy12 said:

Any idea how to debug this?

On it - thanks for the report! At first blush your suspicion that delicates is causing this seems good. I've isolated a very stupid bug (that even tells me that it needs to be completed), and I'm in the process of fixing it now.

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

1 hour ago, crispy12 said:

Someone seems to be associated with the delicates group

Confirmed. Please find a replacement for the delicates script, the fix was simple, and I don't want to talk about it 🙂. Simply paste over old code. Will also be part of next release.

Spoiler

delicates = {}
delicates.version = "1.1.1b"
delicates.verbose = false 
delicates.ups = 1 
delicates.requiredLibs = {
    "dcsCommon", -- always
    "cfxZones", -- Zones, of course 
}
delicates.theDelicates = {}
delicates.inventory = {}

--[[--
    Version History 
    1.0.0 - initial version 
    1.1.0 - better synonym handling for f! and out!
          - addStaticObjectInventoryForZone
          - blowAll?
          - safetyMargin - safety margin. defaults to 10%
    1.1.1 - addGroupToInventoryForZone
          - verbose for zone will show update event from useDelicates
    1.1.b - fix for uncaught explosion on delayed fuse 
    
--]]--
function delicates.adddDelicates(theZone)
    table.insert(delicates.theDelicates, theZone)
end

function delicates.getDelicatesByName(aName) 
    for idx, aZone in pairs(delicates.theDelicates) do 
        if aName == aZone.name then return aZone end 
    end
    if delicates.verbose then 
        trigger.action.outText("+++deli: no delicates with name <" .. aName ..">", 30)
    end 
    
    return nil 
end

--
-- read zone 
-- 
function delicates.objectHandler(theObject, theCollector)
    table.insert(theCollector, theObject)
    return true 
end

function delicates.makeZoneInventory(theZone) 

    local allCats = {1, 3, 6}
    -- Object.Category UNIT=1, WEAPON=2, STATIC=3, BASE=4, SCENERY=5, Cargo=6

    for idx, aCat in pairs(allCats) do 
        local p = cfxZones.getPoint(theZone)
        local lp = {x = p.x, y = p.z}
        p.y = land.getHeight(lp)
        local collector = {}
    
        -- now build the search argument 
        local args = {
                id = world.VolumeType.SPHERE,
                params = {
                    point = p,
                    radius = theZone.radius
                }
            }
    
        -- now call search
        world.searchObjects(aCat, args, delicates.objectHandler, collector)
        -- process results
        if #collector > 0 then 
            if theZone.verbose or delicates.verbose then 
                trigger.action.outText("+++deli: zone " .. theZone.name, 30)
            end 
            
            for idy, anObject in pairs(collector) do
                local oName = anObject:getName()
                if type(oName) == 'number' then oName = tostring(oName) end
                local mLife = anObject:getLife()
                local oLife = mLife - mLife * theZone.safetyMargin
                if theZone.verbose or delicates.verbose then
                    trigger.action.outText("+++deli: cat=".. aCat .. ":<" .. oName .. "> explodes when under " .. oLife .. " of max " .. mLife, 30)
                end 
                local uP = anObject:getPoint()
                if cfxZones.isPointInsideZone(uP, theZone) then 

                    local desc = {}
                    desc.cat = aCat
                    desc.oLife = oLife 
                    desc.mLife = mLife
                    desc.theZone = theZone 
                    desc.oName = oName 
                    delicates.inventory[oName] = desc
                else 
                    if theZone.verbose or delicates.verbose then
                        trigger.action.outText("+++deli: (dropped)", 30)
                    end 
                end 
            end
        end 
    end
end

function delicates.addStaticObjectToInventoryForZone(theZone, theStatic)
    if not theZone then return end 
    if not theStatic then return end 
    
    local desc = {}
    desc.cat = theStatic:getCategory()
    desc.mLife = theStatic:getLife()
    desc.oLife = theStatic:getLife() - theStatic:getLife() * theZone.safetyMargin
    if desc.oLife < 0 then desc.oLife = 0 end 
    desc.theZone = theZone 
    desc.oName = theStatic:getName() 
    if theZone.verbose and delicates[desc.oName] then 
        trigger.action.outText("+++deli: updating existing delicate <" .. desc.oName .. "> with data from zone <" .. theZone.name .. ">", 30)
    end
    delicates.inventory[desc.oName] = desc
    
    if theZone.verbose or delicates.verbose then 
        trigger.action.outText("+++deli: added <" .. desc.oName .. "> to <" .. theZone.name .. "> blows below life = <" .. desc.oLife .. "> of <" .. desc.mLife .. "> = safety margin " .. theZone.safetyMargin * 100 .. "%", 30)
    end 
end 

function delicates.addGroupToInventoryForZone(theZone, theGroup)
--    trigger.action.outText("enter addGroupToInventoryForZone", 30)
    if not theZone then return end 
    if not theGroup then return end 
--    trigger.action.outText("before itering addGroupToInventoryForZone", 30)
    local allUnits = theGroup:getUnits() -- warning: we assume all alive
    for idx, aUnit in pairs (allUnits) do 
        -- we use 'addStatic' as it also supports units
        delicates.addStaticObjectToInventoryForZone(theZone, aUnit)
    end

end

function delicates.createDelicatesWithZone(theZone)
    theZone.power = cfxZones.getNumberFromZoneProperty(theZone, "power", 10)
    
    if cfxZones.hasProperty(theZone, "delicate<profanity>!") then
        theZone.delicateHit = cfxZones.getStringFromZoneProperty(theZone, "delicate<profanity>!", "*<none>")
    elseif cfxZones.hasProperty(theZone, "f!") then
        theZone.delicateHit = cfxZones.getStringFromZoneProperty(theZone, "f!", "*<none>")
    elseif cfxZones.hasProperty(theZone, "out!") then
        theZone.delicateHit = cfxZones.getStringFromZoneProperty(theZone, "out!", "*<none>")
    end
    
    -- safety margin
    theZone.safetyMargin = cfxZones.getNumberFromZoneProperty(theZone, "safetyMargin", 0)
    
    -- DML Method 
    theZone.delicateHitMethod = cfxZones.getStringFromZoneProperty(theZone, "method", "inc")
    if cfxZones.hasProperty(theZone, "delicateMethod") then 
        theZone.delicateHitMethod = cfxZones.getStringFromZoneProperty(theZone, "delicatesMethod", "inc")
    end
    
    theZone.delicateTriggerMethod = cfxZones.getStringFromZoneProperty(theZone, "thriggerMethod", "change")
    if cfxZones.hasProperty(theZone, "delicateTriggerMethod") then 
        theZone.delicateTriggerMethod = cfxZones.getStringFromZoneProperty(theZone, "delicatesMethod", "change")
    end
    
    theZone.delicateRemove = cfxZones.getBoolFromZoneProperty(theZone, "remove", true)
    
    -- read objects for this zone
    -- may want to filter by objects, can be passed in delicates
    delicates.makeZoneInventory(theZone) 
    
    if cfxZones.hasProperty(theZone, "blowAll?") then 
        theZone.blowAll = cfxZones.getStringFromZoneProperty(theZone, "blowAll?", "*<none>")
        theZone.lastBlowAll = cfxZones.getFlagValue(theZone.blowAll, theZone)
    end
    
    if delicates.verbose or theZone.verbose then 
        trigger.action.outText("+++deli: new delicates zone <".. theZone.name ..">", 30)
    end
    
end

--
-- blow me!
--
function delicates.scheduledBlow(args)
    local desc = args.desc 
    if not desc then return end 
    local oName = desc.oName 
    
    local theObject = nil 
    -- UNIT=1, WEAPON=2, STATIC=3, BASE=4, SCENERY=5, Cargo=6
    if desc.cat == 1 then 
        theObject = Unit.getByName(oName)
        if not theObject then 
            theObject = StaticObject.getByName(oName)
        end
    elseif desc.cat == 3 or desc.cat == 6 then 
        theObject = StaticObject.getByName(oName) 
    else
        -- can't handle at the moment
        if delicates.verbose then
            trigger.action.outText("+++Deli: can't handle delicate explosion for object cat <" .. desc.cat .. ">, name <" .. desc.oName .. ">", 30)
        end 
        return 
    end 
    
    -- now, the object might have been removed by now. catch this before we proceed 
    if not theObject then 
        if delicates.verbose then 
            trigger.action.outText("+++Deli: NIL delicate for object blow at cat <" .. desc.cat .. ">, name <" .. desc.oName .. ">", 30)
        end
        return 
    end
    
    
    local theZone = desc.theZone 
    local p = theObject:getPoint()
    local power = desc.theZone.power
    if desc.theZone.delicateRemove then 
        theObject:destroy()
    end
    
    trigger.action.explosion(p, power)
    
    -- bang out!
    if theZone.delicateHit then 
        cfxZones.pollFlag(theZone.delicateHit, theZone.delicateHitMethod, theZone)
        if delicates.verbose or theZone.verbose then 
            trigger.action.outText("+++deli: banging delicateHit! with <" .. theZone.delicateHitMethod .. "> on <" .. theZone.delicateHit .. "> for " .. theZone.name, 30)
        end
    end 
end

function delicates.blowUpObject(desc, delay)
    if not delay then delay = 0.5 end 
    if not desc then return end 
    local args = {}
    args.desc = desc 
    timer.scheduleFunction(delicates.scheduledBlow, args, timer.getTime() + delay)
    
end


--
-- event handler 
--
function delicates:onEvent(theEvent)
--    trigger.action.outText("yup", 30)
    if not theEvent then return end 
    local theObj = theEvent.target
    if not theObj then return end
    if theEvent.id ~= 2 and theEvent.id ~= 23 then return end -- only hit and shooting start events 
 
    local oName = theObj:getName()
    local desc = delicates.inventory[oName]
    if desc then 
        -- see if damage exceeds maximum 
        local cLife = theObj:getLife()
        if cLife < desc.oLife then
            if desc.theZone.verbose or delicates.verbose then 
                trigger.action.outText("+++deli: BRITTLE TRIGGER: life <" .. cLife .. "> below safety margin <" .. desc.oLife .. ">", 30)
            end
            delicates.blowUpObject(desc)
            -- remove it from further searches
            delicates.inventory[oName] = nil
        else 
            if desc.theZone.verbose or delicates.verbose then 
                trigger.action.outText("+++deli: CLOSE CALL, but life <" .. cLife .. "> within safety margin <" .. desc.oLife .. ">", 30)
            end
        end
    end
        
end

--
-- blow entire zone 
--
function delicates.blowZone(theZone)
    if not theZone then return end 
    local zName = theZone.name 
    local newInventory = {}
    local delay = 0.7
    for oName, oDesc in pairs (delicates.inventory) do 
        if oDesc.theZone.name == zName then 
            delicates.blowUpObject(oDesc, delay)
            delay = delay + 0.2 -- stagger explosions
        else 
            newInventory[oName] = oDesc
        end
    end

    delicates.inventory = newInventory
end

--
-- Update 
---

function delicates.update()
    -- call me in a second to poll triggers
    timer.scheduleFunction(delicates.update, {}, timer.getTime() + 1/delicates.ups)
            
    -- see if any deli was damaged and filter for next iter 
    local newInventory = {}
    for oName, oDesc in pairs(delicates.inventory) do 
        -- access the object 
        local theObj = nil 
        -- UNIT=1, WEAPON=2, STATIC=3, BASE=4, SCENERY=5, Cargo=6
        if oDesc.cat == 1 then 
            theObj = Unit.getByName(oName)
            if not theObj then 
                -- DCS now changes objects to static 
                -- so see if we can get this under statics 
                theObj = StaticObject.getByName(oName) 
                if theObj then 
--                    trigger.action.outText("+++deli: Aha! caught smokin'!", 30)
                end
            end 
        elseif oDesc.cat == 3 or oDesc.cat == 6 then 
            theObj = StaticObject.getByName(oName) 
        else
            -- can't handle at the moment
        end 
        
        if theObj then 
            local cLife = theObj:getLife()
            if cLife < oDesc.mLife and cLife >= oDesc.oLife and oDesc.theZone.verbose then 
                trigger.action.outText("+++Deli: <" .. oName .. "> was hit, <" .. cLife .. "> still above trigger <" .. oDesc.oLife .. ">", 30)
            end            
            if cLife >= oDesc.oLife then 
                -- all well, transfer to next iter 
                newInventory[oName] = oDesc
            else 
                -- health beneath min. blow stuff up 
                if oDesc.theZone.verbose or delicates.verbose then
                    trigger.action.outText(oName .. " was hit, will blow up, current health is <" .. cLife .. ">, min health was " .. oDesc.oLife .. ".", 30)
                end 
                delicates.blowUpObject(oDesc)
            end
        else 
            -- nothing to do, don't transfer
            if oDesc.theZone.verbose or delicates.verbose then
                trigger.action.outText("+++deli: <" .. oName .. "> disappeared.", 30)
            end
        end
    end
    delicates.inventory = newInventory
    
    -- now scan all zones for signals 
    for idx, theZone in pairs(delicates.theDelicates) do 
        if theZone.blowAll and cfxZones.testZoneFlag(theZone, theZone.blowAll, theZone.delicateTriggerMethod, "lastBlowAll") then 
            delicates.blowZone(theZone)
        end
    end
end

--
-- Config & Start
--
function delicates.readConfigZone()
    local theZone = cfxZones.getZoneByName("delicatesConfig") 
    if not theZone then 
        if delicates.verbose then 
            trigger.action.outText("+++deli: NO config zone!", 30)
        end 
        return 
    end 
    
    delicates.verbose = cfxZones.getBoolFromZoneProperty(theZone, "verbose", false)
    
    if delicates.verbose then 
        trigger.action.outText("+++deli: read config", 30)
    end 
end

function delicates.start()
    -- lib check
    if not dcsCommon.libCheck then 
        trigger.action.outText("cfx delicates requires dcsCommon", 30)
        return false 
    end 
    if not dcsCommon.libCheck("cfx delicates", delicates.requiredLibs) then
        return false 
    end
    
    -- read config 
    delicates.readConfigZone()
    
    -- process delicates Zones 
    -- old style
    local attrZones = cfxZones.getZonesWithAttributeNamed("delicates")
    for k, aZone in pairs(attrZones) do 
        delicates.createDelicatesWithZone(aZone) -- process attributes
        delicates.adddDelicates(aZone) -- add to list
    end
    
    -- start update 
    delicates.update()
    
    -- listen for events
    world.addEventHandler(delicates)
    
    trigger.action.outText("cfx delicates v" .. delicates.version .. " started.", 30)
    return true 
end

-- let's go!
if not delicates.start() then 
    trigger.action.outText("cfx delicates aborted: missing libraries", 30)
    delicates = nil 
end

-- To Do:
-- integrate with cloners and spawners 

Cheers,

-ch

 

  • Like 1
Link to comment
Share on other sites

Version 1.2.6 - 20230330
Maintenance update 

My grandmother once told me that "anything worth doing is worth doing well". Of course she was right (even though I still suspect that she did not hold herself to that same standard when nobody was looking), and so I went over TaxiPolice's code and - admittedly unwillingly - polished it up to DML standard. Initial feedback suggests that indeed people do not think it a necessity except for specific cases, and I'm heartened by the fact that most server admins agree that taking a hands-off approach is best. So I've come to terms with this module at last.

image.png

This update also includes a point update for CSAR Manager, which is slowly, but steadily increasing functionality. There are still some improvements slated for later releases, but on the whole I'm quite happy with it - it's now almost in league with the other tier-one modules. 
 
Other than that, there have been a number of small bug fixes included in this update, and my thanks to everyone who has taken their time to report bugs and recommendations for improvement.

All Changes

Documentation
    - Main
        - New section Taxi Police module 
        - New section Taxi Police demo
        - updates and corrections to various modules
    
Demos
    - Taxi Police (new)
    - CSAR of Georgia (update)
    

Modules
    - SSBClient 3.0.1 
        - Now can handle disappearing airfields (destroyed naval units)
        
    - CSAR Manager 2.3.4
        - Streamlined CSAR zone attribute handling 
        - Streamlined CSARBASE attribute handling 
        - New "start?" synonym 
    
    - Delicates 1.1.2
        - no longer crashes when trying to explode deleted objects 
    
    - taxiPolice 1.0.0 
        - initial version 

Enjoy,

-ch

 


Edited by cfrag
Link to comment
Share on other sites

Hello Cfrag.

Day by day I am getting more familiar with DML and I appreciate more and more how much easier is for us that we are not lua experts. In this context I would like to thank you for you effort.

I managed to replace Ciribob CSAR in my missions by using DML CSAR and I am started to use DML Player Score, as well.

I have a question regarding Player Score. In DMI manual, 4.5.1 Player Score - 4.5.1.1 Description you mention that "Player Score itself keeps score for every kill and announces them to all players as they happen. A separate module “Player Score UI” provides a UI to access totals and Kill/Feat log." Unfortunately I can't find this Player Score UI module in order to be able to get access totals and kill/feat log. Moreover, is there any way, by the end of a mission e.g a PvP mission to get the final player score and kill/feat log for all participants?

Thank You in advance for your advice 

Joachim "Panthir" TSINTILAS

My Hardware: ROG Strix X570-F Gaming - AMD 5600X @ 4.7 ghz - G.SKILL TRIDENT 32GB DDR4 3200 (14-14-14-34 CL) - GigaByte 3080ti OC 12gb - Corsair MP600 Force 1TB - 2 x EVO Nvme 500GB - Virpil Warbird Base T-50CM2 and TM Throttle + Trackhat + G25 + AOC AG271QG 27"

My Modules: JF-17, F-16C, AV-8N/A, F-18C, ASJ37, MiG-15Bis, MiG-21Bis, Fw-190D, Bf-109K, P-51D, F-86F, Ka-50 III, UH-1H, Mi-8MTV2, NS430, FC3, A-10C, Mirage 2000C, L-39, F-5E-3, SA342, Spitfire, AH-64, Mirage F-1CE.

My Maps: Nevada, Normandy, Persian Gulf, Syria, South Atlantic.

Link to comment
Share on other sites

36 minutes ago, Panthir said:

Unfortunately I can't find this Player Score UI module

That is probably because I stupidly named it "cfxPlayerScoreUI" in the modules folder. If you can't find it in modules, simply copy it from the attachment below. I think I never got around to properly documenting it, but it should be quite self-explanatory and requires no setup. Add it after PlayerScore in your mission.

39 minutes ago, Panthir said:

Moreover, is there any way, by the end of a mission e.g a PvP mission to get the final player score and kill/feat log for all participants?

I could add something like that if I have the time. IIRC (haven't looked at the code in over a year), the UI module gives you access to that at any time during the game already, so it shouldn't be too difficult. 

cfxPlayerScoreUI.lua

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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