Jump to content

Allying with the AI in Tiberian Sun


DarkVen9109

Recommended Posts

Have you ever wondered on why alliance in skirmish games are impossible? Or you were always curious on how you wish Tiberian Sun would have an alliance with an AI? Well, this tutorial will help you team up with an AI in Tiberian Sun without any chances of occuring crashes, however, there will be limitations though.

 

1) You can only team up with one AI.

2) You can only team up with an opposing side (GDI > Nod). GDI > GDI and Nod > Nod alliances WON'T WORK!

3) This must be enabled on all maps.

 

First Step

Open your rules.ini and hit ctrl + F [infantryTypes], then add this.

[infantryTypes]
999=INFORM

 

then this.

[iNFORM]
Name=
Image=E1                ;should use an invisible infantry SHP here
Category=Support
Prerequisite=CABHUT
Primary=none
Crushable=no
Immune=yes
Insignificant=yes
Strength=100
Armor=none
TechLevel=1
Sight=0
Speed=5
Owner=GDI,Nod
AllowedToStartInMultiplayer=no
Cost=0
Points=0
PhysicalSize=1
JumpJet=yes
Locomotor={92612C46-F71F-11d1-AC9F-006008055BB5}
MovementZone=Fly
ThreatPosed=0
ImmuneToVeins=yes

 

Now go to the very bottom of the rules.ini file, which is the section [VariableNames] and add this.

12=GDI Exists
13=Nod Exists

 

Once your done save it and open up your ai.ini and put this in the taskforces section. Keep in mind you have to define its entry first so...

Second Step - Open up the ai.ini and copy these codes.

64=00000001-G

[00000001-G]
Name=Alliance Informer
0,1 INFORM
Group=-1

 

Next is the Scriptype.

[scriptTypes]
19=00000002-G
20=00000003-G

[00000002-G]
Name=GDI Exists
0=12,12 ; Set "GDI exists" global variable "true"
1=3,97   ; Move to waypoint 97 to get out of the way

[00000003-G]
Name=Nod Exists
0=12,13 ; Set "Nod exists" global variable "true"
1=3,97   ; Move to waypoint 97 to get out of the way

 

Third Step is to go to TeamTypes section. This might get messy in this part already so HEADS UP! :)

[TeamTypes]
394=00000004-G
395=00000005-G
396=00000006-G
397=00000007-G
398=00000008-G
399=00000009-G

[00000004-G]
Name=GDI set self
House=GDI
Priority=1
Max=1
Script=00000002-G   ; Set GDI
TaskForce=00000001-G
Aggressive=no
AvoidThreats=no
Annoyance=no
Suicide=yes
Whiner=no
Group=-1
Reinforce=no
AreTeamMembersRecruitable=no
Recruiter=no
LooseRecruit=no
IsBaseDefense=no
GuardSlower=no
OnlyTargetHouseEnemy=yes
Autocreate=no
Prebuild=no
Loadable=no
OnTransOnly=no
TransportsReturnOnUnload=no
VeteranLevel=1
TechLevel=0
IonImmune=no
Droppod=no
Full=no

[00000005-G]
Name=GDI set GDI
House=GDI
Priority=1
Max=1
Script=00000002-G   ; Set GDI
TaskForce=00000001-G
Aggressive=no
AvoidThreats=no
Annoyance=no
Suicide=yes
Whiner=no
Group=-1
Reinforce=no
AreTeamMembersRecruitable=no
Recruiter=no
LooseRecruit=no
IsBaseDefense=no
GuardSlower=no
OnlyTargetHouseEnemy=yes
Autocreate=no
Prebuild=no
Loadable=no
OnTransOnly=no
TransportsReturnOnUnload=no
VeteranLevel=1
TechLevel=0
IonImmune=no
Droppod=no
Full=no

[00000006-G]
Name=GDI set Nod
House=GDI
Priority=1
Max=1
Script=00000003-G   ; Set Nod
TaskForce=00000001-G
Aggressive=no
AvoidThreats=no
Annoyance=no
Suicide=yes
Whiner=no
Group=-1
Reinforce=no
AreTeamMembersRecruitable=no
Recruiter=no
LooseRecruit=no
IsBaseDefense=no
GuardSlower=no
OnlyTargetHouseEnemy=yes
Autocreate=no
Prebuild=no
Loadable=no
OnTransOnly=no
TransportsReturnOnUnload=no
VeteranLevel=1
TechLevel=0
IonImmune=no
Droppod=no
Full=no

[00000007-G]
Name=Nod set self
House=Nod
Priority=1
Max=1
Script=00000003-G   ; Set Nod
TaskForce=00000001-G
Aggressive=no
AvoidThreats=no
Annoyance=no
Suicide=yes
Whiner=no
Group=-1
Reinforce=no
AreTeamMembersRecruitable=no
Recruiter=no
LooseRecruit=no
IsBaseDefense=no
GuardSlower=no
OnlyTargetHouseEnemy=yes
Autocreate=no
Prebuild=no
Loadable=no
OnTransOnly=no
TransportsReturnOnUnload=no
VeteranLevel=1
TechLevel=0
IonImmune=no
Droppod=no
Full=no

[00000008-G]
Name=Nod set Nod
House=Nod
Priority=1
Max=1
Script=00000003-G   ; Set Nod
TaskForce=00000001-G
Aggressive=no
AvoidThreats=no
Annoyance=no
Suicide=yes
Whiner=no
Group=-1
Reinforce=no
AreTeamMembersRecruitable=no
Recruiter=no
LooseRecruit=no
IsBaseDefense=no
GuardSlower=no
OnlyTargetHouseEnemy=yes
Autocreate=no
Prebuild=no
Loadable=no
OnTransOnly=no
TransportsReturnOnUnload=no
VeteranLevel=1
TechLevel=0
IonImmune=no
Droppod=no
Full=no

[00000009-G]
Name=Nod set GDI
House=Nod
Priority=1
Max=1
Script=00000002-G   ; Set GDI
TaskForce=00000001-G
Aggressive=no
AvoidThreats=no
Annoyance=no
Suicide=yes
Whiner=no
Group=-1
Reinforce=no
AreTeamMembersRecruitable=no
Recruiter=no
LooseRecruit=no
IsBaseDefense=no
GuardSlower=no
OnlyTargetHouseEnemy=yes
Autocreate=no
Prebuild=no
Loadable=no
OnTransOnly=no
TransportsReturnOnUnload=no
VeteranLevel=1
TechLevel=0
IonImmune=no
Droppod=no
Full=no

 

Last but not the least, the AI Trigger Types.

[AITriggerTypes]
;GDI set self
00000010-G=GDI 1,00000004-G,<all>,1,1,GAPILE,0100000003000000000000000000000000000000000000000000000000000000,5000.000000,5000.000000,5000.000000,1,0,1,0,<none>,1,1,1

;GDI set GDI
00000011-G=GDI 2,00000005-G,<all>,1,0,GAPILE,0100000003000000000000000000000000000000000000000000000000000000,5000.000000,5000.000000,5000.000000,1,0,1,0,<none>,1,1,1

;GDI set Nod
00000012-G=GDI 3,00000006-G,<all>,1,0,NAHAND,0100000003000000000000000000000000000000000000000000000000000000,5000.000000,5000.000000,5000.000000,1,0,1,0,<none>,1,1,1


;Nod set self
00000013-G=Nod 1,00000007-G,<all>,1,1,NAHAND,0100000003000000000000000000000000000000000000000000000000000000,5000.000000,5000.000000,5000.000000,1,0,2,0,<none>,1,1,1

;Nod set Nod
00000014-G=Nod 2,00000008-G,<all>,1,0,NAHAND,0100000003000000000000000000000000000000000000000000000000000000,5000.000000,5000.000000,5000.000000,1,0,2,0,<none>,1,1,1

;Nod set GDI
00000015-G=Nod 3,00000009-G,<all>,1,0,GAPILE,0100000003000000000000000000000000000000000000000000000000000000,5000.000000,5000.000000,5000.000000,1,0,2,0,<none>,1,1,1

 

Just to inform everybody in here that in general, alliances don't work at all or is impossible at all. It is only possible in Singeplayer campaigns because we don't literally know which sides will be playing in a chosen multiplayer map. Trying to ally with a faction that doesn't exist will result to a crash. Since the check itself will make the game crash, we will let the AI do this. Now, all AIs will check if they have a GDI Barracks or a Hand of Nod present in the field already and if they do, the global will be enabled. (e.g a GDI AI sees he has a Barracks) With this, we are completely sure that a GDI AI is participating in the battlefield. The same thing goes with Nod AI and if so, then we can be sure that the global event will be true and doing so, they will also check on other Ais. This is needed because we, the human players woudn't be setting any global variables.

 

Moving on, open up your Final Sun > desired map then add this 2 triggers (one for GDI and one for Nod) just copy what is done in the picture.

kWXocOa.jpg

As for Nod just clone the trigger and change every value :D

 

Fifth Step - On your Final Sun choose a best location on where do you want to send the Alliance Informers trained by the AI from their respective barracks. Using the Map Limited Access I set it on a place where it can't be reached by enemies but it's up to you where do you want to put the Waypoint and the Waypoint must be 97. Keep this in mind.

ZHfNX1h.jpg

 

Aaaaaaaaaaaaaand! Voila!!!!!!!! You can now team up with an AI! So if you have anything to point out feel free to comment :D

Thanks to SuperJoe for a wonderful tutorial at least I have posted a tutorial before my birthday cuz tomorrow's gonna be my Birthday :D

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...