-
Posts
167 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by gromit190
-
Yes. Here's an example of how you can create multiple task forces. Also I'd like to mention that target and base zone(s) can be shared across multiple task forces (including enemy task forces). -- A task force of 2x4 USA M-1 Abrams -- Spawning at zone "SPAWN1" autogft.TaskForce:new() :setCountry(country.id.USA) :addBaseZone("SPAWN1") :addTargetZone("A1") :addTargetZone("A2") :addTargetZone("A3") :addUnitSpec(4, "M-1 Abrams") :addUnitSpec(4, "M-1 Abrams") :respawn() :setTargetUpdateTimer(120) :setRespawnTimer(300) -- Another task force of 2x4 USA M-1 Abrams -- Spawning at zone "SPAWN2" autogft.TaskForce:new() :setCountry(country.id.USA) :addBaseZone("SPAWN2") :addTargetZone("B1") :addTargetZone("B2") :addTargetZone("B3") :addUnitSpec(4, "M-1 Abrams") :addUnitSpec(4, "M-1 Abrams") :respawn() :setTargetUpdateTimer(120) :setRespawnTimer(300) Yes. This is actually what's done in the example mission (included in the autogft.zip). Example code: -- (STAGING AREA EXAMPLE) -- Same as the previous code, but this time for some russian units and with a different base -- Note this task force will not respawn units. Only pre-existing units located in the base zone will be used to reinforce it autogft.TaskForce:new() :setCountry(country.id.RUSSIA) :addBaseZone("STAGING1") :addTargetZone("Combat3") :addTargetZone("Combat2") :addTargetZone("Combat1") :addUnitSpec(4, "T-90") :reinforce() :setTargetUpdateTimer(120) :setReinforceTimer(300) Here's a screenshot of the example mission:
-
Thanks guys! Ah, okay. Thanks for the tip :) When you've edited and saved your changes to the example.lua, please re-load it to the mission from the mission editor. Select the action that is loading the example.lua script file, click "OPEN" and select the example.lua. That way, the code from the script is re-added to your mission. If you already reloaded the script and it's still not working, would you mind sharing the code you're trying (the contents of your example.lua)? Yes. If you specify more than one staging area ("base zone"), the script will look through all the staging areas to "take" the units it needs to reinforce the task force. With that said, it is possible to have a task force that keeps respawning units, then sends them to the staging area of another task force.
-
Hello everyone, Just wanted to present the "Autonomous Ground Force Tasking" project to the forum. Project goal Download here Getting started Visit project repository https://www.youtube.com/watch?v=Cqv3Mj-Ss58 Any feedback is highly appreciated. If you have any questions or want to see more usage examples, feel free to ask. (WARNING: The code is under development. The various links, code snippets, and discussions found throughout this thread will be subject to change. The project repository, the examples found there and this (initial) post will be kept up-to-date.)
-
Converting a units orientation to a "heading"? (Script help)
gromit190 replied to gromit190's topic in Mission Editor
I see, thanks :-) -
Converting a units orientation to a "heading"? (Script help)
gromit190 replied to gromit190's topic in Mission Editor
Thank you! Can you please eloborate on why I need correction for a "true" north heading? -
Tutorial: Introduction to Lua scripting
gromit190 replied to Yurgon's topic in Scripting Tips, Tricks & Issues
Great tutorial! Whenever someone wants to start scritping for DCS, I just link them here. I'd just like to add that Lua Development Tools (LDT) is completely unmatched when it comes to free IDEs for .lua. Notepad++, Atom, etc has context highlighting but LDT also has extensive content assist (intellisense), automatic refactoring etc. I've been using Notepad++ for years and not just lua programming. But once you go LDT there's no turning back :-P -
Same as you, DCS is the only reason I still have Windowns installed on my computer :(
-
Cool! Sorry, didn't quite understand. Are you considering porting the project to Golang?
-
Hello, The "addGroup" function takes a "heading" as an argument to position the unit when spawning it. I need this heading to be the same as heading as a previously spawned unit. I reckon I get the heading of the previously spawned unit from this function. But how do I convert it to a single number "heading" needed for the addgroup function? Best regards, gromit190
-
Thank you very much, guys :)
-
Are you still considering rewriting audio in C++? Or did upgrading to 64-bit fix the performance? I have another C++ project where I'm going to record audio, so I could definitely look into that for this project aswell.
-
This is a great project and initiative! I want to know: how can I contribute? I'm a Java webapp/javascript developer with experience with C++ and (more recently) .lua hobby projects. Is it just to get crackin' on the issues or do you have some part of the software you'd like someone to take care of?
-
Perhaps the zone stays in memory until it is overwritten. Is it a problem? Maybe there is no point in removing it from memory until the memory is needed...
-
Nice effort! I'll put the unit type definitions here: https://github.com/birgersp/dcs-unit-types
-
I see, how did you obtain every type of object?
-
Impressive! But I'm a little unsure how to use the scripts you linked? The reason I wanted a list of the available unit types was so I could map them to lua variables, so LDT (Lue Development Tools) would recognize the variable names for autocompletion in the editor. Like this example: Maybe we could make a collaborate and make a separate repo for these unit type definitions? Make each unit definition into an object of some class holding all the information you have compiled? Thanks, I'll look into this later today :) EDIT: Also, MIST is really great! We're using it for our scripts, thank you so much for all the work you have put into it. We really appreciate it!
-
Haha yeah, it's kinda hard to show th pictures in script but how about this? You're right the vehicles should be categorized according to country. I probably will categorize them later but it won't be a priority. If you spawn the units in your script the country doesn't seem to matter. I can spawn a Russian M-1 Abrams if I wanted.
-
Ran grep "GT.Names = " in C:\Program Files (x86)\Steam\steamapps\common\DCSWorld\Scripts\Database Made a javascript to process the output, so now I've got the following unit type names: unitTypes = {} unitTypes.navy = {} unitTypes.navy.blue = { VINSON = "VINSON", PERRY = "PERRY", TICONDEROG = "TICONDEROG" } unitTypes.navy.red = { ALBATROS = "ALBATROS", KUZNECOW = "KUZNECOW", MOLNIYA = "MOLNIYA", MOSCOW = "MOSCOW", NEUSTRASH = "NEUSTRASH", PIOTR = "PIOTR", REZKY = "REZKY" } unitTypes.navy.civil = { ELNYA = "ELNYA", Drycargo_ship2 = "Dry-cargo ship-2", Drycargo_ship1 = "Dry-cargo ship-1", ZWEZDNY = "ZWEZDNY" } unitTypes.navy.submarine = { KILO = "KILO", SOM = "SOM" } unitTypes.navy.speedboat = { speedboat = "speedboat" } unitTypes.vehicles = {} unitTypes.vehicles.Howitzers = { _2B11_mortar = "2B11 mortar", SAU_Gvozdika = "SAU Gvozdika", SAU_Msta = "SAU Msta", SAU_Akatsia = "SAU Akatsia", SAU_2C9 = "SAU 2-C9", M109 = "M-109" } unitTypes.vehicles.IFV = { AAV7 = "AAV7", BMD1 = "BMD-1", BMP1 = "BMP-1", BMP2 = "BMP-2", BMP3 = "BMP-3", Boman = "Boman", BRDM2 = "BRDM-2", BTR80 = "BTR-80", BTR_D = "BTR_D", Bunker = "Bunker", Cobra = "Cobra", LAV25 = "LAV-25", M1043_HMMWV_Armament = "M1043 HMMWV Armament", M1045_HMMWV_TOW = "M1045 HMMWV TOW", M1126_Stryker_ICV = "M1126 Stryker ICV", M113 = "M-113", M1134_Stryker_ATGM = "M1134 Stryker ATGM", M2_Bradley = "M-2 Bradley", Marder = "Marder", MCV80 = "MCV-80", MTLB = "MTLB", Paratrooper_RPG16 = "Paratrooper RPG-16", Paratrooper_AKS74 = "Paratrooper AKS-74", Sandbox = "Sandbox", Soldier_AK = "Soldier AK", Infantry_AK = "Infantry AK", Soldier_M249 = "Soldier M249", Soldier_M4 = "Soldier M4", Soldier_M4_GRG = "Soldier M4 GRG", Soldier_RPG = "Soldier RPG", TPZ = "TPZ" } unitTypes.vehicles.MLRS = { GradURAL = "Grad-URAL", Uragan_BM27 = "Uragan_BM-27", Smerch = "Smerch", MLRS = "MLRS" } unitTypes.vehicles.SAM = { _2S6_Tunguska = "2S6 Tunguska", Kub_2P25_ln = "Kub 2P25 ln", _5p73_s125_ln = "5p73 s-125 ln", S300PS_5P85C_ln = "S-300PS 5P85C ln", S300PS_5P85D_ln = "S-300PS 5P85D ln", SA11_Buk_LN_9A310M1 = "SA-11 Buk LN 9A310M1", Osa_9A33_ln = "Osa 9A33 ln", Tor_9A331 = "Tor 9A331", Strela10M3 = "Strela-10M3", Strela1_9P31 = "Strela-1 9P31", SA11_Buk_CC_9S470M1 = "SA-11 Buk CC 9S470M1", SA8_Osa_LD_9T217 = "SA-8 Osa LD 9T217", Patriot_AMG = "Patriot AMG", Patriot_ECS = "Patriot ECS", Gepard = "Gepard", Hawk_pcp = "Hawk pcp", SA18_Igla_manpad = "SA-18 Igla manpad", SA18_Igla_comm = "SA-18 Igla comm", Igla_manpad_INS = "Igla manpad INS", SA18_IglaS_manpad = "SA-18 Igla-S manpad", SA18_IglaS_comm = "SA-18 Igla-S comm", Vulcan = "Vulcan", Hawk_ln = "Hawk ln", M48_Chaparral = "M48 Chaparral", M6_Linebacker = "M6 Linebacker", Patriot_ln = "Patriot ln", M1097_Avenger = "M1097 Avenger", Patriot_EPP = "Patriot EPP", Patriot_cp = "Patriot cp", Roland_ADS = "Roland ADS", S300PS_54K6_cp = "S-300PS 54K6 cp", Stinger_manpad_GRG = "Stinger manpad GRG", Stinger_manpad_dsr = "Stinger manpad dsr", Stinger_comm_dsr = "Stinger comm dsr", Stinger_manpad = "Stinger manpad", Stinger_comm = "Stinger comm", ZSU234_Shilka = "ZSU-23-4 Shilka", ZU23_Emplacement_Closed = "ZU-23 Emplacement Closed", ZU23_Emplacement = "ZU-23 Emplacement", ZU23_Closed_Insurgent = "ZU-23 Closed Insurgent", Ural375_ZU23_Insurgent = "Ural-375 ZU-23 Insurgent", ZU23_Insurgent = "ZU-23 Insurgent", Ural375_ZU23 = "Ural-375 ZU-23" } unitTypes.vehicles.radar = { _1L13_EWR = "1L13 EWR", Kub_1S91_str = "Kub 1S91 str", S300PS_40B6M_tr = "S-300PS 40B6M tr", S300PS_40B6MD_sr = "S-300PS 40B6MD sr", _55G6_EWR = "55G6 EWR", S300PS_64H6E_sr = "S-300PS 64H6E sr", SA11_Buk_SR_9S18M1 = "SA-11 Buk SR 9S18M1", Dog_Ear_radar = "Dog Ear radar", Hawk_tr = "Hawk tr", Hawk_sr = "Hawk sr", Patriot_str = "Patriot str", Hawk_cwar = "Hawk cwar", p19_s125_sr = "p-19 s-125 sr", Roland_Radar = "Roland Radar", snr_s125_tr = "snr s-125 tr" } unitTypes.vehicles.Structures = { house1arm = "house1arm", house2arm = "house2arm", outpost_road = "outpost_road", outpost = "outpost", houseA_arm = "houseA_arm" } unitTypes.vehicles.Tanks = { Challenger2 = "Challenger2", Leclerc = "Leclerc", Leopard1A3 = "Leopard1A3", Leopard2 = "Leopard-2", M60 = "M-60", M1128_Stryker_MGS = "M1128 Stryker MGS", M1_Abrams = "M-1 Abrams", T55 = "T-55", T72B = "T-72B", T80UD = "T-80UD", T90 = "T-90" } unitTypes.vehicles.unarmed = { Ural4320_APA5D = "Ural-4320 APA-5D", ATMZ5 = "ATMZ-5", ATZ10 = "ATZ-10", GAZ3307 = "GAZ-3307", GAZ3308 = "GAZ-3308", GAZ66 = "GAZ-66", M978_HEMTT_Tanker = "M978 HEMTT Tanker", HEMTT_TFFT = "HEMTT TFFT", IKARUS_Bus = "IKARUS Bus", KAMAZ_Truck = "KAMAZ Truck", LAZ_Bus = "LAZ Bus", Hummer = "Hummer", M_818 = "M 818", MAZ6303 = "MAZ-6303", Predator_GCS = "Predator GCS", Predator_TrojanSpirit = "Predator TrojanSpirit", Suidae = "Suidae", Tigr_233036 = "Tigr_233036", Trolley_bus = "Trolley bus", UAZ469 = "UAZ-469", Ural_ATsP6 = "Ural ATsP-6", Ural375_PBU = "Ural-375 PBU", Ural375 = "Ural-375", Ural432031 = "Ural-4320-31", Ural4320T = "Ural-4320T", VAZ_Car = "VAZ Car", ZiL131_APA80 = "ZiL-131 APA-80", SKP11 = "SKP-11", ZIL131_KUNG = "ZIL-131 KUNG", ZIL4331 = "ZIL-4331" } Hoping that's all type names, at least it will do for me for now
-
Hey, I know I've seen this somewhere, someone had listed all (or, at least a lot) of the unit type names in DCS World. Does anyone know where I can find it? What I'm looking for are the type names used for the unit table used in group data when invoking coalition.addGroup http://wiki.hoggit.us/view/DCS_func_addGroup In the example they are using "LAV-25", I was hoping to find a list of all the unit type names possible Does anyone know?
-
I suggest a script that reinforces the combat zone when the infantry is killed. Basically, a script that does the following: If a combat zone has less infantry than some constant (of red or blue), spawn new infantry in a "spawn" zone and make them move to the combat zone. Me and my friend is working on a similar thing, but with vehicles. This way, the combat zone will always be populated with targets for both sides while the AI are fighting each other (or the players): https://github.com/birgersp/dcs-bajas/ If you like this idea, OP, I could write the script for you. If you make combat and spawn zones in your mission, I could take care of the code. Just put the zones in your mission like this:
-
I'm using your script matador, but I'm also a bit eager to learn how to do these things myself. Also I probably won't be using lat/long coordinates like you do in your script. I'm thinking I'll use MGRS grids and heading/distance from bullseye. For the killbox system, MGRS grids will be used for sure.
-
Lol, sorry about that :music_whistling: Hehe. (Back on topic) A friend of mine suggested I make a "killbox" system. So a player can request and receive a area of where to kill all enemy units. So it means I would search for the enemy closest to the player, then give the grid where that enemy is located. Thoughts?
-
Thank you
-
Whoops, was not supposed to post that here. Made a separate thread about this. But thanks!
-
local redVehicles = mist.makeUnitTable({'[blue][vehicle]'}) local redVehiclesInZone = mist.getUnitsInZones(redVehicles, {"Some zone"})