Dragon029 -> RE: Command AI [Beta] (11/22/2017 12:59:52 AM)
|
I tried out the AI and it works great! It does sometimes do silly things, but it did manage to eliminate all flying red air in 4 simulated hours and (with some Time to Ready cheats) destroyed 100% of red air / naval assets within 8 simulated hours. I haven't looked much through the code (there's a fair bit), but I did examine your scenario to observe how the Lua script was implemented in regards to events, triggers and actions and I ended up being able to create my own scenario that implements the AI. I understand that this is a work in progress, but I hope you don't mind if I provide a guide for others? To implement angster's AI as of the time of this post (22 November 2017): 1. Go to angster's scenario, go to Editor / Event Editor / Actions, go to edit each of the 3 actions and copy the Lua scripts into separate Notepad (or an equivalent text editor) files (for ease of storage). Also be sure to record the names of each action / Lua script (I list them below though). Once you have the Lua code, exit out. 2. Create a new scenario (with any name), with 2 sides: "Blue Force" and "Red Force"; set them to be hostile to one another but skill level, etc can be whatever you want. 3. Go to Editor / Event Editor / Actions and recreate the 3 actions from the original scenario (remember that you have to select "Lua script" from the dropdown box before you can click the "Create new action:" button). When creating these actions, be sure to have "Load Functions - DBLoad Override", "Load Functions - Merimack Monitor AI" and "Update AI Functions" as the 'description' of each action. Lua script goes into the big blank box. 4. Go to Editor / Event Editor / Triggers; here we need to create 3 triggers: a)"Scenario is Loaded" - select that from the dropdown box and create it; nothing else required, b)Select 'regular time' and create a new trigger, put "Trigger - Every Five Seconds" into the description and from the dropdown box, select 'Five Seconds', c)Do the same as last time, but give it the description of "Trigger - Load Every Minute" and set it to fire every 'one minute'. Once those 3 are created, exit out of that window. 5. Go to Editor / Event Editor / Events; here we need to create 2 events: a)Description = "Loading AI Scripts", only tick the 'Event is active' and 'Event is shown in Log' boxes, leave probability at 100%. For the triggers, add "Trigger - Every Five Seconds". For the actions, add "Load Functions - DBLoad Override" and "Load Functions - Merimack Monitor AI". Then click OK. b)Description = "Update AI", only tick the 'Event is repeatable' and 'Event is active' boxes, leave probability at 100%. Add the trigger "Trigger - Load Every Minute" and the action "Update AI Functions", click OK. 6. Create your scenario; as angster alluded, you can use whatever units you want, not just the ones in the demonstration scenario. Do not run the scenario yet. 7. Create 4 reference points on the map for Blue Force, they must be named "AI-AO-1", "AI-AO-2", "AI-AO-3" and "AI-AO-4". As their name suggests, these points will mark out the area of operations for the AI. I haven't done enough testing to fully 100% understand how the AI treats this area, but it should essentially envelope all of the airspace that you want Blue Force to recon, defensively protect and offensively engage within. Once it has those 4 reference points, it'll generate its own mission areas inside and outside the AO (SEAD / DEAD missions inside it, support missions like AEW outside it). Once that's done, you're done and you can try the scenario out - as a reminder, only Blue Force will be the smart AI; you have to control Red Force or otherwise set up conventional missions for them (it shouldn't be super hard to edit "Load Functions - Merimack Monitor AI" and have both sides be AI, but I haven't attempted that). Edit: Also I should add for those that have been having issues, that angster's [originally posted] scenario runs DB3000 build 469 and ran fine on my copy of CMANO (v1.13 - Build 972.5). My own scenario using his AI worked fine on DB3000 build 470 as well.
|
|
|
|