The 3rd Age

Armies of Middle-Earth Mod

Armies of Middle-Earth Mod

a strategy focused mod that make it hard and strategic to win,

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

extended map.ini coding

Avatar of -SilverBane-

-SilverBane-

Category: Code
Level: Intermediate
Created: Thursday May 28, 2015 - 18:08
Updated: Sunday May 31, 2015 - 12:20
Views: 4835
Summary: A tutorial for those who want to make heavily customized maps, but modders might find tricks too!

Rating

Staff says

-

Members say

-

Average

-

0 votes

Page 1 2 3 4 5 6 7 8
4=======================================================================================================
This tutorial assumes that you know how to work with AddModule, ReplaceModule and RemoveModule. You can find out how to use them in Rob38's tutorial.
But I will give you a small idea how an object works:
              
Code

Object IsengardPikeman
;-)
; |
; |
; |
; | } all your changes here, including modules, settings, weaponsets, etc
; |
; |
; |
; |
;-)
End


I will take IsengardPikeman as an example now, to help you understand how it works. So, open isengardpikeman.INI (found here: data\ini\object\evilfaction\units\isengard).
You will notice:

              
Code

ButtonImage = WOR_UrukPikemen
SelectPortrait = UPIsenguard_UrukPikeman



These ones define the palantir portrait and the image of the button when the unit is in a garrison. Pretty simple.


              
Code

Draw = W3DHordeModelDraw
;
;
;
;
;
;
End



This one is usually the longest and most complex module on an object. It tells the game what model and animations must use for this unit.

              
Code

CommandPoints = 4



This one defines how many cp fills one unit. Since a horde haves 15 IsengardPikeman, 15*4 = 60cp, wich you already know. If you change this to 2 let's say, when you purchase the horde in-game it will say 60, but when the units are produced they will only take 30 cp, because the horde object haves cp also used to determine if you can buy the horde or not. An example of a bug in original 1.06 is the GondorRanger horde, wich says it costs 70cp but takes only 60cp when produced.
The horde is an inert object that contains a # of units and makes them act as one.

              
Code

    WeaponSet
        Conditions = None
        Weapon = PRIMARY IsengardPikemanPike ;BALANCE Isengard Pikeman Weapon
    End

    
This one sets the weapon used by this unit. Very important, open weapon.ini and find "Weapon IsengardPikemanPike" (without the quotes) to see how it looks.

              
Code

ArmorSet
Conditions = None
Armor = PikemenArmor
DamageFX = NormalDamageFX
End

ArmorSet
Conditions = PLAYER_UPGRADE
Armor = PikemenHeavyArmor
DamageFX = NormalDamageFX    
End


These ones set the armor used by this unit. Open armor.ini and find "Armor PikemenArmor" to see what it looks like.
The 2nd armor set, with condition PLAYER_UPGRADE, is triggered by this module:
              
Code

    Behavior = ArmorUpgrade ArmorUpgradeModuleTag
        TriggeredBy = Upgrade_IsengardHeavyArmor
        ArmorSetFlag            = PLAYER_UPGRADE
    End





;=============================================================





              
Code


    VisionRange = ISENGARD_URUKPIKEMAN_VISION_RANGE
    ShroudClearingRange = SHROUD_CLEAR_STANDARD

    VisionSide = 35%
    VisionRear = 25%
    
    MaxVisionBonusPercent = 300%
    VisionBonusTestRadius = 200
    VisionBonusPercentPerFoot = 2.0%


These ones explain themselves, they set the vision range for the unit.

              
Code

BountyValue = ISENGARD_URUKPIKEMAN_BOUNTY_VALUE
DisplayName = OBJECT:IsengardPikeman
CrushableLevel = 0 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
CrusherLevel = 0 ;What can I crush?: 0 = small animals, 1 = infantry, 2 = trees, 3 = vehicles
    CrushRevengeWeapon = AntiCavalryInfantryCrushRevenge



Bountyvalue - is the amount of money you get if you kill this unit (and having scavenger power active or outlaw leadership/pillage)
DisplayName - Unfortunately, this one doesn't works as it should in map.ini. You can use existing name tags, but you can't create a new name in map.str, it will still show MISSING as it wasn't defined.
CrushableLevel - Explains itself, infantry haves lvl 0
CrusherLevel - Cavalry haves this level 1, mumakil haves level 4, so it can crush pretty much anything
CrushRevengeWeapon - This is very important, it determines the damage dealt by infantry (or the crushed unit) to cavalry (or other crusher). So when you crush with cavalry pikemen, THIS weapon deals damage to cavalry and not the main weapon, wich makes forged blades upgrade many times useless if you only want to protect your archers and not to attack with them.


              
Code


CommandSet = IsengardPikemanCommandSet


This sets the commandbuttons shown in palantir, open commandset.INI and commandbutton.INI for more info



              
Code

KindOf = PRELOAD SELECTABLE CAN_CAST_REFLECTIONS INFANTRY PATH_THROUGH_EACH_OTHER SCORE THROWN_OBJECT GRAB_AND_DROP URUK ATTACK_NEEDS_LINE_OF_SIGHT CAN_USE_SIEGE_TOWER


These are unit parameters that are a must to exist. They are used in many situations, like DamageScalars for weapons, so if an infantry unit lacks INFANTRY token, that weapon won't deal increased damage to them.




              
Code

    Body                    =    PorcupineFormationBodyModule ModuleTag_porcupineFormation
        CheerRadius             = EMOTION_CHEER_RADIUS
        MaxHealth            =    ISENGARD_URUKPIKEMAN_HEALTH                ;BALANCE Isengard Pikeman Health
        MaxHealthDamaged        =    ISENGARD_URUKPIKEMAN_HEALTH_DAMAGED        
        ;RecoveryTime            =    ISENGARD_URUKPIKEMAN_HEALTH_RECOVERY_TIME    
        DamageWeaponTemplate        =    PikemenPorcupineDamage
        CrushDamageWeaponTemplate    =    PikemenPorcupineCrushDamage
        CrusherLevelResisted        =    1;    ;What crusher level can I resist?: 1 = infantry, 2 = trees, 3 = vehicles
        BurningDeathBehavior = Yes
        BurningDeathFX = FX_InfantryBurningFlame
        CheerRadius = EMOTION_CHEER_RADIUS
    End

This module sets the amount of health this unit haves. This is an exception, since the pikemen needs porcupine formation, usually it is:
    

              
Code

Body = ActiveBody ModuleTag_02
        CheerRadius     = EMOTION_CHEER_RADIUS
        MaxHealth     = ISENGARD_URUKFIGHTER_HEALTH                ;BALANCE Uruk Hai Health
        MaxHealthDamaged     = ISENGARD_URUKFIGHTER_HEALTH_DAMAGED         ; this one sets DAMAGED model condition, for special anims, skins, etc
        BurningDeathBehavior = Yes
        BurningDeathFX = FX_InfantryBurningFlame
        CheerRadius = EMOTION_CHEER_RADIUS
    End



You will find yourself changing this module often, to balance the game.



;================================

              
Code

    Behavior = SubObjectsUpgrade Armor_Upgrade
        TriggeredBy        = Upgrade_IsengardHeavyArmor
        UpgradeTexture    = IUUrukahi.tga 0 IUUrukahi_HA.tga
        UpgradeTexture    = IUUrukahi_L.tga 0 IUUrukahi_HA.tga
        UpgradeTexture    = IUUrukahi_M.tga 0 IUUrukahi_HA.tga
        RecolorHouse            = Yes
        ExcludeSubobjects        = Forged_Blade
    End

This module sets the new heavy armor skin after the upgrade its purchased. It is often used in custom maps to change the skin of units to look different.



              
Code

LocomotorSet
Locomotor = HumanLocomotor
Condition = SET_NORMAL
Speed = NORMAL_ISENGARD_PIKEMEN_MEMBER_SPEED ; ;NORMAL_EVIL_FAST_MEMBER_SPEED        
End


This changes the movement speed of your unit. If you change the speed of a horde member, make sure you change the speed in the horde too (wich must be slightly smaller than unit speed), or nothing will happen.



              
Code

Behavior = SlowDeathBehavior ModuleTag_05
DeathTypes = ALL -KNOCKBACK
SinkDelay = 3000 ; how much time before it starts to sink
SinkRate = 0.40 ; in Dist/Sec
DestructionDelay = 8000 ;how fast it dissappears
Sound = INITIAL UrukVoiceDie    
End


This one sets what happens when your unit dies. You can add here FX, weapons, sounds.



              
Code

Geometry = CYLINDER
GeometryMajorRadius = 8.0
GeometryMinorRadius = 8.0
GeometryHeight = 19.2
GeometryIsSmall = Yes

Shadow = SHADOW_DECAL
ShadowSizeX = 21;
ShadowSizeY = 21;
ShadowTexture = ShadowI;

You usually won't need to mess with these things in map.ini, but geometry can sometimes cause pathing problems, so I've added it here.




So, you have an idea now how an unit works and the most importants parts of it. In the next page I will show you how you can create your own special abilities.

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

 
18:03:12