IPB

Welcome Guest ( Log In | Register )


> AI Trigger Collection, useful stuff for singleplayer maps
Lin Kuei Ominae
post Aug 2 2009, 10:42 PM
Post #1


Stealth Tank
Group Icon

Group: Members
Posts: 1,065
Joined: 14-November 06
From: Germany
Member No.: 281
Alliance: CABAL
Favorite game: Tiberian Sun



Since adding AI is always a problem for many TD mappers, but essential for a good singleplayer map, i thought we could collect here some useful Triggers & Teamtypes.

1. The moving and then deploying MCV
It was widely assumed that an MCV can't be deployed on a certain cell by using triggers.
This is how it works anyway.
CODE
[UNITS]
000=GoodGuy,MCV,256,1596,0,Rescue,MCVD
;note the Rescue action and the connection to the MCVD Trigger

[TeamTypes]
mcvt=GoodGuy,0,0,0,0,0,15,0,0,0,1,MCV:1,6,Move:5,Move:6,Move:7,Move:8,Move:9,Rescue:0,0,0
;The MCV moves along the waypoints 5,6,7,8,9 and then deploys at the last waypoint 9

[Triggers]
MCVD=Time,Create Team,0,GoodGuy,mcvt,0
Though i admit it has some drawbacks and special conditions
1. The MCV has to be placed on the map and can't be send via reinforcements.
2. The place where the MCV is placed on the map must be big enough for the MCV to deploy there too (you should test this first using no trigger)
3. The MCV needs Rescue (or Unload) as it's action
4. The TeamType needs Rescue (or Unload if Unload is on the MCV) as the last action on the waypoint list
5. The Trigger has to start instantly (hence Time 0) or the MCV deploys on it's start position
But you can add many waypoints to its path to give it a delay before it deploys on its final destination

The main advantage is, that you can this way make an AI player (in a singleplayer map) which has to build its base from scratch just like the human player in almost every other mission. wink1.gif

2. Attacking Orcas
every 150 timeunits, 3 Orcas will attack the players base
when the GDI Helipad is destroyed, the Orca attacks will stop
CODE
[STRUCTURES]
000=GoodGuy,HPAD,50,3824,0,delx

[TeamTypes]
orc1=GoodGuy,0,0,0,0,0,7,0,0,0,1,ORCA:3,1,Attack Base:99,0,0

[Triggers]
xxxx=Time,Reinforce.,150,GoodGuy,orc1,1
delx=Destroyed,Dstry Trig 'XXXX',0,GoodGuy,None,0
This will give GDI free Orca reinforcements, which are spawned at the map border and attack the players base
Unfortunately i haven't got it work that the AI builds them like any other TeamType.

3. Attacking A10s
This gives GDI every 200 timeunits an airstrike with 2 A10s (even if the human player is GDI)
CODE
[TeamTypes]
a10s=GoodGuy,0,0,0,0,0,7,0,0,0,1,A10:2,0,0,0

[Triggers]
airs=Time,Reinforce.,200,GoodGuy,a10s,1


3. GDI Airstrike Superweapon
This gives GDI the Airstrike SW (unlike the version before, this one can be controlled via the sidemenu icon)
CODE
[Triggers]
airs=Time,Airstrike,0,GoodGuy,None,0
The same works also for Nod
CODE
[Triggers]
airs=Time,Airstrike,0,BadGuy,None,0


4. Starting a patrol
This starts a Hummvee patrol for GDI after 30 timeunits
CODE
[TeamTypes]
gdip1=GoodGuy,1,0,0,0,0,15,1,0,0,1,JEEP:1,8,Move:10,Guard:10,Move:11,Guard:10,Move:10,Guard:10,Move:8,Guard:10,1,0

[Triggers]
gptl1=Time,Create Team,30,GoodGuy,gdip1,0
The unit will patrol along the waypoints 10,11,10,8 and guard for 10 units on each waypoint. Then it starts again since the units loop by default the actions defined in the TeamType.
If the unit is destroyed it will be replaced by another one. (hence the second last 1)

5. Start GDIs production
This starts the GDI production (GDI will start rebuilding Buildings which are in the [Base] section) when the Player enters a certain cell
CODE
[Triggers]
prod=Player Enters,Production,0,GoodGuy,None,0

[CellTriggers]
3752=prod
3816=prod
3880=prod
Note: this will only start the production of buildings and allows the production of units. But to make the AI build units you need an additional autocreate trigger.
That's why you can have an AI which builds buildings and units, but not an AI which only builds units (except you don't give the AI a conyard)
CODE
[STRUCTURES]
012=Special,GTWR,256,1139,0,auto
013=Special,GTWR,256,1141,0,auto

[Triggers]
auto=Destroyed,Autocreate,0,GoodGuy,None,2
when one of the 2 guard towers is destroyed (hence 2 at the trigger which is an "Or" connection), GDI will start producing units.

6. Reinforcements
This gives Nod a Hovercraft with 1 Commando as reinforcements after 10 timeunits
CODE
[TeamTypes]
new1=BadGuy,0,0,0,0,0,7,0,0,0,2,LST:1,RMBO:1,0,0,0

[Triggers]
rnf1=Time,Reinforce.,10,BadGuy,new1,0

Note: the Hovercraft always comes from the south and you have to place there where the Hovercraft should spawn, at least 3 cells water in a row 1 cell outside the visible map
I would suggest making around the whole map, 1 cell outside the visible area, a border with impassable rocks from the terrain set. (Don't use overlays, trees or anything else as these raise the ini file size and maps work only flawlessly when their size is under 16k)

This gives the human player Nod a controllable Transport Helicopter as reinforcements.
CODE
[BadGuy]
Edge=South

[TeamTypes]
heli=BadGuy,0,0,0,0,0,7,0,0,0,1,TRAN:1,1,Move:16,0,0

[Triggers]
rnf2=Time,Reinforce.,0,BadGuy,heli,0

Note: as soon as you put more units in the Team, the Helitrans will unload them at the waypoint and fly away
BadGuy on the Trigger is necessary and must match the house of the human player, or the reinforcements won't arrive.
The Reinforcements are spawned along the map border (here Edge=South) which is specified in the House section (here [BadGuy])


I hope this not only brings back some more life to TibWeb but also to TD mapping.

\EDIT
some more infos about map making and its restrictions
-the max file size of the ini is 16k (16384 Byte) for the DOS version (everything after the 16384th Byte will be ignored)
-the max number of entries for the Terran section is 300 (all trees/rocks after/including the 301st will be ignored)
-the max number of teamtypes is 40 (if you have 41 or more teamtypes the map will freeze the game when loading)

This post has been edited by Lin Kuei Ominae: Aug 11 2009, 08:47 PM


--------------------
Co-Leader of Twisted Insurrection
my public units for you
Nod units:____________________________GDI units:
Nod Scorpion__________________________GDI 3A Kodiak
Nod Tachyon Tank______________________GDI Medusa (Triple Cannon Mech)
Nod Goliath___________________________GDI Behemoth (medium size Mech)
Nod Cobra (fast medium mech)__________GDI Battleship Aurora
Nod Siegebot (light MG-Mech)__________GDI Fortress Tower (Heavy Base Defense)
Nod Redeemer (4 legged heavy Cyborg)__GDI Triton (Titan support Mech)
Nod/Scrin WotW Tripod_________________GDI Exciter
______________________________________GDI Ion Charge Collector
Misc and Fun units:
X-Mech Calendar 28 SHP Units
Star Wars Mechs ATAT/ATST
Cyborg Barrack on PPM_________________Mech Factory
Mutant Tiberium Flyer
yt1300 (Millenium Falcon + BIG version)

if you use my units in your mod, please credit me.if you want to use my units on your website please ask me before.
Go to the top of the page
 
: | +Quote Post
 
Start new topic
Replies
Nyerguds
post Aug 4 2010, 08:57 PM
Post #2


Cyborg
Group Icon

Group: Members
Posts: 370
Joined: 22-October 06
From: Flanders (Belgium)
Member No.: 97
Alliance: Nod
Favorite game: Tiberian Dawn



LKO, I just noticed something odd... "Rescue" doesn't exist in the list of commands the game reads for teamtypes. There's only

"Attack Base"
"Attack Units"
"Attack Civil."
"Rampage"
"Defend Base"
"Move"
"Move to Cell"
"Retreat"
"Guard"
"Loop"
"Attack Tarcom"
"Unload"

and I checked; the list isn't merged in any way with the normal commands.

I suppose you haven't tested if that MCV deploys anyway, at the end?

This post has been edited by Nyerguds: Aug 4 2010, 09:38 PM


--------------------
Go to the top of the page
 
: | +Quote Post
Lin Kuei Ominae
post Aug 4 2010, 09:32 PM
Post #3


Stealth Tank
Group Icon

Group: Members
Posts: 1,065
Joined: 14-November 06
From: Germany
Member No.: 281
Alliance: CABAL
Favorite game: Tiberian Sun



That's strange. Though since it still works and since Unload works as well for the deploying MCV trick, there isn't any harm done.
But none the less quite strange that it made the MCV move and deploy logic work.

I'm not sure anymore if the MCV deployed anyway as it's quite long ago, but if i remember correct, Unload or Rescue was needed as the last command on the TeamType or it wouldn't deploy.

I just checked the game.dat and found Rescue as an existing key. Does that mean Rescue is a valid key, but not for VehicleTypes, or is Rescue simply an unused key at all?

What about the other keys standing in game.dat
None, Sleep, Attack, Move, Retreat, Guard, Sticky, Enter, Capture, Harvest, Area Guard, Return, Stop, Ambush, Hunt, Timed Hunt, Unload, Sabotage, Construction, Selling, Repair, Rescue, Missile
Are only some of them valid and the other useless?

\EDIT
Ah, it seems i've mixed up the TeamType commands you've listed with the Unit commands i've listed.
Anyway, since the MCV deploy logic still works, there's no real problem.
Just a strange unexpected behavior from TD.

This post has been edited by Lin Kuei Ominae: Aug 4 2010, 09:46 PM


--------------------
Co-Leader of Twisted Insurrection
my public units for you
Nod units:____________________________GDI units:
Nod Scorpion__________________________GDI 3A Kodiak
Nod Tachyon Tank______________________GDI Medusa (Triple Cannon Mech)
Nod Goliath___________________________GDI Behemoth (medium size Mech)
Nod Cobra (fast medium mech)__________GDI Battleship Aurora
Nod Siegebot (light MG-Mech)__________GDI Fortress Tower (Heavy Base Defense)
Nod Redeemer (4 legged heavy Cyborg)__GDI Triton (Titan support Mech)
Nod/Scrin WotW Tripod_________________GDI Exciter
______________________________________GDI Ion Charge Collector
Misc and Fun units:
X-Mech Calendar 28 SHP Units
Star Wars Mechs ATAT/ATST
Cyborg Barrack on PPM_________________Mech Factory
Mutant Tiberium Flyer
yt1300 (Millenium Falcon + BIG version)

if you use my units in your mod, please credit me.if you want to use my units on your website please ask me before.
Go to the top of the page
 
: | +Quote Post

Posts in this topic
- Lin Kuei Ominae   AI Trigger Collection   Aug 2 2009, 10:42 PM
- - Nyerguds   1: Neat trick! I'm surprised that a unit w...   Aug 4 2009, 10:10 AM
|- - Lin Kuei Ominae   QUOTE (Nyerguds @ Aug 4 2009, 11:10 AM) 1...   Aug 4 2009, 11:40 AM
|- - Nyerguds   QUOTE (Lin Kuei Ominae @ Aug 4 2009, 01:4...   Aug 4 2009, 11:59 AM
|- - Lin Kuei Ominae   QUOTE (Nyerguds @ Aug 4 2009, 11:59 AM) N...   Aug 4 2009, 04:31 PM
- - Nyerguds   Ooh, that's pretty brilliant [edit] I just ...   Aug 4 2009, 04:38 PM
|- - Lin Kuei Ominae   That is strange because you, the player enter the ...   Aug 4 2009, 05:39 PM
- - Nyerguds   The second row of celltriggers is for when GDI sta...   Aug 4 2009, 08:29 PM
|- - Lin Kuei Ominae   QUOTE (Nyerguds @ Aug 4 2009, 09:29 PM) Y...   Aug 4 2009, 09:29 PM
- - Nyerguds   Magnificent work I wish I had time to experiment...   Aug 4 2009, 10:35 PM
|- - Lin Kuei Ominae   i just found something interesting new. you sure ...   Aug 26 2009, 10:27 PM
- - Nyerguds   That is some great information! I've been ...   Aug 26 2009, 11:20 PM
|- - Lin Kuei Ominae   with this 3rd value i just noticed some kind of pa...   Aug 27 2009, 09:52 AM
|- - Nyerguds   QUOTE (Lin Kuei Ominae @ Aug 27 2009, 11...   Oct 5 2009, 07:48 AM
- - Nyerguds   Interesting stuff, Lin Kuei   Aug 28 2009, 05:40 PM
|- - Lin Kuei Ominae   i took a look in the game.dat (DOS TD) to see if t...   Aug 30 2009, 09:54 PM
- - Nyerguds   I once enabled the Aircraft section in C&C95, ...   Aug 30 2009, 10:32 PM
|- - Lin Kuei Ominae   too bad. I thought already i could make a map with...   Aug 30 2009, 11:10 PM
- - Operon   Here's something fun that could be useful for ...   Feb 9 2010, 12:45 AM
- - Nyerguds   Ehh, "loop" PREVENTS looping. It doesn...   Feb 11 2010, 07:11 PM
|- - Operon   QUOTE (Nyerguds @ Feb 11 2010, 11:11 AM) ...   Feb 14 2010, 03:26 PM
- - Nyerguds   Must be because of the gunboat exceptions... I gue...   Feb 15 2010, 11:05 AM
|- - Operon   QUOTE (Nyerguds @ Feb 15 2010, 03:05 AM) ...   Feb 18 2010, 09:09 AM
- - Crimsonum   Didn't even know this topic exists Should pro...   Feb 18 2010, 12:17 PM
- - Nyerguds   Nice to see you refined the method   Feb 21 2010, 04:53 PM
- - Nyerguds   Yeah, there's 2 completely separate lists; one...   Aug 5 2010, 06:53 PM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 2nd May 2025 - 06:45 PM


XGhozt.com