FransBots 20250308!

5 new bots for OpenRA Red Alert 20250303

Information and discussion for custom maps and mods.
Post Reply
fransotto
Posts: 13
Joined: Fri Jan 21, 2022 8:57 pm

FransBots 20250308!

Post by fransotto »

Fransbot 20250308

Bots for OpenRA Red Alert!


In addition to the standard ”Rush AI, Normal, Turtle AI and Navy AI” you get 5 more bots to fight against.

Battle bots that use engineers, thieves, medics and technicians and even Tanya! They have all distinct attack forces with a broader selection of units and smarter use of atomic bomb… All of them expand which makes them much more resiliant on larger maps and late games.

The bots beat the default AIs on regular basis. There are no ”bonus” for these bots -only tweaked base building, unit building and economic handling for maximum skirmish fun!

Install by replace the ”AI.yaml” located in ”C:\Program Files\OpenRA\mods\ra\rules” (or similiar folder). Dont forget to copy and save the original file!


What you will get;


”Air AI”
-Attack: Frequent small well all-rounded forces with assistance from air. Targeting Harvesters and Construction Yards.
-Early game: Normally starts with an engineer trying to capture construction yards or oil derricks.
-Navy: No
-Thieves: Yes
-Mines: Yes
-Base expanding: Slow

”Horde AI”
-Attack: Mainly Soldiers, Rocket and Artillery; Waves after waves...
-Early game: Focus on pump out basic units as soon as possible.
-Navy: No
-Thieves: No
-Mines: No
-Base expanding: Slow

”Base AI”
-Attack: Keeps the units home, mostly defending but left alone it will attack with great force.
-Early game: Focus on economic to get defense and MCV in mid-game.
-Navy: No
-Thieves: No
-Mines: No
-Base expanding: Fast

”Tech AI”
-Attack: Small forces of high end units.
-Early game: Focus on economic in order to support all the high tech units and buildings.
-Navy: No
-Thieves: Yes
-Mines: Yes
-Base expanding: Slow

”Raid AI”
-Attack: Constant with small forces.
-Early game: Focus on pumping out engineers and thieves to claim and capture buildings. This bot normally does not survive in the long run. Great bot as a team member!
-Navy: No
-Thieves: Yes!
-Mines: Oh, Yes!
-Base expanding: Fast


Have fun and let me know if you think about the bots!

Which is hardest to beat?
Attachments
ai.zip
(5.5 KiB) Downloaded 468 times

abcdefg30
Posts: 664
Joined: Mon Aug 18, 2014 6:00 pm

Re: FransBots 20250308!

Post by abcdefg30 »

Nice to see you are still updating these :bana:

fransotto
Posts: 13
Joined: Fri Jan 21, 2022 8:57 pm

Re: FransBots 20250308!

Post by fransotto »

abcdefg30 wrote:
Sat Apr 26, 2025 4:45 pm
Nice to see you are still updating these :bana:
Thanks abc.. :)

I understand it might be some fibbling with files as you cannot play online while have the bots installed.

How to add these bots to a specific map?

abcdefg30
Posts: 664
Joined: Mon Aug 18, 2014 6:00 pm

Re: FransBots 20250308!

Post by abcdefg30 »

fransotto wrote:
Tue Apr 29, 2025 11:24 am
I understand it might be some fibbling with files as you cannot play online while have the bots installed.

How to add these bots to a specific map?
Sorry for the late response. You can add them to a map by unzipping the .oramap, adding "Rules: rules.yaml" to your map.yaml file, then creating a rules.yaml file in the map with the contents of your ai.yaml. Then rezip the file as .oramap (the easiest is to use the Map Editor to save the map as unpacked, and then afterwards save it again as packed).

Therapist
Posts: 15
Joined: Wed Jun 10, 2020 6:39 am

Re: FransBots 20250308!

Post by Therapist »

Nice, these AI bots should be added to the game by the devs.

User avatar
Punsho
Posts: 172
Joined: Wed Jul 18, 2018 2:56 pm
Location: Lithuania

Re: FransBots 20250308!

Post by Punsho »

Someone needs to make a github Pull Request

User avatar
Mechanicat
Posts: 8
Joined: Tue Jan 07, 2025 3:36 pm
Location: Earth, Sol system

Re: FransBots 20250308!

Post by Mechanicat »

lots of odd things going on with these bots. there are errors:
actors being listed for the wrong types,
like Dtrk being given as AirUnitsTypes for the Air ai,
fix, atek, stek being declared as ProductionTypes for BaseBuilderBotModule@horde, was they meant to be ProtectionTypes: instead ?,
references to actors not existing in vanilla RA,
like in SquadManagerBotModule@air there is NavalUnitsTypes: e42
or declarations missing a : at the end,
like UnitBuilderBotModule@air doesnt have it,
a CaptureManagerBotModule that included mech units but declared no any eligible target for them to capture,
if you declare a structure a limit of 0 under BuildingLimits you probably dont need to assign any BuildingDelays for it,
spelling mistakes and typos,
Produsctionmincashrequirement: at UnitBuilderBotModule@tech
under SquadManagerBotModule@tech: there is IgnoredEnemyTargetTypes: AirborneActor, given, without any further in the list,
etc. etc.

fransotto
Posts: 13
Joined: Fri Jan 21, 2022 8:57 pm

Re: FransBots 20250308!

Post by fransotto »

Mechanicat wrote:
Sun Jun 22, 2025 2:19 pm
lots of odd things going on with these bots. there are errors:
actors being listed for the wrong types,
like Dtrk being given as AirUnitsTypes for the Air ai,
fix, atek, stek being declared as ProductionTypes for BaseBuilderBotModule@horde, was they meant to be ProtectionTypes: instead ?,
references to actors not existing in vanilla RA,
like in SquadManagerBotModule@air there is NavalUnitsTypes: e42
or declarations missing a : at the end,
like UnitBuilderBotModule@air doesnt have it,
a CaptureManagerBotModule that included mech units but declared no any eligible target for them to capture,
if you declare a structure a limit of 0 under BuildingLimits you probably dont need to assign any BuildingDelays for it,
spelling mistakes and typos,
Produsctionmincashrequirement: at UnitBuilderBotModule@tech
under SquadManagerBotModule@tech: there is IgnoredEnemyTargetTypes: AirborneActor, given, without any further in the list,
etc. etc.
Hello Mechanicat! Thanks for the comments.

Yes, its true there are some odd things in the files.

First of all I know _nothing_ about coding. All entries are trial and error from my side. -I make changes, start a game, observe the AI and take notes, rinse and repeat.

I am using notepad. I cannot get the "Lua for openra" to work.

But the bots are working as intendent -at least on my computer and my local lans.

Some comment:

Demolition truck is put under "airunitstype" because I want it to attack itself deep into enemy base. Else its clump up with the rest of the land units and blows them all up.. It works so I leave it.

Yes, by putting those units under "production" the AI will not produce those buildings if there are not enough money, preventing the AI to stall, also its a way to force the bot to a certain build order.

The Navalunitstypes I am using for for a "second group" of attack force with different target. It works quite well with the "HordeAI" there the artilleries is going after fixed defense strucktures... The "e42" is a leftover from experiments, as I am trying desperatly to get the Airunits to do something else than mindless kamikazes..

The structure limits are there because its easier for me to adjust if required. Also I notice if I put "0" there are no risk the bot get feeling and build it anyway (which it does sometimes).

Capturemanagerbotmodule -I just notice that the mechanics works better when they are on this list, as it not giving any errors I left it. I am happy I got an bot that captures derricks, buildings, harvesters and healing itself...

Yea, spelling errors... Notice the same so now that part is working better (next version).

Anyway, a new version is incoming! I have manage to understand base expansion, economics of the bots so now they are better on small maps as on big maps. The nuke decision and support bombing are also better. I have given up the airunits as I notice the bots cannot really handle more than one airunits at the time (ie they will not land for rearm properly) so I am working with some workaround.

I will also add the bots to some maps because then peoples does not need to play around with files when playing online. Any suggestions?

Stay tuned, update incoming! :)

User avatar
Mechanicat
Posts: 8
Joined: Tue Jan 07, 2025 3:36 pm
Location: Earth, Sol system

Re: FransBots 20250308!

Post by Mechanicat »

fransotto wrote:
Mon Jun 23, 2025 9:23 am
First of all I know _nothing_ about coding. All entries are trial and error from my side. -I make changes, start a game, observe the AI and take notes, rinse and repeat.
Massive +respect
I am using notepad. I cannot get the "Lua for openra" to work.
May i recommend you Notepad++, its very convenient to use.
Demolition truck is put under "airunitstype" because I want it to attack itself deep into enemy base. Else its clump up with the rest of the land units and blows them all up.. It works so I leave it.
Ahh, thats rather very clever.
Yes, by putting those units under "production" the AI will not produce those buildings if there are not enough money, preventing the AI to stall, also its a way to force the bot to a certain build order.
I love it when people discover such hidden functions. So there was a means of more intelligent basebuilding for the AI all along. :lol:
The Navalunitstypes I am using for for a "second group" of attack force with different target. It works quite well with the "HordeAI" there the artilleries is going after fixed defense strucktures...
Ive seen this getting done by declaring a seperate SquadManager that then mutually excludes the first group, by setting up very long lists of excluded units for both. Nice to see you discovering a perhaps more convenient way of doing that.
The "e42" is a leftover from experiments, as I am trying desperatly to get the Airunits to do something else than mindless kamikazes..
Seems to be impossible right now.
The structure limits are there because its easier for me to adjust if required. Also I notice if I put "0" there are no risk the bot get feeling and build it anyway (which it does sometimes).
It still does that :? oh, noe. i thought that was supposed to get patched out by now.

One more question, at some of the AI BaseBuilderBotModule i see
WaterTerrainTypes: Water, ground
both getting declared, what purpose does that serve ? (btw the ground is probably a typo, the G has to be large to match the terrain type string)

fransotto
Posts: 13
Joined: Fri Jan 21, 2022 8:57 pm

Re: FransBots 20250308!

Post by fransotto »

Hi Mechanicat,
Massive +respect
Thanks for the kind words.
May i recommend you Notepad++, its very convenient to use.
..I use "Visual studio" now but I cannot get it work with yaml even if I have downloaded the extension.
Ahh, thats rather very clever.
Nah, the SquadManagerBotModule is so strange. It mostly comes down to the value of "AttackForceInterval" once that one is tuned the naval and air part is not needed anymore (to some extend). Next version of Fransbot I almost not use that part at all...
I love it when people discover such hidden functions. So there was a means of more intelligent basebuilding for the AI all along. :lol:
Thanks, well BaseBuilderBotModule works like this (my observations, obs I dont know coding); It priorities all buildings mentioned in the "ProductionTypes" in case the NewProductionCashThreshold is high enough. It build something random from there. In case not the botmodule start look at the "BuildingFractions" and build something random based on the fraction _and_ building limit. Defensetypes can be used to place certain buildings closer (or away) from enemy. The Module also take the delays into account but that part behave strange in case you have two bots of "same kind". I have also noticed there are other "botModules" that does not really work well in case there are several modules (capture and supportpower for example with "same ID/name" on the map.

Question: Are there any way to give the "botmodules" a unique ID (ie the word after @) once the game starts? As per now all my "Air AI" have for example "BaseBuilderBotModule@air" it would be nice if this could be change to like ""BaseBuilderBotModule@air_player4" in order separate all the modules.
Ive seen this getting done by declaring a seperate SquadManager that then mutually excludes the first group, by setting up very long lists of excluded units for both. Nice to see you discovering a perhaps more convenient way of doing that.
Yes, thanks. I learned something new there. Next version each bot have around 4-5 squadmanagers, on top of that I have cloned some units to give them unique names so similiar/same unit can participate in different squads.

Question The "MaxBaseRadius" in the SquadManagerBotModule seem to tell the radius around the basebuilder the bot should look for units to form a squad. Am I right? The trait description seem off on the site https://docs.openra.net/en/release/traits.
Seems to be impossible right now.
I manage a pretty decent workaround using the "IdleBehavior: ReturnToBase" on the aircraft itself together with AttackForceInterval tuning. The aircrafts have strange behavior in case they manage to "land" before they get a new attackorder, however nothing you really notice while playing. -Now a single AI Yak can snipe 3-4 rocketeers before being downed itself, if its survives it goes home and reload and almost immedlty goes out for hunting again.. Pretty nasty to play against.. :)
It still does that :? oh, noe. i thought that was supposed to get patched out by now.
Maybe it has, I keep it does not hurt and easier for me to adjust or add/remove in case I have to,

Next release will be decent and the best to date, There are a new bot in the family called "Fleet AI" that focus on the navy + heavy defense. All navy units are in squads and the air units focusing on support these squads, due to this new member I had to alter the other bots to at least do some navy. -which required quite a lot alteration, but it become quite ok.

Another "feature" I am proud of is the new engineer. I cloned that unit and gave it about 20 in "RevealsShroud" this together with "CheckCaptureTargetsForVisibility true" makes the bot to claim and capture close by oil derricks at early stage. The old engineer is still there trying to capture enemy base and oil derricks far away (still total random though..) but this engineer-clone have have made the game more enjoyable -especially on 1v1 maps. :)

User avatar
Mechanicat
Posts: 8
Joined: Tue Jan 07, 2025 3:36 pm
Location: Earth, Sol system

Re: FransBots 20250308!

Post by Mechanicat »

fransotto wrote:
Tue Jul 01, 2025 5:05 pm
I have also noticed there are other "botModules" that does not really work well in case there are several modules (capture and supportpower for example with "same ID/name" on the map.
From my experience, as long they are setup so as to not overlap, they tend to function well, or rather at the least: 'as intended'
You can have two seperate capture modules running for the RA engineer and thiefs as their capturer and capture target types are seperate of each other.
Question: Are there any way to give the "botmodules" a unique ID (ie the word after @) once the game starts?
You can assign AI a random different name plate if you wish, but lua was involved.
And ofcourse i do not remember where in which mod-map out of hundreds i had ever seen that one being in use.
Yes, thanks. I learned something new there. Next version each bot have around 4-5 squadmanagers, on top of that I have cloned some units to give them unique names so similiar/same unit can participate in different squads.
You didnt need to do that, as they already can be part of different squads when you did have not exclude them.
Question The "MaxBaseRadius" in the SquadManagerBotModule seem to tell the radius around the basebuilder the bot should look for units to form a squad. Am I right? The trait description seem off on the site https://docs.openra.net/en/release/traits.
The trait descriptions on there generally seem to be correct. if you have any doubts as on what a trait actually does can always open up its .cs file to take a look at yourself. Thats after finding it inside the engine\ folder of OpenRA Modding SDK after having used the build command once.
Another "feature" I am proud of is the new engineer. I cloned that unit and gave it about 20 in "RevealsShroud" this together with "CheckCaptureTargetsForVisibility true" makes the bot to claim and capture close by oil derricks at early stage.
I have a feeling similar result could be achieved by assigning a RevealsShroudMultiplier with ai-only condition given to activate.

Post Reply