The 3rd Age

BFME 2: Arcade Edition

BFME 2: Arcade Edition

Throws out all the conventional rules of a RTS game and opens the game up like a playable cheat code

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 - 7:37
Updated: Tuesday October 11, 2016 - 8:19
Views: 6241
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
This is it, the big one, one of the reasons that I started modding in the first place: how to make a hero have multiple commandsets. There are many ways to accomplish this, but most of them never worked for me, except for one: the horse togle method. Here's basically how it works:

First create all the SpecialPower entries that you require and all the commandbuttons you want. Now, for the example I want Malvack to have 2 commandset, the following to be more precise:

              
Code

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

CommandSet AngmarMalvackCommandSet_2
1 = Command_ToggleStance
2 = Command_SpecialAbilityAngmarMalvackSummonSoSAllies
3 = Command_MalvackSummonWatcherAlly
4 = Command_SpecialAbilityMalvackSummonWyrm
5 = Command_SpecialAbilityMalvackSummonBalrogAlly
6 = Command_SpecialAbilityMalvackToggleCS_2
12 = Command_CaptureBuilding
13 = Command_AttackMove
14 = Command_Stop
16 = Command_SetStanceBattle
17 = Command_SetStanceAggressive
18 = Command_SetStanceHoldGround
End


So all the commandbuttons we know how to code them,except for the ones that change the commandsets that is. So it will basically work as a horse toggle button. Here's the code so you can see what I mean:

              
Code

CommandButton Command_SpecialAbilityMalvackToggleCS
    Command            = SPECIAL_POWER
    SpecialPower        = SpecialAbilityToggleMounted
    TextLabel        = CONTROLBAR:MalvackToggle
    Options            = TOGGLE_IMAGE_ON_WEAPONSET    ON_GROUND_ONLY                ; Not really image, just audio
    FlagsUsedForToggle    = MOUNTED                                ; What we really want is to toggle Theoden's audio if he is mounted or unmounted. Ya, this is a hack
    ButtonImage        = HSFrodoOneRing HSFrodoOneRing
    ButtonBorderType    = ACTION
    DescriptLabel        = CONTROLBAR:MalvackToggleTooltip
    InPalantir        = Yes
End

CommandButton Command_SpecialAbilityMalvackToggleCS_2
    Command            = SPECIAL_POWER
    SpecialPower        = SpecialAbilityToggleMounted
    TextLabel        = CONTROLBAR:MalvackToggle_2
    Options            = TOGGLE_IMAGE_ON_WEAPONSET    ON_GROUND_ONLY                ; Not really image, just audio
    FlagsUsedForToggle    = MOUNTED                                ; What we really want is to toggle Theoden's audio if he is mounted or unmounted. Ya, this is a hack
    ButtonImage        = HSFrodoOneRing HSFrodoOneRing
    ButtonBorderType    = ACTION
    DescriptLabel        = CONTROLBAR:MalvackToggleTooltip_2
    InPalantir        = Yes
End


As you can see both buttons are exactly the same except for the name and the strings that will be displayed, other than that is the same. The magic of this trick is, as you would expect, in the special power modules within the object.

So what this method do is that it will kill your hero and substitute him/her with another hero. To not screw this up, we will use ChildObjects. A child object will be an exact copy of the object it is a child of, that is imagine you have your object of Malvack and it looks like this:

              
Code

Object AngmarMalvack

<<lots of code>>

End

ChildObject AngmarMalvack_2 AngmarMalvack
End


Even though AngmarMalvack_2 doesn't have a single line of code, he will be exactly the same as the original AngmarMalvack; but if you make a change in the childobject, this one will be the same as the "parent" except for your alteration. So what we are going to do is this change:

              
Code

Object AngmarMalvack

<<code>>

Commandset = AngmarMalvackCommandSet ;make sure he has the first commandset

<<even more code>>

End

ChildObject AngmarMalvack_2 AngmarMalvack

Commandset = AngmarMalvackCommandSet_2 ;make sure he has the OTHER commandset

End


However this is not enough, we have to tell the special ability to kill the object and select another object. So the new module that AngmarMalvck has to have is:

              
Code

;---------MOUNT------------------------------------------------------------------------
    Behavior = SpecialPowerModule ModuleTag_HorseToggleStarter
        SpecialPowerTemplate        = SpecialAbilityToggleMounted
        UpdateModuleStartsAttack    = Yes
        StartsPaused                = No
        ;InitiateSound                = FellBeastVoiceMove
    End

    Behavior = ToggleMountedSpecialAbilityUpdate ModuleTag_HorseToggle
        SpecialPowerTemplate = SpecialAbilityToggleMounted
        MountedTemplate            = AngmarMalvack_2
        SynchronizeTimerOnSpecialPower = ;***VERY IMPORTANT READ REST OF TUTORIAL THE3RDAGE.NET***
        UnpackTime = 0
        PreparationTime = 0            ; none, cause we hop onto our mount in no time at all :)
        PackTime = 0         ; none, cause we hop onto our mount in no time at all :)
        OpacityTarget            = .0        ; How see-thru to be at peak of change
        AwardXPForTriggering = 0
        IgnoreFacingCheck        = Yes
    End


That code belongs to the "parent" special powers section. Now, as the note goes, in the SynchronizeTimerOnSpecialPower section of power you must write ALL the SpecialPowerTemplates of both the power of the "parent" and the "child", is very important to write all of them because this is what force them to share the timer of powers. Let me explain what would happen without this:

You are playing with the parent, who has the Shake Foundation ability, you use this ability in some building. Then, immediately after you change to the child (who doesn't have this ability) and use the Summon Balrog ability, then you immediately after change back to the parent but now his ability of Shake Foundation has already recharged. Then you immediately after change back to the child and the Summon Balrog ability has already recharged (while the first Balrog is still on the field!)

With SynchronizeTimerOnSpecialPower you make sure that, although one doesn't have the ability of the other, the recharge time is respected all the way through (so you will have to wait to the Summon Balrog to recharge as you normally would despite having changed from the parent to the child or viceversa). Remember to write the names of the SpecialPowerTemplate in that section.

Now, as it is, the parent can change into the child but the child cannot become the parent, so we will add the new modules in the child as well. The whole body of the childobject is as follows:

              
Code


ChildObject AngmarMalvack_2 AngmarMalvack

Commandset = AngmarMalvackCommandSet_2 ;make sure he has the OTHER commandset

RemoveModule ModuleTag_HorseToggleStarter
RemoveModule ModuleTag_HorseToggle

;---------MOUNT------------------------------------------------------------------------
    Behavior = SpecialPowerModule ModuleTag_HorseToggleStarter
        SpecialPowerTemplate        = SpecialAbilityToggleMounted
        UpdateModuleStartsAttack    = Yes
        StartsPaused                = No
        ;InitiateSound                = FellBeastVoiceMove
    End

    Behavior = ToggleMountedSpecialAbilityUpdate ModuleTag_HorseToggle
        SpecialPowerTemplate = SpecialAbilityToggleMounted
        MountedTemplate            = AngmarMalvack ;***SEE HOW IT CHANGES BACK TO THE PARENT OBJECT***
        SynchronizeTimerOnSpecialPower = ; *AGAIN, WRITE ALL THE SPECIALPOWERTEMPLATES HERE*
        UnpackTime = 0
        PreparationTime = 0            ; none, cause we hop onto our mount in no time at all :)
        PackTime = 0         ; none, cause we hop onto our mount in no time at all :)
        OpacityTarget            = .0        ; How see-thru to be at peak of change
        AwardXPForTriggering = 0
        IgnoreFacingCheck        = Yes
    End
End


The reason why I removed the moduletags is because, as I said before, you CANNOT have the same moduletag more than once during the code, since the ChildObject inherits eveyrthing from his parent this will include the moduletags; it's an implicit repetition, so we have to remove it in order to avoid a possible crash.

There's only one tiny thing to do now: add the childobject to the experiencelevels.ini. You can go to your hero entry in that file and just write aside his/her name the name of the childobject, separated by a space, like this:

              
Code

    TargetNames                        =    AngmarMalvack AngmarMalvack_2


Obviously this has to be done in every entry, from level 1 to 10.

Naturally, you can apply this to a 3rd, 4th, or even more ChildObjects and you could have a hero with many commandset. And, believe or not, that's it.
Take care.

Links / Downloads

 HitsAdded
WinXPSoundRecorder491March 6, 2016 - 7:03
FinalBigEditor571March 5, 2016 - 8:29

Comments

Display order: Newest first

Amonrath - Monday August 14, 2017 - 4: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 - Wednesday April 26, 2017 - 0: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 - 12: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."

 
2:14:36