The 3rd Age

Age of the Firstborn

Age of the Firstborn

A mod that adds two new factions, new CaH-Class, new maps and more

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: 17081
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
If you are here, it means that you have a fully operational battlesta... I mean, I hero that works properly, congrats =)

Now it's time to give him some powers, to cover as much topics as I can I will give him a power from another hero, a power from CaH, and a power from a spellbook; and yes, I know that these topics are already covered in other tutorials, but I want to write them just because.

The first power we are going to steal is Gloin's Shake Foundation. Let's say that you have closed every file of the mod just for the tutorial sake, now open yourhero.ini and gloin.ini, that's all for now. In every hero ability there are from 2 to 4 different behaviors, in this case is 4, but no matter how many are there copy them all. As you would expect paste all the behaviors of the desired ability into yourhero.ini, if you want to delete the ones of Boromir (since I'm not going to use any in this tutorial) do it carefully.

Now yourhero.ini should have this part:

              
Code

    ;;;; SHAKE FOUNDATION SPECIAL ABILITY ;;;;--------------------------------------------------------------------
    Behavior = UnpauseSpecialPowerUpgrade ModuleTag_ShakeFoundationEnabler
        SpecialPowerTemplate = SpecialAbilityDwarvenGloinShakeFoundation
        TriggeredBy = Upgrade_EnableDwarvenGloinShakeFoundation
    End

    Behavior = SpecialPowerModule ModuleTag_ShakeFoundationStarter
        SpecialPowerTemplate = SpecialAbilityDwarvenGloinShakeFoundation
        UpdateModuleStartsAttack = Yes
        StartsPaused              = Yes
        InitiateSound                = GloinVoiceGenericSpecialAbility
    End

    Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_ShakeFoundationWeaponFireUpdate
        SpecialPowerTemplate = SpecialAbilityDwarvenGloinShakeFoundation
        SpecialWeapon            = DwarvenGloinShakeFoundationWeapon
        WhichSpecialWeapon        = 2            ; Corresponds to SPECIAL_WEAPON_TWO
        StartAbilityRange        = 15.0

        SkipContinue            = Yes
        UnpackTime                = 1400        ; Trigger on frame 42 (of 115)
        PackTime                = 2433        ; Remaining 73 frames (of 115)
        MustFinishAbility        = Yes
    End
    Behavior = AutoAbilityBehavior ModuleTag_ShakeFoundationAutoAbility
        SpecialAbility            = SpecialAbilityDwarvenGloinShakeFoundation
        Query                    = 1 ANY ENEMIES +STRUCTURE -UNATTACKABLE
        MaxScanRange            = 100
    End


Now there are 2 tiny problems if you leave it like this; 1 is that the power is only activated upon recieving the Upgrade_EnableDwarvenGloinShakeFoundation upgrade, an upgrade that your hero do not recieve at any point, the other problem is that yourhero will sound like Gloin when he/she activates his/her ability.

The first problem can be solved by 2 different ways; first you could give your hero the upgrade at the desired level simply by opening experiencelevels.ini and put it in the upgrade section of the level. The other, and the one that I always use, is to change the upgrade in yourhero.ini to something he/she has.

Either way, for testing porpoises, I'll give him the power at level 1, so in my case my hero will look like this:

              
Code

    ;;;; SHAKE FOUNDATION SPECIAL ABILITY ;;;;--------------------------------------------------------------------
    Behavior = UnpauseSpecialPowerUpgrade ModuleTag_ShakeFoundationEnabler
        SpecialPowerTemplate = SpecialAbilityDwarvenGloinShakeFoundation
        TriggeredBy = Upgrade_ObjectLevel1
    End

    Behavior = SpecialPowerModule ModuleTag_ShakeFoundationStarter
        SpecialPowerTemplate = SpecialAbilityDwarvenGloinShakeFoundation
        UpdateModuleStartsAttack = Yes
        StartsPaused              = Yes
;        InitiateSound                = GloinVoiceGenericSpecialAbility I won't use this voice
    End

    Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_ShakeFoundationWeaponFireUpdate
        SpecialPowerTemplate = SpecialAbilityDwarvenGloinShakeFoundation
        SpecialWeapon            = DwarvenGloinShakeFoundationWeapon
        WhichSpecialWeapon        = 2            ; Corresponds to SPECIAL_WEAPON_TWO
        StartAbilityRange        = 15.0

        SkipContinue            = Yes
        UnpackTime                = 1400        ; Trigger on frame 42 (of 115)
        PackTime                = 2433        ; Remaining 73 frames (of 115)
        MustFinishAbility        = Yes
    End
    Behavior = AutoAbilityBehavior ModuleTag_ShakeFoundationAutoAbility
        SpecialAbility            = SpecialAbilityDwarvenGloinShakeFoundation
        Query                    = 1 ANY ENEMIES +STRUCTURE -UNATTACKABLE
        MaxScanRange            = 100
    End


Notice that I commented the InitiateSound part for I don't want to hear Gloin at this point.


So, our hero knows Shake Foundation but he doesn't have the button in his/her commandset, so we have to change that as well. Again, for the tutorial sake, I will open data>ini>commandbutton.ini and copy gloin's shake foundation and paste it at the bottom of the file, the ONLY change I will do is the name, so I end up with:

              
Code

CommandButton Command_SpecialAbilityAngmarMalvackShakeFoundation
Command = SPECIAL_POWER
Options                 = NEED_TARGET_ENEMY_OBJECT
SpecialPower = SpecialAbilityDwarvenGloinShakeFoundation
TextLabel = CONTROLBAR:GloinShakeFoundation
CursorName             = Bombard
InvalidCursorName         = GenericInvalid
ButtonImage = HSGloinShakeFoundation
ButtonBorderType = ACTION
DescriptLabel = CONTROLBAR:ToolTipDwarvenGloinShakeFoundation
InPalantir             = Yes

AutoAbility             = Yes
AffectsKindOf         = STRUCTURE
PresetRange             = 15.0
End


Remember that the alteration I did was on the copy, NOT in the original commandbutton.


Now go to commandset.ini, search for yourherocommandset and put the new commandbutton in the first spot for an ability. In the end you have something like this:

              
Code

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


And that's it. Now you can test your hero to see if he/she can use the shake foundation ability.

If you want your hero to unlock shake foundation at some other level (after testing it works properly) just change the name of the upgrade; instead of Upgrade_ObjectLevel1 be Upgrade_ObjectLevel7 or Upgrade_ObjectLevel10. Remember that some powers ask for an upgrade twice, watch out for those...

Links / Downloads

 HitsAdded
WinXPSoundRecorder1512March 6, 2016 - 6:03
FinalBigEditor1785March 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."

 
8:54:04