The 3rd Age

The Battle for Alagaësia

The Battle for Alagaësia

A mod that transport BFME2:ROTWK to the Inheritance cycle universe

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

Ultimate beginner's guide. New hero, many topics

Avatar of malvack

malvack

Category: Code
Level: Beginner
Created: Saturday March 5, 2016 - 6:37
Updated: Tuesday October 11, 2016 - 6:19
Views: 16181
Summary: Guide to make new hero based on CaH and many other topics

Rating

Staff says

-

Members say

5.0

Average

5.0/5.0

2 votes

Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
As you can see, copying powers from hero to hero isn't that difficult, you just have to copy the exact same set of behaviors and you're done. Copying powers from CaH heroes to normal heroes isn't that different, although there are a few more steps involved.

As before, I'll suppose that you have every file close, so the first thing you want to do is to open data>ini>object>createahero>createaheropowers.inc and look for any power you want; in this tutorial I'll choose cripple strike lvl 2 (melee version). So, same as before, I'll copy all the behaviors I want and paste them in myhero.ini file, after doing that, my hero will have this modules:

              
Code

//--------------------------------------------------------------------------    
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_CreateAHeroHotWCrippleStrikeMeleeEnabler_Level2
    SpecialPowerTemplate = SpecialAbilityCreateAHeroHotWCrippleStrikeMelee_Level2
    TriggeredBy             =
End

Behavior = SpecialPowerModule ModuleTag_CreateAHeroHotWCrippleStrikeMeleeStarter_Level2
    SpecialPowerTemplate     = SpecialAbilityCreateAHeroHotWCrippleStrikeMelee_Level2
    UpdateModuleStartsAttack = Yes
    StartsPaused             = Yes
//        InitiateSound             = LurtzVoiceAttackCripplingStrike
End
Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_CreateAHeroHotWCrippleStrikeMeleeUpdate_Level2
    SpecialPowerTemplate = SpecialAbilityCreateAHeroHotWCrippleStrikeMelee_Level2
    SkipContinue         = Yes

    UnpackTime             = 1100    //Pull out arrow
    PreparationTime         = 1    //Quick    shot
    PersistentPrepTime     = 500    //looping the quick    shot
    PackTime             = 500    //back to idle
    MustFinishAbility     = Yes
    
    AwardXPForTriggering = 0    
    StartAbilityRange     = 30.0
    
    SpecialWeapon         = CreateAHeroCrippleStrikeMelee_Level2
    WhichSpecialWeapon     = 1
//    RejectedConditions     = WEAPON_TOGGLE
End


As you can see, is the exact same procedure as before, however now we have a problem. You see, the reason why copying from hero to hero is so fast is because the section SpecialPowerTemplate looks for the power inside the specialpower.ini file, the problem here is that the template SpecialAbilityCreateAHeroHotWCrippleStrikeMelee_Level2 does not exsists in specialpower.ini, it is in createaherospecialpower.ini, so what we have to do is open data>ini>createaherospecialpower.ini look for the template SpecialAbilityCreateAHeroHotWCrippleStrikeMelee_Level2 and copy it; now go to data>ini>specialpower.ini and paste it, while doing it change its name so you can reference later. When you're done with that you'll have something that looks like this:

              
Code

//------------------------------------------------------------------------------
SpecialPower SpecialAbilityMalvackCrippleStrikeMelee
    Enum                                     =    SPECIAL_AT_VISIBLE_OBJECT
    ReloadTime                                 =    45000
    PublicTimer                                 =    No
    //InitiateAtLocationSound = LurtzVoiceAttackCripplingStrike
    ObjectFilter                             = CRIPPLE_STRIKE_OBJECT_FILTER
End


Now go back to yourhero.ini and replace every CaH SpecialPowerTemplate with your new SpecialPowerTemplate; in other words, replace SpecialAbilityCreateAHeroHotWCrippleStrikeMelee_Level2 with SpecialAbilityMalvackCrippleStrikeMelee. So you will end up with something resambling this:

              
Code

;--------------MALVACK CRIPPLE STRIKE------------------------------------------------------------    
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_CreateAHeroHotWCrippleStrikeMeleeEnabler_Level2
    SpecialPowerTemplate = SpecialAbilityMalvackCrippleStrikeMelee
    TriggeredBy             = Upgrade_ObjectLevel1
End

Behavior = SpecialPowerModule ModuleTag_CreateAHeroHotWCrippleStrikeMeleeStarter_Level2
    SpecialPowerTemplate     = SpecialAbilityMalvackCrippleStrikeMelee
    UpdateModuleStartsAttack = Yes
    StartsPaused             = Yes
//        InitiateSound             = LurtzVoiceAttackCripplingStrike
End
Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_CreateAHeroHotWCrippleStrikeMeleeUpdate_Level2
    SpecialPowerTemplate = SpecialAbilityMalvackCrippleStrikeMelee
    SkipContinue         = Yes

    UnpackTime             = 1100    //Pull out arrow
    PreparationTime         = 1    //Quick    shot
    PersistentPrepTime     = 500    //looping the quick    shot
    PackTime             = 500    //back to idle
    MustFinishAbility     = Yes
    
    AwardXPForTriggering = 0    
    StartAbilityRange     = 30.0
    
    SpecialWeapon         = CreateAHeroCrippleStrikeMelee_Level2
    WhichSpecialWeapon     = 1
//    RejectedConditions     = WEAPON_TOGGLE
End


As you can see I wrote the name of the power above the modules just to make it easier to find. Also I changed the TriggeredBy section so my hero will unlock this power as soon as he reaches level 1. The moduletags can retain their CaH name, since that won't affect at all the power, although if you want, you can change it to make it look prettier.


The last thing that we have to do is to create the commandbutton, and commandset entrance. Open the commandbutton.ini file and look for the one you gave to your hero, copy it and paste it somewhere in the file. There are three things you have to change, first off the name, secondly you'll have to delete the part of the commandbutton that interacts with the CaH system, and finally you will change the SpecialPowerTemplate. After these 3 changes will change from this:

              
Code

CommandButton Command_CreateAHero_HotW_CrippleStrikeMelee_Level2
Command = SPECIAL_POWER
SpecialPower = SpecialAbilityCreateAHeroHotWCrippleStrikeMelee_Level2
Options = NEED_TARGET_ENEMY_OBJECT // CONTEXTMODE_COMMAND
TextLabel = CONTROLBAR:SpecialAbilityHotWCrippleStrikeMelee_Level2
CursorName = EvilAbilityObj
InvalidCursorName = GenericInvalid
ButtonImage = HSCrippleStrikeMelee
ButtonBorderType = ACTION
DescriptLabel = CONTROLBAR:ToolTipSpecialAbilityHotWCrippleStrikeMelee_Level2
InPalantir             = Yes

    CreateAHeroUIAllowableUpgrades             =    Upgrade_CreateAHero_ClassHeroOfTheWest
    CreateAHeroUIMinimumLevel                 = 7
    CreateAHeroUIPrerequisiteButtonName =    Command_CreateAHero_HotW_CrippleStrikeMelee_Level1
    CreateAHeroUICostIfSelected                 = CAH_CRIPPLESTRIKEMELEE_LEVEL2_COST
End


To this:

              
Code

CommandButton Command_MalvackCrippleStrikeMelee
Command = SPECIAL_POWER
SpecialPower = SpecialAbilityMalvackCrippleStrikeMelee
Options = NEED_TARGET_ENEMY_OBJECT // CONTEXTMODE_COMMAND
TextLabel = CONTROLBAR:SpecialAbilityHotWCrippleStrikeMelee_Level2
CursorName = EvilAbilityObj
InvalidCursorName = GenericInvalid
ButtonImage = HSCrippleStrikeMelee
ButtonBorderType = ACTION
DescriptLabel = CONTROLBAR:ToolTipSpecialAbilityHotWCrippleStrikeMelee_Level2
InPalantir             = Yes
End


Now go to the commandset and put the new commandbutton in the next spot. When you're done with that, you'll have something like this (don't forget to uncomment):

              
Code

CommandSet AngmarMalvackCommandSet
1 = Command_ToggleStance
2 = Command_SpecialAbilityAngmarMalvackShakeFoundation
3 = Command_MalvackCrippleStrikeMelee
; 4 =
; 5 =
; 6 =
12 = Command_CaptureBuilding
13 = Command_AttackMove
14 = Command_Stop
16 = Command_SetStanceBattle
17 = Command_SetStanceAggressive
18 = Command_SetStanceHoldGround
End


So that's it, your hero has a CaH power, feel free to test it out.

Links / Downloads

 HitsAdded
WinXPSoundRecorder1341March 6, 2016 - 6:03
FinalBigEditor1685March 5, 2016 - 7:29

Comments

Display order: Newest first

Amonrath - Monday August 14, 2017 - 2:16

Hello! I'm trying to do the but in the bfme I. Is there any different steps? I created a folder with my own mod... I then just edit the values that I want and I save them... I have also added the -mod in the end of the "Path" as well as done the lotr.srt extraction. Could anyone help? Thanks =D

--------

Hello! I'm trying to do the but in the bfme I. Is there any different steps? I created a folder with my own mod... I then just edit the values that I want and I save them... I have also added the -mod in the end of the "Path" as well as done the lotr.srt extraction. Could anyone help? Thanks =D

BouncyKnight - Tuesday April 25, 2017 - 22:08

Amazing step-by-step, very detailed and explanatory tutorial on how to create your custom heroes! Thank you sir, you're great!

Gabriel Oak - Tuesday December 13, 2016 - 11:19

I created this account only to thank you, sir. This tutorial is really, really useful.

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

 
15:24:58