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

Fixing the Rohirrim-WeaponToggle Glitch

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

Avatar of Sulherokhh

Sulherokhh

Category: Code
Level: Intermediate
Created: Saturday August 11, 2007 - 9:50
Updated: Sunday October 7, 2007 - 1:49
Views: 5237
Summary: Quickly done, if you don't get confused.

Rating

Staff says

3.3

Members say

4.4

Average

4.0/5.0

8 votes

This is a straightforward coding fix, quickly done and easy to implement.

These are the parts in rohanrohirrim.ini you will need to adjust. It's just the default-modelcondtions' flags (that determine at what time the bow/spear are shown/hidden) and the actual switching animations.

The funny thing is this. EA's layout is logical and faultless, yet they use a flag ('SWAPPING_TO_WEAPONSET_2') that the development team seems to have forgotten to implement. It is a temporary flag that is set, when you are just about to toggle the weaponset, who's flag is incidentally set or removed immediately. Now, the thing is that the flag 'SWAPPING_TO_WEAPONSET_1' is used correctly, and not only that, it is also used when toggling back! (Instead of 'SWAPPING_TO_WEAPONSET_2' as EA had planned)

So, to make it work all instances of 'SWAPPING_TO_WEAPONSET_2' need to be replaced by 'SWAPPING_TO_WEAPONSET_1' and at certain points the flag 'WEAPONSET_TOGGLE_1' needs to be an additional condition.

So here it is. You can just plug in the pieces of code, replacing the old code, or just do the changes manually:



              
Code
;-----Spear-----
DefaultModelConditionState
    Model = RURohrm_SKN
End
ModelConditionState = SWAPPING_TO_WEAPONSET_1 WEAPONSET_TOGGLE_1 ;added WEAPONSET_TOGGLE_1
    Model = RURohrm_SKN
End

;-----Flaming arrows + bow-----
ModelConditionState = WEAPONSET_PLAYER_UPGRADE USER_2 SWAPPING_TO_WEAPONSET_1 ;was SWAPPING_TO_WEAPONSET_2
    Model = RURhrmArch_SKN
    WeaponLaunchBone = SECONDARY FIREAROWTIP
    ParticleSysBone = FireArowTip arrowFire FollowBone:Yes
End

ModelConditionState = WEAPONSET_PLAYER_UPGRADE USER_2 WEAPONSET_TOGGLE_1
    Model = RURhrmArch_SKN
    WeaponLaunchBone = SECONDARY FIREAROWTIP
    ParticleSysBone = FireArowTip arrowFire FollowBone:Yes
End

;-----Bow-----
ModelConditionState = SWAPPING_TO_WEAPONSET_1 ;was SWAPPING_TO_WEAPONSET_2
    Model = RURhrmArch_SKN
    WeaponLaunchBone = SECONDARY FIREAROWTIP
End

ModelConditionState = WEAPONSET_TOGGLE_1
    Model = RURhrmArch_SKN
    WeaponLaunchBone = SECONDARY FIREAROWTIP
End

...

; Swapping to spear -----        
AnimationState = SWAPPING_TO_WEAPONSET_1 ;---- was SWAPPING_TO_WEAPONSET_2
    StateName = State_PuttingBowAway
    Animation
        AnimationName = RURhrmArch_SKL.RURhrmArch_WPNA ; putting bow away.
        AnimationMode = ONCE
        AnimationSpeedFactorRange = 0.5 0.6 ; Needs to match one second, approx.
    End
    ; Flags = START_FRAME_LAST
End

...

; Swapping to bow -----        
AnimationState    = SWAPPING_TO_WEAPONSET_1 WEAPONSET_TOGGLE_1 ;---- added SWAPPING_TO_WEAPONSET_1
    StateName = State_PuttingSpearAway
    Animation
        AnimationName = RURohrm_SKL.RURohrm_WPNB ; putting spear away.
        AnimationMode = ONCE_BACKWARDS
        AnimationSpeedFactorRange = 0.5 0.7 ; Needs to match one second.
    End
    Flags = START_FRAME_LAST
End


So, that's it. :P


If somehow you find that this doesn't work for you, tell me.
I would also like to know if it actually DOES work for you, so please leave a comment if you use this. Thanks. :P


------------------------------------------------------------------------------------------------------------------------------
Edit^1: I redone formatting.

Credits

Only myself.

Comments

Display order: Newest first

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

Zoom in on the Rohirrim and toggle the weapons from bow to spear and back to bow. Watch closely.
You will see the glitch.

yorxdestroyer uu - Tuesday May 12, 2009 - 21:39

What Glitch?

Sulherokhh (Team Chamber Member) - Monday August 13, 2007 - 3:57

So it is working for you? Great! :D

Rob38 (Team Chamber Member) - Sunday August 12, 2007 - 19:02

Nice way to fix that annoying error with the rohirrim

Sulherokhh (Team Chamber Member) - Saturday August 11, 2007 - 9:58

...

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

 
13:59:11