The 3rd Age

Broken Sword: Expansion Pack

Broken Sword: Expansion Pack

New Heroes, new Factions, new Maps,... a new world is waiting.

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 Faction for bfme2 & rotwk

Avatar of SquallBK

SquallBK

Category: Code
Level: Beginner
Created: Monday May 28, 2007 - 6:48
Updated: Saturday June 27, 2009 - 18:31
Views: 38425
Summary: This will take you through the steps of adding a new faction for bfme2 & rotwk.

Rating

Staff says

3.3

Members say

3.9

Average

3.8/5.0

23 votes

Page 1 2 3 4 5
If you don't understand what files go where from bfme1 to bfme2, then this is a good article to read. This tutorial will take you through the steps of adding a new faction. If you want to add your new faction to the AI, then you may want to read a different article. First, the files we will be editing are-

playertemplate.ini
lotr.str
science.ini
menfortress.ini (doesn't always have to be just menfortress, but will be explained in the tutorial.)


Lets start with playertemplate.ini. Playertemplate.ini is required to be edited, or the new faction you plan on making, will not even appear playable in skirmish mode. So lets begin.

When you open up the file, you will see that pretty much everything is the same. So lets just use the Hobbits as an example for this tutorial.

first off, copy and paste the code that looks like this-


              
Code
PlayerTemplate FactionMen
Side = Men
PlayableSide = Yes
Evil = No
StartMoney = 0
MaxLevelMP = #DIVIDE( PLAYER_MAX_PURCHASE_POINTS_DEFAULT PLAYER_PURCHASE_POINTS_GRANTED )
MaxLevelSP = #DIVIDE( PLAYER_MAX_PURCHASE_POINTS_GOOD PLAYER_PURCHASE_POINTS_GRANTED )
PreferredColor = R:43 G:150 B:179
StartingBuilding = MenFortress

;------------- NO STARTING UNITS FOR YOU -------
;StartingUnit0 = GondorFighterHorde
;StartingUnitOffset0 = X:-60 Y:185 Z:0


StartingUnit1 = MenPorter
StartingUnitOffset1 = X:30 Y:200 Z:0
StartingUnit0 = MenPorter
StartingUnitOffset0 = X:1 Y:130 Z:0

StartingUnitTacticalWOTR = MenPorter ;// This unit is placed in tactical mode when playing WOTR. Add multiple lines for multiple units.
StartingUnitTacticalWOTR = MenPorter
IntrinsicSciences = SCIENCE_GOOD
IntrinsicSciencesMP = SCIENCE_MEN
SpellBook = GoodSpellBook
SpellBookMp = MenSpellBook
PurchaseScienceCommandSet = GoodSpellStoreCommandSet
PurchaseScienceCommandSetMP = MenSpellStoreCommandSet
DisplayName = INI:FactionMen
DefaultPlayerAIType = MenSkirmishAI
BeaconName = MultiplayerBeacon
LightPointsUpSound = GondorLightPointsUp
ObjectiveAddedSound = Gui_MissionObjectiveNew
ObjectiveCompletedSound = Gui_MissionObjectiveCompleted
InitialUpgrades = Upgrade_MenFaction ; Any upgrades this player template is born with.

// NOTE: It is very important that the create-a-hero be the first buildable hero, to ensure that the create-a-hero and the ring hero are always
// attached to the first two buttons in the command set.

BuildableHeroesMP = CreateAHero RohanEomer GondorBoromir RohanTheoden GondorFaramir AragornNew GondorGandalf DwarvenGimli ElvenLegolas ElvenGlorfindel ElvenHaldir ArnorCaptainStealthless
BuildableRingHeroesMP = ElvenGaladriel_RingHero
SpellStoreCurrentPowerLabel = APT:SpellStoreCurrentEvenstarPower
SpellStoreMaximumPowerLabel = APT:SpellStoreMaximumEvenstarPower
ResourceModifierObjectFilter = RESOURCE_MODIFIER_OBJECT_FILTER
ResourceModifierValues = 100 100 100 100 90 85 80 75 71 68 66
MultiSelectionPortrait = UPGondor_Army
LoadScreenMusic = Shell2MusicForLoadScreen
End


but now lets begin editing it-


              
Code


PlayerTemplate FactionHobbits ; the faction name
Side = Hobbits ; what side will your faction be on?
PlayableSide = Yes ; self explanatory, choose no, and you can't play it in the game.
Evil = No ; is your faction evil or not?
StartMoney = 0 ; how much money will your faction start off with?
MaxLevelMP = #DIVIDE( PLAYER_MAX_PURCHASE_POINTS_DEFAULT PLAYER_PURCHASE_POINTS_GRANTED ); just ignore this for now
MaxLevelSP = #DIVIDE( PLAYER_MAX_PURCHASE_POINTS_GOOD PLAYER_PURCHASE_POINTS_GRANTED ); just ignore it
PreferredColor = R:43 G:150 B:179; the preferred color of your faction. It really isn't necessary to edit this, but feel free
StartingBuilding = MenFortress ; the starting building of your faction

;------------- NO STARTING UNITS FOR YOU -------
;StartingUnit0 = GondorFighterHorde ; this would normally be the units your faction starts off with, but when any code line has a ';' in it, that usually means it will be ignored.
;StartingUnitOffset0 = X:-60 Y:185 Z:0; just ignore this


StartingUnit1 = HobbitPorter ;the porter that your faction will start with.
StartingUnitOffset1 = X:30 Y:200 Z:0
StartingUnit0 = HobbitPorter
StartingUnitOffset0 = X:1 Y:130 Z:0

StartingUnitTacticalWOTR = MenPorter ;the starting units for war of the ring.
StartingUnitTacticalWOTR = MenPorter ; same thing. You can also add the same code line for different starting units if you wish to do so
IntrinsicSciences = SCIENCE_GOOD ; will your faction use good or evil science?
IntrinsicSciencesMP = SCIENCE_HOBBIT; the science your individual faction has. It is not required to be edited, but is suggested.
SpellBook = GoodSpellBook ; evil spellbook or good spell book?
SpellBookMp = HobbitSpellBook; The individual spellbook for your faction.
PurchaseScienceCommandSet = GoodSpellStoreCommandSet
PurchaseScienceCommandSetMP = MenSpellStoreCommandSet
DisplayName = INI:FactionHobbit ; this is referencing to the lotr.str. It will be explained when we come to it.
DefaultPlayerAIType = MenSkirmishAI; I'm not 100% sure, but i'd guess that it is the strategic AI that the faction uses. But again that will have to be added.
BeaconName = MultiplayerBeacon
LightPointsUpSound = GondorLightPointsUp
ObjectiveAddedSound = Gui_MissionObjectiveNew
ObjectiveCompletedSound = Gui_MissionObjectiveCompleted
InitialUpgrades = Upgrade_MenFaction ; Any upgrades this player template is born with.

// NOTE: It is very important that the create-a-hero be the first buildable hero, to ensure that the create-a-hero and the ring hero are always
// attached to the first two buttons in the command set.

BuildableHeroesMP = CreateAHero RohanEomer GondorBoromir RohanTheoden GondorFaramir AragornNew GondorGandalf DwarvenGimli ElvenLegolas ElvenGlorfindel ElvenHaldir ArnorCaptainStealthless; the buildable heroes for your fortress.
BuildableRingHeroesMP = ElvenGaladriel_RingHero ; the ring hero for your faction.
SpellStoreCurrentPowerLabel = APT:SpellStoreCurrentEvenstarPower
SpellStoreMaximumPowerLabel = APT:SpellStoreMaximumEvenstarPower
ResourceModifierObjectFilter = RESOURCE_MODIFIER_OBJECT_FILTER
ResourceModifierValues = 100 100 100 100 90 85 80 75 71 68 66
MultiSelectionPortrait = UPGondor_Army
LoadScreenMusic = Shell2MusicForLoadScreen
End

Links / Downloads

 HitsAdded
preconverted INI Packages5272May 28, 2007 - 14:39

Comments

Display order: Newest first | Page: 1, 2, 3

Treefoz01 - Wednesday August 7, 2013 - 19:19

What do you do with the lotr.str file when you're done editing it?

Emperor of the East - Wednesday October 10, 2012 - 20:52

Something's up with the playertemplate.ini file. Every time I download the preconverted packages, I open the playertemplate file to find that it looks nothing like what I need. May I have some help solving this problem, please? I used this tutorial before on a much older computer and it worked just fine. I would like help with the playertemplate problem please. It's still an excellent tutorial, but my PC won't comply for some reason.

Halanor - Friday November 11, 2011 - 18:15

very useful tutorial thanks

mikele87 - Sunday June 5, 2011 - 14:43

Hello...i followed all the instructions but i'm occuring in the problem of page 2 about the name of the faction.
Those are the code strings i added in the playertemlate.ini:


PlayerTemplate FactionNumenor
    Side             = Numenor
    PlayableSide             = Yes
    Evil                     = No
    StartMoney         = 0
    MaxLevelMP                = #DIVIDE( PLAYER_MAX_PURCHASE_POINTS_DEFAULT PLAYER_PURCHASE_POINTS_GRANTED )
    MaxLevelSP                = #DIVIDE( PLAYER_MAX_PURCHASE_POINTS_GOOD PLAYER_PURCHASE_POINTS_GRANTED )
    PreferredColor            = R:255 G:255 B:255
    StartingBuilding            = MenFortress
    
    ;------------- NO STARTING UNITS FOR YOU -------
    ;StartingUnit0 = GondorFighterHorde
    ;StartingUnitOffset0 = X:-60 Y:185 Z:0    
    
    StartingUnit1         = ArnorPorter
    StartingUnitOffset1     = X:10 Y:200 Z:0
    StartingUnit2         = ArnorPorter
    StartingUnitOffset2     = X:10 Y:210 Z:0
    StartingUnit0        = MenPorter
    StartingUnitOffset0     = X:35 Y:200 Z:0

    StartingUnitTacticalWOTR    = MenPorter            ;// This unit is placed in tactical mode when playing WOTR. Add multiple lines for multiple units.
    StartingUnitTacticalWOTR    = ArnorPorter
    IntrinsicSciences            = SCIENCE_GOOD
    IntrinsicSciencesMP         = SCIENCE_MEN SCIENCE_ARNOR
    SpellBook                = GoodSpellBook
    SpellBookMp                = MenSpellBook ArnorSpellBook
    PurchaseScienceCommandSet    = GoodSpellStoreCommandSet
    PurchaseScienceCommandSetMP    = MenSpellStoreCommandSet ArnorSpellStoreCommandSet
    DisplayName                = INI:FactionNumenor
    DefaultPlayerAIType        = MenSkirmishAI
    BeaconName                = MultiplayerBeacon
    LightPointsUpSound        = GondorLightPointsUp
    ObjectiveAddedSound        = Gui_MissionObjectiveNew
    ObjectiveCompletedSound        = Gui_MissionObjectiveCompleted
    InitialUpgrades            = Upgrade_MenFaction Upgrade_ArnorFaction    ; Any upgrades this player template is born with.



    BuildableHeroesMP        = CreateAHero RohanEomer RohanTheoden GondorFaramir GondorAragornMP GondorGandalf ArnorArgeleb ArnorArveleg
    BuildableRingHeroesMP        = ElvenGaladriel_RingHero
    SpellStoreCurrentPowerLabel     = APT:SpellStoreCurrentEvenstarPower
    SpellStoreMaximumPowerLabel     = APT:SpellStoreMaximumEvenstarPower
    ResourceModifierObjectFilter     = RESOURCE_MODIFIER_OBJECT_FILTER
    ResourceModifierValues        = 100 100 100 100 90 85 80 75 71 68 66
    MultiSelectionPortrait        = UPGondor_Army
    LoadScreenMusic                = Shell2MusicForLoadScreen
End

In the str file i also added the string:

INI:FactionNumenor
"Numenor"
END

In the ROTWK I see the error in the name telling MISSING:INI:NUMENOR

I'm using patch 2.01 and running the game on windows 7 x64.
I hope someone could help me.
Thanks to all

king of the dead94 - Tuesday May 3, 2011 - 12:28

where in the lotr.str file is it? I've searched it several times without success.

clank234 - Monday November 15, 2010 - 12:26

It workd perfectly for me but when u say u only need to edit 1 fortress type, that is where i got stuck wiv no fortress.
But u either need to use an existing fortress or change all fortress files.
Keep up the gd work ;)

elvenlord95 - Saturday July 4, 2009 - 7:26

i did everything you say but i when i go to run it says that the modules are already used!how can i change their names and from were?i'm totally confused!

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

has anybody a hobbit faction ready?because i try to make one and i can't!if anybody has one please upload it...

witchy king - Saturday May 23, 2009 - 13:23

for lotr.str you have to open the lang\[yourlanguage].Big with final big

melkor777 - Wednesday April 15, 2009 - 13:12

change the name of the moduletags

person 1123 - Monday January 12, 2009 - 5:01

Help! My mod gives me all sorts of weird errors with my hobbitporter when I try to run it. It says that the moduletags it uses are already used. What do I do?

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:54:31