cfrag Posted May 24 Author Posted May 24 9 hours ago, Priest said: Enter: mask zones and unmask zones. I see that you've already put a lot of thought into this - thank you! I'll see how I can add this idea to cloners. I feel that cloners have become a "DML deity" in their own right (people are using DML just to get access to cloners), and making them more powerful needs to be balanced with usability and code maintainability ("with great power come great bills" and all that). While I like the mask Idea, I think masking the mask may be taking it a step too far, but we'll see what my little mind can come up with. So, thank you! for the great idea, let's see how far we can take it. 1
cfrag Posted May 24 Author Posted May 24 (edited) 12 hours ago, Priest said: That's ONE fancy looking clone zone! I'm looking into this. My first step is trying to put this into mathematical terms so I can easily transcribe to code. Subtracting an arbitrary mask from an arbitrary shape is a b¦7ç%, and can take enormous processing. Consider the following simple example: Only the green edges are open to populate, and when green surfaces approach a small fraction of the total (i.e. the masked surface is larger than unmasked) a simple randomized approach can fail, and when the entire green area is covered, it will always fail. There are some trivial approaches to this, and they will fail with a determinable probability. I don't like it. At all. So this idea has hit a definite snag. I'll try a brute-force approach that trades processing time for resolution, and that will have a definite probability to fail if no solution was found within some bounds. I'll also place some restrictions on the masks: a masking zone can at max belong to a single cloner, so cloners cannot share a mask, but masks can share a cloner. Yeah, I feel that I've just twisted the lid on Pandora's flask. Edited May 24 by cfrag 1
cfrag Posted May 24 Author Posted May 24 19 hours ago, Priest said: The basic idea is create a clone zone, then create zones within the clone zone that define where units shouldn't spawn. Something like this? Time to uncork that flask of Pandora Aalto. clone here - but not here.miz
Priest Posted May 24 Posted May 24 5 hours ago, cfrag said: Something like this? YES!!! I threw 3x the units at it and added some additional nospawn zones this is awesome! What are the "rules" so to speak?
cfrag Posted May 25 Author Posted May 25 13 hours ago, Priest said: What are the "rules" so to speak? NoSpawn zones Name Description noSpawn Marks this ME Zone as a noSpawn. To work, the center of the trigger zone must reside inside a clone zone. NoSpawn zones only work when the attached clone zone’s rndLoc attribute is active. The following rules apply to noSpawn zones: · A noSpawn zone attaches to the closest clone zone that it is inside. Thus, if a noSpawn zone comes to reside in multiple clone zones, it always attaches to the clone zone whose center is closest to its own center · A noSpawn zone attaches to a maximum of one clone zone · Clone zones can have from zero to many noSpawn zones attached · During cloning, situations can arise when the clone zone cannot find a free location where it can place the clone. In that event, the clone zone simply places the new clone and ignores all noSpawn zones inside it MANDATORY
cfrag Posted May 25 Author Posted May 25 OK, this newflangled "noSpawn" thang can be really helpful. Here I'm using it to set up three randomly located SAM sites around Baksan, but avoid them being set up in forest or across rivers. 1
Priest Posted May 25 Posted May 25 Previously I'd have done something like that with multiple clone zones combined with rnd flags to select individual zones but when playing my own missions I'd still always have a pretty good idea where the threats are since no matter what I know where the zones are! So I'd add more and more clone zones to expand the number of potential spawn points and that quickly becomes it's own pandoras box. Now it's super easy to really open things up with just a handful of nospawn zones. It's awesome!
Priest Posted May 31 Posted May 31 Alright been playing with this for a week may I suggest a (hopefully) small tweak! When searching for the nearest clone zone to attach a noSpawn zone to, ignore clone zones that don't have the rndLoc attribute active. This way you can still have smaller, more traditional clone zones inside a large area clone zone without the risk of noSpawns attaching to an unintended zone or failing to attach due to being outside of the nearest zone found. Here's a screenshot of what I was trying to do. In this example noSpawn zones 5, 6, 13, 34, 37 (in purple) on the left side of the green spawn area try to attach to the cloner HIND-1 (blue) and noSpawn-3 buried at the six o'clock position tries to attach to cloner HIND-3. Since the noSpawn zones are completely outside the nearest zones found they are ignored/rejected. The AAA SPAWN AREA cloner uses rndLoc, the cloners HIND-1 through HIND-6 on the pads do not use rndLoc. An unintended side-effect of being able to create a huge spawn area for sure! My thinking was if noSpawns only work if rndLoc is active, no reason to attach to zones where rndLoc is not active. Maybe more complicated, but another way to do it would be to (optionally) allow the positive linking of noSpawns to a specific cloner by direct reference to a specific zone name in the noSpawn attribute field. Then could still use rndLoc in other zones as needed. ps..If you can't tell I hate trees, but not so much that I want to cut them all down this works perfectly even with all those zones and tons of units! null null
cfrag Posted May 31 Author Posted May 31 11 hours ago, Priest said: ignore clone zones that don't have the rndLoc attribute active. Hmmm. Interesting, if inelegant. I'll have a look, thank you for the idea! -ch 1
cfrag Posted Monday at 02:34 PM Author Posted Monday at 02:34 PM On 5/31/2025 at 7:18 AM, Priest said: ignore clone zones that don't have the rndLoc attribute active. Like this? cloneZone.lua
Priest Posted Monday at 11:41 PM Posted Monday at 11:41 PM 8 hours ago, cfrag said: Like this? Perfection! Now we can even put our source zones for the clone zones in or near the randomized clone zone. That was actually the first "issue" I ran into but saw it as an acceptable inconvenience since obviously the source zones could be placed anywhere on the map and out of the way. It was the actual clone zones in or near the randomized area that seemed to create an unintended functional conflict. This is perfect now.
hannibal Posted Tuesday at 01:44 PM Posted Tuesday at 01:44 PM hello cfrag... i been trying to get into warbirds bombing. i happen to run into a thing called a "range script" i like to make a mission that i could place a target and the script would give you impact data of the weapon you release.. not sure if DML does that.. find me on steam! username: Hannibal_A101A http://steamcommunity.com/profiles/76561197969447179
Recluse Posted Tuesday at 06:13 PM Posted Tuesday at 06:13 PM 4 hours ago, hannibal said: hello cfrag... i been trying to get into warbirds bombing. i happen to run into a thing called a "range script" i like to make a mission that i could place a target and the script would give you impact data of the weapon you release.. not sure if DML does that.. It does. Look at the Bombing Range module Quote 5.4.20 Bomb Range 5.4.20.1 Description BombRange is a fully function plug-in module to add bomb range training abilities to your mission: it provides you with the ability to designate zones where player can drop munitions into, and the module reports (and keeps books) on how accurately these munitions where dropped. The module comes with a built-in UI. BASIC FUNCTIONALITY The module calculates impact points of player-dropped munitions (all munitions except projectiles fired by a gun) and then correlates the impact point with the closest “BombRange’ trigger zone. If the distance to the trigger zone is greater than that zone’s clipping distance, the drop is ignored: all drops that fall outside the clipping distance don’t count. If the projectile hits inside the clipping distance, but outside the trigger zone (“target zone”), the drop counts as a full miss (“0%”), if it impacts inside the trigger zone, the drop counts as a hit. TRACKING HITS (ACCURACY) Since DCS itself does not provide means to provide the impact point of munitions dropped, the module uses its own method to track hits: 1
cfrag Posted Thursday at 06:16 AM Author Posted Thursday at 06:16 AM (edited) Version 2.5.0 - 20250605 And so it turns out I was wrong: DCS does invoke the save state callback. It merely disables all debugging, and my debugging code wasn't invoked, leading me down the wrong track. Since all debugging is disabled during state saving and can't be enabled, I'm postponing my own development until it can be enabled. I'm not that masochistic. I also tried DCS' new QAG (Quick Action Generator) and was deeply troubled by what I saw. And, again, I screwed up - believing that the interface blunders in that new feature were obvious to anyone with UI/UX experience (they are), it seems that the kind folk at ED took exception to my publicly saying so, without me elaborating the (to me) obvious. That post was taken down; ED deemed it unhelpful and not constructive (as I did not point to the many -- to me obvious -- faults or provide a better solution). I followed up to our community managers in a private conversation enumerating some 30+ (yeah) of the most egregious (and, yes, obvious) bugs/UI/UX blunders in that one new feature (examples: set the number of wingmen to 1 to have zero wingmen. Press the Cancel button on armament screen to accept all changes. That kind of obvious). I haven't received any reaction other than the we'll "look it over the next few days". Ah, well. Somewhat disheartened by what seems to me an accelerating downturn in DCS quality wise, I tinkered with some scripts that now can access a map's radio and beacon info, and came up with a new mission that turns out to be incredibly fun: Ferry Caucasus It's full of new scripts (some of them folded into "common") that may or may not make a full transition to DML - we'll see. Changes Documentation Manual - clone zones "noSpawn" QuickRef - clone zones update Demos - clone here - but not here (new) Modules - bcn 1.0.0 - (experimental) - cfxMX 4.1.0 - (DCS "state save" preparation) - cloneZone 2.7.0 - noSpawn zones - dcsCommon 3.3.1 - various new support methods - ungrief 2.0.2 - removed typo in config Enjoy, -ch Edited Thursday at 06:28 AM by cfrag 2
Recluse Posted Thursday at 12:41 PM Posted Thursday at 12:41 PM (edited) @cfrag bcn is great. I spend a lot of time digging through the Kneeboard where i have the Aerodrome pages (https://www.digitalcombatsimulator.com/en/files/3312200/) and have been populating home and destination airbase frequencies in VALET messages. Do I understand correctly that the ferry module is also experimental and demonstrated in the Caucasus Ferrry mission but NOT included in the current DML module set? I tried to stuff bcn into a Nevada mission and it threw an error, but perhaps this is not a supported theater, or it needs ferry to function as designed? null Edited Thursday at 12:48 PM by Recluse
cfrag Posted Thursday at 12:47 PM Author Posted Thursday at 12:47 PM 2 minutes ago, Recluse said: Do I understand correctly that the ferry module is also experimental and demonstrated in the Caucasus Ferrry mission but NOT included in the current DML module set? Yes. One particular challenge of the ferry module is switching all airfields to give access to aircraft, and managing the available numbers of ac, and limiting the number of helicopter fields (in Syria and Germany), then making ferry more accessible for mission developers. Ferry Germany is almost finished - and I've run into some data issues with the map (the airfield names don't match radio, and I've asked Ugra to look into this). Let's see if and how far I can push Ferry to make a good DML module. Since it involves the Warehouse API, it's going to be ugly. 6 minutes ago, Recluse said: populating home and destination airbase frequencies in VALET messages There may be an appropriate integration into messenger and valet for this as well, and the morse code translation added to common 1
cfrag Posted yesterday at 05:21 AM Author Posted yesterday at 05:21 AM (edited) 16 hours ago, Recluse said: I tried to stuff bcn into a Nevada mission and it threw an error, Without inspecting this myself it looks as if Nevada's 'radio' file is malformed. Some of these miscellaneous files are, for example Germany Cold War's radio file is formatted correctly, but the names of the airfields are incorrectly given (their eastern equivalents). I'll have a look. Edited yesterday at 05:21 AM by cfrag
cfrag Posted yesterday at 08:50 AM Author Posted yesterday at 08:50 AM 20 hours ago, Recluse said: I tried to stuff bcn into a Nevada mission and it threw an error, I just checked. There is the string "Boulderñity" in the radios file that completely flusters net.json2lua() (meaning: that method can't handle UTF-8, that little "ñ" kills it. Nothing I can do. I'll write it up as a bug, for the time being this means that Nevada is off limits for bcn, unless I try and write an UTF-8->ASCII string converter (which is bound to bring up other issues).
Recluse Posted 21 hours ago Posted 21 hours ago (edited) 6 hours ago, cfrag said: I just checked. There is the string "Boulderñity" in the radios file that completely flusters net.json2lua() (meaning: that method can't handle UTF-8, that little "ñ" kills it. Nothing I can do. I'll write it up as a bug, for the time being this means that Nevada is off limits for bcn, unless I try and write an UTF-8->ASCII string converter (which is bound to bring up other issues). Thanks for checking. Can't do much about DCS mistakes. Hopefully the bug writeup will get some action for the next patch. Should be relatively low hanging fruit... Just for grins, I manually edited the radio.lua for Nevada to change it to "Bouldercity" and it loaded without error with bcn installed. So its good until the next update overwrites it. Not that I know how to invoke it currently. I may steal ferry.lua from your caucasus mission and see if it works with bcn in Nevada. Edited 21 hours ago by Recluse 1
ChuckIV Posted 13 hours ago Posted 13 hours ago Hey cfrag, Got this error in our server today. I'm using the most up to date playerScore and playerScoreUI (3.10 and 5.30) Any ideas what might cause this?? Mission script error: [string "cfxPlayerScore = {}..."]:1134: Unit doesn't exist stack traceback: [C]: ? [C]: in function 'getPlayerName' [string "cfxPlayerScore = {}..."]:1134: in function 'isScoreEvent' [string "cfxPlayerScore = {}..."]:1216: in function 'onEvent' [string "Scripts/World/EventHandlers.lua"]:13: in function <[string "Scripts/World/EventHandlers.lua"]:11> ChuckIV "Never in the field of human conflict was so much owed by so many to so few." Winston Churchill SYSTEM: Processor - Intel® Core i9-9900KF CPU @ 3.60GHz 3600MHz water-cooled Installed memory (RAM) - 32.0 GB 64-bit Operating System, x64-based processor Windows 10 & DCS on SSD Video Card - water-cooled NVIDIA GeForce RTX 2080 Ti Internet: Cable 200Mbps 12Mbps
cfrag Posted 4 hours ago Author Posted 4 hours ago 9 hours ago, ChuckIV said: Any ideas what might cause this?? That's very odd. I've hardened the code further against unforeseen situations. Does this take care of the issue? playerScore.lua
Recommended Posts