2playgames suggested that ppl are more interested in Subclasses. It was my intention to include that in the guide, but I cut it before really making a guide of it. At the bottom of this post I added my notes on the subclasses. They should be enough for someone who has modded ini files before.
Basic instructions for a new faction in the Create a Hero line-up.
*******************************************************************************
This guide is based on Battle for Middle Earth II v1.02 ini files.
19 Jan 2007 Update:
With the RotWK expansion out, there have been a few minor changes about the CaH. However, the guide still applies to all patch versions of both games. The only additional point that came with the expansion is that there is now a fourth CaH specific line in the commandbuttons of the CaH; the line that specifies the costs of the power. The guide has been updated to include the line.
The files you'll need:
"Createaheroupgrades.inc"
"createaherosystem******.inc" ( new file - check step 2)
"createaherosystem.ini"
"createaheromodelconditionupgrades.inc"
"createaheroremoveupgradeupgrades.inc"
"commandbutton.ini"
"createaheroarmorupgrades.inc"
In this guide, there is no real custom stuff. That way it won't get to complex to fast for new modders.
Another big reason is that I don't expect to have much spare time in the near future. I thought it would be better to post this shortend version now, than to never post anything, so I kind of cut the more detailed part I was still working on.
Besides, this guide is just an example about creating a basis for a new faction, not an allround modding guide.
Go to this site for basic information about .ini editing:
http://the3rdage.net/beginner.php
*******************************************************************************
1 - "Createaheroupgrades.inc"
*******************************************************************************
This file lists all the upgrades available to CAHs.
The faction side is also an upgrade, which you need to define.
Search for this:
//-------------------------------------------------------- //Create a Hero CLASS upgrades //--------------------------------------------------------And add this small block:
( Replacing the "******" with your faction name. )
Upgrade Upgrade_CreateAHero_Class****** Type = OBJECT EndYou have now defined the Class upgrade for your hero.
This value is essential, because it is used in many a file to identity your faction.
*******************************************************************************
2 - "createaherosystem******.inc"
*******************************************************************************
Each CAH Faction has its own .inc file.
Create your own:
( Replacing the "******" with your faction name. )
"createaherosystem******.inc"
For now we'll leave it be.
*******************************************************************************
3 - "createaherosystem.ini"
*******************************************************************************
The game doesn't automatically read .inc files, they are referred to in .ini files.
That means we have to create a reference to our own file in the right .ini file.
Open "createaherosystem.ini" and scroll all the way down.
At the bottom you'll see this list:
#include "CreateAHeroSystemMenOfTheWest.inc"
#include "CreateAHeroSystemArcher.inc"
#include "CreateAHeroSystemWizard.inc"
#include "CreateAHeroSystemDwarf.inc"
#include "CreateAHeroSystemServantsOfSauron.inc"
#include "CreateAHeroSystemCorruptedMan.inc"
These are the .inc files of the factions that come with the game.
Add your own .inc file from step 2 to the list in order to link it to the CAH system:
#include "createaherosystem******.inc"
The name you use here has to be the same as the name given to your own .inc file from step 2.
*******************************************************************************
4 - "createaherosystem******.inc"
*******************************************************************************
Now you'll have to open "CreateAHeroSystemMenOfTheWest.inc" and copy the whole contend.
Return to your own faction file and past the copied code in it.
You only NEED to change one line.
UpgradeName = Upgrade_CreateAHero_Class******Make sure you use the same name as you defined in step 1 !
Otherwise you'll get an error if you start the game.
*******************************************************************************
5 - ...\ini\object\createahero\"createaheromodelconditionupgrades.inc"
*******************************************************************************
Next step are the animations.
Notice that the file isn't in the main ini folder!
The file is build up of pairs of Behavior modules. Just like this one, for the Captain of Gondor subclass:
//------------------------------------------------------------------------------------------------------ // CAPTAIN OF GONDOR Behavior = ModelConditionUpgrade ModuleTag_HeroOfTheWest_SubClass_0 TriggeredBy = Upgrade_CreateAHero_ClassHeroOfTheWest Upgrade_CreateAHero_SubClass_0 ConflictsWith = Upgrade_CreateAHeroMapMode RequiresAllTriggers = Yes RemoveConditionFlagsInRange = CREATE_A_HERO_00 CREATE_A_HERO_65 AddConditionFlags = CREATE_A_HERO_00 End // CAPTAIN OF GONDOR (Create A Hero Map Mode) Behavior = ModelConditionUpgrade ModuleTag_HeroOfTheWest_SubClass_0_MM TriggeredBy = Upgrade_CreateAHeroMapMode Upgrade_CreateAHero_ClassHeroOfTheWest Upgrade_CreateAHero_SubClass_0 RequiresAllTriggers = Yes RemoveConditionFlagsInRange = CREATE_A_HERO_00 CREATE_A_HERO_65 AddConditionFlags = CREATE_A_HERO_01 EndIf you scroll down you'll see that each subclass has its own pair.
Here is a default behavior module, with comments behind them to explain what things are for.
Behavior - States the unique name of the behavior TriggeredBy - Here you'll have to place the upgrade name from step 1 and the subclass number ConflictsWith - This is a condition to determine if you are playing with or creating the CAH RequiresAllTriggers - Makes sure that only the right subclass loads these animations. You cannot use this as a fast way to use the same animations for all subclasses. RemoveConditionFlagsInRange - Just to reset the current value of AddConditionFlags AddConditionFlags - This is the animation link to Createaheromodels.inc. Choose a pair in the range CREATE_A_HERO_00 to CREATE_A_HERO_65.We have two subclasses, so we will need to copy two pairs and modify the TriggeredBy values.
For now I suggest using the blocks of the Captain of Gondor and the Shield Maiden.
Change "Upgrade_CreateAHero_ClassHeroOfTheWest" into your own faction upgrade name and that's enough to get things running.
Just make sure your set of AddConditionFlags starts with an even number (that includes zero), otherwise you'll have two types of animations.
*******************************************************************************
6 - ...\ini\object\createahero\"createaheroremoveupgradeupgrades.inc"
*******************************************************************************
For all that have noticed the notes in the header of this file: I noticed them too.
One is about FX_CreateAHeroDie, which are the death sounds. These are bound to the animation set, normal sounds are not.
You don't have to change anything here, unless you want to use your homemade animations and/or soundset.
The other is more important. That one makes sure that you won't end up loading more than one animation set at a time in the CAH menu.
Open createaheroremoveupgradeupgrades.inc and scroll down to this section:
//====================================================================== // This section contains the RemoveUpgradeUpgrades for the Create a Hero class //======================================================================You'll see the following behavior modules:
Behavior = RemoveUpgradeUpgrade Remove_Upgrades_Upgrade_CreateAHero_ClassHeroOfTheWest TriggeredBy = Upgrade_CreateAHero_ClassHeroOfTheWest UpgradeToRemove = Upgrade_CreateAHero_ClassIstariWizard Upgrade_CreateAHero_ClassDwarf ...... EndCopy one of the behaviors and edit it:
- Again the first is the unique name of the behavior, replace "ClassHeroOfTheWest" with the name of your own Faction.
- TriggeredBy = is to be followed by the faction upgrade name from step 1
- UpgradeToRemove - make sure ALL OTHER faction upgrade names are listed here, including any OTHER factions you add.
After you have made your own behavior you will have to edit all the existing ones.
Place your faction upgrade name from step 1 in all (but your own behavior's) UpgradeToRemove lists.
*******************************************************************************
7 - "commandbutton.ini"
*******************************************************************************
The powers, likely for most the reason for adding a new faction among the existing CAH's.
Now as I said at the start, the focus is on getting the faction playable.
That's why I keep this part simple for now.
All you need to do, to have the same powers as the Men of the West faction has, is
to add you faction upgrade name to every instance of:
CreateAHeroUIAllowableUpgrades = Upgrade_CreateAHero_ClassHeroOfTheWestHint: use search and replace!
That's all!
Some more info for those who already know how to add powers.
There are three values that are new to CAH's, all of them are used in the CAH power selection menu. (When you create your hero)
CreateAHeroUIAllowableUpgrades - Here all the factions that may choose the power are listed.
CreateAHeroUIMinimumLevel - The minimum level the hero must be before it can choose this power.
CreateAHeroUIPrerequisiteButtonName - If this is a level 2 power, you'll first have to choose the level 1 version.
The "CommandButton" name of that level 1 power is listed here.
19 jan 2007 update:
In RotWK there is an additional CaH specific line:
CreateAHeroUICostIfSelected - This sets the costs that come with selecting this power for your personal CaH. The combined costs of all powers make the costs to purchase your CaH ingame. By default the input for this are macro's, variables that are defined in ...\data\ini\gamedata.ini. You can also choose to just enter numeric values, which is recommended if you intend to make a small mod.
Other files used are:
ini\object\createahero\createaheropowers.inc
createaherospecialpowers.ini
createaheroupgrades.inc
Createaheropowers.inc is used to store all the power behaviors that would otherwise be found in the unit ini file.
The other two are, AFAIK, similar to their non CAH versions.
I know there are more files involved, but these listed are just the new ones.
Before I forget, you DONT need to change "experiencelevels.ini" or "experiencelevels_createahero.inc"
This is now taken care of in "commandbutton.ini" with the three new values.
Those who don't know how to mod themselves some powers, I suggest to check out some of the guides from this site.
19 jan 2007 Update:
In the meanwhile I have written two guides about exchanging powers between normal heroes:
BFME 2 Guide: Converting normal powers into Create A Hero Powers
BFME 2 Guide: Converting Create A Hero powers to normal powers
*******************************************************************************
8 - ...\ini\object\createahero\"createaheroarmorupgrades.inc"
*******************************************************************************
The last step before testing your new faction is very simple and likely not even necessary.
Open up the file and copy a code section like this:
////------------------------------------------------------------- //// Class Hero Of The West Armor upgrade. (Upgrade_CreateAHero_ClassHeroOfTheWest) ////------------------------------------------------------------- ArmorSet Conditions = CREATE_A_HERO_01 Armor = CAHArmorHeroOfTheWest DamageFX = NormalDamageFX End Behavior = ArmorUpgrade ModuleTag_CreateAHeroMenOfTheWestArmor TriggeredBy = Upgrade_CreateAHero_ClassHeroOfTheWest ArmorSetFlag = CREATE_A_HERO_01 CustomAnimAndDuration = AnimState:USER_1 AnimTime:0 TriggerTime:0;set flag forever EndRename the behavior module to reflect your own faction.
Change CREATE_A_HERO_01 to CREATE_A_HERO_07.
And again change the "TriggeredBy" value to your own faction upgrade name.
That's it! Unless you want a unique armor setting.
For a guide about armor and Armorsets I suggest you take a look at the guide from the INI section of this site:
http://the3rdage.net/
*******************************************************************************
9 - Test and Backup
*******************************************************************************
It's time to test your new faction.
If there are no problems with the creation of the hero and all animations and powers work fine,
then you should make a backup.
You have the most basic functions of your new faction.
It is always handy to have this backed up, so you can use it again later on.
*******************************************************************************
HAPPY MODDING!
If you have some questions you can always mail me: Solinx.BFME @ gmail dot com
Solinx
Note: I made this guide in notepad. The structure I had made didn't last in this post. I fixed some stuff best as I could, but it's most likely I missed some stuff.
Edit:
=================================================================
SUBCLASSES
=================================================================
From my notes:
*****************
1. Open "createaherosystemmenofthewest.inc"
2. Copy the Shield Maiden Subclass code
3. Rename the value of UpgradeName to Upgrade_CreateAHero_SubClass_2
4. At this point the class is added in the CAH menu next to the Shield Maiden.
It is an exact copy of that class. The only thing missing are the animations.
Alltough it definetly doesn't look the way it should, you can now use it as a new class.
5. Making the animations work is just as easy.
Open "createaheromodelconditionupgrades.inc" which you can find in ...\ini\Object\Createahero
6. Again we copy the Shield Maiden code.
7. Change "ModuleTag_HeroOfTheWest_SubClass_1" into "ModuleTag_HeroOfTheWest_SubClass_2"
Change "ModuleTag_HeroOfTheWest_SubClass_1_MM" into "ModuleTag_HeroOfTheWest_SubClass_2_MM"
Change both "Upgrade_CreateAHero_SubClass_1" into "Upgrade_CreateAHero_SubClass_2"
You can now play the game with your own copy of the Shield Maiden (or whichever character you decide to copy.)
Naturally this isn't exactly what you'd want.
But you now have a copy of the Shield Maiden you can toy with, without destroying the original class.
For instance, you can change the stats and bling stuff in the "createaherosystemmenofthewest.inc" file.
If you know more about the workings of BFME you can change more stuff, but you wont need me to point out the possiblities.
However it is not possible to change the powers that you can choose for your class,
unless you dont mind having them changed for the whole faction.
Unlike with adding a new faction, you don't have to add new Subclass upgrades, untill you have 6 or 7 of them in one faction.
Solinx
Edited by Solinx, 19 January 2007 - 12:36 PM.