Jump to content

Recommended Posts

Posted

Hello,

can anyone point me to a post/wiki that will help me find out how to control an AI aircraft. I want to be able to tell the AI to perform certain turns, like a 3 G turn to the left for 90 degrees. I have a waypoint with an aerobatics sequence in it, but I would like to give the client the option to trigger other sequences.

Thanks,

Fresh

Here is the non-flexible version of my mission: https://www.digitalcombatsimulator.com/en/files/3326105/

Posted

Yea sure, read up on the tasking scripting API, and there's also a big aerobatics task set. Then to implement into F10 you'd need to think about how to structure for control and then insert commands that execute tasks and push them to given AI (missionCommands is the module to use to add F10/Other menu's and commands).

Creator & Developer of XSAF ::An AI model that wants to kill you, and needs no help from humans.

Discord: PravusJSB#9484   twitch.tv/pravusjsb  https://www.patreon.com/XSAF  https://discord.gg/pC9EBe8vWU https://bmc.link/johnsbeaslu

Work with me on Fiverr: https://www.fiverr.com/pravusjsb

  • 3 weeks later...
Posted

Hi Pravus,

thanks for your input. I've spent a while searching for AI Aerobatics API without any luck. Can you send me a URL/Link to help me find the task scripting API?

Thanks,

 

Fresh

Posted

I have some data from a long while ago (below), it used to be a bit crash'y if you tried to get certain frames to barrel roll, your mileage may vary.

There are 3 manoeuvres below taskMaster and I would choose one, update with real-time altitudes and speeds and start orders, then insert where the comment is and push it or set it to the unit as a combo_task and would get good results mostly.

      ['aeroTasks'] =
      {
        ['taskMaster'] = 
        {
          [1] = 
          {
            ["enabled"] = true,
            ["auto"] = false,
            ["id"] = "Aerobatics",
            ["number"] = 1,
            ["params"] = 
            {
              ["maneuversSequency"] = 
              {                      
                ---- this is where i insert...
              },
              ["maneuversParams"] = 
              {
              },
            },
          },
        }, -- eof master
        ['rollLeft'] = 
        {
          ["displayName"] = "Barrel roll",
          ["name"] = "BARREL_ROLL",
          ["params"] = 
          {
              ["InitAltitude"] = 
              {
                  ["order"] = 2,
                  ["value"] = 2500, -- needs group alt
              }, -- end of ["InitAltitude"]
              ["StartImmediatly"] = 
              {
                  ["order"] = 5,
                  ["value"] = 1,
              }, -- end of ["StartImmediatly"]
              ["UseSmoke"] = 
              {
                  ["order"] = 4,
                  ["value"] = 0,
              }, -- end of ["UseSmoke"]
              ["SIDE"] = 
              {
                  ["order"] = 6,
                  ["value"] = 1, -- left side??
              }, -- end of ["SIDE"]
              ["InitSpeed"] = 
              {
                  ["order"] = 3,
                  ["value"] = 950, -- needs curr speed
              }, -- end of ["InitSpeed"]
              ["RollRate"] = 
              {
                  ["min_v"] = 15,
                  ["max_v"] = 450,
                  ["value"] = 90,
                  ["step"] = 5,
                  ["order"] = 7,
              }, -- end of ["RollRate"]
              ["SECTOR"] = 
              {
                  ["order"] = 8,
                  ["value"] = 360,
              }, -- end of ["SECTOR"]
              ["RepeatQty"] = 
              {
                  ["min_v"] = 1,
                  ["max_v"] = 10,
                  ["value"] = 1,
                  ["order"] = 1,
              }, -- end of ["RepeatQty"]
          },                    
        }, -- eof roll
        ['breakRight'] = 
        {
          ["displayName"] = "Military Turn",
          ["name"] = "MILITARY_TURN",
          ["params"] = 
          {
              ["InitSpeed"] = 
              {
                  ["order"] = 3,
                  ["value"] = 950, -- needs speed
              }, -- end of ["InitSpeed"]
              ["InitAltitude"] = 
              {
                  ["order"] = 2,
                  ["value"] = 2200, -- needs alt
              }, -- end of ["InitAltitude"]
              ["StartImmediatly"] = 
              {
                  ["order"] = 5,
                  ["value"] = 1,
              }, -- end of ["StartImmediatly"]
              ["UseSmoke"] = 
              {
                  ["order"] = 4,
                  ["value"] = 0,
              }, -- end of ["UseSmoke"]
              ["RepeatQty"] = 
              {
                  ["min_v"] = 1,
                  ["max_v"] = 10,
                  ["value"] = 1,
                  ["order"] = 1,
              }, -- end of ["RepeatQty"]
              ["SIDE"] = 
              {
                  ["order"] = 6,
                  ["value"] = 1,
              }, -- end of ["SIDE"]
          }, -- end of ["params"]
        }, -- eof break right  
        ['rollRight'] = 
        {
          ["displayName"] = "Barrel roll",
          ["name"] = "BARREL_ROLL",
          ["params"] = 
          {
              ["InitAltitude"] = 
              {
                  ["order"] = 2,
                  ["value"] = 2500, -- needs group alt
              }, -- end of ["InitAltitude"]
              ["StartImmediatly"] = 
              {
                  ["order"] = 5,
                  ["value"] = 1,
              }, -- end of ["StartImmediatly"]
              ["UseSmoke"] = 
              {
                  ["order"] = 4,
                  ["value"] = 0,
              }, -- end of ["UseSmoke"]
              ["SIDE"] = 
              {
                  ["order"] = 6,
                  ["value"] = 0, -- right side??
              }, -- end of ["SIDE"]
              ["InitSpeed"] = 
              {
                  ["order"] = 3,
                  ["value"] = 950, -- needs curr speed
              }, -- end of ["InitSpeed"]
              ["RollRate"] = 
              {
                  ["min_v"] = 15,
                  ["max_v"] = 450,
                  ["value"] = 90,
                  ["step"] = 5,
                  ["order"] = 7,
              }, -- end of ["RollRate"]
              ["SECTOR"] = 
              {
                  ["order"] = 8,
                  ["value"] = 360,
              }, -- end of ["SECTOR"]
              ["RepeatQty"] = 
              {
                  ["min_v"] = 1,
                  ["max_v"] = 10,
                  ["value"] = 1,
                  ["order"] = 1,
              }, -- end of ["RepeatQty"]
          },                    
        }, -- eof roll
      },

 

Creator & Developer of XSAF ::An AI model that wants to kill you, and needs no help from humans.

Discord: PravusJSB#9484   twitch.tv/pravusjsb  https://www.patreon.com/XSAF  https://discord.gg/pC9EBe8vWU https://bmc.link/johnsbeaslu

Work with me on Fiverr: https://www.fiverr.com/pravusjsb

  • 1 month later...
Posted
On 6/2/2023 at 11:52 PM, PravusJSB said:

I have some data from a long while ago (below), it used to be a bit crash'y if you tried to get certain frames to barrel roll, your mileage may vary.

There are 3 manoeuvres below taskMaster and I would choose one, update with real-time altitudes and speeds and start orders, then insert where the comment is and push it or set it to the unit as a combo_task and would get good results mostly.

 

Hey mate - thanks for posting this - I had been looking for aerobatics task details for a while. Since you seem to know what you are doing, I wondered if you have a method to retrieve the active task, either through a framework (Mist, MOOSE, whatever really) or directly? I mean you can setTask / pushTask, you can popTask and you can interrogate existence of one with getTask but I can't seem to find a way to retrieve all or at least the top task table. Any insight? Thanks in any case!

Posted

There's no currently visible method in Lua scripting to query current task's. Your best bet is to write a little tracker class that holds info of what you've sent/pushed yourself, assuming you're tasking yourself in script rather than the ME.

Creator & Developer of XSAF ::An AI model that wants to kill you, and needs no help from humans.

Discord: PravusJSB#9484   twitch.tv/pravusjsb  https://www.patreon.com/XSAF  https://discord.gg/pC9EBe8vWU https://bmc.link/johnsbeaslu

Work with me on Fiverr: https://www.fiverr.com/pravusjsb

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...