|
|
  |
AI Trigger Collection, useful stuff for singleplayer maps |
|
|
|
Aug 2 2009, 10:42 PM
|

Stealth Tank

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 MCVIt 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. 2. Attacking Orcasevery 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 A10sThis 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 SuperweaponThis 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 patrolThis 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 productionThis 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. ReinforcementsThis 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
--------------------
|
|
: |

|
|
|
Aug 4 2009, 10:10 AM
|

Cyborg

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

|
1: Neat trick! I'm surprised that a unit with an Unload/Rescue command can be recruited into a team and made to stop its original action. Normally that shouldn't work. Does Rescue also deploy the MCV from the start, if you don't add any other trigger stuff? 2: Hm, right. Nothing new there  On a related note, 1.06c will have up to 6 destroyable triggers, and probably a few more to enable/disable the automatic area guard of helicopters. 3a: Well, that's just how all AI Airstrikes are done in the campaign... 3b: I've actually succeeded in giving the rechargeable Airstrike superweapon to the AI. All you need to do for that is make the AI player trigger a celltrigger linked to the airstrike superweapon, and they will get it (if they are set as trigger owner). This way the AI targets its airstrikes more intelligently. The drawbacks is that you can't have a trigger to stop the airstrikes, and that the AI never targets units with its superweapons. 4: A common misconception with this is the Loop:## command, which does NOT cause the patrol to loop (it does that automatically), but instead takes off the first ## commands. It can be used to move a team to a certain location through some waypoints, and then make them patrol there without going through those first waypoints again. 5: This is actually almost completely wrong. Production isn't just rebuilding of buildings. Before Production is activated the AI players will also not build any units. Also, Production has no owner. It applies to ALL AIs. As I said in some other threads already, the house indication in a trigger is a restriction in who can ACTIVATE the trigger, and rarely relates to the effect. The Airstrike thing I mentioned above is the only exception I've noticed so far. 6: hovercrafts: pretty correct, though as far as I know the only thing that matters is the obstacles on the water ON the map and ONE CELL just outside the map border. Anything further outside the map is ignored by reinforcements, as this mission shows (all non-water outside the border is normal clear terrain). Helis: Yeah, standard stuff. This is also used to place (capturable) enemy transport helicopters on a map 'from the beginning', since it's not possible to actually place air units on a map. (I once activated that in the exe and tried it, but it acted weird) On a kinda related note, I've once seen an odd teamtype situation where a transport helicopter unloaded 8 APCs and didn't fly away. This is probably caused by the fact the Unload command is accepted by the APCs too. Chinooks shouldn't be used for ridiculous things like that anyway though, imo  QUOTE (Lin Kuei Ominae @ Aug 3 2009, 12:42 AM)  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]) The "Time" trigger has always been a bit dodgy when it comes to ownership. But it's perfectly possible to make the AI drop off heli reinforcements after the human player triggers a celltrigger. And pretty much everything outside Time triggers needs the "team that can activate it" as trigger owner. Same thing for heli reinforcements after you destroy certain buildings or units. The player WHO DESTROYS has to be the trigger 'owner', and it has no effect on the reinforcement. It will come. "Trigger owner" is actually a very bad way of calling it. It's actually the "trigger activator". I'm pretty sure this also works for AI players... like giving the player a new MCV after the AI destroyed the (pre-placed) one in the player's base.
This post has been edited by Nyerguds: Apr 26 2015, 06:02 PM
--------------------

|
|
: |

|
|
|
Aug 4 2009, 11:40 AM
|

Stealth Tank

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

|
QUOTE (Nyerguds @ Aug 4 2009, 11:10 AM)  1: Neat trick! I'm surprised that a unit with an Unload/Rescue command can be recruited into a team and made to stop its original action. Normally that ahouldn't work. Does Rescue also deploy the MCV from the start, if you don't add any other trigger stuff? yep, both Rescue and Deploy assigned as the action to an MCV will make it deploy. QUOTE (Nyerguds @ Aug 4 2009, 11:10 AM)  Production isn't just rebuilding of buildings. Before Production is activated the AI players will also not build any units. i haven't said anything else. But I'll update the topic with the info that an additional autocreate trigger is necessary for the AI to build units too. So you can have an AI which rebuilds Buildings and no units, but you can't have an AI which builds units only, as the autocreate trigger needs a working production. QUOTE (Nyerguds @ Aug 4 2009, 11:10 AM)  5: This is actually almost completely wrong. Production isn't just rebuilding of buildings. Before Production is activated the AI players will also not build any units. Also, Production has no owner. It applies to ALL AIs. As I said in some other threads already, the house indication in a trigger is a restriction in who can ACTIVATE the trigger, and rarely relates to the effect. The Airstrike thing I mentioned above is the only exception I've noticed so far. If you have 2 AI players, you can let only one start the production using the House on that trigger. That's why it is necessary to identify which one of the AI players should start the production. The House in the trigger also must match the reinforcements house or they won't appear. The House in the trigger must match the team that is created by "Create Team". (e.g. 4. gptl1=Time,Create Team,30,GoodGuy,gdip1,0 ) You see there are more situations where the trigger specifies the house to which it belongs and not who can activate it. QUOTE (Nyerguds @ Aug 4 2009, 11:10 AM)  6: hovercrafts: pretty correct, though as far as I know the only thing that matters is the obstacles on the water ON the map and ONE CELL just outside the map border. Anything further outside the map is ignored by reinforcements, as this mission shows (all non-water outside the border is normal clear terrain). yep, with one cell outside i meant the one cell border just outside the visible map. e.g. white marks the border which isn't visible and just one cell outside the visible map  the upper one works and the hovercraft will always come from the centre cell of the 3 water cells in the border. the lower one doesn't works as the water stripe is not big enough (only one water cell isn't enough) and also the path to the beach is not free. QUOTE (Nyerguds @ Aug 4 2009, 11:10 AM)  Helis: Yeah, standard stuff. do you know if it's possible to use the Nod Cargo Plane as a transport for reinforcements? I tried this by simply replacing TRAN with C17 in the team but nothing happened. QUOTE (Nyerguds @ Aug 4 2009, 11:10 AM)  The "Time" trigger has always been a bit dodgy when it comes to ownership. But it's perfectly possible to make the AI drop off heli reinforcements after the human player triggers a celltrigger. This is because "Player Enters" is always the human player, that's why the House in the trigger can be assigned to the AI player. e.g. CODE rnf2=Player Enters,Reinforce.,0,GoodGuy,heli,0 while the human player is BadGuy also for destroyed objects this works, because you assign the trigger to the objects on the map, so the House on the trigger is again unbound to the event of the trigger and can be this way assigned to the house which should do the action (e.g create a team or give reinforcements). That's why i wouldn't call it "trigger owner" nor "trigger activator" but "action owner", as it depends on the action you plan to do with the trigger. CODE name=Event, Action, Value, ActionOwner, TeamType, loop Event: the event that causes the trigger to start (depends on the certain event which owner starts this) Action: the action that should be done when this trigger is released ActionOwner: the owner to which the action belongs (must match the owner of the TeamType) TeamType: the team that is assigned to the trigger Loop: 1-And 2-Or 0-No loop
This post has been edited by Lin Kuei Ominae: Aug 4 2009, 12:04 PM
--------------------
|
|
: |

|
|
|
Aug 4 2009, 11:59 AM
|

Cyborg

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

|
QUOTE (Lin Kuei Ominae @ Aug 4 2009, 01:40 PM)  If you have 2 AI players, you can let only one start the production using the House on that trigger. That's why it is necessary to identify which one of the AI players should start the production. Actually, I've seen missions where multi-houses were added to the map, and after one Production trigger was activated, all AI players competed over the buildings put in the [Base] section (after all, they have no owners set). One trigger enabled AI production for all AI houses. Besides, I've seen triggers in the original missions where AI production was started by a trigger activated by the player, like crossing certain celltriggers: http://nyerguds.arsaneus-design.com/cncstu...nod/scb08ea.pnghttp://nyerguds.arsaneus-design.com/cncstu...aps/scb08ea.ini[Triggers] prod=Player Enters,Production,0,BadGuy,None,0 Player is Badguy. QUOTE (Lin Kuei Ominae @ Aug 4 2009, 01:40 PM)  yep, with one cell outside i meant the one cell border just outside the visible map. e.g. white marks the border which isn't visible and just one cell outside the visible map  the upper one works and the hovercraft will always come from the centre cell of the 3 water cells in the border. the lower one doesn't works as the water stripe is not big enough (only one water cell isn't enough) and also the path to the beach is not free. Ahh, in X direction. right, sorry, I misunderstood that. Since you combined 2 conditions that block it in that second image, that doesn't prove much about the actual size of the opening though  I never tested this myself though, so I'll believe you  QUOTE (Lin Kuei Ominae @ Aug 4 2009, 01:40 PM)  do you know if it's possible to use the Nod Cargo Plane as a transport for reinforcements? I tried this by simply replacing TRAN with C17 in the team but nothing happened. No, the Nod cargo plane has the same "Is Aircraft" option set that the A-10 has. It makes sure they can't turn on the spot in the air (they have to kleep flying forward while they turn), and it prevents them from landing. If you disable that option, and you build something with the airstrip, the C-17 unloads like a reinforced chinook, at (I think) the default helicopter reinforcements dropoff waypoint (#27) QUOTE (Lin Kuei Ominae @ Aug 4 2009, 01:40 PM)  This is because "Player Enters" is always the human player, that's why the House in the trigger can be assigned to the AI player. e.g. CODE rnf2=Player Enters,Reinforce.,0,GoodGuy,heli,0 while the human player is BadGuy No it's not. As I just said, I made an AI house activate the trigger. If you set a celltrigger somewhere and make the "owner" of the actual trigger the AI's house, then the human player can't activate it. I tested this with Flare triggers.
This post has been edited by Nyerguds: Dec 6 2011, 11:29 AM
--------------------

|
|
: |

|
|
|
Aug 4 2009, 04:31 PM
|

Stealth Tank

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

|
QUOTE (Nyerguds @ Aug 4 2009, 11:59 AM)  No, the Nod cargo plane has the same "Is Aircraft" option set that the A-10 has. It makes sure they can't turn on the spot in the air (they have to kleep flying forward while they turn), and it prevents them from landing. If you disable that option, and you build something with the airstrip, the C-17 unloads like a reinforced chinook, at (I think) the default helicopter reinforcements dropoff waypoint (#27) I just found out that it is indeed possible to use the C17 as a reinforcements transporter. This is how it works. Player=BadGuy CODE [TeamTypes] new1=BadGuy,0,0,0,0,0,7,0,0,0,2,C17:1,RMBO:1,0,0,0
[Triggers] rnf1=Time,Reinforce.,0,BadGuy,new1,0 The only condition is, that you have an airfield on the map which belongs to the side of the reinforcements (here BadGuy). Then the C17 will enter the map just like when you build units. But now it delivers a Commando and for free. However you can't send in more units at once. Only one C17 and one cargo unit is allowed. If you have more in the list, only the last one will be delivered. I can imagine already a mission where you have to capture an airfield and then get there flown in your new mcv.
This post has been edited by Lin Kuei Ominae: Aug 4 2009, 04:36 PM
--------------------
|
|
: |

|
|
|
Aug 4 2009, 04:38 PM
|

Cyborg

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

|
Ooh, that's pretty brilliant  [edit] I just noticed this, in that same Nod mission 8 I already quoted: http://nyerguds.arsaneus-design.com/cncstu...aps/scb08ea.inihttp://nyerguds.arsaneus-design.com/cncstu...nod/scb08ea.png[Triggers] xxxx=Destroyed,Lose,0,None,None,1 desx=Player Enters,Dstry Trig 'XXXX',0,BadGuy,None,0 delx=Player Enters,Dstry Trig 'XXXX',0,GoodGuy,None,0 The map has 2 rows of celltriggers close to eachother (lower right corner), one for GDI and one for Nod, with the same purpose. This proves that celltriggers aren't just for the human player.
This post has been edited by Nyerguds: Nov 7 2011, 03:22 PM
--------------------
|
|
: |

|
|
|
Aug 4 2009, 05:39 PM
|

Stealth Tank

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

|
That is strange because you, the player enter the delx cells which will stop the xxxx lose condition. (tested; no GDI unit ever entered the cell and the trigger was activated anyway) So GoodGuy on this Trigger seems to be completely useless, as it is BadGuy who throws the trigger, which in turn supports my theory that "Player Enters" is always the human player. Maybe GoodGuy on this one just allows GDI to throw the trigger too, while still allowing Nod to throw it. \EDIT i just made a small test map and it seems you were right. The "Player Enters" event was only thrown when the GDI unit entered the cell but not when my Nod unit entered it. Though i wonder why i never lost that mission, because i always destroyed all GDI units before they could enter the cells and the lose condition should have been activated as i have lost all the connected starting units after a while. \EDIT damn it. now i see that both of your triggers destroy xxxx. ok, everything solved, you were right.  \EDIT some more infos and updates about the C17 reinforcements the code posted above wasn't completely correct this works better CODE [TeamTypes] new1=BadGuy,0,0,0,0,0,7,0,0,0,2,C17:1,RMBO:1,1,Unload:0,0,0
[Triggers] rnf1=Time,Reinforce.,0,BadGuy,new1,0 i missed Unload:0 on the team and without it the C17 attacks any enemy unit which is visible. Don't ask me why and how (as it has no weapon), but it attacks the enemy unit with big building explosion anims right under the aircraft image. But with Unload:0 on the team it ignores correct enemy units and delivers the reinforcements. However if you try to send at the same time more than one aircraft via multiple trigger, they will deliver one unit after the other, except there is an enemy unit in the visible area of the map. In this case only the first C17 delivers the unit and the other will attack the enemy unit, leave the map and sell the unit inside. So you should make sure that the reinforcements have enough time to arrive, before sending the next C17. Also to mention is, that without an airfield for the reinforcements, the C17 can't enter the map and thus sells the unit inside. But this can be used to give the player a certain amount of money (e.g. 2500cr if the cargo was an MCV) at a certain time without using wooden crates. The good thing is, that you also don't hear "reinforcements have arrived" and just get the money.
This post has been edited by Lin Kuei Ominae: Aug 4 2009, 08:01 PM
--------------------
|
|
: |

|
|
|
Aug 4 2009, 08:29 PM
|

Cyborg

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

|
The second row of celltriggers is for when GDI starts attacking your base. To get there, they move over these celltriggers, but since they most likely uncover your base when attacking, you can still try to build some infantry to kill them. I love that airfield idea, btw. It reminds me of a certain Dune 2000 (or was it Emperor:BFD?) mission where you have to capture and protect a smuggler spaceport to get free weapon drops  [edit] You found a method to trigger money adding for the player??? That is awesome!  I'd expect the game to just cancel the "unit construction" though, which would give you the full amount...
This post has been edited by Nyerguds: Aug 4 2009, 08:34 PM
--------------------
|
|
: |

|
|
|
Aug 4 2009, 09:29 PM
|

Stealth Tank

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

|
QUOTE (Nyerguds @ Aug 4 2009, 09:29 PM)  You found a method to trigger money adding for the player??? That is awesome!  I'm astonished too that after such a long time new things are still discoverable. This is why i love C&C. QUOTE (Nyerguds @ Aug 4 2009, 09:29 PM)  I'd expect the game to just cancel the "unit construction" though, which would give you the full amount... you're right. You get the full prize. (my TD is modified where the MCV costs only 2500 instead of 5000) btw, with new1=BadGuy,0,0,0,0,0,7,0,0,0,2,C17:1,RMBO: 10,1,Unload:0,0,0 you get 10000 credits as the cargo plane was meant to deliver 10 Rambos. This way you can specify almost exactly the amount of credits the player should get. (e.g. by using E1 you can give a multiple of 100cr which works the same as the starting money) If you have an airfield, it would deliver one Rambo and then refund the 9 others when it leaves the map. So you can kill two birds with one stone.
This post has been edited by Lin Kuei Ominae: Aug 4 2009, 09:34 PM
--------------------
|
|
: |

|
|
|
Aug 26 2009, 10:27 PM
|

Stealth Tank

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

|
i just found something interesting new.
you sure know the long string of numbers in any teamtype, e.g. auto1=GoodGuy,1,0,0,1,0,15,1,0,0,1,MTNK:1,1,Attack Base:80,0,0
since now the 6th value has only 2 known functions 15- allow to create the team by the autocreate function 7- use this team for reinforcements
i just found out another purpose of this value.
a team with 15 will stop moving along it's path at the next Move: waypoint, as soon as you attack an enemy building (this doesn't even have to be an enemy building belonging to the side in the team) e.g. a goodguy team will stop it's move on the next waypoint when you attack a Neutral building (or Special etc)
But If you create the team with 20, it will ignore fire from the player on enemy buildings. Thus they will strictly perform their orders and don't stop in the middle of nowhere. This also explains why sometimes attack teams stop (keep staying in the base etc) and why in original missions many teams use different numbers than 15 and 7.
So the 20 should be used especially on patrols which should loop moving along their path. Another very important point where this should be used is on the MCV move and deploy team described in the first post. If you use a 15 the MCV will stop on the next waypoint when you fire on an enemy building and don't deploy on its final destination. with 20 it will correctly ignore the fire and head straight to its final waypoint to deploy there.
This post has been edited by Lin Kuei Ominae: Aug 26 2009, 10:45 PM
--------------------
|
|
: |

|
|
|
Aug 27 2009, 09:52 AM
|

Stealth Tank

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

|
with this 3rd value i just noticed some kind of pattern, but this should be tested. This value could be some kind of AI behaviour priority setting. 0 - do nothing else than the orders in the teamtype 7 - strictly perform your orders, but also react a bit on your environment (e.g. take care of the gap in the map border where you're supposed to be spawned when entering the map as reinforcements) 15 - react on things which happen around you (e.g. buildings being attacked, units in your range) 20 - react on things which happen around you (e.g. attack units if they are in range), but ignore major events (e.g. the loss of a building or base under attack) 30 - could be like 0 again where it does nothing else than the orders in the teamtype (e.g. scb30ea "eviction notice" uses this for the civilists which have to inform the GDI base that the player has attacked their village, for that they ignore everything and head straight to the next waypoint to emit the celltrigger at the final waypoint) 0 and 30 could be AI wise the same, except that 0 is for reinforcements and 30 for creating teams 15 being in the middle, gives the AI the most freedom to follow the orders.  This is just a theory, but imo sounds quite plausible.
This post has been edited by Lin Kuei Ominae: Aug 27 2009, 11:00 AM
--------------------
|
|
: |

|
|
|
Aug 30 2009, 09:54 PM
|

Stealth Tank

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

|
i took a look in the game.dat (DOS TD) to see if there are anymore unused things. There i noticed that the aircraft doesn't stand next to the normal units, but actually has its own section. What would explain why you can't place aircraft on a map in the [UNITS] section. In addition stands in the file for [UNITS] the exact notation, how they have to be listed in a map file QUOTE ('game.dat') %03d None %s,%s,%d,%u,%d,%s,%s which is equal to: index/number = string,string,double,unsigned,double,string,string or in the map : index = player,unitID,health,cell,direction,action,trigger then a bit further down in the game.dat i found a similar section AIRCRAFT QUOTE ('game.dat') %03d %s,%s,%d,%u,%d,%s which is equal to: index/number string,string,double,unsigned,double,string I then tried adding to a test-map the aircaft section as follows CODE [AIRCRAFT] 000=GoodGuy,A10,256,3126,0,None But unfortunately i had no aircraft on cell 3126. I also noticed that the word None is missing in the game.dat AIRCRAFT string. First i assumed that "None" would be a placeholder for the equal sign in the UNITS section. But after i've found all the other sections too, i had to notice that it's missing on other sections too and they still use an equal sign in the map. e.g. SMUDGE QUOTE ('game.dat') %03d %s,%d,%d So i doubt that the equal sign is wrong in my aircraft entry. Can someone (i assume Nyerguds or Hyper are the only one who can do it) look in the gamecode to see if i made any mistake with this section? It looks like it should actually work to place aircraft on a map and is only due to a small typo or wrong notation that they still don't appear ingame.
This post has been edited by Lin Kuei Ominae: Aug 30 2009, 10:06 PM
--------------------
|
|
: |

|
|
|
Oct 5 2009, 07:48 AM
|

Cyborg

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

|
QUOTE (Lin Kuei Ominae @ Aug 27 2009, 11:52 AM)  0 - do nothing else than the orders in the teamtype 7 - strictly perform your orders, but also react a bit on your environment (e.g. take care of the gap in the map border where you're supposed to be spawned when entering the map as reinforcements) 15 - react on things which happen around you (e.g. buildings being attacked, units in your range) 20 - react on things which happen around you (e.g. attack units if they are in range), but ignore major events (e.g. the loss of a building or base under attack) 30 - could be like 0 again where it does nothing else than the orders in the teamtype (e.g. scb30ea "eviction notice" uses this for the civilists which have to inform the GDI base that the player has attacked their village, for that they ignore everything and head straight to the next waypoint to emit the celltrigger at the final waypoint) This is interesting... in binary, 7 is 111, and 15 is 1111. Maybe this number is a bunch of bit flags? 00 - 0000 0000 07 - 0000 0111 15 - 0000 1111 20 - 0001 0100 30 - 0001 1110
This post has been edited by Nyerguds: Oct 5 2009, 07:53 AM
--------------------

|
|
: |

|
|
|
Feb 9 2010, 12:45 AM
|
Technician

Group: Members
Posts: 4
Joined: 8-February 10
Member No.: 1,766
Favorite game: Tiberian Dawn

|
Here's something fun that could be useful for map making efforts:
You can make a reinforcement gunboat "patrol" a certain section of water so you don't have to make an entire horizontal cross section of map a water lane. It seems to patrol in this way indefinitely but, unless Nyerguds is able to fix the weapon problem in his next patch, it is only of value for adding cannon fodder as a storyline element. The movement is not very smooth, they just immediately stop at each waypoint, then flip over, but it works after a fashion.
[GoodGuy] Edge=East
[Triggers] Gunboat=Time,Reinforce.,2,GoodGuy,bot1,0
[TeamTypes] bot1=GoodGuy,0,0,0,0,0,7,1,0,0,1,BOAT:1,4,Move:4,Move:6,Move:4,Loop:1,0,0
So in the above scenario, I have a non-looping reinforce trigger coupled with a reinforce teamtype with 3 move commands and a loop command at the end. I've tried every combination of commands I could, but it seems like any command following a Move command other than Loop or Move results in the rest of your command list being ignored. Here's what I think happens: The first Move gets the thing to move to waypoint 4 from the edge, the second one makes it stop and return to the second waypoint (Take care here to keep your waypoints in the same plane, otherwise goofy stuff happens.). After the third Move causes it to return to waypoint 4 from waypoint 6, the Loop command erases the 1st Move command and for some reason enables it to keep looping through the last 2. I've tried just using Move:4,Move:6 and it doesn't seem to work. Anyway, this is great stuff, I'll be sure to add anything else useful I find.
This post has been edited by Operon: Feb 9 2010, 12:48 AM
|
|
: |

|
|
|
Feb 14 2010, 03:26 PM
|
Technician

Group: Members
Posts: 4
Joined: 8-February 10
Member No.: 1,766
Favorite game: Tiberian Dawn

|
QUOTE (Nyerguds @ Feb 11 2010, 11:11 AM)  Ehh, "loop" PREVENTS looping. It doesn't cause it. All teamtype actions loop automatically; it's the reason all WW attack teams have a time of 99 in their final attack command. What you did there is tell it to cut 1 command off the start of the loop, making it repeat from the "Move:6" again instead of the first Move:4.
This means your commands are identical if you'd just make them 2,Move:4,Move:6,0,0 It "should" work, but it doesn't... Try it on that test map I sent you, if you use Move:4, Move:6 it will indeed move back and forth 1 time, but then it resumes the normal edge to edge patrol. The only way to make it stay constrained to the waypoints indefinitely that I've found is the above method. Op
|
|
: |

|
|
|
Feb 18 2010, 09:09 AM
|
Technician

Group: Members
Posts: 4
Joined: 8-February 10
Member No.: 1,766
Favorite game: Tiberian Dawn

|
QUOTE (Nyerguds @ Feb 15 2010, 03:05 AM)  Must be because of the gunboat exceptions... I guess it stops looping unless you specifically say "loop back from command #1" (first one being command #0). So maybe 3,Move:4,Move:6,Loop:0,0,0 might work as well  That does work, neat.  Also, two important things I've discovered, you have to use 20 in the 6th number slot per the discussion above about AI freedom. For some reason, using 0, 7, and 15 all seem to allow the gunboat to resume screen to screen patrols after a building is attacked or the gunboat itself is attacked. The 2nd thing is you need to have give it at least 1 buffer cell of water between its patrol route and land. Sometimes when a unit attacks it from land, it will "slide" up diagonally 1 space towards the attacking unit, then resume it's waypoint patrol route. If it's directly adjacent to the land, the boat appears to beach itself for a minute. Unfortunately, even if you put up with it sliding around on the water, there are some brief graphic artifacts that persist until you scroll the screen. Ah well, all in all it still allows some fun to be had with gunboats. Especially if you fix the turrets.
|
|
: |

|
|
|
Aug 4 2010, 09:32 PM
|

Stealth Tank

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
--------------------
|
|
: |

|
|
|
  |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
|
|