Diplo-Matic

Upload your latest creations here.
Please note that by posting comments to posts in this forum you forfeit your personal copyright on whatever you post. AI Scripters reserves the right to re-use objective comments in script reviews without requiring the posting author's permission. Credit, where appropriate will be given in such cases.
Post Reply
Deepfreeze
Forumer
Posts: 11
Joined: Wed Mar 17, 2004 2:41 pm

Post by Deepfreeze »

This is just a script snippet, not a whole ai. What this does is compare two enemies on a non-teams locked map and determine which one has the higher military-population. It will then set diplomacy to neutral for the weaker of the two, assuring you are attacking the bigger threat. When the strong opponent is destroyed it will set diplomacy of the neutral player to enemy and then attack them.

I have it starting it's military comparison just before I launch my first attack.

I thought this would be useful especially for ai's that like to rush so they can see exactly what they're up against, and be attacking the player they need to attack. Rushes are so much more effective when they're lauched against the right target.

Again this only works with two enemies.. If you were playing a 4 player AI match, you would have to ally with one of the players before you triggered the actual military checking in this script or things could get screwy.

A note: If you are playing against a turtling ai with low military count, but high defensive building count.. towers, castles... then this script may backfire on you. While you're attacking the higher military pop enemy.. the turtle may have 22 castles and 30 towers waiting for you by the time you get to him.

Feel free to modify this any way you feel necessary to suit your needs. I will work on a three enemy version of this next. Hepefully everything is explained clearly enough for any would-be-user in the beginning part of the script itself.

Gregg (Deepfreeze)
Attachments
diplo_matic.zip
(2.78 KiB) Downloaded 303 times

Post Reply