CRAIG and defensive tactics


#1

An idea I had. Bare in mind I have no knowledge of AI scripting. However, this idea popped into my head when I was thinking about how AIs handle limited-arc weapons.

There are some ways I think that CRAIG could utilize deployed guns.

The first idea is to have the AI randomly select a location near a captured flag that meets the following criteria:

  1. The position is on flat terrain;
  2. Drawing a “line” from that position to the enemy’s start position, check to see that the terrain is relatively flat (so gun don’t face a cliff); only one check is actually needed (but more than one, to make sure there isn’t a tall but very slender mountain or other silliness in the wya) – say it draws a position roughly equal to the weapon’s maximum range between the chosen deployment position and the enemy’s base. If that location is of similar height to the deployment location, it will assume that the space between both locations is flat. See attached picture for (hopefully) clarification.

Second idea is for groups of deployed artillery. A spot can be chosen somewhere near the AI’s start position, checking to see if ground around this point is flat, and again like above, checking to see if the terrain towards the enemy’s base is also flat. Then the AI simply sends a number of artillery guns to deploy around that first location, creating a battery of guns pointed more or less towards the enemy base (and thus where he’s most likely to come from).

Third is for minefields; AI could either build minefields around a flag, or create a small minefield in a random location between two flags (where enemy is likely to travel). This would probably necessitate some form of do-not-go-there-unless-all-minefields-are-dead sort of code, though, otherwise they’re likely to blow themselves up.

Another idea is not so much defensive as offensive; using the same gun deployment ideas the AI could select a location relatively close to the enemy’s base, again checking to make sure flat terrain between deployment location and target, etc. Then they’re rush one or more towed nebelwerfer rockets there; deploy them, and unleash a barrage on the base.

Other similar unit-specific AI tactics could be used, such as using Katyushas by sending one or two or three to a location near the enemy’s base and then surprise rocket barraging him to death.

Can CRAIG use aircraft? If not, this would be very useful, especially if they could be given relatively complex commands, such as sending in bomber strikes against player’s/enemy’s barracks and factories (checking if player controls such a building, then going and killing it; or perhaps in reverse, if the player does build it, the attack is triggered). Also, when/if paradrops/glider landings become possible, it’d be awesome if CRAIG used these to attack enemy flags.

USSR CRAIG could also build partisan shacks in secluded parts of the map.

Again, these are just ideas based on my very limited knowledge of Lua scripting.


#2

Unrelated note: that is some horrible .jpg compression. Use .png for simple drawings; if you aren’t using many colors it can actually be much smaller than .jpg while being lossless.