The 3rd Age

Simple BFME1 Mod

Simple BFME1 Mod

A very simple BFME1 mod with a few changes and balances

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

How To Make The AI Build Pre-Upgraded Units

Avatar of Ganon

Ganon

Category: Code
Level: Beginner
Created: Thursday June 2, 2016 - 1:58
Updated: Thursday June 2, 2016 - 4:17
Views: 8686
Summary: A quick and simple way to increase the difficulty of the AI.

Rating

Staff says

4.0

Members say

-

Average

4.0/5.0

1 vote

Page 1 2 3
Here I'll show you how to make any unit come to life with its upgrades already granted.

So in addition to all the steps you made on the previous page, we need to do a couple more things.
For the purpose of this tutorial, I'll make those Gondor soldiers come pre-upgraded for everyone. And not just that darn cheating AI.

First we need to open up "upgrade.ini" again, and make another generic upgrade. This time we'll make it number 2, like so:

              
Code
Upgrade Upgrade_GenericUpgrade2
    Type = OBJECT
End


Now open "experiencelevels.ini" and search for the ones pertaining to "GondorFighter"
The first rank will look like this:

              
Code
ExperienceLevel    GoodLevel1
    TargetNames                        =    RohanArcher RohanArcherHorde RohanArcherHordeSkirmishFormation RohanPeasant RohanPeasant1 RohanPeasant2 RohanPeasant3 RohanPeasant4 RohanPeasantHorde GondorFighter GondorFighterHorde GondorFighterHordeBlock GondorArcher GondorArcherHorde GondorArcherHordeWedgeFormation GondorFighterArcherComboHorde GondorFighterTrebuchetComboHorde RohanPeasantArcherComboHorde GondorBanner RohanBanner
    RequiredExperience                    =    M_EXPERIENCE_REQUIRED_GOOD_TROOP_1
    ExperienceAward                        =    M_EXPERIENCE_AWARD_GOOD_TROOP_1
    InformUpdateModule                    =    Yes
    Rank                            =    1
    LevelUpTintColor                    =    R:255 G:255    B:255
    LevelUpTintPreColorTime                    =    500    
    LevelUpTintPostColorTime                =    3000
    LevelUpTintSustainColorTime                =    500    

    SelectionDecal
        Texture                        =    decal_G_level4
        Texture2                    =    decal_good_CO
        Style                        =    SHADOW_MERGE_DECAL
        OpacityMin                    =    80%
        OpacityMax                    =    100%
        MinRadius                     =    HORDE_DECAL_MIN_RADIUS
        MaxRadius                    =    200
        MaxSelectedUnits                 =    40
    End    
END


Now insert this line directly under "Rank"

              
Code
    Upgrades                    =    Upgrade_GenericUpgrade2


It should now look like this:

              
Code
ExperienceLevel    GoodLevel1
    TargetNames                        =    RohanArcher RohanArcherHorde RohanArcherHordeSkirmishFormation RohanPeasant RohanPeasant1 RohanPeasant2 RohanPeasant3 RohanPeasant4 RohanPeasantHorde GondorFighter GondorFighterHorde GondorFighterHordeBlock GondorArcher GondorArcherHorde GondorArcherHordeWedgeFormation GondorFighterArcherComboHorde GondorFighterTrebuchetComboHorde RohanPeasantArcherComboHorde GondorBanner RohanBanner
    RequiredExperience                    =    M_EXPERIENCE_REQUIRED_GOOD_TROOP_1
    ExperienceAward                        =    M_EXPERIENCE_AWARD_GOOD_TROOP_1
    InformUpdateModule                    =    Yes
    Rank                            =    1
    Upgrades                    =    Upgrade_GenericUpgrade2
    LevelUpTintColor                    =    R:255 G:255    B:255
    LevelUpTintPreColorTime                    =    500    
    LevelUpTintPostColorTime                =    3000
    LevelUpTintSustainColorTime                =    500    

    SelectionDecal
        Texture                        =    decal_G_level4
        Texture2                    =    decal_good_CO
        Style                        =    SHADOW_MERGE_DECAL
        OpacityMin                    =    80%
        OpacityMax                    =    100%
        MinRadius                     =    HORDE_DECAL_MIN_RADIUS
        MaxRadius                    =    200
        MaxSelectedUnits                 =    40
    End    
END


Now go back to that "GondorFighterHorde" code where you copy/pasted that code on the previous page. And change this:
              
Code
        TriggeredBy        = Upgrade_HardAIMultiPlayer

To this:
              
Code
        TriggeredBy        = Upgrade_GenericUpgrade2


Now you should see this code in your "GondorFighterHorde":

              
Code
    ;;; HARD AI JUST CHEATS FOR THEIR UPGRADES ;;;
    Behavior = ObjectCreationUpgrade ModuleTag_HardAICheat1
        TriggeredBy        = Upgrade_GenericUpgrade2
        Delay            = 8.0
        GrantUpgrade    = Upgrade_GenericUpgrade1
    End
    
    Behavior = LevelUpUpgrade ModuleTag_HardAIJumpstart
        TriggeredBy = Upgrade_GenericUpgrade1
        LevelsToGain = 4
        LevelCap = 5
    End
    Behavior = ObjectCreationUpgrade ModuleTag_HardAICheat2
        TriggeredBy        = Upgrade_GenericUpgrade1
        Delay            = 2.0
        GrantUpgrade    = Upgrade_GondorHeavyArmor
    End
    Behavior = ObjectCreationUpgrade ModuleTag_HardAICheat3
        TriggeredBy        = Upgrade_GenericUpgrade1
        Delay            = 4.0
        GrantUpgrade    = Upgrade_GondorForgedBlades
    End
    
    ;;; END OF HARD AI CHEATS ;;;


And that's all. Now all Gondor soldiers will come fully prepared for battle at Rank 5, and with Heavy Armor and Forged Blades.

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

 
16:14:36