The 3rd Age

Age of the Firstborn - The Rebirth

Age of the Firstborn - The Rebirth

Continues on Elrond99's Age of the Firstborn mod by turning time back to around TA2000.

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

Map.ini Tutorial

Avatar of Rob38

Rob38

Category: Code
Level: Beginner
Created: Friday August 17, 2007 - 12:31
Updated: Sunday March 20, 2011 - 13:22
Views: 12501
Summary: benefits and limitations to this amazing file

Rating

Staff says

3.7

Members say

3.8

Average

3.8/5.0

8 votes

Page 1 2 3 4 5
Tutorial

NOTE: Use the shortcut buttons to help you through the process. ctrl + c is to copy something, ctrl + f is to find something in the ini, and ctrl + v is to paste your copied material.

First open up your 'data' folder. I suggest becoming familiar with all the different areas in it. You will be using this when you are making a map.ini file.

Next, find the gondor fighter. It should be under data\ini\object\goodfaction. Also locate the horde for this unit also. This should be under the same category but you have to look for it since they combine hordes into one section. You are probably wondering what is the difference between a horde and unit. Well, a unit's ini has all the models and animations for it plus this is where all the upgrades, weaponsets, health, and other things are defined. The horde on the other hand, is used to describe how many units are in a horde, the command points for the entire horde, and other things.

Going back to the Gondor fighter, let's first change their health to 500. If you scroll down the unit's ini, you should find the module for it. We want to replace the module of it so in your map.ini, you should have something like this.
              
Code

Object GondorFighter

ReplaceModule ModuleTag_02
    Body = ActiveBody ModuleTag_GondorFighterHealth
        CheerRadius      = EMOTION_CHEER_RADIUS
        MaxHealth = 500
        MaxHealthDamaged = 250
        BurningDeathBehavior = Yes
        BurningDeathFX = FX_InfantryBurningFlame
    End
End
End


There health has now been changed for the map. For any module, you can do one of three things: AddModule, ReplaceModule, or RemoveModule. Note that whenever you add or replace a module, you must rename the moduletag. I changed ModuleTag_02 to ModuleTag_GondorFighter in the above code. Also notice that there is an extra end also in the code. For add and replace module, you must put an 'end' after you finished the body.

Let's change the command points for the unit now. All you simply do is change the command points with a number you desire. But it must be done in both the horde and unit to match correctly. Here's how it will look .
              
Code

Object GondorFighter
CommandPoints = 1
End

Object GondorFighterHorde
CommandPoints = 12
End

For command points, you must multiply how many you have in a horde for their commandpoints. Since there are twelve of them in a horde (or at least I think there is) then with our new command point from the unit, it should be twelve.

How about changing the speed of the unit? Their speed is defined by their locomoter set. Again, you must change what's in both the horde and unit. For the unit you should find their locomotor set to look something like this:
              
Code

LocomotorSet
        Locomotor = HumanLocomotor
        Condition = SET_NORMAL
        Speed     = NORMAL_GOOD_FAST_MEMBER_SPEED
    End


Copy the words NORMAL_GOOD_FAST_MEMBER_SPEED with your shortcut and go to the gamedata.ini category under data\ini\gamedata.ini. Hit ctrl +f and paste in your copied words . It should locate the words and have the number 55 defined by it. Let's say we want the unit to move even quicker (let's say 65) so in your map.ini you would have:
              
Code

Object GondorFighter
LocomotorSet
        Locomotor = HumanLocomotor
        Condition = SET_NORMAL
        Speed     = 65    
End

We must also make the change for the horde. For the horde, you always make the speed five less than the unit. This is so that if a unit fall behind in the horde, they can catch up. Here's the locomotor set for the horde.
              
Code

Object GondorFighterHorde
LocomotorSet
        Locomotor = HumanLocomotor
        Condition = SET_NORMAL
        Speed     = 60    
End

That's a brief introduction to some things you can do with units. You don't have to keep defining the same object over and over, I just did it to break it down. This is how it should look completed in your map.ini.
              
Code


Object GondorFighter

CommandPoints = 1

ReplaceModule ModuleTag_02
         Body = ActiveBody ModuleTag_GondorFighter            
         MaxHealth = 500
         End
        End

LocomotorSet
        Locomotor = HumanLocomotor
        Condition = SET_NORMAL
        Speed     = 65    
End
End

Object GondorFighterHorde

CommandPoints = 12

LocomotorSet
        Locomotor = HumanLocomotor
        Condition = SET_NORMAL
        Speed     = 60    
End
End


There are other things I can show you, such as changing armor, weapons, command sets, and number of units in a horde. But first, figure out what I did in this tutorial and I try it on a unit of your own ;)

Comments

Display order: Newest first

Rob38 (Team Chamber Member) - Saturday June 5, 2010 - 14:44

Not sure about Inheritable Modules. It's worth a try.

Masterini - Saturday June 5, 2010 - 6:27

I have a question : How to Change the Inheritable Modules ? Is it possible ?
I would like to change the OCL of the Morgul Blade who summon a BarrowWight.
And when i tried to change totally the Barrowwight i bugged :/

Rob38 (Team Chamber Member) - Sunday January 13, 2008 - 21:17

Probably want to post your question in the forums as you'll get more help there ;)

ILUTAVAR - Sunday January 13, 2008 - 13:59

how do i add more powers to a hero?

Sulherokhh (Team Chamber Member) - Saturday October 6, 2007 - 1:33

I knew some of that already, but it is a very helpful reference. I bet that it is even better for starting map.ini coders.
Very good. :P

Bart (Administrator) - Saturday August 18, 2007 - 17:36

              
Quote
Hold on 2play... It seems you are talking about the game being modded. I'm talking about just a stand alone map with a map.ini file included.

nope, map.ini. i've gotten quite some experience with it when making my helms deep map
              
Quote
What isn't true? I was refering to trying to change an upgrade already in the game ;)

what isn't true, is that you can't edit existing upgrades. only, removing things from existing upgrades isn't possible. if you need a better explanation, contact me on msn
              
Quote
Does that work in a map.ini file? Can you put the mappedimage code in it?

haven't tested it, but someone posted it a while ago and i can't see why it wouldn't work (but then again, many things don't work that should :-/)
              
Quote
Again, I'm confused. I'm almost positive you have to change the name of it no matter what.

if your set is
              
Code
1 = Button1
2 = Button2
3 = Button3

then overriding it with
              
Code
1 = Button5
2 = Button12
3 = Button6
will work, but
              
Code
1 = Button5
2 = Button7

will leave the 3rd button in too
              
Quote
Again, I'm talking about a stand alone map. You may be right though with creating a new object. I'll test that out.

of course, but only the map maker has to do this mini-mod. an object in worldbuilder is just a reference to an object name, and this mini mod tells WB that it exists

Rob38 (Team Chamber Member) - Saturday August 18, 2007 - 14:08

Hold on 2play... It seems you are talking about the game being modded. I'm talking about just a stand alone map with a map.ini file included.

              
Quote
As far as I know, this isn't true. It doesn't work however to copy an upgrade from the original ini (the literal text, so without changing the name) and removing a line, because it's already there when the game is loaded. In this case you would need to add a new upgrade indeed.
What isn't true? I was refering to trying to change an upgrade already in the game ;)
              
Quote
You can also find a button with a completely unused image, and then edit that mappedimage to the actual texture you want on your button
Does that work in a map.ini file? Can you put the mappedimage code in it?               
Quote
Not if you can override every slot
Again, I'm confused. I'm almost positive you have to change the name of it no matter what.               
Quote
Yes you can, but you can't use them in WB. That can be fixed with a simple ini file in the game dir when editing your map (see my -mod tutorial)
Again, I'm talking about a stand alone map. You may be right though with creating a new object. I'll test that out.

Bart (Administrator) - Saturday August 18, 2007 - 6:30

Good tutorial, some comments:

              
Quote
I found out that if you want to change anything in an existing upgrade, you must make a new one and name it something else. This can be a real pain for big map.ini files since you have to change all the units affected by the upgrade also :( I did find, however, that you do not need to change the names of special abilities for the game to read the changes made in it.

As far as I know, this isn't true. It doesn't work however to copy an upgrade from the original ini (the literal text, so without changing the name) and removing a line, because it's already there when the game is loaded. In this case you would need to add a new upgrade indeed.
              
Quote
You can't change the name of commandbuttons. If you try to make your own with a unique name, the button images will not show in-game no matter what. So what you have to do is go through the commandbutton.ini, find one with the button image you want, and change everything else (except the name) for it. This can be annoying at times.

You can also find a button with a completely unused image, and then edit that mappedimage to the actual texture you want on your button
              
Quote
To change a commandset, you must make a new one and name it something different.

Not if you can override every slot
              
Quote
You can't create new objects. You must use an existing object from the game. You can, however, change almost everything with the object and give it a new model, etc...

Yes you can, but you can't use them in WB. That can be fixed with a simple ini file in the game dir when editing your map (see my -mod tutorial)

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

 
14:26:36