splanton
  • splanton
  • 56.75% (Neutral)
  • Private Topic Starter
14 years ago
Hiya,
I some pretty basic question regarding AI. Apologies if these are relativly well documented, but I have searched and not been able to find the basics on garrisoning (plenty of tut's regarding more involved garrisioning - such as traints etc).

I have built a map with oil derreks and bunkers for the AI to take over and use.

Currently the derreks are outside the combat zone but inside the outer perimiter of each team. I was surprised to see that the AI teams wern't using derreks automatically.

1) Are there any basic rules to adhere to when placing derreks and other tech buldings so that the AI doesn't ignore them?

2) How do I script the AI to use the defensive bunkers I have created?

Regards,

Spencer
Sponsor
BR-Alexandre
14 years ago
1) standard AI go for derricks in combat zone but you can make an infantry team go for them with this behavior script

*** IF ***
    True.
*** THEN ***
   Team '<This Team>' begins hunting using Ability 'Command_AmericaRangerCaptureBuilding'.

note he'll also capture enemy structures if find them

Team '<This Team>' begins hunting using Ability 'Command_ChinaInfantryRedGuardCaptureBuilding'.
Team '<This Team>' begins hunting using Ability 'Command_AmericaRangerCaptureBuilding'.

you have to use one for each infantry. there's one for rebel too


2) put this on AIs team behavior tab

*** IF ***
    True.
*** THEN ***
   Team '<This Team>' garrison a nearby building.


the teams will now garrisson any nearby building. you can also specify the building
you can also change the condition for a better one so they don't suicide
"The Only Way To Have Peace is Prepare for War" <---I forgot who said this...
"Lasers make superior weapons!" <--- Townes
"Laser crusader ready for engagement" <--- Laser Crusader Tank
"Tactical lasers online" <--- Avenger Support Venhice
"Storm climbed mountain" <--- Pathfinder Elite Infantry
"Ready for covert mission" <--- Stealth Fighter Tactical Support
splanton
  • splanton
  • 56.75% (Neutral)
  • Private Topic Starter
14 years ago
@BR-Alexandre

Thanks for the prompt response. OK - you unleashed a whole can of worms :)

When you say an 'infantry team' or 'rebel' can you expand on that a little? I am not familiar with anything other than 'standard AI' at this time.

I am going to expand my combat zone to include derreks so they will be captured correctly by standard AI.

You mention teams 'suiciding'. OK, that's new one on me too, is it something I should be made aware of :)

The script:
*** IF ***
    True.
*** THEN ***
   Team '<This Team>' garrison a nearby building.

Is that a generic script to garrison 'anything' garrisonable in the vacinity and are there limitations?

Sorry for the fundamental questions but I am still on the basics. The whole scripting thing is pretty easy but as ever there seem to be some 'interesting' ways of doing things sometimes.

Drummin
14 years ago
Each skirmish player can garrison up to three buildings. You just name the buildings you want the skirmish players to garrison: PlayerX GarrisonY. (I believe this is case sensitive.) The "X" & "Y" are number variables. For the skirmish player at Player_1_Start replace the "X" with "1". Then replace the "Y" with a "1", "2", or "3". Here is a example for the skirmish player at Player_3_Start with building number two: Player3 Garrison2

Remember that each skirmish player can garrison up to three buildings. Any buildings named "PlayerX Garrison4" may not be garrisoned. The default scripts will create teams for these buildings if the buildings are named correctly so no custom scripts are needed.
BR-Alexandre
14 years ago

When you say an 'infantry team' or 'rebel' can you expand on that a little? I am not familiar with anything other than 'standard AI' at this time.

splanton wrote:



the infantry you will see in the game are: ranger,red guard, minigunner, rebel, toxin rebel and the rocket armed infntries. when i say infantry teams i mean the 5 firsts (they have capture ability) go arround the map searching for anything they can capture


You mention teams 'suiciding'. OK, that's new one on me too, is it something I should be made aware of :)

splanton wrote:



with suicide i mean the mens move to your base, or towards your army without any chances of succeed (usually because they are going to take something)
for example, they 2 rangers moving to a waypoint, enemy has galting cannon in that waypoint, if rangers keep going they suicide. a good condition may save them from it like "player0 has 0 units in area "

The script:

*** IF ***
    True.
*** THEN ***
   Team '<This Team>' garrison a nearby building.

Is that a generic script to garrison 'anything' garrisonable in the vacinity and are there limitations?

splanton wrote:



As Drummin says

"The Only Way To Have Peace is Prepare for War" <---I forgot who said this...
"Lasers make superior weapons!" <--- Townes
"Laser crusader ready for engagement" <--- Laser Crusader Tank
"Tactical lasers online" <--- Avenger Support Venhice
"Storm climbed mountain" <--- Pathfinder Elite Infantry
"Ready for covert mission" <--- Stealth Fighter Tactical Support