The 3rd Age

The Peloponnesian Wars

The Peloponnesian Wars

The Peloponnesian Wars (or TPW) aims to bring BFME2 into Greece, 5th Century BCE.

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

A Guide to Map.INI Hacks

Tutorial for Battle for Middle-earth BFME, Battle for Middle-earth II BFME 2, Battle for Middle-earth II: Rise of the Witch-king ROTWK

Avatar of m@tt

m@tt

Category: Code
Level: Intermediate
Created: Tuesday May 1, 2007 - 9:37
Updated: Tuesday May 1, 2007 - 9:41
Views: 14346
Summary: A guide to making changes to a map that can't be done within WB

Rating

Staff says

3.0

Members say

4.0

Average

3.5/5.0

6 votes

/// This was all done by Rohara over at GR so all credits go to him not me ///
///Refers to BFME II but some bits also apply to BFME 1, but not all of it does ///

INTRODUCTION

The map.ini file is where you can adjust settings for almost *any* element in the game for use in your map. A lot can be done using scripts within the map itself, but scripting is limited to the pre-defined set of WorldBuilder scripts; whereas map.ini is only limited to the SAGE engine (essentially) itself.

You should use a combination of the two for best results, and only use map.ini for things you can't do with scripting. Map.ini files should reside in your map's folder along with your .map, .tga, and map.str files (if applicable).

Unfortunately, though, there is a downside to using extensive map.ini files: they work once, then you must restart your game or else you will get the dreaded Out Of Sync error, even if you try to play the very same map again.

If you do use a map.ini file that changes things other than the most very basic elements of the game (such as fog, water reflections, low LOD settings), it is a very good idea to include a warning in the map itself (ie: upon victory or defeat, show text to the players stating they need to restart their game).


INI TOOLS

The best way to get started with map.ini editing is to have a look at the .ini files that come with the game. You can do this using a program called FinalBig. Use FinalBig to extract the ini.big file (from your game's install folder) somewhere you can take a look at them. Ini files can be opened/edited/created with Notepad or any text editor. Just about anything you find in the game's .ini files can be modified in your map.ini file.


COMMON INI HACKS

Anyway, without further adieu, here's some hacks that I find myself using often. Even if you don't need them, they may help you begin learning about map.ini hacks.

1. Players Start Without a Fortress and Builders

              
Code
PlayerTemplate <Faction Name>
StartingBuilding = NONE
StartingUnit0 = NONE
StartingUnit1 = NONE
End

<Faction Name> can be:
FactionMen
FactionElves
FactionDwarves
FactionIsengard
FactionMordor
FactionWild

2. Remove Timer from Summoned Watcher

              
Code
Object WatcherHead
RemoveModule ModuleTag_LifetimeUpdate
End

Object WatcherHittingArm
RemoveModule ModuleTag_LifetimeUpdate
End

Object WatcherCaldera
RemoveModule ModuleTag_LifetimeUpdate
End


3. Remove Timer from Summoned Dragon

              
Code
Object SummonedDragon
RemoveModule ModuleTag_LifetimeUpdate
End

ChildObject SummonedDragonJH1 SummonedDragon
RemoveModule ModuleTag_LifetimeUpdate
End


4. Remove/Set Timer for Misc Objects

Remove:
              
Code
Object <ObjectName>
RemoveModule ModuleTag_LifetimeUpdate
End

Set:
              
Code
Object <ObjectName>
ReplaceModule ModuleTag_LifetimeUpdate
Behavior = LifetimeUpdate ModuleTag_LifetimeUpdateOverride
MinLifetime = <Minimum Time In Milliseconds>
MaxLifetime = <Maximum Time In Milliseconds>
DeathType = FADED
End
End

(*Note* If a particular spell/ability has more than one Object or ChildObject, you will probably need to remove/set the timer for each Object or ChildObject as well. See "Remove Timer from Summoned Watcher" above for an example. Also note that the DeathType variable is not required for all objects, so I recommend omitting it unless you run into problems.)

<ObjectName> can be:

Spells:
EyeOfSauron (Eye of Sauron spell)
MordorBalrog (Balrog Ally spell)
Wyrm (Awaken Wyrm spell)
RohanOathbreakerHorde (Army of the Dead spell)
RohanOathbreaker1 (Army of the Dead spell)
RohanOathbreakersCavalry (Army of the Dead spell)
Crebain (Murder of Crows spell)
IsengardMurderOfCrows (Murder of Crows spell)
WildBatCloud (Wild Cave Bat spell)
PalantirVisionBase (Palantir spell)
EnshroudingMistPing (Enshrouding Mist spell)
WatcherHead (Summon Watcher spell)
WatcherHittingArm (Summon Watcher spell)
WatcherCaldera (Summon Watcher spell)
SummonedDragon (Dragon Ally spell)

Hero Abilities:
RohanOathbreakerHordeSmall (Aragorn's mini-AOTD summon ability)
GaladrielTornado02 (Galadriel's Storm summon ability)
GaladrielTornado (Galadriel's Storm summon ability)
ElrondWhirlwind (Elrond's Tornado summon ability)
SarumanLightning (Saruman's Lightning Strike ability)

Fortress Abilities:
IvoryTowerVisionBase (Ivory Tower Vision ability)

CaH Abilities:
CreateAHeroOilDrum_Level1 (I don't use CaH much so I'm not sure what this does tongue.gif )
CreateAHeroOilDrum_Level2 (I don't use CaH much so I'm not sure what this does tongue.gif )
CreateAHeroOilDrum_Level3 (I don't use CaH much so I'm not sure what this does tongue.gif )
CreateAHeroFamiliar_Base (I don't use CaH much so I'm not sure what this does tongue.gif )
CreateAHeroTornado_Level1 (CaH Tornado Level 1 ability)
CreateAHeroTornado_Level2 (CaH Tornado Level 2 ability)
CreateAHeroTornado_Level3 (CaH Tornado Level 3 ability)

Misc:
BoatDeathSplash (Not sure, but I wouldn't mess with it)
Marker (Not sure, but I wouldn't mess with it)
ElvenWhirlpool (Elven Storm Ship's whirlpool attack)
ShroudRevealer_Bombard (Not sure, but I wouldn't mess with it)

5. Remove/Set Timer for Misc ChildObjects

Remove:
              
Code
ChildObject <ChildObjectName ObjectName>
RemoveModule ModuleTag_LifetimeUpdate
End

Set:
              
Code
ChildObject <ChildObjectName ObjectName>
ReplaceModule ModuleTag_LifetimeUpdate
Behavior = LifetimeUpdate ModuleTag_LifetimeUpdateOverride
MinLifetime = <Minimum Time In Milliseconds>
MaxLifetime = <Maximum Time In Milliseconds>
DeathType = FADED
End
End

(*Note* If a particular spell/ability has more than one Object or ChildObject, you will probably need to remove/set the timer for each Object or ChildObject as well. See "Remove Timer from Summoned Watcher" above for an example. Also note that the DeathType variable is not required for all objects, so I recommend omitting it unless you run into problems.)

<ChildObjectName ObjectName> can be:

Spells:
IsengardWildmanHorde_Summoned IsengardWildmanHorde (Wild Men Allies spell)
IsengardWildman_Summoned IsengardWildman (Wild Men Allies spell)
WildSpiderling_Summoned WildSpiderling (Spiderling Allies spell)
MinorSpider_Summoned MinorSpider (Spiderling Allies spell)
RohanHobbitFriendsHorde_Summoned RohanHobbitFriendsHorde (Hobbit Allies spell)
RohanHobbit_Summoned RohanHobbit (Hobbit Allies spell)
RohanFrodo_Summoned RohanFrodo (Hobbit Allies spell)
RohanMerry_Summoned RohanMerry (Hobbit Allies spell)
RohanPippen_Summoned RohanPippin (Hobbit Allies spell)
RohanSam_Summoned RohanSam (Hobbit Allies spell)
TomBombadil_Summoned TomBombadil (Summon Tom Bombadil spell)
DwarvenMenOfDaleHorde_Summoned DwarvenMenOfDaleHorde (Men of Dale Allies spell)
DwarvenMenOfDale_Summoned DwarvenMenOfDale (Men of Dale Allies spell)
GondorRangerHorde_Summoned GondorRangerHorde (Dunedain Allies spell)
GondorRanger_Summoned GondorRangerInn (Dunedain Allies spell)
RohanRohirrimHorde_Summoned RohanRohirrimHorde (Rohan Allies spell)
RohanRohirrim_Summoned RohanRohirrim (Rohan Allies spell)
GondorGwaihir_Summoned GondorGwaihir (Eagle Allies spell)
RohanEntFir_Summoned RohanEntBase (Ent Allies spell)
RohanEntBirch_Summoned RohanEntBase (Ent Allies spell)

Hero Abilities:
WildFireDrake_Summoned WildFireDrake (Gorkil's Summon Drakes ability)
DwarvenGuardianHorde_Summoned DwarvenGuardianHorde (Dain's Summon Reinforcements ability)
DwarvenGuardian_Summoned DwarvenGuardian (Dain's Summon Reinforcements ability)
DwarvenAxeThrowerHorde_Summoned DwarvenAxeThrowerHorde (Dain's Summon Reinforcements ability)
DwarvenAxeThrower_Summoned DwarvenAxeThrower (Dain's Summon Reinforcements ability)
DwarvenPhalanxHorde_Summoned DwarvenPhalanxHorde (Dain's Summon Reinforcements ability)
DwarvenPhalanx_Summoned DwarvenPhalanx (Dain's Summon Reinforcements ability)
DwarvenBanner_Summoned DwarvenBanner (Dain's Summon Reinforcements ability)

CaH Abilities:
CreateAHeroFamiliar_Level1 CreateAHeroFamiliar_Base (I don't use CaH much so I'm not sure what this does tongue.gif )
MordorFighterHorde_Summoned MordorFighterHorde (Evil CaH Summon Reinforcements ability)
MordorFighter_Summoned MordorFighter (Evil CaH Summon Reinforcements ability)
WildMountainGiant_Summoned WildMountainGiant (Evil CaH Summon Reinforcements ability)
GondorFighterHorde_Summoned GondorFighterHorde (Good CaH Summon Reinforcements ability)
GondorFighter_Summoned GondorFighter (Good CaH Summon Reinforcements ability)
GondorTowerShieldGuardHorde_Summoned GondorTowerShieldGuardHorde (Good CaH Summon Reinforcements ability)
GondorTowerShieldGuard_Summoned GondorTowerShieldGuard (Good CaH Summon Reinforcements ability)
GondorArcherHorde_Summoned GondorArcherHorde (Good CaH Summon Reinforcements ability)
GondorArcher_Summoned GondorArcher (Good CaH Summon Reinforcements ability)
GondorKnightHorde_Summoned GondorKnightHorde (Good CaH Summon Reinforcements ability)
GondorCavalry_Summoned GondorCavalry (Good CaH Summon Reinforcements ability)
Chicken_Replacement Chicken (CaH Word of Poultry ability)
Rabbit_Replacement Rabbit (CaH Word of Poultry ability)
Dog_Replacement Dog (CaH Word of Poultry ability)
Dog1_Replacement Dog1 (CaH Word of Poultry ability)
Duck_Replacement Duck (CaH Word of Poultry ability)
Cow_Replacement Cow (CaH Word of Poultry ability)
Sheep_Replacement Sheep (CaH Word of Poultry ability)
Crow_Replacement Crow (CaH Word of Poultry ability)
GoatMale_Replacement GoatMale (CaH Word of Poultry ability)
GoatFemale_Replacement GoatFemale (CaH Word of Poultry ability)

Misc:
RohanElvenWarriorHorde_Summoned RohanElvenWarriorHorde (Not sure, possibly obsolete)
ElvenMirkwoodArcher_Summoned ElvenMirkwoodArcher (Not sure, possibly obsolete)
ShroudRevealer_BattleShip ShroudRevealer_Bombard (Not sure, but I wouldn't mess with it)

Credits

RoharaWriter
GameReplaysPublisher

Comments

Display order: Newest first

ILUTAVAR - Sunday January 13, 2008 - 13:54

naaa this tutorial really heped me so much but i want to put my own music in my map how to do it...

--------

how do i add more powers to a hero

Rob38 (Team Chamber Member) - Sunday June 17, 2007 - 19:40

This tutorial is ok, but it lacks in many areas. It doesn't really explain in detail the benefits and limits a map.ini file can have.

{IP}Sauron - Saturday May 26, 2007 - 5:01

starting without fortress could really just be changing the start position waypoint from normal to beacon and by that it wont affect th next map u play

Nolis - Thursday May 24, 2007 - 3:41

This tutorial really helped me!

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

 
4:17:35