The 3rd Age

MasterHero Mod 1.9

MasterHero Mod 1.9

Enhances Visuals, provide series of modifications and additions to the game play, support WOR

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

Custom Heroes & AI for BFME1

Avatar of Hebblewhite


Category: Worldbuilder
Level: Intermediate
Created: Wednesday July 18, 2007 - 19:49
Updated: Monday September 13, 2010 - 13:56
Views: 6137
Summary: Getting the BFME 1 AI system to build and use custom heroes effectively - including special powers


Staff says


Members say




7 votes

Page 1 2 3 4 5 6 7 8 9
Working with Hero Abilities

As mentioned earlier, we need to play around with a few more script files if we want the BFME1 AI system to make use of our special hero abilities during run time.

Firstly, open “” and take a look inside the “[ns A]LIB - Hero Abilities” script folder. You’ll notice a complete list of all of the original heroes that EA went with in the final release of BFME1. This area is basically where the magic happens…

Copy the “[ns A]Hero Ability – Boromir” script file, and then change the name to “[ns A]Hero Ability – Sauron”.

In order for the AI system to sue our Sauron character effectively, we will need to implement three things:

•    A Unit Reference for the AI to recognise the object in subsequent scripts
•    A basic Combat Retreat script to allow our hero to run away when heavily damaged
•    Any special abilities our character may possess

To make things a little easier, we can recycle some of the Boromir script files for use with our own Sauron character. Delete all of the script files in our new folder with the exception of the Unit Reference and Combat Retreat scripts. Change the name of the “[S A nd][E N H]b_Boromir - Set Unit Ref” script file to “[S A nd][E N H]b_Sauron - Set Unit Ref”.

We can then modify the condition/action set to reflect the following:


*** IF ***
Team '<This Team>' has one or more units.

*** THEN ***
Find 'MordorSauron' Owned by Player '<This Player>' nearest team Team '<This Team>' and reference as UnitRef 'AI_HERO_SAURON'

When the game is running, our character will now always be known as AI_HERO_SAURON whenever decisions need to be made, or abilities need to be activated.

We can then modify the Boromir combat retreat script by firstly changing the name to “[S A nd][E N H]b_Sauron - Retreat to Combat Area”, and then modifying the condition/action set to reflect the following code:


*** IF ***
Unit '<This Object>' Health IS Less Than 25 percent.

*** THEN ***
Team '<This Team>' executes Script 'be_Hero - Retreat to Combat Area' sequentially.

Links / Downloads

Custom Heroes & AI for BFME11907July 19, 2007 - 6:42


Display order: Newest first

Hebblewhite - Thursday July 19, 2007 - 6:44

Hey guys,

I've added a pdf version of the tutorial for easier reading... this one is a bit long (apologies for that), but I decided to combine both parts 1 and 2 of the set to make it easier to follow.



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."