The 3rd Age

Return of Shadow

Return of Shadow

A large scale mod that greatly expands the game.

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: 16180
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
So, funny thing about this page, this is the second time I'm writing this one down, I was logged out and nothing was saved at all... >:(

So where was I? Oh yes, the RespawnUpdate module. There are a couple of things that I want to get through, first and foremost is that every part of the code is driven by modules, each module behave differently. Some modules draw your hero, others make sure he/she walks correctly at the propper speed and fashion, and so on. Each module has a name that will tell the game how to read it (i.e. is it drawing? walking? casting a power?) and a moduletag, which acts as solely as a unique name within the object. Therefore, you can have the modules of the same behavior within the object as long as their moduletag is different; if you have the same moduletag more than once, your game will crash.

In other words, you can have RespawnUpdate twice or even more as long as the two modules have different moduletags.

So, having that out of the way, we'll look at the malvack.ini RespawnUpdate to change it.

              
Code

    Behavior = RespawnUpdate ModuleTag_RespawnUpdate
;        DeathAnim                = STUNNED                ;Model condition to play when killed-to-respawn
        DeathAnim                = DYING                 ;Model condition to play when killed-to-respawn
        DeathFX                = FX_BoromirDieToRespawn    ;FXList to play when killed-to-respawn
        DeathAnimationTime        = 4966 ;1133            ;How long DeathAnim will take.
        InitialSpawnFX            = FX_BoromirInitialSpawn
        RespawnAnim                = LEVELED                ;Animation to play when respawning.
        RespawnFX                = FX_BoromirRespawn        ;FXList to play when respawning.
        RespawnAnimationTime        = 2000                ;Time it takes for respawn to play.
        AutoRespawnAtObjectFilter    = NONE +CASTLE_KEEP        ;Respawn at this location -- and at it's exit production point if possible.
        ButtonImage                = HICAHCaptainGondor_res
        
        ;RespawnEntries determine the ruleset for how a character can be revived. Some units may automatically respawn, others
        ;may require a specific revive action performed on him. You can specify different values for each level... or use Level:Any
        RespawnRules =            AutoSpawn:No    Cost:625        Time:60000        Health:100%        ;DEFAULT VALUES    
    End


As you can see, there are 3 effects that are named after Denethor's favorite son, every time that something special happens (like Boromir initial spawn) a special effect will play out. For the most part, at least here, the effects are the lights that come out of the castle and the voice of Boromir saying "I shall see the glory of Gondor restored". If you want your hero to say this and all the other Boromir quotes then move along, if not, stay a little bit.

There are 2 ways to change this effects, either by creating new ones in data>ini>fxlist.ini for every hero you make or just use the ones of CaH. This is by far way easier because 1 they are already there and 2 because, when the time comes, we will only focus on the voice of our hero in 2 files instead of 3.

So, I will change the effects of the hero with the ones of CaH, so in the end you should have something like this:

              
Code

    Behavior = RespawnUpdate ModuleTag_RespawnUpdate
        DeathAnim                = DYING                        //Model condition to play when killed-to-respawn
        DeathFX                    = FX_HeroDieToRespawn        //FXList to play when killed-to-respawn
        DeathAnimationTime            = 5000                        //How long DeathAnim will take.
        InitialSpawnFX                = FX_HeroInitialSpawn
        RespawnAnim                = LEVELED                    //Animation to play when respawning.
        RespawnFX                = FX_HeroRespawn            //FXList to play when respawning.
        RespawnAnimationTime        = 2000                ;Time it takes for respawn to play.
        AutoRespawnAtObjectFilter    = NONE +CASTLE_KEEP        ;Respawn at this location -- and at it's exit production point if possible.
        ButtonImage                = HICAHCaptainGondor_res
        
        ;RespawnEntries determine the ruleset for how a character can be revived. Some units may automatically respawn, others
        ;may require a specific revive action performed on him. You can specify different values for each level... or use Level:Any
        RespawnRules =            AutoSpawn:No    Cost:625        Time:60000        Health:100%        ;DEFAULT VALUES    
    End



There's one more thing you can do with the RespawnUpdate module, and that is to add some respawnrules. As it is, if you create your hero and dies, respawing him will cost $625 and will take 1 minute to do so; we can change that by adding some rules. Here's an example of what our hero will look like if we add some respawnrules


              
Code

    Behavior = RespawnUpdate ModuleTag_RespawnUpdate
        DeathAnim                = DYING                        //Model condition to play when killed-to-respawn
        DeathFX                    = FX_HeroDieToRespawn        //FXList to play when killed-to-respawn
        DeathAnimationTime            = 5000                        //How long DeathAnim will take.
        InitialSpawnFX                = FX_HeroInitialSpawn
        RespawnAnim                = LEVELED                    //Animation to play when respawning.
        RespawnFX                = FX_HeroRespawn            //FXList to play when respawning.
        RespawnAnimationTime        = 2000                ;Time it takes for respawn to play.
        AutoRespawnAtObjectFilter    = NONE +CASTLE_KEEP        ;Respawn at this location -- and at it's exit production point if possible.
        ButtonImage                = HICAHCaptainGondor_res
        
        ;RespawnEntries determine the ruleset for how a character can be revived. Some units may automatically respawn, others
        ;may require a specific revive action performed on him. You can specify different values for each level... or use Level:Any
        RespawnRules =            AutoSpawn:No    Cost:625        Time:60000        Health:100%        ;DEFAULT VALUES    
        RespawnEntry =    Level:2                Cost:750        Time:55000    ; Change from 1.07                        ; ;50% cost, 1x buildtime ;For other levels, only override what is different.
        RespawnEntry =    Level:3                Cost:750         Time:55000    ; Change from 1.07
        RespawnEntry =    Level:4                Cost:750         Time:55000    ; Change from 1.07
        RespawnEntry =    Level:5                Cost:975        Time:110000    ; Change from 1.07                        ; ;65% cost, 1.5x buildtime
        RespawnEntry =    Level:6                Cost:975        Time:110000    ; Change from 1.07
        RespawnEntry =    Level:7                Cost:975        Time:110000    ; Change from 1.07
        RespawnEntry =    Level:8                Cost:1200        Time:165000     ; Change from 1.07                    ; ;80% cost, 2x buildtime
        RespawnEntry =    Level:9                Cost:1200        Time:165000     ; Change from 1.07
        RespawnEntry =    Level:10            Cost:1200        Time:165000     ; Change from 1.07
    End


Now that we are all set, there's one last thing I want to say before moving on, and that is the SlowDeathBehavior module. All this module does, aside from setting the animation to do its thing, is to play a sound or effect whenever your hero dies. Right now, our hero has the same SlowDeathBehavior module as Boromir, which is:

              
Code

    Behavior = SlowDeathBehavior ModuleTag_05
        DeathTypes = ALL
        SinkDelay = 3000
        SinkRate = 0.40 ; in Dist/Sec
        DestructionDelay = 8000
        Sound = INITIAL BoromirVoiceDie
;        - Where does this stuff go? -
;        UnpackTime = 2000
;        PreparationTime = 1
;        PersistentPrepTime = 4000
;        PackTime = 2000
;        WhichSpecialWeapon = 1
    End


We can change it to the one of CaH, that is:

              
Code

    Behavior = SlowDeathBehavior ModuleTag_SlowDeathBehavior_01
        DeathTypes         = ALL //-KNOCKBACK
        SinkDelay         = 5800
        SinkRate         = 2.3        // in Dist/Sec
        DestructionDelay = 12000
        // Die sounds are now going through an FX; this is the only way to get different dies for
        // different classes
        FX = INITIAL FX_CreateAHeroDie
    End


It doesn't matter that the moduletag changes from the one of Boromir to the one of CaH, as long as its unique within the object it won't matter how it's named.

Is very important to say that the FX_CreateAHeroDie effect won't play any sound at all when your hero dies, it will only set some light and stuff, but nothing more. The voice of your hero dying will be changed in further chapters.

Links / Downloads

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

 
5:38:18