Search the Community
Showing results for tags 'lua function'.
-
First-off this touches on a variety of combined arms and core game elements, so i opted to stick it here if it would be better in the CA section or elsewhere please move it or let me know and ill re-post there. Ok now that's out of the way, I have been working on some scripting to try and improve the Combined Arms experience, in doing so I have been looking at gameplay and general immersion, I have written two core scripts that improve these aspects (in my opinion) and I would like to ask for one of them to serve as a 'proof of concept' for what I would love to see added to Combined Arms specifically However in the shorter term there are some much simpler asks that are a mix of new functionality and bug fixes that will allow for my demo scripts to be greatly enhanced, and by extensions similar scripting options that can add a lot to a mission. So the two features are: CREW COMMANDS: This is a mix of immersion and better situational awareness, lets the player benefit from magic AI vision and just generally get help finding their targets. Inspired by GHPC (and my own armoured experience) this generates calls to targets instructing the player of the target type and guiding them to the target with traverse calls. The version in the attached demo miz is still what I would call indev, has some edgecase issues and target prioritization is very basic at the moment and could use a few more features (radio items to adjust priority of targets and shut it up etc), but its stable and I think quite a bit better than the current vanilla experience. Note a few vehicles (mostly modern ones) will call "Target Cease Fire" when you kill a target but i don't remember hearing any other commands/callouts VEHICLE ACCURACY: This topic has been done to death in discord etc but the other big script feature in the demo miz is my stormtrooper function, basically it aims enemies manually using fire at point, in the demo miz this unfortunately manifests as them mostly ignoring the player entirely until the player is the only one they can see, once you get too close it (currently) makes the player visible so they will engage naturally. The primary issues here stem from a few bugs that severely limit how much it can be used, when it does fully work its a good way to have decent volume of fire without the players being instantly killed. ALL THE WISHES: So what would I love to see added beyond a full crew command system ... Each title is hyperlinked to a related thread Unit Description Enhancements: This will allow both crew commands and things like stormtrooper to function better, having quick programmatic access to the rough max range a unit can shoot will generally simplify a lot of potential scripts well beyond what I have mentioned here Fire at Point Options: This would enable much finer control over the AI in DCS, being able to specify to any increased degree the weapons units should use when given fire at point (or attack unit/group), and being able to shortcut the aim delay would enable simulating a lot more tactical scenarios easily AI LOS Respect Trees: I'm linking a bug report on this issue, but basically would love to see AI detection factor in foliage and forests for obvious reasons Ground Unit Follow Command: Pretty simple, for some scripting due to the nature of things like ROEs, Alert State, and invis/immortal etc being group-wide its often necessary to use individual units (1 unit groups) for certain effects to be feasible, but them moving them around together is a nightmare, a simple follow command would help immensely. This would also be great in normal mission making, allowing 2 groups to move together easily before splitting up at some point Dead Vehicle Fire/Smoke Randomization: Would love to see just some randomness here so they dont all always spawn the exact-same size fire and smoke effect Ok so these next ones I have heard rumours are tracked internally already but im not sure.... LUA LOS Access: Allow us to check LOS between 2 points using whatever the back end method of doing so is (expose it through lua), somethign that factors in buildings etc instead of the current land.isVisible() which only considers the ground. Get Detected Targets/Is Target Detected: Change to Return detected units that are of the same or neutral coalition instead of just "enemies", same for is detected, allow us to query if a specific unit has detected another regardless of coalition. BUGS: Ok Final thing before I talk demo mission, there are a variety of bugs that are really directly hindering the ability to accomplish some really interesting effects (can tell you without these both my above-mentioned scripts would be a lot better) or generally hurting CA gameplay a lot, Some of these are fully reported, some not yet acknowledged but id like to highlight them: Restrict Target breaks Fire at Point: Cant stop units from shooting at the air or the ground whichever if I plan to use any fire at points Fire at Point vs ROEs: This one is a major pain and why I need to have the players be invis or neutral or have the enemies neutral to use stormtrooper scripts, as it stands if you give a fire at point, regardless of their ROEs they will immediately ignore the fire at point to engage any valid target they have detected and is in range Aiming in CA has some issues: Makes aiming at close range a nightmare at times Tank Engagement Range: Pretty obvious why this would impact CA stuff I think Infantry Chickens: Running like their heads cut off, makes them hard to include if the players will be looking at them for any amount of time Sherman FF HE shells: They dont explode, less important than the issues above but worth mentioning (the standard sherman's shells do explode) DEMO TIME: Ok Thanks for reading, ive been enjoying using LUA to force DCS to do interesting things, and used it a lot to enable experiences that cant exist without it, sometimes its to make something that should someday hopefully end up in the base-game, other times not so much but either way it can suck when a weird bug renders something impossible or overly complicated. Please check out the demo miz ive attached: DesertFox_demo_nomods.miz(its on Sinai and will require the WW2 asset pack) This has just a single blue JTAC/Operator slot, grab that, let the miz run atleast 2 seconds and then there are a handful of shermans called driveme that are in singleton groups with the rest of the shermans and drive (or feel free to advance time until the shermans are making contact with the enemy) Regardless play until you've faced off against the enemy tanks and please remember this meant to be a proof of concept, this is not meant to be a completed mission, feel free to reach out if you want more info on the scripts I am always happy to share.
- 1 reply
-
- 5
-
- tanks
- combined arms
-
(and 3 more)
Tagged with:
-
so currently through the scripting engine we can use: trigger.action.explosion(table vec3 , number power ) To create an explosion of some magnitude at a point, it works well for that. I would like to propose an extension of this function or perhaps a new function that allows the selection of explosion type such that we can trigger FLAK explosions at a chosen point and get the flak visuals. For context the specific use case I have in mind... For DCS WW2 or Korea era when bombers will be flying in large formations and FLAK will be a large threat currently it is quite taxing on the clients/servers to deploy a realistic amount of guns to create a realistic density flak screen (especially for WW2), this would allow some basic scripting to be a force multiplier for any flak guns on the ground, adding to the effect and giving mission makers more control over the effect in their missions as we could easily script flak screens that are guaranteed not to hit any bombers until a specific distance is travelled or script in some very close-calls for the players etc.
- 2 replies
-
- 2
-
- lua
- lua function
-
(and 2 more)
Tagged with:
-
Hi All, I found the g_suit paramotor under the crew members is deferent in each plan. Some have value 0f 0.75 and some have of 5 I read some post from 2019-2020 that say the value need to be from 0-1 some examples from the "aircraft module".lua F-15E g_suit = 2.0, MB-339 g_suit = 1, Mig-15 g_suit = 0.35, F-16C No sech value
-
So currently there is a editor placed static proxy for the smoke/fire effects, there are also lua functions for creating and destroying them on an adhoc basis. However both methods of producing these effects lack a critical feature to allow certain desirable usecases. The usecase i will focus on is smoke attached to a moving object (specifically a ship), to simulate damage or simply to add smoke stack smoke on older ships. The editor placed static object can be linked to a unit like other statics, resulting in a nice effect as the ship sails: However when smoke is placed this way there is seemingly no way to ever turn it off, resulting in this appearance lasting indefinitely if the ship is sunk: If however you place the smoke via the lua function trigger.action.effectSmokeBig() while you can then remove it with effectSmokeStop() it cannot be linked to an object and so does not work with a moving unit. Suggested improvement: I would like to suggest that either we get the ability to deactivate the static object placed effects(either through a traditional triggered action or maybe through the effectSmokeStop() function), or ideally the effectSmokeBig() function be enhanced to allow linking to units.
-
In the mission editor, we can see yellow and red circles indicating respectively the maximum detection range and the maximum firing range. There is also a minimum range for some models. It would be interesting to create lua functions to return its information, as well as a function indicating if a point or a unit are "within range" of fire. This can be used in particular for artillery script, or dca... Function we needed : - unit:getMinRange() return minimum range of unit in metter - unit:getMaxRange() return maximum range of unit in metter (red circle) - unit:getDetectionRange() return maximum detection Range in metter (yellow circle) - unit:pointInRange(vec3) param point (vec3) of a position. Return boolean (true/false) if a param "point" is between min and max range.
-
- lua function
- script
-
(and 2 more)
Tagged with:
-
In DCS, forest are indesctuctible. It's a shame : - A group of APCs under the cover of a forest is practically indestructible: A rocket pass will have no effect on the units below, the leaves will stop the shoots! It could be interesting sometimes to destroy trees, there should be a notion of destructible trees. - Another thing: There is no lua function to know if a position is occuped by a forest or not. There are functions to determine if an area is land or sea, but no functions that indicates if the area is forested or not. However, it can sometimes be practical. For example: I want to make a script so that a artillery move in an area, finds a place without forest to deploy, fire, then leave. However, no function will allow me to determine if an area or a path contains forest. I don't want my artillery trying to deploy under a forest, I want it to find nearby clearings if the aera is forrested. But no lua functions can determine that.
-
- 3
-
- three
- destructible
-
(and 1 more)
Tagged with:
-
At any point, tell an AI unit to go immediately to it's NEXT waypoint. If there are no more waypoints left, go back to it's first waypoint. This prevents the need to get and parse the table of waypoints to work out which one it's between and what the next one is (a huge overhead), and whilst 'goToWaypoint(n)' does work, you have to do all the work I've just mentioned to work out which one is the next one. Alternatively, have a 'getNextWaypoint' function that returns the number of the next waypoint. And a 'getTotalNumberOfWaypoints()' function, so we can see where it is in the list and then call 'goToWaypoint()' with the correct number.
-
I've got a lua script set up to display the main viewport on one monitor, and two MFDs (and apache TEDAC) on a second monitor. I use the same script in the apache, Ka-50, F-16 and F/A-18 the MFDs all appear in the monitor in the correct place. When I switch to the AV8B harrier, the MFD displays do not show up in the F1 cockpit view, but do display when I switch to the F2 external view, and disappear when I switch back to the F1 view. The script uses the generic LEFT_MFCD and RIGHT_MFCD identifiers as they seem to work in the modules listed above. _ = function(p) return p; end; name = _('AH-64D Apache CPG Dual Monitor: m1 - Viewport, m2 - MFDs, TEDAC (equal)'); Description = 'dual monitor: viewport on main 2560 x 1080 (21:9 aspect ratio), MFDs and TEDAC on second monitor: 1680 x 1050 (16/10 aspect ratio) bottom aligned' Viewports = { Center = { x = 0; y = 0; width = 2560; height = 1080; viewDx = 0; viewDy = 0; aspect = 21/9; } } LEFT_MFCD = { x = 2560; y = 30; width = 554; height = 554; } RIGHT_MFCD = { x = 3668; y = 30; width = 554; height = 554; } TEDAC = { x = 3114; y = 30; width = 554; height = 554; } UIMainView = Viewports.Center GU_MAIN_VIEWPORT = Viewports.Center Is it a case of using specific IDs for the AV8b displays instead of the generic IDs, or is just a weird bug with the harrier?
- 2 replies
-
- mfd export
- lua function
-
(and 1 more)
Tagged with: