-
Posts
1724 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by TEMPEST.114
-
Not even as a 'button box'?!
-
AI Task: "Employ precision munitions on players designation"
TEMPEST.114 replied to Dr4gis's topic in Wish List
That kind of logic you will have to create and then use the list of functions to execute it. -
AI Task: "Employ precision munitions on players designation"
TEMPEST.114 replied to Dr4gis's topic in Wish List
Well, there isn't a single 'command' to do what you want, but you can create a script to do exactly what you are looking for, but it's going to be multiple lines and function calls and data scrubbing. Start here: https://wiki.hoggitworld.com/view/Simulator_Scripting_Engine_Documentation -
Ground assets cannot be placed inside hangers?!
TEMPEST.114 replied to buceador's topic in Mission Editor Bugs
No, we shouldn’t… but it’s DCS. -
Using an IDE without MOOSE?
TEMPEST.114 replied to Pizzicato's topic in Scripting Tips, Tricks & Issues
Visual Studio Code + Lua extensions -
AI Convoy refuses to move if it's out of ammo.
TEMPEST.114 replied to MeanJim's topic in Mission Editor
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. -
AI Convoy refuses to move if it's out of ammo.
TEMPEST.114 replied to MeanJim's topic in Mission Editor
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. -
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.
-
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?
-
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.
-
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.
-
@Flappie Hiya. Any chance you can let me know if/when you've spoken to the devs to confirm that this is indeed a bug or am I missing something that (yet again) isn't clear in the Manual or UI?
- 4 replies
-
- group
- mission editor
-
(and 2 more)
Tagged with:
-
AI Task: "Employ precision munitions on players designation"
TEMPEST.114 replied to Dr4gis's topic in Wish List
You can do this with scripting already if you want to do this. -
Using the output of getPosition
TEMPEST.114 replied to Squiggs's topic in Scripting Tips, Tricks & Issues
https://wiki.hoggitworld.com/view/DCS_Scripting_orig_Part_1 https://wiki.hoggitworld.com/view/DCS_func_getPosition https://wiki.hoggitworld.com/view/DCS_func_setTask You have to create a task with a waypoint of the new position. -
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)
-
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:
-
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.
- 4 replies
-
- group
- mission editor
-
(and 2 more)
Tagged with:
-
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?
-
Just put the effort in. It's not hard. It's scripting. Basic logic and typing is all you need.
-
Free mission planner & kneeboard generator ( open source )
TEMPEST.114 replied to winghunter's topic in Mission Editor
I wish you'd concentrate on making a first class mission editor with extra features over the DCS one, instead of wasting time making a moving map for noobs and War Thunder idiots. Stop adding to the dumbing down of DCS please, and focus on expanding the capabilities of what a mission editor can do. -
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. WTF?!
-
?:\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:
-
Reloading env.mission tables
TEMPEST.114 replied to Laxxor's topic in Scripting Tips, Tricks & Issues
What is it you're actually trying to do - maybe there's a better way? -
Reloading env.mission tables
TEMPEST.114 replied to Laxxor's topic in Scripting Tips, Tricks & Issues
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?