The 3rd Age

RJ - RotWK

RJ - RotWK

A mod that combines the best of BFME1 and BFME2 - living world campaign, factions, AI, bases, etc.

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


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


Staff says


Members say




8 votes

Page 1 2 3 4 5 6 7 8
--- CommandButton.ini ---

The next step is to open up CommandButton.ini and find this code:               
CommandButton Command_RohanEomerOutlawLeadership
Command                 = SPECIAL_POWER
SpecialPower            = SpecialAbilityFakeLeadership2
Options         = NONPRESSABLE
TextLabel             = CONTROLBAR:OutlawLeadership
ButtonImage             = UCCommon_Pillage
RadiusCursorType        = TrainingRadiusCursor
ButtonBorderType        = ACTION
DescriptLabel         = CONTROLBAR:ToolTipOutlawLeadership
InPalantir         = Yes

Copy it and paste it at the bottom of the file.
Just copying isn't enough. For a start, all buttons must have an unique name. Change it into Command_CreateAHero_HotW_OutlawLeadership.
The specialpower name is used to link the button to the bits of code in the object. Clearly it needs to be the same as in
You'll also need to change the TextLabel and DescriptLabel, I've made the assumption you know how to do that.

So far, this has been similar to duplicating a normal power. Now we come at the new code that is only used for the CaH. For now, just use this code:               

    CreateAHeroUIAllowableUpgrades        = Upgrade_CreateAHero_ClassHeroOfTheWest
    CreateAHeroUIMinimumLevel            = 1
    CreateAHeroUIPrerequisiteButtonName    = None
The combined result of the button will be:               
CommandButton Command_CreateAHero_HotW_OutlawLeadership
Command                 = SPECIAL_POWER
SpecialPower            = SpecialAbilityCaHFakeLeadership2
Options         = NONPRESSABLE
TextLabel             = CONTROLBAR:CreateAHeroOutlawLeadership
ButtonImage             = UCCommon_Pillage
RadiusCursorType        = TrainingRadiusCursor
ButtonBorderType        = ACTION
DescriptLabel         = CONTROLBAR:ToolTipCreateAHeroOutlawLeadership
InPalantir         = Yes

CreateAHeroUIAllowableUpgrades    = Upgrade_CreateAHero_ClassHeroOfTheWest
CreateAHeroUIMinimumLevel        = 1
CreateAHeroUIPrerequisiteButtonName    = None

That's it. You now have changed this simple leadership from a normal power to a level 1 HotW power. No need to do anything with experience ini's, since the last three lines of code, together with hardcoded stuff, make sure your CaH gets this power when he should.

With the release of RotWK, the commandbuttons of the CaH's have a 4th line: The costs of the power.

Add the following line to the bottom, just above the 'end' of course, of each commandbutton:               
CreateAHeroUICostIfSelected = 500
You can replace 500 with the costs you find appropiate for the power, or you can use one of the variables that EA used with their powers. You can find the values of these variables in\ini\gamedata.ini

Next page: Making a chain with the normal level 1 CaH leadership


CahikFinding the Disguise power exception


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 but the program don't really accept anything

Berethomb - Thursday November 24, 2011 - 21:15

Help! I can't paste anything into! 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."