The 3rd Age

Age Of Men

Age Of Men

Age of Men will be some like an unofficial expansion set for BFME2:ROTWK

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

Horde Mount/Dismount Ability

Avatar of Rob38

Rob38

Category: Code
Level: Expert
Created: Wednesday December 19, 2007 - 14:55
Updated: Saturday June 27, 2009 - 18:18
Views: 12673
Summary: Giving hordes the ability to toggle between horse and foot.

Rating

Staff says

4.8

Members say

4.0

Average

4.3/5.0

11 votes

Page 1 2 3 4 5 6 7
For the banner carrier object, I highly suggest making an unique banner carrier just for your horde. This helps simplify many things.

1. First, add the model conditions.
              
Code
DefaultModelConditionState
    Model = ruhdguardbnr
    Skeleton = GUBanner_SKL    
End
; morph for Mount         
ModelConditionState = USER_3
    Model = ruguardhrsebnr
    Skeleton = RURrmBnr_SKL        
End


2. Add the animations like we did for the unit object.
              
Code
; --- Mounting/Dismounting
AnimationState     = USER_3 UNPACKING USER_6 ;PREPARING SPECIAL_POWER_3
        Animation            = CheerA
            AnimationName        = RURrmBnr_CHRA
            AnimationMode        = ONCE
    AnimationSpeedFactorRange = 0.9 1.1
        End
    
End

AnimationState     = USER_3 PACKING ;SPECIAL_POWER_3
        Animation            = CheerA
            AnimationName        = RURrmBnr_CHRA
            AnimationMode        = ONCE
    AnimationSpeedFactorRange = 0.9 1.1
        End
End


3. Add an upgrade locomotor to your object. The armor and weapon set ones are optional.
              
Code
LocomotorSet
    Locomotor = HorseLocomotor
    Condition = SET_NORMAL_UPGRADED ;SET_MOUNTED
    Speed = NORMAL_CAVALRY_FAST_MEMBER_SPEED
End


4. Add all the crush information to the object.
              
Code
    CrusherLevel = 0            ;Can I crush anything?
    CrushableLevel = 0            

    MountedCrusherLevel = 1        ;Crush level when mounted.
    MountedCrushableLevel = 3    ;Crusable level when mounted.

    CrushRevengeWeapon = BasicInfantryCrushRevenge
    CrushWeapon = RohirrimCrush


5. Add the AIUpdateInterface behavior in your object. Make sure the AILuaEventsList includes all the things we did on page 3 of the tutorial.
              
Code
Behavior = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS STEALTHED
    MoodAttackCheckRate = 500
    AttackPriority         = AttackPriority_Infantry
    AILuaEventsList         = HelmDefenderBannerFunctions
    BurningDeathTime     = BURNINGDEATH_DURATION_CAVALRY
End


6. Add all the behaviors made in the unit object into the banner carrier one. Also add the AI behaviors from the unit object into the banner carrier one.

The banner carrier should work now. Check the final page for some analysis and drawbacks to the whole horde mount/dismount process.

Links / Downloads

 HitsAdded
In-Depth AI Coding2070December 23, 2007 - 20:00

Comments

Display order: Newest first

Rob38 (Team Chamber Member) - Sunday December 23, 2007 - 21:00

Ugh... ok, Sul, I tried your method and I was able to improve everything except for one thing. The animation will play when it's just an individual unit, but when it's a horde, it refuses to play one. I have tried tons of things but nothing works. I'll update this tutorial after I try some other things out.

EDIT: Yeah, I'm stumped. Unless someone can find a way to get the animation to work for the horde, it looks like we'll have to do without them :( Once I clean up and double check to make sure everything runs correctly, I'll edit and fix up the tutorial.

--------

Re-did the tutorial. If you find a solution to any of the problems on Page 7, please let me know :)

Sulherokhh (Team Chamber Member) - Friday December 21, 2007 - 19:59

Sweet! :) It sure looks perfectly functional, and since you tested it, we now all know it works!! :D

For further ideas on switching commandsets (which are identical, except for the single button that buys upgrades) and the use of specific animations to play for mounting /dismounting (by using a special power instead of an OBJECT_UPGRADE button), refer to 'blackrider_SEE.ini' from S.E.E. The specialpower (and LocomotorUpgrades) would have to be installed in both horde AND hordemember, but the LuaFunctions would only be needed in the horde, just like the CommandSetMonitor) These black riders don't mount horses the usual way, as the normal mount behavior has been reserved for mounting fellbeasts.

Rob38 (Team Chamber Member) - Friday December 21, 2007 - 14:19

Yeah, the commandset is quite an annoyance but I can't find any other solution to the problem :(

JEV3 - Friday December 21, 2007 - 11:50

Pity the commandset is so unfriendly... But to have a horde be able to mount and dismount is worth it.

Rob38 (Team Chamber Member) - Thursday December 20, 2007 - 22:35

Please leave comments :)

EDIT: Fixed an error in article... HorseHordeContain is the behavior you want to use for the horde behavior

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

 
9:55:21