The 3rd Age

Game Enhancement Mod

Game Enhancement Mod

Enhances the expansion by adding new units, new features, and a new faction: Arnor!

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

Apollo's Ultimate Intermediate Tutorial

Avatar of Elric

Elric

Category: Code
Level: Intermediate
Created: Sunday January 23, 2011 - 19:36
Updated: Sunday June 16, 2013 - 19:51
Views: 7346
Summary: Almost all you need to know about intermediate coding...

Rating

Staff says

2.0

Members say

3.8

Average

3.6/5.0

7 votes

Page 1 2 3 4 5 6
Making Larger Hordes.

Note: Make RohanElvenWarriors be recruited from somewhere.

For this tutorial piece I will be using the "RohanElvenWarriorHorde".
Go to your hordes folder and click on Rohan. Then Open up the ini and look For RohanElvenWarriorHorde.

The RohanElvenWarriorHorde Code:

              
Code

Object RohanElvenWarriorHorde

    ; This is required for garrisoned objects - please put in all objects.
    ButtonImage      = BCElvenBarracks_ElvenWarriors
    SelectPortrait = UPRohan_ElvenWarrior



    Draw = W3DScriptedModelDraw ModuleTag_W3DModelDraw
     DependencySharedModelFlags = EMOTION_ALERT EMOTION_MORALE_HIGH EMOTION_MORALE_LOW EMOTION_AFRAID EMOTION_COWER SELECTED EMOTION_TERROR
        DefaultModelConditionState
            Model = None ;InvisHrdeTmp5x2
        End
        ModelConditionState = HORDE_EMPTY
            Model = None
        End        
        ModelConditionState = WORLD_BUILDER
            Model = HordeTemp_5By2
        End
    End

    
    Side = Men ; ;Obsolete
    EditorSorting = UNIT
    EmotionRange = 240
    DisplayName = OBJECT:RohanElvenWarrior ; ;OBJECT:HordeRohanElves
    DisplayNameStrategic = CONTROLBAR:LW_Unit_ElvenWarriorHorde ; ;
    DescriptionStrategic = CONTROLBAR:LW_ToolTip_ElvenWarriorHorde ; ;
    
    WeaponSet
        Conditions = None
        Weapon = PRIMARY ElvenArcherMissileHordeRangefinder
    End
    WeaponSet
        Conditions = WEAPONSET_TOGGLE_1
        Weapon = PRIMARY    NormalMeleeHordeRangefinder
    End
    
    CommandSet = RohanElvenWarriorHordeCommandSet

    ; *** AUDIO Parameters ***
    ; Note: Don't put voice parameters here -- they will be ignored. Voice play requests
    ; are always passed through to members
    #include "..\..\..\includes\StandardHordeEvaEvents.inc"


    CrushableLevel = 0 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
    CrusherLevel = 0

    BuildCost = ROHAN_ELVENWARRIOR_BUILDCOST            
    BuildTime = ROHAN_ELVENWARRIOR_BUILDTIME            
    VisionRange = 470 ; ; ROHAN_ELVENWARRIOR_HORDE_VISION_RANGE
    VisionSide = 40%
    VisionRear = 15%
    VisionBonusPercentPerFoot = 1.0%
    ShroudClearingRange = 470 ; ;161
    CommandPoints = 40 ; ;20
        
    FormationWidth = 2 ; Width it occupies in formations. Current choices are 1 or 2.
    FormationDepth = 1 ; Depth it occupies in formations. Current choices are 1 or 2.
    
TransportSlotCount = TRANSPORTSLOTCOUNT_SMALL_HORDE
    KindOf = SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT INFANTRY HORDE ARCHER ARMY_SUMMARY MELEE_HORDE;UNATTACKABLE
    
    Body = ImmortalBody ModuleTag_ImmortalBody
        MaxHealth = 1
    End
    
    Behavior = StancesBehavior ModuleTag_StancesBehavior
StanceTemplate = FighterHorde
End

    #include "..\..\..\includes\CaptureBuilding.inc"
    
    Behavior = HordeAIUpdate ModuleTag_HordeAIUpdate
        AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS STEALTHED
        MoodAttackCheckRate = 500
        MaxCowerTime                =    5000
        MinCowerTime                =    3000
        CanAttackWhileContained = Yes ; Can fire out of garrisoned building        
AILuaEventsList                = InfantryFunctions    
AttackPriority                =     AttackPriority_Archer
    End

    Behavior = HordeContain ModuleTag_HordeContain
        ObjectStatusOfContained =
        InitialPayload = RohanElvenWarrior 10 ; ;GOOD_MEN_HORDE_SIZE
        Slots = 10 ; ;5
        PassengerFilter = NONE +INFANTRY
        ShowPips = No
        ThisFormationIsTheMainFormation = Yes    ;Used to determine which armorset to use (and anything else we want!)
        RandomOffset = X:1 Y:1
        
        ; Banner Carrier info        
        BannerCarriersAllowed    = RohanBanner                                        ; types of units that are allowed as banner carriers
        BannerCarrierPosition    = UnitType:RohanElvenWarrior    Pos:X:35.0 Y:0.0    ; (DEFAULT) position of banner carrier for elven warrior horde
        
        ; Positions for 10 ; ;5
        RankInfo = RankNumber:1 UnitType:RohanElvenWarrior Position:X:13 Y:0    Position:X:8 Y:25        Position:X:8 Y:-25        Position:X:3 Y:50        Position:X:3 Y:-50     
        RankInfo = RankNumber:2 UnitType:RohanElvenWarrior Position:X:-9 Y:0    Position:X:-12 Y:25    Position:X:-12 Y:-25    Position:X:-15 Y:50    Position:X:-15 Y:-50
                
        RanksToReleaseWhenAttacking = 1 2
        MeleeAttackLeashDistance = 25; How far the hordes can move from the center of the horde when melee attacking.
    End
    
    Behavior = PhysicsBehavior ModuleTag_PhysicsBehavior
        GravityMult = 1.0
    End
    
    Behavior = EmotionTrackerUpdate    Module_EmotionTracker
        TauntAndPointDistance        =    INFANTRY_TAUNT_POINT_RADIUS        ; max distance to taunted/pointed objet
        TauntAndPointUpdateDelay    =    1000    ; how often scan (milliseconds)
        TauntAndPointExcluded        =    NONE
        AfraidOf                    =    NONE +GondorGwaihir +RohanTreeBerd +RohanEntFir +RohanEntAsh +RohanEntBirch +MordorCaveTroll +MordorMountainTroll +MordorDrummerTroll +MordorFellBeast +MordorWitchKingOnFellBeast +MordorMumakil;Must be SCARY kindof as well.
        AlwaysAfraidOf                =    NONE +MordorBalrog +RohanOathbreaker +MordorSauron ;+MordorWitchKing +MordorWitchKingOnFellBeast
        PointAt                =    NONE +MordorFellBeast +MordorWitchKingOnFellBeast +GondorGwaihir
        HeroScanDistance        =    150
        FearScanDistance        =    ARCHER_FEAR_SCAN_RADIUS



        AddEmotion    =    Terror_Base
        AddEmotion    =    Doom_Base
        AddEmotion    = BraceForBeingCrushed_Base
        AddEmotion    =    UncontrollableFear_Base
        AddEmotion    =    FearIdle_Base
        AddEmotion    =    FearBusy_Base
        AddEmotion    =    Point_Base
        AddEmotion    =    Taunt_Base    
        AddEmotion    =    CheerIdle_Base
        AddEmotion    =    CheerBusy_Base
        AddEmotion    =    HeroCheerIdle_Base
        AddEmotion    =    HeroCheerBusy_Base
        AddEmotion    =    Alert_Base
    End            


    
    LocomotorSet
        Locomotor = NormalMeleeHordeLocomotor
        Condition = SET_NORMAL
        Speed = NORMAL_ELVEN_FAST_HORDE_SPEED ; ;NORMAL_GOOD_FAST_HORDE_SPEED        
    End

    Behavior = ProductionUpdate ProductionUpdateModuleTag
        GiveNoXP = Yes
    End

; ;
    Behavior = LevelUpUpgrade ModuleTag_BasicTraining
        TriggeredBy = Upgrade_ElvenBasicTraining
        LevelsToGain = 1
        LevelCap = 2
    End
    
    Behavior = StatusBitsUpgrade ModuleTag_ProductionLegality
        TriggeredBy = Upgrade_ElvenForgedBlades
    End
    
    Behavior = StatusBitsUpgrade ModuleTag_ProductionLegality2
        TriggeredBy = Upgrade_ElvenHeavyArmor
    End

    Behavior = StatusBitsUpgrade ModuleTag_ProductionLegality3
        TriggeredBy = Upgrade_ElvenSilverthornArrows
    End
    
    Geometry = BOX
    GeometryMajorRadius = 20.0
    GeometryMinorRadius = 20.0
    GeometryHeight = 20.0
    GeometryIsSmall = No
End


Ok Look at these pieces of code:

              
Code

Behavior = HordeContain ModuleTag_HordeContain
        ObjectStatusOfContained =
        InitialPayload = RohanElvenWarrior 10 ; ;GOOD_MEN_HORDE_SIZE
        Slots = 10 ; ;5
        PassengerFilter = NONE +INFANTRY
        ShowPips = No
        ThisFormationIsTheMainFormation = Yes    ;Used to determine which armorset to use (and anything else we want!)
        RandomOffset = X:1 Y:1
        
        ; Banner Carrier info        
        BannerCarriersAllowed    = RohanBanner                                        ; types of units that are allowed as banner carriers
        BannerCarrierPosition    = UnitType:RohanElvenWarrior    Pos:X:35.0 Y:0.0    ; (DEFAULT) position of banner carrier for elven warrior horde
        
        ; Positions for 10 ; ;5
        RankInfo = RankNumber:1 UnitType:RohanElvenWarrior Position:X:13 Y:0    Position:X:8 Y:25        Position:X:8 Y:-25        Position:X:3 Y:50        Position:X:3 Y:-50     
        RankInfo = RankNumber:2 UnitType:RohanElvenWarrior Position:X:-9 Y:0    Position:X:-12 Y:25    Position:X:-12 Y:-25    Position:X:-15 Y:50    Position:X:-15 Y:-50
                
        RanksToReleaseWhenAttacking = 1 2
        MeleeAttackLeashDistance = 25; How far the hordes can move from the center of the horde when melee attacking.
    End


See The "Slots =" and it says 10 which is the amount of units in the horde. Change it to 15. After that go to the Positions for 10 and copy RankNumber:1 Completly and paste it below RankNumber:2 and change the 1 to 3 and change the positions. After fooling around and getting the positions it should look like this:

              
Code
RankInfo = RankNumber:3 UnitType:RohanElvenWarrior Position:X:10 Y:0 Leader 2 0    Position:X:10 Y:20 Leader 2 1    Position:X:10 Y:-20 Leader 2 2    Position:X:10 Y:40 Leader 2 3    Position:X:10 Y:-40 Leader 2 4

Now go to game and Buy some ElvenWarriors and there should be 3 rows.

Links / Downloads

 HitsAdded
Clanks Ultimate Beginner Tutorial1296January 23, 2011 - 19:39

Credits

ElricMaker
clank234Gave me the idea from Clanks Ultimate Beginners Tutorial
The3rdAgeFor the help from all community members who helped me learn

Comments

Display order: Newest first

wesleypicard - Monday July 23, 2018 - 2:15

rate it a 10 but i am confused on one thing on page 3 where you explain how to increase horde size. i understand part of it. do i have to change the initial payload as well or leave that alone? and what about the rohirram? do you do the same with them as with the elven warriors?

--------

elric thanks so much for this tutorial i am finally able to increase horde sizes thanks to this.

Radspakr Wolfbane (Team Chamber Member) - Sunday August 14, 2011 - 6:10

In the FX ParticleSystems Shader refers to the type of Shader used these can be Alpha which reads the Alpha channel,Additive which reads Black as transparency and of course you can choose not to have them.

Zues - Saturday August 6, 2011 - 15:07

Pretty Clear could use a little improvmennt

Elric - Saturday August 6, 2011 - 9:53

@newbkiller: what do you mean choice 2. i need a page number to help you?

newbkiller.williams - Saturday August 6, 2011 - 4:26

could you explain choice number 2 aswell please , because i dont know how to put a new models/textures into the game

Poseidon - Tuesday January 25, 2011 - 16:43

I really think that this article follows up clanks in quite a few ways. I can't wait until this whole article is finished! This will be very helpful to me in some map.ini coding and maybe modding once i think i am ready for it...

Elric - Tuesday January 25, 2011 - 16:23

Please Comment and Rate. I would release this whole tutorial in one go but i wanted to release half first and then half later. Just in case I never finished it so at least people will have 1 half of it...

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

 
10:49:09