The 3rd Age

Fin's LOTR Expansion

Fin's LOTR Expansion

A mod that adds Rohan to the game, and strives to bring back some BFME I fun!

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

Converting a normal power into a CaH power

Avatar of Solinx

Solinx

Category: Code
Level: Intermediate
Created: Saturday March 24, 2007 - 18:17
Updated: Saturday June 27, 2009 - 18:57
Views: 12250
Summary: This guide will step by step show you how to convert a normal power into a CaH power

Rating

Staff says

3.7

Members say

4.4

Average

4.1/5.0

8 votes

Page 1 2 3 4 5 6 7 8
--- Copying the core of the ability ---

Copy the code from Eomer.ini and open createaheropowers.inc
Scroll to the bottom of that file and paste the code you copied from Eomer.ini into createaheropowers.inc

We can't use an exact copy of the power, because we need to make sure it's unique.

After my changes, the code looks like this:
              
Code
;;; PASSIVE OUTLAW LEADERSHIP;;;
    Behavior = UnpauseSpecialPowerUpgrade ModuleTag_CaHOutlawLeadershipEnabler
        SpecialPowerTemplate = SpecialAbilityCaHFakeLeadership2
        TriggeredBy = Upgrade_CaHOutlawLeader
    End
    Behavior = SpecialPowerModule ModuleTag_CaHOutlawLeadershipUpdate
        SpecialPowerTemplate     = SpecialAbilityCaHFakeLeadership2
        UpdateModuleStartsAttack = No
        StartsPaused = Yes
    End    
    Behavior = AttributeModifierAuraUpdate ModuleTag_CaHOutlawLeadership
        StartsActive    = No;If no, requires upgrade to turn on.
        BonusName        = EomerPassiveOutlawLeadership
        TriggeredBy        = Upgrade_CaHOutlawLeader
        RefreshDelay    = 2000
        Range            = 200
        AllowSelf        = Yes
        ObjectFilter    = ANY +CAVALRY +INFANTRY -STRUCTURE -BASE_FOUNDATION -DOZER
    End    

If you compare the two code blocks, you will notice that I changed the ModuleTag, SpecialPowerTemplate and the TriggeredBy values.
In case you want the aura to have different attributes modifiers, you naturally can create your own. But that is outside the scope of this guide.


--- The upgrade ---

Simple stuff first. We created a new upgrade, named "Upgrade_CaHOutlawLeader". There is no such upgrade defined yet, so we need to do that.

Open createaheroupgrades.inc and add the following code:               
Code
Upgrade Upgrade_CaHOutlawLeader
Type             = OBJECT
End
This identifies Upgrade_CaHOutlawLeader as an upgrade for the CaH object.

That's it for the upgrade.


--- The SpecialPowerTemplate ---

Just as simple, open createaherospecialpowers.ini and add the following code:               
Code
;------------------------------------------------------------------------------
; For the CaH version of Eomer's passive leadership abilities
SpecialPower SpecialAbilityCaHFakeLeadership2
Enum                = SPECIAL_FAKE_LEADERSHIP_BUTTON
ReloadTime         = 1; in milliseconds
End

Now we've also defined the special power.

Note: When adding a lot of powers to one CaH class, try not to use the same Enum. The game won't allow normal objects to have any Enum twice in all their abilities. CaH may be different, but it is unlikely.


Next page: CommandButton.ini

Credits

CahikFinding the Disguise power exception

Comments

Display order: Newest first

imreszabo2018 - Monday November 7, 2022 - 12:22

Nice tutorial.
Can you help me in something? I am new in the site and I want to create a new ability for create a hero archers. It would be a passive ability that increases the range and attack speed of the bow. I noticed that I can do it in weapon.ini and I tried creating a new weapon based on the CreateAHeroBasicRangedWeapon. As soon as the hero gets this new ability in game I want to update this CreateAHeroBasicRangedWeapon to my new weapon object . Is this even possible? Tried it in createaheroweaponupgrades.inc but the program don't really accept anything

Berethomb - Thursday November 24, 2011 - 21:15

Help! I can't paste anything into createheropowers.inc! What shall I do?

King Komodo3 - Sunday February 13, 2011 - 13:28

I need some help with my project, I'm making a goblin create a hero, I have him in the Servant of sauron area and I need to add Mount/Dismount Scorpion & Toggle Weapon. If you could help me that would be great (I have a forum file in the BFME2/RTWK section the goblin one talking about adding the Goblin Fiend)

lilkaka - Friday October 16, 2009 - 11:24

Thanks for the guide. But do you know how to convert the special power of Mount/Dismount into the power of Elven CaH Archer?

Elaryan - Thursday January 15, 2009 - 8:54

m...i'll do it with the balrog's fire whip!

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:10:18