The 3rd Age

BOTTA Mod

BOTTA Mod

This mod tends to follow the lore of books and films along with bringing the realism in the gameplay

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

Delaying the Mount/Dismount Toggle

No Avatar

Gath of Baal

Category: Code
Level: Beginner
Created: Saturday December 10, 2011 - 21:27
Updated: Saturday December 10, 2011 - 21:52
Views: 3336
Summary: A quick and easy way to delay the Nazgul from running around on foot during scrimmage games.

Rating

Staff says

3.0

Members say

3.0

Average

3.0/5.0

3 votes

DELAYING THE MOUNT/DISMOUNT TOGGLE

Here's an alternative, quick and easy way to delay the Nazgul from running around on foot during scrimmage games. It basically turns the given "Mount/Dismount" clickable button into a deactivated toggle switch that only becomes available once the Nazgul reaches a certain level which you will pre-determine. Until then, he will start and remain mounted and cruise around  to wreck havoc on enemy foot soldiers!

Disclaimer: This variant was created to enhance play of "scrimmage" games; I'm not sure if these same altered files are accessed by "campaign" games, which if so, could dramatically change the way campaign-mode was intended to play. Also, this variant affects both AI and players i.e., if playing as Mordor during scrimmage and raising a hero Nazgul, you will also have the mount/dismount toggle disabled until the appropriate level is reached.

Files edited are:

blackrider.ini
upgrade.ini
experiencelevels.ini
commandset.ini
lotr.str


STEP 1: Adjust the "blackrider.ini" file

Open "blackrider.ini" and scroll down to find the code block (or just do CTRL+F and find, "TOGGLE MOUNTED ABILITY")

              
Code

    ;--------- TOGGLE MOUNTED ABILITY -----------------------------------------------------------------------------------
     Behavior = SpecialPowerModule ModuleTag_HorseToggleStarter                     
         SpecialPowerTemplate        = SpecialAbilityToggleMounted
         UpdateModuleStartsAttack    = Yes
         StartsPaused                = No
     End
    Behavior = ToggleMountedSpecialAbilityUpdate ModuleTag_HorseToggle
         SpecialPowerTemplate        = SpecialAbilityToggleMounted
         TriggerInstantlyOnCreate    = Yes  ;Instantly puts Black Rider on a horse.
         UnpackTime                    = 750 ; ;2000
         PreparationTime                = 1 
         PersistentPrepTime            = 250
         PackTime                    = 750 ; ;2000
         OpacityTarget                = .3        ; How see-thru to be at peak of change  
         AwardXPForTriggering        = 0
    End



Add the following behavior, which is the switch that will put mount/dismount on "hold" basically; also note that "StartsPaused" has been changed to "yes"

              
Code

;--------- TOGGLE MOUNTED ABILITY -----------------------------------------------------------------------------------
     Behavior = UnpauseSpecialPowerUpgrade ModuleTag_UnpauseHorseToggle
        SpecialPowerTemplate        = SpecialAbilityToggleMounted
        TriggeredBy                    = Upgrade_NazgulDreadRiderToggle
    End
    Behavior = SpecialPowerModule ModuleTag_HorseToggleStarter                     
         SpecialPowerTemplate        = SpecialAbilityToggleMounted
         UpdateModuleStartsAttack    = Yes
         StartsPaused                = yes
     End
    Behavior = ToggleMountedSpecialAbilityUpdate ModuleTag_HorseToggle
         SpecialPowerTemplate        = SpecialAbilityToggleMounted
         TriggerInstantlyOnCreate    = Yes  ;Instantly puts Black Rider on a horse.
         UnpackTime                    = 750 ; ;2000
         PreparationTime                = 1 
         PersistentPrepTime            = 250
         PackTime                    = 750 ; ;2000
         OpacityTarget                = .3        ; How see-thru to be at peak of change  
         AwardXPForTriggering        = 0
    End


Save the file, close it.
   
STEP 2: Adjust the "upgrade.ini" file

Open "upgrade.ini" and add this upgrade which is the new trigger for toggle mount/dismount:
              
Code

Upgrade Upgrade_NazgulDreadRiderToggle
  Type              = OBJECT
End


Save and close the file.

STEP 3: Adjust the "experience.ini" file

Open the "experience.ini" file and CTRL+F looking for "EvilMenBlackRider". You'll see blocks of code that look like this:

              
Code

ExperienceLevel    BlackRiderLevel8
    TargetNames                = EvilMenBlackRider EvilMenBlackRiderMounted
    RequiredExperience        = 1220 ; ;600
    ExperienceAward            = 120   
    AttributeModifiers        = HeroLevelUpDamage7
    Rank                    = 8
    LevelUpFx                =    FX:GandalfLevelUp1FX
    SelectionDecal
        Texture                = decal_hero_evil
        Style                =    SHADOW_ALPHA_DECAL
        OpacityMin            =    50%   
        OpacityMax            =    100%
        MinRadius            = 40
        MaxRadius            = 200
        MaxSelectedUnits    = 40
    End   
END   


You'll note the different upgrades he receives and at what level he receives them  (i.e., Upgrade_BlackRiderDreadVisage at level 2, Upgrade_BlackRiderMorgulBlade at level 6 etc.)
Now we can add our mount/dismount toggle upgrade wherever we want our Nazgul to earn it. I've chosen level 8 which gives him a fair amount of time to cruise around on horseback, since the AI's tendency is to switch him on foot once he's earned/unlocked it.  My level 8 experience code block now looks like:

              
Code

ExperienceLevel    BlackRiderLevel8
    TargetNames                = EvilMenBlackRider EvilMenBlackRiderMounted
    RequiredExperience        = 1220 ; ;600
    ExperienceAward            = 120   
    AttributeModifiers        = HeroLevelUpDamage7
    Rank                    = 8
    LevelUpFx                =    FX:GandalfLevelUp1FX
    Upgrades                =    Upgrade_NazgulDreadRiderToggle
    SelectionDecal
        Texture                = decal_hero_evil
        Style                =    SHADOW_ALPHA_DECAL
        OpacityMin            =    50%   
        OpacityMax            =    100%
        MinRadius            = 40
        MaxRadius            = 200
        MaxSelectedUnits    = 40
    End   


Save and close the experience.ini file.

At this point things should be up and running, function-wise. Test it by running a scrimmage game controlling Mordor and having some Mordor AI opponents; your nazgul should only receive the Mount/Dismount toggle whenever he reaches the level you defined (level 8 in my example) and the same goes with any AI-controlled nazgul opponents.

If everything's working fine, you can proceed to fixing the minor stuff which I like to think of as "cosmetic."

STEP 4: Cosmetic Fixes

You probably noticed his power up icons are all whacky and out of order or the text doesn't match up to what level he earns a power so you'll need to adjust that.

Open up the "commandset.ini" file and find this block (or just CTRL + F and find, "blackrider"):

              
Code


CommandSet EvilMenBlackRiderCommandSet
    1    = Command_ToggleStance
    2    = Command_MountHorseBlackRider
    3    = Command_BlackRiderDreadVisage
    4    = Command_BlackRiderMorgulBlade
    5    = Command_SpecialAbilityScreechBlackRider
    12    = Command_CaptureBuilding
    13    = Command_AttackMove
    14    = Command_Stop
End


Keeping 1,12,13 and 14 as they are, go ahead and rearrange the order in which the powers are received and renumber them accordingly (don't get confused; this has nothing to do with levels. It's simply the order of how the icons appear in the control panel and should be numbered sequentially 1, 2, 3, 4 etc.)

Test/run the game again to check if your Nazgul's icons appear in the correct order he's receiving them. If so you can proceed to make changes to any text that doesn't match up (for instance if you wanted to add a "Requires level 8" to your mount/dismount toggle description, or if you shifted 'Screech' from level 10 to level 7 but it still says level 10 required etc.)

I'm going to assume you know how to do this by making the necessary tweaks to the "lotr.str" file found in the data1.big (if not, it's fairly easy. Just open the file and modify the appropriate text. Here's a hint: use CTRL + F and search for "blackrider" to track down what you need to fix faster)

Lastly, before I forget...
re-open the "blackrider.ini" file and find the block:

              
Code

Behavior = SlowDeathBehavior ModuleTag_08
        ; Die and don't spawn horse
        DeathTypes = ALL
        SinkDelay = 3000
        SinkRate = 0.80     ; in Dist/Sec
        DestructionDelay = 12000
        ;ProbabilityModifier = 33
        Sound = INITIAL GondorSoldierVoiceDie
    End


Change "Sound = INITIAL GondorSoldierVoiceDie" to "Sound = INITIAL NazgulScreech" so now anytime your (or your enemy's) Nazgul gets killed, he'll let out a final scream which adds a nice touch.

Anyway, hope you enjoy this quick and easy tweak to a timelessly fun LoTR classic. I'm sure it'd be easy enough to adapt/implement to any character that might have a similar setup to the Nazgul (Eowyn and Theoden come to mind).

Comments

Display order: Newest first

JUS_SAURON - Monday January 2, 2012 - 23:14

Good tutorisl : Simple but effective ...I had overlooked the Death Sound

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

 
17:41:47