Jump to content

TEMPEST.114

Members
  • Posts

    1724
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by TEMPEST.114

  1. On 8/26/2024 at 11:13 PM, LorenLuke said:

    I found a way to generate a laser spot, and return that artificially created laser spot, but in a scenario where it's 'hey, I have an A10 with a targeting pod... boop, laser's on, tell me where that location is in code terms', I can't find it. 

    That kind of logic you will have to create and then use the list of functions to execute it. 

  2. 6 minutes ago, MeanJim said:

    If the convoy even makes it that far, I still want them to engage us if we find and attack them before they retreat to safety.

    Then I suggest you set some variables (flags) at waypoints to toggle their ROE and Alarm State so they don't waste everything before they get there. But your question said that they get there and won't move because they're out of ammo. So that was what I was addressing. 

  3. Welcome to the ai logic of ground units in DCS. It has to be the worst of any ‘sim’ or game ever released.

    When they get to the point of no ammo and just sit there, set their roe to don’t engage, set their alarm state to green and set their visibility to invisible, those might help. 

  4. 1 hour ago, OzDeaDMeaT said:

    That is a basic logic fail IMO.

    You like most completely missed the point and jumped to a fallacious conclusion. 
     

    The mods I was talking about added npc/ai units - did nothing to affect change in DCs other than open more mission types; as such they never cause a crash or any instability; I’ve been running them for almost 4 years and had zero problems from them.

    This fallacious closed mindedness is part of the problem. 

  5. 5 hours ago, Dangerzone said:

    I find it helpful for the "What is wrong with this code" - especially for LUA and JSON tables that I've handwritten. I've also had it pick up potential errors in my code the compiler doesn't, such as potentials for infinite loops, or memory leaks, etc

    How are you learning if you don't work it out? LUA isn't compiled, so what are you talking about with a compiler?!?!

    You shouldn't even be able to make any memory leaks because it's an interpreted scripting language, so the interpreter and C backing library should prevent all that. 

    You're implying that you don't 'write' most of the scripting you're using. Are you just dumbly copying and pasting and then using vile AI just to hack it to work? 

    Are you not actually learning anything? LUA has one of the smallest command sets in any scripting or programming languages. It truly is one if the the most simplest 'languages' ever made... 

    What is is that you’re struggling with? Have you read the programming guide? Is this the first computer language you’ve ever tried to use? How have you tried to learn? There is virtually zero reasons to use ChatGPT or any other evil ai tool as most if not all the problems you’re going to have are because of the DCs s.e. and the inability for a live debugger. 
     

    what do you do to debug?

  6. And another thing; I put a poll out for the people who come into the M.E. forums about using mods for aircraft and objects that ED have no interest in adding into DCS yet open up HUGE amounts of narrative and mission types that DCS just can't do. 

    Virtually everyone poo-pooed it; saying they hate mods, won't use OvGME, are unwilling to make their players install mods as they see it as a hurdle most of their users won't cross to get (or even see) the benefit and irrational worries about crashes. 

    So even putting scripts into missions/campaigns is seen as a hurdle or problematic to a lot of the 'players' of DCS... you have to decide if it's even worth it.

  7. 1 hour ago, OzDeaDMeaT said:

    @TEMPEST.114, who is the best person to talk to about these undocumented commands? And how do we start some comms between ED and us on getting them documented. I know we have Grimes and the team over at Hoggit maintaining that awesome resource, would love to help them grip up some of these newer commands.

    You don't.

    Like I said, they're hidden and unexposed at the whims of ED. And Grimes knows about them and has never added them to the hoggit documentation for reasons I don't know, but there is no process or way to get ED to officially make an effort; they don't care very much about this stuff and they have priorities that are, in their opinion, much, much higher. 

    If you want to find them (and I can only think of two or three off the top of my head that aren't 'documented' anywhere) then you are going to need to go looking for them yourself and if you're able to put the time and effort in, you can reverse engineer how the params are specified and the outcomes are testable and repeatable then you can use them, but they can vanish in a patch and break your scripts / missions / campaigns at any time. If you look at the 'wish' list or 'bugs' for the scripting engine things that we DESPERATELY need have been asked for and tracked for over a DECADE and they still won't address them or fix them.

    The line ED have said in comments and messages is that most of the users of DCS are single players. The small percentage that do multiplayer do the big servers to just dogfight or bomb it to hell and a TINY portion of those create missions or even dive into campaign creation and scripting.

    They have their priorities and the M.E. and Scripting Engine (S.E.) are not in that list.

    Like I hinted above, if you want to compare what is on 'hoggitworld' (hint: it's not complete or fully accurate or up to date) with what is actually available with each patch of DCS, then you're going to have to dump the _G table so you can see all the C functions available - one of which is 'addZone' and you'll notice there is no 'removeZone' - so hence you can't do it. 

    Even Grimes has said in posts and comments that he regularly dumps G so he can see what's been added/removed/changed.

    The DCS Scripting Engine API (and ME) is pretty crap. It was never really 'designed' and the best it was ever 'officially' communicated was here: https://www.digitalcombatsimulator.com/en/support/faq/scripting_engine/  

    If you look into the history it was born out of a need for debugging purposes and was provided 'as is' to only the most hardcore mission creators and put out on the 'YMMV' principle. No deep or thorough documentation, no real examples; you had to already be a programmer or software engineer to even begin to reverse engineer it to make use of it; the documentation on hoggit is not an ED thing and done by the community for the community; but it's not up to date and it's not completely accurate. It's just better than absolutely nothing. The 'architecture' if you can call it that is laughable, disparate systems that can't but should communicate, back end objects having been deleted before the S.E. gets a callback with an id of that object that will cause a crash if you try and inspect/use it etc etc etc.

    So if you want to do these more complex things that you seem to be wanting to do, then you're just going to have to roll up your sleeves like the rest of us, get very familiar with lua tables and even metatables, start pulling out data structures from the .miz and looking in _G and even the mission editor lua files in the core game folders and start working it all out for yourself. 

    It's what everyone before you has done. 

    There is no real incentive for someone to volunteer a huge amount of time and effort to create in depth tutorials and  documentation for ED because they don't appear to value that (having never tried themselves) and the M.E. and scripting environment are woefully ignored in patches and updates. Not only that but most go out of date or aren't kept up with and most of the DCS community seem to be quite toxic and anti-intellectual; they want the results and rewards, but they don't want to go to the effort of learning and contributing (look at the fools arguing for AI and ChatGPT to do scripting for them, rather than use their brains and make an effort) but they're rather tear down those actively trying to highlight the problems, offer solutions and contribute with bug reports and scripting advice. There is a lot of gaslighting and mansplaining in this tiny niche group of scripters and mission creators. Lots of big egos writing cheques they can't cash. 

    Ultimately, unless ED do a 180 and actually focus on doing this and the M.E. properly, it is what it is; if you can make it do something cool, great, but it could just as easily break with each patch or features you rely on could disappear forever and there is nothing you can do about it. 

    If you get a buzz from the intellectual side of doing this crap then I'd say go for it; if you're just doing it to make a mission to play and the playing/flying/learning aircraft or flying with friends is more important, then focus on that and leave the scripting alone. 

  8. 3 hours ago, OzDeaDMeaT said:

    bump

    There's no removeZone.

    I believe the SSE is Secret Scripting Environment/Expression... either way it's an undocumented function (there are a couple of them). 

    Hint (Dump _G and take a gander)

  9. 2 hours ago, Glide said:

    i got it!  Thanks for that excellent explanation.  Yes I am a reluctant programmer.  If the initialization script has a function called GunsOnly that returns True, then if a Unit has only guns, set % to 100, call GunsOnly in the condition field, and this unit will always spawn.  Set % to anything less than 100, and it's a roll of the dice if this unit spawns.  If a Unit has missiles, Call GunsOnly in the Condition field, and set % to Zero.

    You're not changing the %, but if you return a FALSE, then regardless of the % spawn likelihood, it won't spawn.

    The CONDITION and the % are two things, the CONDITION is evaluated first, and should that result in a TRUE, it is THEN that the % is evaluated. 

    So your CONDITION could pass, but the % will still prevent the spawn.

    And this is just like I did it to test if it's working or broken: 

     

    • Like 1
  10. Someone was asking about this box in the main M.E. channel. 

    As I was explaining it for them, I tested it out, because you know... DCS and the DCS ME manual can be deceiving...

    Here's the script I created to create a CONDITIONAL that returns either a TRUE or a FALSE.

    groupConditionTestScript.lua

    It IS loaded via the 'Initialisation Script' box in the Trigger Rules dialog as per the manual.

    It is called from the CONDITION box on the GROUP Inspector just to the left of the % spawn box.

    Even if you edit this script to always return true and set the % to 100, the group will never spawn. 

     

    Either the manual is grossly misleading, or this is broken.

    Here's the test mission:

    groupCONDITION.miz

     

    It SHOULD just spawn a helo group if the CONDITION returns true (it's an RNG from 0 to 10, anything over 5 is a TRUE - check the DCS.log to see if the script is called and what the return value is) but either way, the game NEVER spawns the group.

  11. 6 hours ago, Glide said:

    It's still a mystery how to use it.

    I'm making an assumption you're not a programmer and don't understand what the manual is saying, if I'm incorrect, I apologise, but this explanation will help others regardless.

    First you have to understand what a CONDITION is: 

    "Conditionals are expressions that evaluate to either true or false. They are mostly used to determine Program Flow through if statements and while loops."

    So we have to have an EXPRESSION - which is: 

    "An expression in programming is a combination of literals, variables, operators, and function calls that produce a value when evaluated. It represents a computation and can be as simple as a single variable or as complex as a mathematical equation."

    Finally you need to understand what a STATEMENT is:

    "In a computer programming language, a statement is a line of code commanding a task. Every program consists of a sequence of statements."

    So therefore, you need some LUA STATEMENT in that condition box that uses an CONDITIONAL type of EXPRESSION that will always result in either returning a value of TRUE or FALSE. This is most easily done by calling a function from this dialog box to a function that you have previously written which uses your script's logic, expressions, conditions, state machine and statements to result in either a TRUE or FALSE being the RETURN VALUE of that function.

    Where this LUA function is contained, is inside the LUA script that the manual and explanation above tells you to load in the Initialisation box in the Triggers Dialog.

    The % is the likelihood that this group will be spawned. It just a RNG that's created at mission start and if the number is greater than the figure set in this % box then the group will spawn. It will NOT overwrite the decision that is returned from the script as called in the CONDITION box; so even if your CONDITION returns TRUE, if the game's RNG is less than the percentage value set, it STILL won't spawn. I'd suggest having the % as 100 if you're using your own condition.

    Does that clear up your mystery?

    ****** ****** ******

    Now, here's the usual 'DCS gotcha!'

    It's broken. 

    You can put a condition in there that will always return true with a percentage of 100% and it still won't spawn. 

    Gotta love the 'DCS consistency'... just when you think you have it sussed out it bites you again eh?

     

    • Like 1
    • Thanks 1
  12. 18 minutes ago, Weed89 said:

    🙂  THANKS 🙂

    no wonder i could not find it..the NAME is not the same 🙂  Again THANK you Rudel +100

    I posted the answer before Rudel and with an image showing you how you find it... Thanks so much, I won't bother helping you next time. 

    33 minutes ago, Rudel_chw said:

     

    Its file name is "IA-Hornet-CAP.miz" and its default location is:

    C:\Program Files\Eagle Dynamics\DCS World\Mods\aircraft\FA-18C\Missions\QuickStart

    WTF?!

  13. 14 minutes ago, Weed89 said:

    THIS LOCATION IS not THE instant fly MIZ folder...they are mission miz files..I Am looking for the INSTANT  fA-18 Caucus " where is the none shall pass miz file"  and can NOT find it anywhere.

     Does anyone Know the location of that MIZ file ?

    MIZlocation1.jpg

    ?:\DCS World\Mods\aircraft\FA-18C\Missions\QuickStart\IA-Hornet-CAP.miz

    IA = Instant Action
    'CAP' - look at the mission name when you load it:

    dcs1.png

  14. 1 hour ago, Laxxor said:

    "Its not too hard" so there must be some stuff written about it somewhere, and clearly you've done it? 😄

     

    I'm not looking for handouts, but any hints on where to look?

     

     

     

    Nothing written. All worked out from peeking and poking. 😉

    Overview:

    1. You're going to have to create an empty mission with a single trigger set up like you'd want to create by script.

    2. Pull out the mission file from the .miz, look at the data structure of the trigger table for that trigger and then using the secret addTrigger() function, work out how to pass those parameters in (by trial and error) until you can get it to work from a function call in a different mission file you make to test it. 

    3. Then rinse and repeat for every other type of trigger. 

     

    Fun right? 😉  They couldn't have made it easy for us eh?

×
×
  • Create New...