|Tutorial Name: Adding AI Trigger Types
Made by: Banshee
Attention! This tutorial was originally made for Intel Classified Website (from PPM) and, later it was made for by Entertainment Explosion. If you wanna post it in your site, ask me first by e-mailing to email@example.com
Adding AI Trigger Types:
AI Trigger Types determines the conditions to AI build your team type. It`s the hardest part of ai.ini, but it was recently supported in Final Alert 2. With Westwood`s help, it was easier to understand these codes.
Note that some settings of AI Trigger Types overrides the settings of Team Types (specially the ones without autocreate).
To make new AI Trigger Types, you need to open your ai.ini if you don`t have Firestorm or your aifs.ini if you have Firestorm and go to the AI Trigger Types and write your new ai trigger type. You don`t need to declare it in lists. Take a look at an example:
080D6920-G=M_Nod tib. refinery attack 2,073AEA00-G,<all>,5,0,PROC,
Huh? What? How?
Too weird, don`t you agree? But I`ve compared some values and we have some translation here:
080D6920-G = Internal name of the Trigger
M_Nod tib. refinery attack 2 = Description made by the editor (can be everything you want)
073AEA00-G = Primary Team-Type used in the trigger.
<all> = Which house builds this?
5 = Minimum tech level required for AI use this trigger.
0 = Type of trigger. It will explain AI when it needs to launch the trigger. This is the main part of the condition to make trigger work (Check below).
PROC = Type of object in the condition to make trigger work (related to type). Use <none> if type is -1, 2, 3 or 4.
0300000003000000000000000000000000000000000000000000000000000000 = Internal data. It says if AI will need more, less, equal number of objects determined also inside it. It`s a huge value splitted in 3 codes (Check below).
[b]30.000000 = Starting weight of the trigger. The higher the weight, the higher the probability of AI build this trigger.
10.000000 = Minimum weight.
70.000000 = Maximum weight.
1 = Available in Skirmish? (1 for yes, 0 for no).
0 = Unknown meaning. It`s 0 for every trigger. (According to Deezire, it`s probably related to AI Generals, yet it`s unknown)
2 = Side that builds this troop. (0 for None, 1 for GDI, 2 for Nod).
0 = Base Defense? (1 for yes, 0 for no)
04173E00-G = Secondary Team-Types used in this trigger.
0 = Easy AI Build this? 1 for yes, 0 for no.
1 = Normal AI Build this? 1 for yes, 0 for no.
0 = Hard AI Build this? 1 for yes, 0 for no.
Type of triggers can be:
-1 = No condition
0 = Enemy owns a certain number of a type of object.
1 = Player house owns a certain number of a type of object.
2 = Enemy`s power is yellow.
3 = Enemy`s power is red.
4 = Enemy owns a certain ammount of cash.
7 = Neutral owns a certain number of a type of object.
The first part of the huge value is the number of objects of the condition in a hex value (use calculator for any help):
X = Hex value (I.e.: "1" or 1, "a" for 10, "f" for 15, etc...)
The second part of the huge value determines the limits for the condition become true:
000000000 = Less than...
010000000 = Less than or Equal to...>
020000000 = Equal to...
030000000 = Greater than or Equal to...
040000000 = Greater than...
050000000 = Not Equal to...
The third part of the huge value has an unknown meaning. Here are some examples generated by Final Sun/Alert2:
So, the rest is a mistery. If you know something that isn`t here, please [url=mailto:firstname.lastname@example.org">e-mail me[/url] to share this information and I will post it here.
- Task Forces (For TS and RA2)
- Script Types (TS Only)
- Team Types (TS Only)
- AI Mini Guide (RA2 Only, but it shows a global use of all parts of ai.ini together which is also interesting for TS modders