Forged Alliance Forever Forged Alliance Forever Forums 2019-11-28T10:46:34+02:00 /feed.php?f=41&t=18449 2019-11-28T10:46:34+02:00 2019-11-28T10:46:34+02:00 /viewtopic.php?t=18449&p=180041#p180041 <![CDATA[Re: How to make AI use for a custom fraction ??]]> I`m tested and stock AI and Sorian AI. Аll that you showed, I found in stock AI code and Sorian AI code, but nothing has changed.
Maybe I haven’t added anything to the stock code yet?

Statistics: Posted by Mavr390 — 28 Nov 2019, 10:46


]]>
2019-11-28T04:59:20+02:00 2019-11-28T04:59:20+02:00 /viewtopic.php?t=18449&p=180039#p180039 <![CDATA[Re: How to make AI use for a custom fraction ??]]>
First i hope you have no errors inside the error log.
Any error can prevent the ACU from moving!

Normaly the AI starts to use the ACU with the Initial platoon builder.

As example:
If you start a game with an AI Rush then the AI will choose the "Land Rush Initial ACU Builders"
https://github.com/FAForever/fa/blob/de ... s.lua#L215

This platoon builder will build the first factory and energy:
https://github.com/FAForever/fa/blob/de ... s.lua#L232

This platoonbuilder will also add a special function called "CommanderBehaviorImproved":
https://github.com/FAForever/fa/blob/de ... s.lua#L221

This function will control the ACU for fighting and moving in case the ACU is not building something.

Statistics: Posted by Uveso — 28 Nov 2019, 04:59


]]>
2019-11-28T04:25:26+02:00 2019-11-28T04:25:26+02:00 /viewtopic.php?t=18449&p=180037#p180037 <![CDATA[Re: How to make AI use for a custom fraction ??]]> I did as you said, but when the game starts, ACU appears and does not move. What and where should I add to the code so that it behaves like other ACU ???

Statistics: Posted by Mavr390 — 28 Nov 2019, 04:25


]]>
2019-11-28T00:27:34+02:00 2019-11-28T00:27:34+02:00 /viewtopic.php?t=18449&p=180034#p180034 <![CDATA[Re: How to make AI use for a custom fraction ??]]>
you only need unitplatoons to make the AI using your custom units.

You can use Nomads as example.

Here is the AIR platoon file for nomads:
https://github.com/FAForever/nomads/blo ... plates.lua

In line 129 starts the table for air scout units as example:
https://github.com/FAForever/nomads/blo ... s.lua#L129

Nomads is added simply as 5. table.
In case you want your own air scout unit used from the AI simply add it to the table.
If you new Faction has the name "Marver" and your airscout has the unitID "ABC1234" then you need to add this table:
Code:
        Marver = {
            { 'abc1234', 1, 1, 'scout', 'GrowthFormation' }
        },

Now if the AI plays the faction Marver and it want to build an Air scout it will know that your air scout has the unitID ABC1234 and will build it.

Thats all :)

Statistics: Posted by Uveso — 28 Nov 2019, 00:27


]]>
2019-11-27T10:25:33+02:00 2019-11-27T10:25:33+02:00 /viewtopic.php?t=18449&p=180013#p180013 <![CDATA[Re: How to make AI use for a custom fraction ??]]> https://discord.gg/7rBR3fH
https://discord.gg/zFEdTHD
https://discord.gg/UQfEVky

Statistics: Posted by ZLO_RD — 27 Nov 2019, 10:25


]]>
2019-11-27T09:26:05+02:00 2019-11-27T09:26:05+02:00 /viewtopic.php?t=18449&p=180012#p180012 <![CDATA[How to make AI use for a custom fraction ??]]> I`m created custom fraction, but I don’t know how to make AI use it.
Please tell me how to do this.

Statistics: Posted by Mavr390 — 27 Nov 2019, 09:26


]]>