The 3rd Age

Battle for the Galaxy

Battle for the Galaxy

Battle for the Galaxy seeks to change the land of Middle-earth into the vast Star Wars Galaxy.

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

How to give Witch-King word of power

Tutorial for Battle for Middle-earth II BFME 2

Avatar of clank234

clank234

Category: Code
Level: Beginner
Created: Saturday December 11, 2010 - 6:48
Updated: Saturday December 11, 2010 - 7:29
Views: 6119
Summary: different to Gothmogs Tutorial

Rating

Staff says

-

Members say

3.5

Average

3.5/5.0

2 votes

Page 1 2 3
We will start by going into Gandalfs ini. (data\ini\object\goodfaction\units\men\gandalf.ini)
Normally, you only need 2 pieces of code from the hero and paste it in the other hero's ini. But some powers might have otherwise. Word of Power only has 2 codes as far as I'm aware of. But anyway, pres Ctrl+F and type in whatever power you want. In my case it is "Word" (without the "). The reason search word and not WordOfPower is because usually it skips the animations and goes straight towards the behavior block. Now i have found my animations,
              
Code
        ;;; WORD OF POWER ANIMS ON FOOT ;;;
        AnimationState = SPECIAL_WEAPON_ONE
            StateName = Attacking
            Animation
                AnimationName = GUGandalfG_SKL.GUGandalfG_SPCK
                AnimationMode = ONCE
            End
            FXEvent            = Frame:5 Name:FX_GandalfPreAttackBlast
        End


I'm taking the one on foot as it still works when the Witch-King is on his horse but the blast will be a bit shorter in height. Now copy the code that you've found and paste it in your hero's ini, but you have to paste it at the end of the AnimationState list. You'll know where the end is because there will be either no more AnimationState's or there will sometimes be one of the hero's power animations.
Next we will need the code its self. Ctrl+f "word" (without the ")
There will be alot of "sword" stuff coming up but just keep on searching for Word of Power.
The code should look like this:
              
Code
    ;------- WORD OF POWER (BLUE RING BLAST) SPELL --------------------------------------------------------------------------------
    Behavior = UnpauseSpecialPowerUpgrade ModuleTag_WordEnabler
        SpecialPowerTemplate = SpecialAbilityWordOfPower
        TriggeredBy = Upgrade_GandalfWordOfPower
    End
    Behavior = SpecialPowerModule ModuleTag_WordStarter
        SpecialPowerTemplate = SpecialAbilityWordOfPower
        UpdateModuleStartsAttack = Yes
        StartsPaused              = Yes
    End
    Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_WordWeaponFireUpdate
        SpecialPowerTemplate = SpecialAbilityWordOfPower
        WhichSpecialWeapon        = 1
        SkipContinue            = Yes

        UnpackTime = 1700
        PackTime = 1    
        FreezeAfterTriggerDuration = 2500 ; Hold AI for this long after we fire.
        
        AwardXPForTriggering = 0        
        StartAbilityRange        = 80.0
        
        SpecialWeapon            = GandalfWordOfPower
    End


Once again, copy and paste it but this time paste it where some other hero powers are with the behaviors
e.g:
              
Code
    ;--------- MORGUL BLADE -----------------------------------------------------------------------------------
    Behavior = UnpauseSpecialPowerUpgrade ModuleTag_WitchkingMorgulBlade
        SpecialPowerTemplate = SpecialAbilityWitchkingMorgulBlade
        TriggeredBy = Upgrade_WitchkingMorgulBlade
    End
    Behavior = SpecialPowerModule ModuleTag_WitchkingMorgulBladeStarter
        SpecialPowerTemplate        = SpecialAbilityWitchkingMorgulBlade
        UpdateModuleStartsAttack    = Yes
        StartsPaused                = Yes
        InitiateSound                = AngWitchkingVoiceModeMorgulCorruption        ;LurtzVoiceAttackCripplingStrike
    End
    Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_WitchkingMorgulBladeUpdate
        SpecialPowerTemplate = SpecialAbilityWitchkingMorgulBlade
        SkipContinue            = Yes

        UnpackTime                = 250
        PreparationTime            = 1
        PersistentPrepTime        = 500
        PackTime                = 100
        WhichSpecialWeapon        = 1
        
        AwardXPForTriggering    = 0        
        StartAbilityRange        = 15.0
        MustFinishAbility     = Yes
        
        SpecialWeapon            = AngmarWitchkingMorgulBlade
    End
    Behavior = AutoAbilityBehavior ModuleTag_MorgulBladeAutoAbility
        SpecialAbility    = SpecialAbilityWitchkingMorgulBlade
        ForbiddenStatus = INSIDE_GARRISON
        AllowSelf        = No
        Query            = 1 MORGULBLADE_OBJECT_FILTER
    End

Just paste it under this type of code,
(it doesn't have to be morgul blade)

That is it for the hero's ini.

Credits

Comments

Display order: Newest first

Radspakr Wolfbane (Team Chamber Member) - Monday February 14, 2011 - 18:46

This is kind of redundant.
The idea of GtO's tutorial was to show how code in basic special powers.
It's the same for both games.

Unknown - Tuesday February 8, 2011 - 5:40

:D It works. Thx clank

Imdrar - Thursday December 23, 2010 - 8:59

I'm a credit of this? Never noticed.

modboy451 - Saturday December 18, 2010 - 13:43

thats because

              
Code

;;; WORD OF POWER ANIMS ON FOOT ;;;
        AnimationState = SPECIAL_WEAPON_ONE
            StateName = Attacking
            Animation
                AnimationName = GUGandalfG_SKL.GUGandalfG_SPCK
                AnimationMode = ONCE
            End
            FXEvent            = Frame:5 Name:FX_GandalfPreAttackBlast
        End

has the flag: SPECIAL_POWER_ONE
so does:
              
Code

;;; FIRE BALL SPECIAL POWER ;;;
        AnimationState         = SPECIAL_WEAPON_ONE
            Animation                = Throwing Fireball
                AnimationName        = IUSaruman_ATKB
                AnimationMode        = ONCE
            End
            FrameForPristineBonePositions = 27
        End


the fire ball and the Word of power ability
both ar flagged with SPECIAL_POWER_ONE flag...i don't know where you go to change it...
but that is why you get that glitch...

clank234 - Thursday December 16, 2010 - 5:37

@Modboy451
It worked fine for me except wen i used fireball he started with Word of Power but then the ball came out. Otherwise i have had no problmes with it

--------

sorry for double post,
also, this tutorial isn't meant to teach people how to model

modboy451 - Saturday December 11, 2010 - 15:46

Note: To Clank...
ERROR!!!

ANIMATIONS FROM OTHER UNITS WILL NOT WORK UNLESS THE MODEL IS BOUND TO THAT SKL!!!

EX:

Celeborn's (childobject at bottom of elrond.ini)animations/skl are the same as Elrond's so if you take one from elronds and add it to celeborn it WILL work...BUT...

gandalfs and thw which king's SKL are not the same of you add the animation listed above you might crash your game or make you unit stand funny like you see while modeling it(arms sticking out) if you want the animations to work you have to bind the model you want to use to Gandalfs SKL and use a model conditions state where he changes models and skeletons and then put that animations under that (flag the condition state and the animation with USER_# (i know 1 and 2 work for sure but some units already use that flag for something else)

Modboy451

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:35:50