So I stumbled upon one of my junk files and there it was; the aokedit utility that allows fans of ageo f empires II to create their own artifitial intellegence.
The code is very similar to out post 2 and has some sample code when you first unpack it, and lucky you all can see it too i have the zip file in my aok folder so i just thought people like hooman would enjoy a laugh at this when they say similar code....
Sample:
;Rules applying to Dark Age and/or all future ages
(defrule
(game-time > 80)
=>
(chat-local-to-self "RegBuild selected.")
(disable-self)
)
#load-if-not-defined VICTORY-CONQUEST
;Unfortunately, if you build a wonder you never build anything else. Therefore
;exclude them on Hard and Hardest. Also exclude them on Easiest.
#load-if-not-defined DIFFICULTY-EASIEST
#load-if-not-defined DIFFICULTY-HARD
#load-if-not-defined DIFFICULTY-HARDEST
(defrule
(game-time > 900)
(can-build-with-escrow wonder)
(population > ninety-five-percent-pop)
(building-type-count-total wonder < 1)
(can-build-with-escrow wonder)
=>
(release-escrow wood)
(release-escrow stone)
(release-escrow gold)
(build wonder)
(chat-to-allies "Building Wonder.")
)
(defrule
(building-type-count-total wonder > 0)
=>
(set-strategic-number sn-maximum-gold-drop-distance -1)
(set-strategic-number sn-maximum-wood-drop-distance -1)
(set-strategic-number sn-maximum-food-drop-distance -1)
(set-strategic-number sn-maximum-stone-drop-distance -1)
(set-strategic-number sn-maximum-hunt-drop-distance -1)
(set-strategic-number sn-maximum-fish-boat-drop-distance -1)
)
#end-if
#end-if
#end-if
#end-if
(defrule
(building-type-count town-center == 0)
(can-build-with-escrow town-center)
=>
(release-escrow wood)
(release-escrow stone)
(build town-center)
(chat-to-allies "Building town center.")
)
;Housing Rules ****************************************************************
(defrule
(housing-headroom < 4)
(population-headroom > 3)
(can-build house)
=>
(build house)
)
Thats just the tip of the iceberg, you can veiw or create your own code for age of kings 2 if you have the game or like it with the aokedit file in this zip folder.
you can find that zip Here (http://forum.outpost2.net/index.php?showtopic=5147)