The 3rd Age

Power Of The Ring 3 : Campaigns Of Middle Earth

Power Of The Ring 3 :  Campaigns Of Middle Earth

Contains BFME1 Campaigns : Based on Power Of The Ring

Button for The 3rd AgeButton for The Dwarf HoldsButton for The Elven AllianceButton for Helm's Deep Last HopeButton for GothmogtheOrcButton for BFME+Button for The Four AgesButton for HDR HeadquartersButton for Middle Earth CenterButton for Project Perfect Mod

Become an affiliate!


Quick Lists

Top Rated Popular New Updated Last Comments Users

Register and log in to move these advertisements down

In-depth AI Coding

Avatar of Sulherokhh


Category: Code
Level: Expert
Created: Wednesday October 3, 2007 - 6:28
Updated: Friday August 27, 2010 - 19:26
Views: 26221
Summary: The beginning of a comprehensive guide to AI-modding for BfME2


Staff says


Members say




20 votes

Page 1 2 3 4 5 6 7 8 9 10 11
In-depth AI-Coding

This tutorial will show you different ways in making the AI use Special Powers, take specific actions or limit/randomize it's options. It is suited mostly for the advanced coder, though some of it's elements are easy to implement for beginners too.

While i will try to keep it organized, i will necessarily jump back and forth between several different aspects of coding. I might try and add several sections about BaseBuilding, SpellPurchase etc. later-on.

Newest additions:

  • Introductory Rant on page 2!
  • C1. General SkirmishAI Setup on page 9!
  • C2. General SkirmishAI_1 and _2 Settings: 'aidata.ini' on page 10!


00. Introduction - In which the reader will encounter something funny and sad about a misguided attempt to do something awesome but stopped halfway in it's tracks. (page 2)

A. Starting Simple (Object AI)

This contains 2 straightforward AI modules to put in your objects.

A1. 'AISpecialPowerUpdate' (page 3)
A2. 'AutoAbilityBehavior' (page 4)

B. Advanced AI Modding (Object AI).

This section contains a lot of specialized modules, as well as a custom approach on implementing it for the AI (and NOT for the player). Knowledge of LUA-scripting, ModelConditions, the works of Upgrades and a general feel for all Object-code is a prerequisite.

B1. The Basic Setup(page 5)
B2. Straightforward uses of the AI-Upgrade (page 6)
B3. Complicating the issue (page 7)
B4. Practical Use of 'AutoAbilityBehavior' for the AI controlled unit (page 8)

C. HAL 9000: Powerful AI In Need Of Brainsurgery. (progress: about a third written, unformattet)

This section contains a step by step explanation (or rather an estimate) on how the over-improved SkirmishAI_2 is set up and presumably works. It will provide the tools to customize a specific faction's AI to suit your needs.

C1. General SkirmishAI Setup (page 9)
C2. General SkirmishAI_1 and _2 Settings: 'aidata.ini' (page 10)
C3. General SkirmishAI_2 Settings: 'skirmishaidata.ini' (not done yet)

D. The Faction Base and Fortress (not done yet)

E. Spell Purchase Scripts(not done yet)

F. Custom AI Scripts(not done yet)

Comments and Suggestions are appreciated. Please go and try out these goodies. Should help in tuning up any mod. *grin*

Edit: Did some reformatting. Hopefully it looks readable now. Also reformatted and split up from 2 to 7 pages.
Edit(Jan.28th.2009): Small edit. Also starting work on section C. ...
Edit(Feb.14th.2009): Completed sections C1 and C2. Expanded to 10 pages. Some reformatting.



Display order: Newest first | Page: 1, 2

Bart (Administrator) - Wednesday October 3, 2007 - 12:41

Couldn't you split it into a few more pages? ;)

Sulherokhh (Team Chamber Member) - Wednesday October 3, 2007 - 10:23

I was being brief, you know?

Guess Who - Wednesday October 3, 2007 - 10:13

Does it have to be so long? :P

Sulherokhh (Team Chamber Member) - Wednesday October 3, 2007 - 6:54

I guess i'll need to make a pdf or word file out of this. The format just sucks and is really hard to read.

Go to top


"One site to rule them all, one site to find them,
one site to host them all, and on the network bind them."