cfrag Posted May 19, 2021 Share Posted May 19, 2021 (edited) stageDemon - a simple interactive in-mission testing and debugging tool Download link Summary: stageDemon is a little tool to help you test your missions while they run, and that you can easily extend Why? While DCS has a great mission editor to create engaging and complex missions, it provides little help to make sure your mission works. Unfortunately, good missions require some degree of orchestration via triggers, and testing your mission before you can play can be truly frustrating - especially the later stages of your mission, as you usually need to run through all prior stages before you get to the one crucial point - only to miss the trigger window. Ouch. In short - you need a stage hand; someone who can help you during your rehearsals. That's why I created stageDemon. It's a tiny, highly extensible tool that waits in the background while the mission is running, that takes up no processing power, and that allows you to read, and change any trigger at will. For the initial version, I've also thrown in the ability to schedule setting of a trigger for a later point in time (e.g. in 10 seconds), and to place smoke markers anywhere on the map (in any of DCS's choice colors of red, blue, orange, white and prussia blue) How does it work? stageDemon uses F10-Map view's 'Mark Label' feature. Once you enter text into the mark, stageDemon looks at it to see if it contains a command. stageDemons commands all begin with a special character (currently '-', you can change that any time). When stageDemon finds a command, it will try to do as you say. For example, the command "-flag get 10" will cause stageDemon to fetch the value of flag 10, and display its current value as a message. [Important: to engage stageDemon, click *outside* the mark text box] Will then result in After stageDemon finishes your command, it removes the mark for your convenience. If it doesn't recognize the command, stageDemon complains, and leaves the mark for you to correct, delete, or do whatever you please. Currently, stageDemon knows the following commands: "- flag set <flag number> <value> [<delay in seconds>]" Set the user flag <flag number> to <value>. If you omit <value>, it will be set to zero. If you also supply a delay value (e.g. 5), setting the flag's value is scheduled to take place in the number of seconds you specify. You can schedule as many flag changes as you like, but you cant un-schedule them. Once the flag is set, a message appears. "- flag get <flag number>" Reads the current value of flag <flag number> and displays it as a message to all. "- smoke <color>" places a smoke (standard 3 minutes duration) of the specified color at the exact location of the Mark. If you omit <color>, stageDemon uses red. Colors that are understood are "red", "green", "blue", "orange" and "white" stageDemon is highly extensible, can be used as a feature in missions (not only for testing), and you can easily add your own in-game functions, such as place units while the game is running allow players to place smoke on the map if they are in range and can see it remove units in-game synchronize waves kick players off the server blow stuff up that annoys you place radio beacons INSTALLATION You to add stageDemon to your mission: Start Mission editor and load your mission Here comes the icky part: you must create a "Mission Start" trigger, and use the mysterious 'Do script' or 'Do script file' actions. Here's how: Click 'Set Rules for Triggers' tool on the left Create a new Trigger of Type "4 Mission Start", ignore the Conditions box (not required) and add a new Action. Now EITHER Choose "Do Script" from the Action drop-down. Copy and paste the entire source text from stageDemon.lua OR choose "Do Script File" and choose "stageDemon.lua" as file you are done - have a beer, smoke, or some other unhealthy treat since you've earned it DEPENDENCIES stageDemon has no dependencies and requires no other libraries to run. DEMO There is a small demo mission for your convenience that shows you how it's done via "Do script" - you can simply copy/paste from there. In the demo mission, set flag 10 to anything but 0 to start the Hummer driving around LIMITATIONS In order to use stageDemon, you must inhabit a Player or Client plane. That is because Spectators have no access to the Map Mark tool. CREDITS: stageDemon was inspired by CakeSorbus' great contribution "Enhanced Gamemaster", who in turn was inspired by deadlyfish's amazing "Through the Inferno" series to use game's "Mark" feature for interactive purposes. Edited May 22, 2021 by cfrag 1 1 Link to comment Share on other sites More sharing options...
Mistermann Posted May 19, 2021 Share Posted May 19, 2021 Sounds great! Thanks for this work. Subscribed to see what the ME wizards do with this. System Specs: Spoiler Processor:13th Gen Intel(R) Core(TM) i9-13900K - RAM: 64GB - Video Card: NVIDIA RTX 4090 - Display: Pimax 8kx VR Headset - Accessories: VKB Gunfighter III MCG Ultimate, Thrustmaster TWCS (modified), Thrustmaster TPR Pedals, Simshaker JetPad, Predator HOTAS Mounts, 3D Printed Flight Button Box Thrustmaster TWCS Mod Link to comment Share on other sites More sharing options...
CakeSorbus Posted May 20, 2021 Share Posted May 20, 2021 On 5/19/2021 at 11:04 AM, cfrag said: stageDemon was inspired by CakeSorbus' great contribution "Enhanced Gamemaster", who (to my knowledge) was the first to use the game's "Mark" feature for interactive purposes. Huh, i thought that quite a lot of what I read about your script sounded awfully familiar, thanks for the acknowledgement! I can't take credit for being the first one to use map markers as an input method. I myself was inspired by deadlyfishes "Through the Inferno" mission in that regard. I think I'm the first one who came up with the idea to seperate the input string into multiple parameters, and to pass them on to multiple functions, though What I find very interesting is that you've apparently found a way to return the message about the flag status only to the group through which the marker has been created. I've been trying to achieve the same without success. I will pick through your script later to learn how you did it. Link to comment Share on other sites More sharing options...
cfrag Posted May 21, 2021 Author Share Posted May 21, 2021 9 hours ago, CakeSorbus said: What I find very interesting is that you've apparently found a way to return the message about the flag status only to the group through which the marker has been created. I've been trying to achieve the same without success. I will pick through your script later to learn how you did it. Thanks, @CakeSorbus - actually, I haven't tried, but at face value (I'll verify when I have some time), that should not be difficult. Initiator always has a unit that always belongs to a group, and OutTextToGroup() should work with that group. stageDemon in it's current form intentionally broadcasts to all so you can also receive debugging info when you are debugging with your testers. I'll see if and how I can limit messaging to the owning group or coalition. Link to comment Share on other sites More sharing options...
Rudel_chw Posted May 21, 2021 Share Posted May 21, 2021 Thanks for this, it should ease a lot the testing of complex missions. I don’t know enough lua to extend it by myself, but would love to see a way to examine the current value of an aircraft parameter. 1 For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1 Mobile: iPad Pro 12.9" of 256 GB Link to comment Share on other sites More sharing options...
cfrag Posted May 21, 2021 Author Share Posted May 21, 2021 1 minute ago, Rudel_chw said: Thanks for this, it should ease a lot the testing of complex missions. I don’t know enough lua to extend it by myself, but would love to see a way to examine the current value of an aircraft parameter. Well, if the API exists, that shouldn't be too difficult. Some (e.g. Fuel, Life, currently tasked) can be accessed easily, others (cockpit switches) not. Which parameters would you want to inspect? Link to comment Share on other sites More sharing options...
Rudel_chw Posted May 21, 2021 Share Posted May 21, 2021 Each DCS aircraft has a different set of parameters, currently I inspect them using the Lua Console tool of DCS-Bios. on my missions, I can use them to test for items like Gear position, armament status, radio frequencies, etc. For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1 Mobile: iPad Pro 12.9" of 256 GB Link to comment Share on other sites More sharing options...
cfrag Posted May 21, 2021 Author Share Posted May 21, 2021 (edited) Oh, wow, now that is something else entirely! What a great tool! A very cursory inspection of how DCS Bios works is that it takes the output from Export.lua, to create a small server for others (like Lua Console) to connect to. Building a loop that connects to Export/DCS Bios from within a DCS-hosted mission feels wrong, may be possible, but would break the scope of stageDemon. Writing and reading the export file directly might be a way to go, and I'll try to look at it over the week-end. Edited May 21, 2021 by cfrag 1 Link to comment Share on other sites More sharing options...
CakeSorbus Posted May 21, 2021 Share Posted May 21, 2021 8 hours ago, cfrag said: Initiator always has a unit that always belongs to a group, and OutTextToGroup() should work with that group. And that's where my problem lies, in MP event.initiator for mark related events only gets filled with the unit currently occupied by the server host. Link to comment Share on other sites More sharing options...
cfrag Posted May 21, 2021 Author Share Posted May 21, 2021 2 minutes ago, CakeSorbus said: And that's where my problem lies, in MP event.initiator for mark related events only gets filled with the unit currently occupied by the server host. Ah! Now that's interesting. I'll look into it - maybe it's filled with New Mark, but not when the mark is updated? I'll test around over the week.end() -ch Link to comment Share on other sites More sharing options...
cfrag Posted May 21, 2021 Author Share Posted May 21, 2021 14 minutes ago, CakeSorbus said: And that's where my problem lies, in MP event.initiator for mark related events only gets filled with the unit currently occupied by the server host. Out of curiosity (I can't check before tomorrow): the event's groupID field is also unfilled on MP? I know, kind of obvious, but I've overlooked more obvious things. Link to comment Share on other sites More sharing options...
cfrag Posted May 22, 2021 Author Share Posted May 22, 2021 It would seem 2.7 took care of that issue - or to put it differently: I'm luckily not observing this issue in MP. groupID is -1 across the board, but initiator is set by other clients in the group as well Link to comment Share on other sites More sharing options...
CakeSorbus Posted May 23, 2021 Share Posted May 23, 2021 On 5/22/2021 at 11:24 AM, cfrag said: It would seem 2.7 took care of that issue - or to put it differently: I'm luckily not observing this issue in MP. groupID is -1 across the board, but initiator is set by other clients in the group as well Damn, you had really gotten my hopes up, but I just tested it myself and the result ist still the same in 2.7.1: No matter who creates, changes or deletes a marker in MP, event.initiator is always the server host's unit, or nil, if the host has not slotted in himself, while groupID is always -1. This makes it impossible for scripts that hook into mark related events to "know" which player actually created the mark. Thanks a bunch for devoting your time, though. I appreciate it! 1 Link to comment Share on other sites More sharing options...
cfrag Posted June 2, 2021 Author Share Posted June 2, 2021 Upload removed Too many people downrated this without bothering to say what to improve. 1 Link to comment Share on other sites More sharing options...
Proxen Posted June 9, 2021 Share Posted June 9, 2021 That's a shame. I think it's an incredible tool, especially for debugging. 2 Link to comment Share on other sites More sharing options...
Rudel_chw Posted June 9, 2021 Share Posted June 9, 2021 (edited) On 6/2/2021 at 3:11 PM, cfrag said: Upload removed Too many people downrated this without bothering to say what to improve. You mean the star rating? For my own files I don't even bother looking at it, I only care about how many downloads, and sometimes check the coments (pity that ED's Site software doesn't send me an e-mail when a new comment is posted). I tried your tool, but eventually got back to the LUA console because I was already used to it, but yours seemed like a much easier to use alternative. Best regards, Eduardo Edited June 9, 2021 by Rudel_chw 1 For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1 Mobile: iPad Pro 12.9" of 256 GB Link to comment Share on other sites More sharing options...
Backy 51 Posted June 9, 2021 Share Posted June 9, 2021 cfrag, Ignore the downvote nonsense ... keep improving your app and press on! 1 I don't need no stinkin' GPS! (except for PGMs :D) [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
cfrag Posted June 11, 2021 Author Share Posted June 11, 2021 (edited) Thank you all for your encouragement and kind words. To me, it's a matter of culture - or rather lack thereof. Please consider this: In addition to submitting my download, creating above instruction page alone took more than three hours and great care (for someone who's mother tongue isn't English). My contribution does exactly what I say it does, and I offer it for free. And for that, I expect people to respond in kind. This is what gets me: people download someone else's contribution and do not like what they got. So far so good. But then they care enough to return and submit a low rating without offering a comment as to what they think is wrong. If someone cares enough to return to the page to downrate, but does not bother to say what should improve, they send me a clear message: they believe that they are entitled to this download, they feel that they have no obligation to at least give a thought as to what could be better, and they think that their opinion is so important that others should heed it. Worst: these people clearly are the majority. How else can I interpret a 2-star rating for an upload that got some 650 downloads and no negative comments? I have no truck with criticism, I welcome it -- and I won't tolerate this kind of self-important arrogance. It's not as if this was a one-time occurrence. So far I have removed five uploads that have received this same treatment (including one that explicitly requested feedback from downvoters), and I've discontinued working on my A-10 tutorials. This community has a big problem; I'm first to admit that I'm not as big a person as the other incredibly talented and kind people here who contribute and then can overlook the large percentile of highly toxic members. I can't - and luckily, I don't have to. Edited June 11, 2021 by cfrag 1 Link to comment Share on other sites More sharing options...
Rudel_chw Posted June 11, 2021 Share Posted June 11, 2021 2 hours ago, cfrag said: This is what gets me: people download someone else's contribution and do not like what they got. So far so good. But then they care enough to return and submit a low rating without offering a comment as to what they think is wrong. OK, but you really don't know how many people actually rated your file. I must admit that I never return to a File to rate it, either positively or negatively ... I only return when I feel its appropiate to comment and then only on files that don't have a forum thread to support it (wish many more did) ... my guess is that most people are like me, and thus that star average is determined with the vote of a very small part of the users that did download it. In other words, it is very likely that most downloaders did like the file but didn't get back to vote. Instead of rating a file, I show my appreciation by being careful to record who is the author of each file, like this: And the files I download are what gives me the desire to give back into the Community, by sharing my own. 2 hours ago, cfrag said: It's not as if this was a one-time occurrence. So far I have removed five uploads that have received this same treatment (including one that explicitly requested feedback from downvoters), and I've discontinued working on my A-10 tutorials. I'm so sad to hear that .. upon reading your words I had to ran to download your remaining two files before you take them down. I already had the A-10A Tutorials (even tough I'm not a fan of FC3 modules, but some of my friends do) but didn't knew that you had uploaded a newer version. I was dismayed to find out that you took down the "Lawnmower" mission, as I'm currently learning the Hip in anticipation of the Mi-24 release. For my own Files, I only take the number of downloads as a measure of their sucess .. I don't care about the star rating. For example, this one has 0 comments but over 500 downloads, not bad for an item that only mission makers will use: https://www.digitalcombatsimulator.com/en/files/3312342/ 3 hours ago, cfrag said: I'm first to admit that I'm not as big a person as the other incredibly talented and kind people here who contribute and then can overlook the large percentile of highly toxic members. I can't - and luckily, I don't have to. You are not the only person that can't overlook toxic people, my 8-page long listing of ignored users can attest to that .. but on this case I really believe that you are reacting in response to a really small part of the users that did use your files, I hope you will reconsider. Best regards, Eduardo 2 For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1 Mobile: iPad Pro 12.9" of 256 GB Link to comment Share on other sites More sharing options...
Backy 51 Posted June 11, 2021 Share Posted June 11, 2021 4 hours ago, Rudel_chw said: OK, but you really don't know how many people actually rated your file. I must admit that I never return to a File to rate it, either positively or negatively ... I only return when I feel its appropiate to comment and then only on files that don't have a forum thread to support it (wish many more did) ... my guess is that most people are like me, and thus that star average is determined with the vote of a very small part of the users that did download it. In other words, it is very likely that most downloaders did like the file but didn't get back to vote. Instead of rating a file, I show my appreciation by being careful to record who is the author of each file, like this: And the files I download are what gives me the desire to give back into the Community, by sharing my own. I'm so sad to hear that .. upon reading your words I had to ran to download your remaining two files before you take them down. I already had the A-10A Tutorials (even tough I'm not a fan of FC3 modules, but some of my friends do) but didn't knew that you had uploaded a newer version. I was dismayed to find out that you took down the "Lawnmower" mission, as I'm currently learning the Hip in anticipation of the Mi-24 release. For my own Files, I only take the number of downloads as a measure of their sucess .. I don't care about the star rating. For example, this one has 0 comments but over 500 downloads, not bad for an item that only mission makers will use: https://www.digitalcombatsimulator.com/en/files/3312342/ You are not the only person that can't overlook toxic people, my 8-page long listing of ignored users can attest to that .. but on this case I really believe that you are reacting in response to a really small part of the users that did use your files, I hope you will reconsider. Best regards, Eduardo Bravo Eduardo! Nail meet Hammer. But I truly understand cfrag's belief that the community contains many toxic personalities ... ban them as you do and move on. It's sadly just a part of dealing with the public at large. I don't need no stinkin' GPS! (except for PGMs :D) [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Recommended Posts