The 3rd Age

Age of the Firstborn - The Rebirth

Age of the Firstborn - The Rebirth

Continues on Elrond99's Age of the Firstborn mod by turning time back to around TA2000.

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 Structures & AI for BFME1

Avatar of Hebblewhite

Hebblewhite

Category: Worldbuilder
Level: Expert
Created: Wednesday July 18, 2007 - 15:36
Updated: Friday July 20, 2007 - 6:01
Views: 6820
Summary: Getting the BFME1 AI system to construct and utilise your custom structures effectively at run time

Rating

Staff says

4.3

Members say

4.5

Average

4.4/5.0

10 votes

Page 1 2 3 4 5 6
That’s it for part 1, and the process is generally the same for all four factions in BFME1 with the exception of Mordor. For some reason, EA kindly decided to replace the “Attack Faction AI” folder with one called “Production Buildings” just to confuse us… so watch out for it.


Part 2:

In part one, we created the basic structure building script, and then made the new Barracks available when the AI system is in attacking mode. Now we need to play around with the build priority scripts and values so that our Barracks is considered when weighing up the type of units we need to create when under attack, or forming an attack of our own.

Save and close the "ai_rohan.map" file, and open “ai_predictive_building.map”.

Open the “[ns A] Predictive Building Init” script folder, and add the following entry to the “[ns A D][E N H]g_PredBuild - Variable Inits” script file:

              
Code

Set 'l_PredBuild_Barracks_Building_Priority' to 0



The above value can be increased from zero when required depending on the nature of the game being played, and the threats being posed to the AI system at any given time.

Next we need to add a repeat entry of our original structure building script to the “[ns A] Predictive Build Subs” script folder. In this case, we only need the condition, because the action is already set up for us in “ai_rohan.map”.

Add a script called “[S A nd] [E N H]g_PredBuild - Build Barracks Building” with the following contents:

              
Code

*** IF ***
Can player Player '<This Player>' build at base Unit 'AI_CURRENT_CONSTRUCTION_SITE'

*** THEN ***
Null operation. (Does nothing.)



Now we need to set up a script that will activate our build command based on priority data that ways up economy, archer, cavalry, artillery and upgrade necessity at all given times during a game. We want our structure to be built only if it is of an equal or higher priority than the others…

Open the “[S A nd] [E N H]g_Predictive Build Execution” script folder, and copy the “[S A nd] [E N H]g_PredBuild - Infantry Building Is Highest Priority” script file and change the name to “[S A nd] [E N H]g_PredBuild - Barracks Building Is Highest Priority”. Then modify the condition/action statements in accordance with the following:

Links / Downloads

 HitsAdded
Custom Structures & AI for BFME11853July 18, 2007 - 15:40

Comments

Display order: Newest first

Hebblewhite - Wednesday July 18, 2007 - 15:58

I've attached a pdf version for easier reading!


Cheers,

Hebblewhite

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

 
0:50:40