The 3rd Age

Last Alliance Battle Mod

Last Alliance Battle Mod

The final battle between the Alliance of Men and Elves and Mordor.

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

Modules - Draw + Body + Behaviors

Tutorial for Battle for Middle-earth BFME, Battle for Middle-earth II BFME 2, Battle for Middle-earth II: Rise of the Witch-king ROTWK

Avatar of Ridder Geel

Ridder Geel

Category: Code
Level: Intermediate
Created: Tuesday May 5, 2009 - 10:16
Updated: Monday February 18, 2013 - 13:46
Views: 7837
Summary: Find info on all the modules (Body & Draw & AIUpdate are done) in the BFME series! (Far from done!)

Rating

Staff says

4.3

Members say

4.3

Average

4.3/5.0

11 votes

Page 1 2 3 4
-+-=-+-=-+-=-+-=-+- Behavior ~ AI Update Modules -+-=-+-=-+-=-+-=-+-

-AIUpdateInterface-User imageUser imageUser image
This one is used by most units ingame, this one is usually the Basic one, so some of the things in this "Block" can be used in any other "AI Update".
              
Code

Behavior = AIUpdateInterface ModuleTag_AIUpdateInterface
    AttackPriority = AttackPriority_Cavalry ;; The Attack priority this unit has, found in: \data\ini\default\skirmishaidata.ini
    AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS ;; Auto Aquire structures and units when idle.
    StopChaseDistance        = 642    ;; How far to chase a unit before giving up?
    MoodAttackCheckRate        = 500    ;; How often to check for emotions such as fear? (M. Seconds)
    CanAttackWhileContained        = Yes    ;; Can this unit attack while its in a structure or other unit?
    HoldGroundCloseRangeDistance    = 40    ;; Can attack this close when being in the Hold Ground stance.
    AILuaEventsList    = TomBombadil_Functions    ;; LUA Event list, found in:\data\scripts\scriptevents.xml
    MinCowerTime            = 8000    ;; Min time to cower in fear. (M. Seconds)
    MaxCowerTime            = 10000    ;; Max time to cower in fear. (M. Seconds)
    RampageTime            = 4470    ;; Time to be in rampage mode. (M. Seconds)
    RampageRequiresAflame        = Yes    ;; Must be on fire to Rampage"death"
    BurningDeathTime        = 2000    ;; Time to "burn" until death. (M. Seconds)
    TimeToEjectPassengersOnRampage    = 2300    ;; Time to eject all passengers in rampage mode. (M. Seconds)
    ComboLocomotorSet    = SET_COMBO    ;; Locomoterset to use when in "Combo Attack".
    ComboLocoAttackDistance        = 100    ;; If we are farther than this from an enemy, use combo locomotor.
    SpecialContactPoints     = Repair ;; Special points which this unit uses for doing special things.
    FadeOnPortals            = Yes    ;; When teleporting fade away.
End


-SiegeAIUpdate-User imageUser imageUser image
This is the AI Update module used by Siegeladders and Siegetowers.
              
Code

Behavior = SiegeAIUpdate ModuleTag_SiegeAIUpdate
    AutoAcquireEnemiesWhenIdle = No
    MoodAttackCheckRate = 250
End


-HordeAIUpdate-User imageUser imageUser image
This is the AI Update module used by hordes.
              
Code

Behavior = HordeAIUpdate ModuleTag_HordeAIUpdate
    AutoAcquireEnemiesWhenIdle     = Yes ATTACK_BUILDINGS
    MoodAttackCheckRate     = 500
    AILuaEventsList            = InfantryFunctions
    MaxCowerTime            = 5000
    MinCowerTime            = 3000
    AttackPriority            = AttackPriority_Infantry
End


-HordeWorkerAIUpdate-User imageUser imageUser image
This is the AI Update module used by hordes which can repair things, such as Rohan's peasants.
              
Code

Behavior = HordeWorkerAIUpdate ModuleTag_HordeWorkerAIUpdate
    AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS
    MoodAttackCheckRate    = 500
    MaxCowerTime        = 5000
    MinCowerTime        = 3000
AILuaEventsList        = InfantryFunctions    
AttackPriority        = AttackPriority_Infantry
SpecialContactPoints    = Repair
End


-SupplyTruckAIUpdate-User imageUser imageUser image
This is the AI Update module used by Supply trucks in C&C Generals.
              
Code

Behavior = SupplyTruckAIUpdate ModuleTag_SupplyTruckAIUpdate
    MaxBoxes = 4
    SupplyCenterActionDelay = 400 ; ms for whole thing (one transaction)
    SupplyWarehouseActionDelay = 1000 ; ms per box (many small transactions)
    SupplyWarehouseScanDistance = 700 ;350 ; Max distance to look for a warehouse, or we go home. (Direct dock command on warehouse overrides, and no max on Center Scan)
End


-DozerAIUpdate-User imageUser imageUser image
This is the AI Update Module used by Porters (AKA: Dozers)
              
Code

Behavior = DozerAIUpdate ModuleTag_DozerAIUpdate
    AILuaEventsList                    = EvilPorterFunctions
    RepairHealthPercentPerSecond    = 2% ; % of max health to repair each second
    BoredTime                        = 5000 ; in milliseconds
    BoredRange                        = 120 ; when bored, we look this far away to do something
    AutoAcquireEnemiesWhenIdle        = No ; no mine-disarming in the design at the moment
    SpecialContactPoints            = Repair
End


-TransportAIUpdate-User imageUser imageUser image
This is the AI Update Module used by transports in C&C Generals.
              
Code

Behavior = TransportAIUpdate ModuleTag_TransportAIUpdate
    AutoAcquireEnemiesWhenIdle = No        ;CleanupHazardUpdate handles this...
    Turret
        TurretTurnRate = 180    ;; How fast can the turret turn?
        TurretPitchRate = 180    ;; How fast can the turret change its pitch?
        AllowsPitch = Yes    ;; Can it change its Pitch?
        MinPhysicalPitch = -20    ;; If allows pitch, the lowest I can dip down to shoot. defaults to 0 (horizontal)
        TurretFireAngleSweep = PRIMARY 25    ;; At what angle does this turret fire?
        ControlledWeaponSlots = PRIMARY        ;; What weapon slot does this turret use?
    End
End


-WanderAIUpdate-User imageUser imageUser image
This is the AI Update Module used by nothing... Only used a few times in C&C Generals... There it is empty!
              
Code

Behavior = WanderAIUpdate ModuleTag_WanderAIUpdate
End


-AnimalAIUpdate-User imageUser imageUser image
This is the AI Update Module used by Animals, Gollum also uses this AI Update.
              
Code

Behavior = AnimalAIUpdate ModuleTagWanderAround
    FleeRange = 100        ;; how close enemies have to be before we panic.
    FleeDistance = 800    ;; how far the animal will run once spooked.
    WanderPercentage = 5    ;; percentage of the time we should move.
    MaxWanderDistance = 50    ;; maximum distance to move at once.
    MaxWanderRadius = 200    ;; how far to wander on our own?
    UpdateTimer = 10000    ;; how often do we want to check for enemies?
    AfraidOfCastles = Yes    ;; are we afraid of entering castles/camps?
End


-FoundationAIUpdate-User imageUser imageUser image
This is the AI Update Module used by building foundations.
              
Code

Behavior = FoundationAIUpdate ModuleTag_FoundationAIUpdate
    BuildVariation = 2 ;; Will give BUILD_VARIATION_TWO to anything built on it
End


-WorkerAIUpdate-User imageUser imageUser image
This is the AI Update Module used by Workers.
              
Code

Behavior = WorkerAIUpdate ModuleTag_WorkerAIUpdate
    RepairHealthPercentPerSecond    = 0.2%    ;; % of max health to repair each second
    BoredTime            = 5000    ;; in milliseconds
    BoredRange            = 120    ;; when bored, we look this far away to do something
    SpecialContactPoints        = Repair
    MaxBoxes            = 1    ;; How many abstract units of goods can I carry
    SupplyWarehouseScanDistance    = 5000    ;; How far to look for trees
    SupplyCenterActionDelay        = 2000    ;; How long it takes to drop off logs
    HarvestTrees            = Yes    ;; Replace the Dock-with-warehouse with Harvest-From-Point
    HarvestActivationRange        = 25    ;; How close to a tree counts as close enough
    HarvestPreparationTime        = 5000    ;; How long to knock a tree down
    HarvestActionTime        = 3000    ;; How long to grab a load of wood
AILuaEventsList            = InfantryFunctions
End


-GiantBirdAIUpdate-User imageUser imageUser image
This is the AI Update Module used by big flying creatures.
              
Code

Behavior = GiantBirdAIUpdate ModuleTag_GiantBirdAIUpdate
    AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS
    MoodAttackCheckRate    = 500
    AILuaEventsList        = FellBeastFunctions

    FollowThroughDistance    = 200    ;; Distance to follow through on swoop attack.
    FollowThroughCheckStep    = 50    ;; Check "Steps" on follow through.
    FollowThroughGradient    = 1.0    ;; Not sure what this does, but its always 1.0.

    GrabTossTimeTrigger    = 2.5    ;; After how many seconds do I drop my "victim".
    GrabTossHeightTrigger    = 100.0    ;; At what height do i drop my "victim".
    TossFX            = FX_DiebyFalling    ;; FX to play when i drop my "victim".
    SpecialContactPoints    = Swoop
    AttackPriority        = AttackPriority_FellBeast
End


-AssaultTransportAIUpdate-User imageUser imageUser image
This is the AI Update Module used by a special transport in C&C Generals.
              
Code

Behavior = AssaultTransportAIUpdate ModuleTag_AssaultTransportAIUpdate
    MembersGetHealedAtLifeRatio = 0.5
End


-DeployStyleAIUpdate-User imageUser imageUser image
This is the AI Update Module used by units/objects that can be deployed.
              
Code

Behavior = DeployStyleAIUpdate ModuleTag_DeployStyleAIUpdate
    AutoAcquireEnemiesWhenIdle     = Yes ATTACK_BUILDINGS
    MoodAttackCheckRate = 2500
    MustDeployToAttack     = No    ;; Must the unit be deployed to be able to attack?
    UnpackTime        = 2000    ;; Time in MS to "Unpack"
    PackTime        = 2000    ;; Time in MS to "Pack"
    DeployedAttributeModifier = DwarvenDemolisherDeployModifier ;; Modifier to give once deployed.
End

Comments

Display order: Newest first

GothmogtheOrc (Team Chamber Member) - Monday July 20, 2009 - 11:07

wow, very good idea for a tutorial. Very useful.

Ridder Geel (Staff) - Sunday May 24, 2009 - 10:56

Ill do that later ;) (additional modules) ;)

Sulherokhh (Team Chamber Member) - Thursday May 21, 2009 - 6:44

Most, if not all, AI update modules work with additional modules (which they need) exclusively. It might be sensible to make a reference to those modules and/or define them in the same way right below the AI module.
---------------------
In adddition, work on the formatting. It's bothersome to read different sections with entirely different formats. Remove all TAB characters, replace with a single SPACE. Comment (';') lines that don't help explain should be removed as well.
Keep it up.

Lurtzy - Thursday May 14, 2009 - 18:08

Looking really cool so far, can't wait to see more!

Yarrum - Monday May 11, 2009 - 4:23

Cool tutorial. With this, I might be able to get Boromir's Last Stand power to work properly. I know they did it in Elvenstar but it never seemed to work in my game.

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

 
2:19:25