Jump to content

Can the AI be more inteligent?


Recommended Posts

Ive been playing in Single Skirmish games with the AI patch which improves the game, but the AI limits its number of buildings to one...only sometimes builds 2 sub-house or 2 factory. I was wondering if there is a way to make the AI starts to do these thing:

-Build 3 buildings each

-expands to another base

-use more air units (harkonnen for example) and place them in the lauchpad to load weapons again

-change the way AI attacks using better combinations

Do these changes modify only the rules.txt?

Link to comment
Share on other sites

To do those changes you must change files found in the /AI directory. There are many files that control unit formation attacks as seen in Appo's AI Patch and the expert is Appolyon on this subject.

Then there is the ai_difficulty.txt file.

This file controls the AI at the various Tech levels (Skirmish is either 7 or 8 depending on Superweapons being on or off) how many units/buildings it can build, plus the time between builds, plus how many attacks it can launch at the same time.

See below for all parameters that can be changed:

// ai_difficulty.txt

// Sets values for different tech levels to allow the difficulty of the AI to be altered

// MaxAiUnits is Total units AI side can have at any one time

// NumBuildings is How many buildings AI should build : 5 gives only barracks units, 7 gives factory , 10/11 gives hanger

// BuildingDelay is Ticks the AI waits before placing another building or creating a unit

// MaintenanceDelay is As above when in maintenance mode (3000=2 mins)

// MaxScriptsToRunAtOnce is How many pro active scripts (attack formations) can run at once

// FirstAttackDelay is Ticks until first base attack allowed

// GapBetweenNewScripts is Ticks before trying to choose a new script tactic

// UnitDelay is ticks between building units

// MinimumUnitsForDefence - sets min

// MaximumUnitsForDefence - sets max defensive units, ratio in ini file is also used

// MaxTurretsAllowed - allows a max to be set per tech level

I modified this file for ICW mod.

The final file tells the AI what type of buildings to build and when and the types of units to build as follows:


Core=10 // Buildings like the outpost, required to build other buildings was 17

Defence=25 // Additional turrets etc to the wall defences was 16

Manufacturing=40 // Barracks, Factory , Starport, hanger etc. was 41

Resource=25 // Refinery etc. was 26


Foot=20 // foot soldiers

Tank=70 // quads etc.

Air=10 // Aircraft, was 4

Special=0 // e.g. Engineer, Carryall, stuff that needs code to control it

This is the version from my ICW mod, I seem to remember that the aircraft number is very low (less than the 10% shown above) and thus it tends not to attack in more two's...(combined with the attack formation file relating to aircraft attacks).







The above dictates the building order (each building in the Rules.txt is defined as Core, Manufacturing, Resource etc). To push subhouses you could edit the Rules.txt, add new definitions for subhouse and then add it to the Startscript....

As you can see there is a lot of work involved in upgrading the AI.

Hope this helps.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.