|
|
| PURPOSE: The AI.INI file contained within Tiberian Sun contains the scrips which make the computer sides work. These are in addition to any specific scripts that may be contained within specific maps. This file controls the production and replacement of units as well as the specific missions that these units will go on. This section will be only the briefest introduction to this file, and as more information is revealed additional sections will be added. |
| GENERAL ORGANIZATION: There are several blocks inside of AI.INI, they are Taskforces, ScripTypes, TeamTypes and AITriggerTypes. Those of you who remember hacking Tiberian Dawn maps have seen early versions of these already. Except for the AITriggerTypes, each of these blocks starts out with a list of all of the entries that are contained within them. Lets take a closer look at each of these blocks. |
TASKFORCES: This block describes the specific units that will make up each team. As you can see for the following examples, this is a pretty simple section to understand. First comes the entry id, then the name, then a list of units to build, and then a "Group" setting.
[07F3CAE0-G]Name=1 sub. APC, 3 lt, 2 cyborgs 0=2,CYBORG 1=3,E1 2=1,SAPC Group=-1 |
SCRIPTYPES: These entries decribe what the team members are going to try to do. This section is a little dense, but you can see that each script consists of a list of action codes. In time we will determine what each code means. For now, don't play with this section.
[07F7D0D0-G] Name=Aerial base attack 0=0,2 1=0,1 [07F7E3B0-G] Name=Vehicle attack 0=0,5 1=0,1 [0960AAA0-G] Name=APC/thief steal vehicles 0=14,0 1=47,1 2=49,0 3=8,2 4=0,5 |
|
TEAMTYPES:Now we come to the meat of the AI, these entries match up units and jobs and send them out. Let's take a look at some of the keywords.
Aggressive appears to control guard mode.Some teams are, some arn't. Annoyance is set to "no" in every entry, which means that the default may be "yes". What this does is unknown, perhaps a form of "harass", or the unit starts telling really bad joke. AreTeamMembersRecruitable controls if another team can steal units away. This appears to to "yes" for every entry, so the default must be "no". Autocreate is set to "no" in every entry, which means that the default may be "yes". This may turn the team into one that is created based on time instead of triggers. AvoidThreats seems to control weither or not the unit stops to return fire with every unit along it's trip. Only certain attacks have this set to "yes". Droppod says if these team members arrive in a Drop Pod. None of the entries has this set to "yes". This is probibly only used in single player maps. Full is set to "no" for every entry. I suspect that this is used for things like Weed Eaters arriving with full loads. Group is set to "-1O" for nearly every entry except a number of GDI "pools", which are "-40094". What this does not not totally clear, but it may be used for production control. Negative numbers may indicate computer contolled sides. GuardSlower is set to "no" for every entry, so the default must be "yes". May control reaction time. House controls which side gets this team. This is where an addition side would be specified. IonImmune probibly means that these team members ignore the effects of Ion Stroms. Every entry has this set to "no", so the default may be "yes". IsBaseDefense determines if this team hangs around to defend the base. This is set to "no" except for "pool" teams. Loadable may control if non-team members can get onto the same transport. All entrys have this set to "no". LooseRecruit is set to "no" for every entry. May control how easily units can be peeled off of this team. Max appears to be the limit on the number of this type of team to build at a time. The values range from "1" to "3". Name is a quick description of the team, such as "H_GDI APC/commando attack". Useful for finding the right one to play with. OnlyTargetHouseEnemy probibly stops the teams from attacking neutrals. Every entry in AI.INI has this set to "yes". OnTransOnly probibly says that this team can only arrive on some kind of transport. No entries in AI.INI have this set to "yes". Prebuild probibly means that this team is contructed before the player sees the map. Ebery entry in AI.INI has this set to "no". Priority is probibly the build priority for this team. The values used are "4", "8" and "12". Recruiter probibly means that this team can call up loose units to form it rather than build new ones. Every entry has this set to "no". Reinforce is set to "no" in every entry. It probibly controls when EVA says "reinfocements have arrived". Script specifies the actions taken by this team. The details are given in the Script section above. Suicide probibly tells this unit to ignore any damage and keep on going. Most entries have this set to "yes". TaskForce describes the units that make up this team. The details are given in the Task Force section above. TechLevel is the lowest tech level that this team is available at. All of the entrys in AI.INI have this set to "0". This probibly overrides the tech leveles in RULES.INI to make production more restrictive. TransportsReturnOnUnload tells the transport unit (normally some kind of APC) to return to base after unloading the rest of the team. VeteranLevel is set to "1" for all of these entries. Probibly controls the Vetran status, and thus could be either a "2" or "3". Whineris set to "yes" for "pool" teams and "no" for those with active jobs. I guess busy units don't have time to whine. |
AITRIGGERTYPES: These control the "when" of the AI and are just as complex as they were back in the Tiberian Dawn days. Only WestWood has a total understanding of how these work, and I suspect that they need some good cheat sheets to beat these into submission. Bottom line, don't mess with these without a backup. Here's a sample, remember this is only ONE entry:
09EEBCD0-G=M_GDI base air defense 3,084E4F50-G, |
SUMMERY: What can we do with this file given our incomplete understanding? Actually, we can do some pretty nifty things. For example, we can make the AI build all of those "new" units we've been putting together. To do this we take a copy of the AI.INI file (always keep a unmodified "gold" copy safely hidden away) and add a few units to the Task Force sections. Here's a "before" and "after" look at an example:
; this is the before [0846A4D0-G] Name=1 attack cycles 0=1,BIKE Group=-1 ; this is the after [0846A4D0-G] Name=1 attack cycles 0=1,BIKE 1=2,1TNK 2=1,MRJ 3=1,FTNK Group=-1Now whenever the AI goes to build an Attack Cycle, it will also build two Light Tanks, a Mobile Radar Jammer and an old Flame Tank. Of course, all of the "new" units MUST be working correctly or the game will become confused. And if that happens, it dies. This means that the AI.INI file should be the LAST file that you modify. If you follow all of the steps then you should have the AI pumping out anything you want. |
|
|