FAForever Forums
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Login

    Support ACU Assist order code

    Scheduled Pinned Locked Moved AI development
    5 Posts 2 Posters 626 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      GeneralJenson
      last edited by

      Is there anyone who knows the code to create a specific support acu unit and focus it only throughout its existence as an entity to assist a specific factory in SupCom FA Vanilla Lua Script?

      1 Reply Last reply Reply Quote 0
      • UvesoU
        Uveso
        last edited by

        well, yes and no 🙂

        In case you are coding an AI then yes;
        You have buildconditons and platoon assist functions that can do this for you.

        If you want to make this without the AI background infrastructure then no.
        Those AI functions only work together with a running AI BrainConditonMonitor and other AI stuff.

        But you can add any funtion to any unit if you want. (but you need to write your own functions here)
        So you can add a function only to SubCommanders that will find the next factory and issue an assist order to the unit.
        Or you can run a multithreaded Lua function and scan for idle SACUs and send them to assist what you want.

        Have in mind such functions can't be made as UI mod, it needs to be an SIM Mod.
        That means every player in a multiplayer game must have this mod installed.


        Btw. what do you mean by "create a specific support acu". Do you need a new unit for the assisting or can we use any SACU ?
        What factory should be assisted? The highest Tier level or factories that are actually building something ?
        Should those SACU be able to change the assisting target or just stay with the actual factiory no matter if it builds something or not ?

        1 Reply Last reply Reply Quote 0
        • G
          GeneralJenson
          last edited by

          I am trying to edit the SupCom FA campaign ai scripts. I wanted the ai bases to have SACU assisting factories that builds patrolling units, and main forces. Instead of using the scenario framework engineer assist function. I could just use a scenario utility that will specify a SACU unit to only assist a factory. Problem is I can't find a function that will not affect any engineers other than SACU.

          1 Reply Last reply Reply Quote 0
          • G
            GeneralJenson
            last edited by

            Ow my mistake not scenario framework but with the functions made in basemanager.lua. I can't find any assist only function for SACU exclusively.

            1 Reply Last reply Reply Quote 0
            • UvesoU
              Uveso
              last edited by

              Well maybe the platoon builder has a template that is only using engineers, or Subcommander are excluded from the assist function.

              SACUs are excluded from the engineer platoons here:
              https://github.com/FAForever/fa/blob/deploy/fafdevelop/lua/AI/OpAI/BaseManagerPlatoonThreads.lua#L45

              Also SACUs are not allowed to perma assist a factory:
              https://github.com/FAForever/fa/blob/deploy/fafdevelop/lua/AI/OpAI/BaseManagerPlatoonThreads.lua#L45

              These need to be changed or those functions are useless for platoons with SACUs.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post