What Makes AI? [A Guide On Learning Supcom AI]

Moderator: Uveso

What Makes AI? [A Guide On Learning Supcom AI]

Postby Azraeel » 04 Nov 2019, 03:22

Supreme Commander AI

Supreme Commander AI is very unique, You never get one behavior out of it. A Simple line change in the code can make the AI act completely different. A Lot Of People don't know, How AI Truly Works in Supcom... So Today I Will Be Explaining :)


Lets start off with the basics

Supreme Commander AI works through LUA Code. These AI's work through Basetemplates, That grabs AIBuilders and AIBuilderGroups... AIBuilderGroups hold the information to build units, structures, defenses, and more! Priority is also important is decides what the AI does first!

AIBuilders look like this: Image

AIBuilders have Build Conditions that are programmed from the Editor File that holds the UnitCountBuildConditions.lua or EconomyBuildConditions.lua and etc

These affect when these Units, Structures, and etc are Built and why they are built. Builders can adaptive to if the enemy has "This or That." Example: If You set the Builder to build a Factory when the enemy has more factories then your ai does, or Building SMD when Nuke Launcher Spotted...

Next is Platoonformers... PlatoonFormers take Units, Structures, and etc and makes them do stuff like Attacking Building and more. They basically order units to do stuff...

Here is an Example: Image

This is a raid platoon, it does from Mass Marker to Mass Marker Looking for Enemy Mexes To Raid... It avoids bases in a radius and tries to skirt around and raid the enemy. It can also hold mexes to stop enemy from recapturing them.

Next is Platoon Templates... Platoon Templates are what can get assigned to the Platoon that the PlatoonFormer has assigned to it. It also has the plan of how it behaves. Plans are what are used to make it think.

Here is an Example: Image

Platoon Templates can have min and max number of units assigned to that Platoon. They can assign use a formation like Attack or Growth. It can also pick from Categories of units like Indirectfire units or directfire units.


Expansions

Expansions are good for expanding swarm's eco and land. Expansions are entirely different bases that act on there own. They have there own Basetemplates and everything. Expansions can be very useful to the ai. Note: All Start Markers are counted as Expansions ;) . Engineers can set up these expansions using builders like this.

Image

Expansions can have many requirements and have tons of builderdata.
BuildStructures = {
'T1LandFactory',
'T1Radar',

Determines what the engineer that sets up the base builds. Only the First Engineer!

LocationType = 'LocationType',
ThreatMin = -1000,
ThreatMax = 100,
ThreatRings = 1,

This determines if the engineer will go there, it will not go there if the threat is high :D. Meaning if units are there, the engineer will not go there. ;)


I'll be updating this with more and more information as time goes on :shock:
viewtopic.php?f=88&t=18142 | Swarm Developer

https://discord.gg/29VeeN5 | Project Galactic

https://discord.gg/ChRfhB3 | AI-Development Server
User avatar
Azraeel
Avatar-of-War
 
Posts: 58
Joined: 19 Jun 2019, 06:47
Location: Ottawa, Canada
Has liked: 15 times
Been liked: 8 times
FAF User Name: Azraeelian-Angel

Return to AI modifications

Who is online

Users browsing this forum: No registered users and 1 guest