The 3rd Age

The Elven LegacY MoD

The Elven LegacY MoD

This mod for bfme 1 Mod based on Elvestar 5.5

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

Adding a New Hero

Tutorial for Battle for Middle-earth BFME

Avatar of GothmogtheOrc

GothmogtheOrc

Category: Code
Level: Intermediate
Created: Monday March 26, 2007 - 11:55
Updated: Monday March 26, 2007 - 12:02
Views: 17505
Summary: The basics of making new heroes

Rating

Staff says

2.7

Members say

4.0

Average

3.7/5.0

14 votes

Adding A New Hero

Written by: Ayden aka Shawn

Hello The3rdAge community. First off I want to thank Hostile for his great website. It was very helpful in my modifications and is a main reason I mod today. Now lets begin with the tutorial. ^^

We have all wondered how cool it would be to be playing Sharaku, the warg captian of Isengard or the captian of Lothlorien, Haldir in our adventures into the Battle for Middle-Earth. I wanted to do this so badly that one day, I found this website and it gave me the final push I needed to make a hero. Now I want to share my knowledge with you.

Creating a hero isn’t very hard at all, since you can copy a existing hero’s .ini folder. I would not try to create the ini from scratch as it is very tricky and somewhat irritating with all the errors and false spelling that will come out of creating the .ini and making it fully readable to the game. Instead we are going to copy the .ini file of Legolas, as I intend to teach you all how to make Haldir playable in your game.

Please make sure you know how to effectively open .ini files by clicking on this link and reading the tutorials CLICK. Check out the tools section for the programs you will need to extract your .ini files to edit them.

In this tutorial we will be editing the following INI's:
Legolas.ini
CommandSet.in
Experiencelevels.ini
Playertemplate.ini

--------------------------------------------------------------

First off we will be copying Legolas’ .ini file. Right click on the Legolas.ini in the object/good faction/unit/rohan directory. Now look for the “Copy” selection and press it. Ok, now lets paste it into the same directory, only changing the name of the .ini we copied to “Haldir”.

Now that we have copied the file, lets look at the very top of the text until you find these strings of code:

              
Code
Object RohanLegolas
; *** ART Parameters ***

; SelectPortrait for Heros is portrait behind skill buttons. HP = HeroPortrait.
SelectPortrait = HPLegolas

; ButtonImage for Heros is button image on Hero Select UI to select hero. HI = HeroIcon or HeroImage.
ButtonImage = HILegolas


Now that we found it, lets edit it to fit our new hero.

Object = The name of the hero or unit that the string refers to

Select Portriat = The picture of the hero that will show up in the Plantir

Button Image = The small icon of the hero that you will see when clicking on the citidel to Recruit your hero for example.


First off, our hero is going to be Haldir, so we need the icon and portrait to look like him right? Lets change the HPLegolas to HPHaldir and the HILegolas to HPHaldir

Note: not every custom hero you will want to make will have a icon or portrait for you to select.

Moving on to models/animations. We wont need to change anything here because the Legolas animations will work just fine for out archery hero Haldir, so I wont cover it in this tutorial. Instead, move down the file until you find the “Design parameters” strings. Here will can edit the stats or even faction of our hero.

Side = the side/force you want the hero to be added to.

Editor Sorting = skip this one, you will not need to edit it in this tutorial.

Threat Level = How threatening this unit is to AI. If it is a high level of threat the AI will go after it first. If it is a low level then the AI will not worry about it as much.

Thing Class = skip this one, you will not need to edit it in this tutorial.

Build Cost = How much our new hero will cost to be recruited. Change this to any number you like.

Build time = How long it will take for the hero to be built. Once again this can be changed to any number you like. Remember build time is in milliseconds.



Ok, now that we have changed all of the previous statistics of the hero that we want, we will move on the weapon sets. You can leave these alone if you like the damage that legolas does it ok, or you can change them to what you see fit. Once you changed or skipped the Weapon set values, keep going down the list, changing only the strings that I list here:

Weapon Set = The weapon damage that the new hero will do when he inflicts damage. Change it to any other hero that you like in the game by adding HeroNameWeapon.

Armor Set = The armor value this hero has. It determines how well he can take damage from other units and how long he can stay alive when under attack.

Vision Range = How far this hero can see. Since we are making an elven hero, we will want him to have good vison so you can leave this one alone, or change it to any value you like.

Display Name = Be sure to change this to the Side/Name of the hero.

Command Set = This is the Buttons in the plantir that our new hero will be able to use. Will we make the command set later in the tutorial. For right now, call this RohanHaldirCommandSet.

Display Melee Damage = This is the number value that you will see when you mouse over the hero. If you changed your melee damage earlier in the tutorial, then change this to the hero that has the melee damage you selected, for example if I changed my weapon set values to Borormir, then I would change this to BOROMIR_DAMAGE.

Display Ranged Damage = Same as above, but change the value to FARAMIR_BOW_DAMAGE for example, instead of BOROMIR_DAMAGE.

ReSpawn Rules: This area of the code will allow you to change how long it takes/how much it costs to revive a hero after he/she has fallen in battle. Change the values here to anything you like.


Soon, you will be seeing a “Behavior” code. Behavior codes are the skills/spells that heros will be able to use in the game. So if you wanted to have your hero use the “Athelas” ability, like Aragorn does, then you will need to go into Aragorn’s .ini file and find the Athelas behavior. You can skip this part if you don’t want you hero having any spells/skills. If you do want your hero to have some Behaviors then you will need to wait for my next tutorial, where I will talk about command buttons and Spells for your hero.


Now, save your .ini file as your Hero’s name, then exit. Now remember that command set we referenced? RohanHaldirCommandSet? Well, we are going to go make that now.

Go out of the hero’s section and back out to the main section of .inis. Here we will find commandset.ini, open it up.

Scroll down to the very bottom of the file and make a code for your new hero. On one line, we will need to state what hero/unit this command set will effect.

Add these lines:

              
Code
CommandSet RohanHaldirCommandSet
End


Now we made the commandset, will we work on it next time.

Since we are done with the CommandSet for the time being, we will go add the hero to our game. Find the Playertemplate.ini file.

In this file, is all the different details on the factions in the game. Scroll down unit you find the faction that you want your hero to be recruited under. Remeber when we changed (Or left alone) the side = string? we will now need to remember what side we wanted our hero on, then add him to the BuildableHeroesMP string. In this guide I was making Haldir, and I plan on adding him to Rohan, but you can add him to any faction you please. So, edit this code to the BuildableHeroesMP string if you are making Haldir for Rohan.

              
Code
BuildableHeroesMP = RohanTheoden RohanEomer RohanEowyn RohanGimli RohanLegolas GondorAragornMP RohanMerry


Add the RohanHaldir to the end like this:

              
Code
BuildableHeroesMP = RohanTheoden RohanEomer RohanEowyn RohanGimli RohanLegolas GondorAragornMP RohanMerry RohanHaldir


Ok, now we need to move onto the experience levels.ini once you have found that file, add in this long string at the very bottom of the ini:

              
Code
;--------------- HALDIR -------------------------
ExperienceLevel HaldirLevel1
TargetNames = RohanHaldir
RequiredExperience = 1
ExperienceAward = 70
Rank = 1
Upgrades = Upgrade_HaldirCostume
AttributeModifiers = HaldirResistKnockback
SelectionDecal
Texture = decal_hero_good
Style = SHADOW_ALPHA_DECAL
OpacityMin = 50%
OpacityMax = 100%
MinRadius = 40
MaxRadius = 200
MaxSelectedUnits = 40
End
End

ExperienceLevel HaldirLevel2
TargetNames = RohanHaldir
RequiredExperience = 50 ;200
ExperienceAward = 80
AttributeModifiers = HeroLevelUpDamage1
Rank = 2
LevelUpFx = FX:GandalfLevelUp1FX
SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 50%
OpacityMax = 100%
MinRadius = 40
MaxRadius = 200
MaxSelectedUnits = 40
End
END

ExperienceLevel HaldirLevel3
TargetNames = RohanHaldir
RequiredExperience = 100 ;400
ExperienceAward = 90
AttributeModifiers = HeroLevelUpDamage2
Rank = 3
LevelUpFx = FX:GandalfLevelUp1FX
SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 50%
OpacityMax = 100%
MinRadius = 40
MaxRadius = 200
MaxSelectedUnits = 40
End
END

ExperienceLevel HaldirLevel4
TargetNames = RohanHaldir
RequiredExperience = 200 ;600
ExperienceAward = 100
AttributeModifiers = HeroLevelUpDamage3
Rank = 4
LevelUpFx = FX:GandalfLevelUp1FX

SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 50%
OpacityMax = 100%
MinRadius = 40
MaxRadius = 200
MaxSelectedUnits = 40
End
END

ExperienceLevel HaldirLevel5
TargetNames = RohanHaldir
RequiredExperience = 300 ;800
ExperienceAward = 120
AttributeModifiers = HeroLevelUpDamage4
Rank = 5
LevelUpFx = FX:GandalfLevelUp1FX

SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 50%
OpacityMax = 100%
MinRadius = 40
MaxRadius = 200
MaxSelectedUnits = 40
End
END

ExperienceLevel HaldirLevel6
TargetNames = RohanHaldir
RequiredExperience = 500 ;1000
ExperienceAward = 150
AttributeModifiers = HeroLevelUpDamage5
Rank = 6
LevelUpFx = FX:GandalfLevelUp1FX
SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 50%
OpacityMax = 100%
MinRadius = 40
MaxRadius = 200
MaxSelectedUnits = 40
End
END

ExperienceLevel HaldirLevel7
TargetNames = RohanHaldir
RequiredExperience = 700 ;1200
ExperienceAward = 180
AttributeModifiers = HeroLevelUpDamage6
Rank = 7
LevelUpFx = FX:GandalfLevelUp1FX
SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 50%
OpacityMax = 100%
MinRadius = 40
MaxRadius = 200
MaxSelectedUnits = 40
End
END

ExperienceLevel HaldirLevel8
TargetNames = RohanHaldir
RequiredExperience = 900 ;1400
ExperienceAward = 210
AttributeModifiers = HeroLevelUpDamage7
Rank = 8
LevelUpFx = FX:GandalfLevelUp1FX
SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 50%
OpacityMax = 100%
MinRadius = 40
MaxRadius = 200
MaxSelectedUnits = 40
End
END

ExperienceLevel HaldirLevel9
TargetNames = RohanHaldir
RequiredExperience = 1100 ;1600
ExperienceAward = 250
AttributeModifiers = HeroLevelUpDamage8
Rank = 9
LevelUpFx = FX:GandalfLevelUp1FX
SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 50%
OpacityMax = 100%
MinRadius = 40
MaxRadius = 200
MaxSelectedUnits = 40
End
END

ExperienceLevel HaldirLevel10
TargetNames = RohanHaldir
RequiredExperience = 1500 ;2000
ExperienceAward = 300
AttributeModifiers = HeroLevelUpDamage9
Rank = 10
LevelUpFx = FX:GandalfLevelUp1FX
SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 50%
OpacityMax = 100%
MinRadius = 40
MaxRadius = 200
MaxSelectedUnits = 40
End
END


This code will determen how fast he ranks up, when he will get abilites, ect. Once all of this is added, your Haldir is now a playable character. Have fun. //Ayden

Note: This makes the hero playable, but there are alot more powers and abilities you can add to them. Check out the other tutorials for more ideas.

Comments

Display order: Newest first | Page: 1, 2

Kyoushiro - Tuesday January 22, 2013 - 2:34

Not working for me... If I make this I got an error with the original Legolas.ini file. If I delete this new "Haldir" stuff the game works fine.

Lionheart2 - Wednesday August 10, 2011 - 7:54

I have two questions.
1. My hero ingame that I made with your steps works but is called a "MISSING:Object". How do you change this?
2. I was wondering how to change build and revive text to be different than the copied hero.


wr1000, I had the same problem.
You must type hero name in playertemplate.ini like this
BuildableHeroesMP= - - - - - - - -Hero Names - - - - - - - - - RohanHaldir

wr1000 - Monday November 29, 2010 - 1:30

hello
this tuto don't work for me
the model w3d and textures haldir is not in bmfe1 i think
post please all object code haldir here or on the forum
thank you for your help

Paul Kellerman - Saturday August 14, 2010 - 23:02

What do you use to open the bin File .
Can Anybody make a video Please .

kubonex - Thursday January 7, 2010 - 11:19

i ve a problem with editor sorting when i start game it crashes Error parsing INI block 'EditorSorting' in file 'Data\INI\Object\goodfaction\units\rohan\haldir.ini'

Windrider - Friday July 17, 2009 - 17:37

does this work for bfme2 and rotwk as well?

elvenlord95 - Thursday July 2, 2009 - 3:10

Grey Beard - Wednesday January 21, 2009 - 12:30

where is the link to learn about ini. files

druchii22 - Monday August 11, 2008 - 14:15

Very useful, thank you!

UltimateRanger - Tuesday September 4, 2007 - 6:10

ty

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

 
3:17:00