1C Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official 1C Company forum > 1C Publishing > King's Bounty > King's Bounty: Armored Princess > Mods

Mods Armored Princess mods

Reply
 
Thread Tools Display Modes
  #1  
Old 02-18-2013, 09:14 PM
BB Shockwave BB Shockwave is offline
Approved Member
 
Join Date: Jan 2009
Posts: 633
Default Enemy hero statistics - where are they?

I want to edit some enemy heroes in AP/CW. However I found no TXT files for their stats in the loc.ses files.

I did find files like "26443629.hero" which are sadly not really readable even with a hex-editor, I see some attack/defense stats and spells, but no numeric data.
Reply With Quote
  #2  
Old 03-18-2013, 12:50 AM
MattCaspermeyer MattCaspermeyer is offline
Approved Member
 
Join Date: Aug 2010
Posts: 549
Talking You found them!

Quote:
Originally Posted by BB Shockwave View Post
I want to edit some enemy heroes in AP/CW. However I found no TXT files for their stats in the loc.ses files.

I did find files like "26443629.hero" which are sadly not really readable even with a hex-editor, I see some attack/defense stats and spells, but no numeric data.
You found them!

You have to use KB_DB_EDIT to convert them into text files, even then they are not the most easily editable files, but when I worked on editing the heroes in my H3B mod I came up with some templates to aid in how to edit them as well as devised my own enemy hero skill system based on their class and level to redefine their skills.

Let me give you an example of what a file looks like and how to edit it...

Okay, I guess before that, if you want to batch convert them do this (skip this if you're only interested in one and just use KB_DB_EDIT_0.75 to decompile it):
  1. Open a Command Prompt to where you have the *.HERO files extracted from the SES.KFS file.
  2. Type this command: dir *.HERO /b > DIRLIST.TXT
  3. What this does is it generates a list of all the *.HERO files, but just their names and saves them to DIRLIST.TXT
  4. Open DIRLIST.TXT in Microsoft Excel (or equivalent spreadsheet program). Each row will be one of the files and they should be in column A.
  5. In column B enter this formula: ="KB_DB_EDIT_0.75 decompile """&A1&""" """&A1&".txt"""
  6. Copy that formula all the way down (make sure it looks right before you do) such that it has a similar command for each different file.
  7. Highlight the cells in column B and copy and paste it into Notepad.
  8. Save the file as KB_DB_EDIT_hero.bat (or another name you prefer) in the same folder as all your *.HERO files.
  9. Copy KB_DB_EDIT_0.75.exe to the same folder as the *.BAT file you just created.
  10. Run your BATch file! You might want to copy and paste the first line into your command prompt to ensure that you haven't made an error before you execute it. Just use caution when performing batch processes...
  11. You should now have all the decompiled *.HERO files (as *.HERO.txt) in the same folder.
  12. Now you are ready to edit them!

Now the anatomy of a *.HERO file (I'll pick one from TL, but it should follow the same rules in WotN) - here is 1206884.HERO converted to 1206884.HERO.TXT:

Code:
{Y}{}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 11 elements
{
	{U}{uid} = {1206884}
	{U}{au} = {1986885}
	{W}{h} = {ehero_system_hint_1206884}
	{A}{ato} = {ah_robber}
	{A}{sp} = {spell_healing}
	{U}{le} = {1}
	{U}{in} = {1}
	{U}{ma} = {10}
	{U}{atk} = {2}
	{U}{de} = {1}
	{Y}{fi}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{1} // 1 elements
	{
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 2 elements
			{
				{A}{level} = {1,2}
				{A}{belligerent} = {enemy}
			}
			{A}{pbonus} = {moral,-1,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
	}
}
Alright, now at first this looks like something that could send you screaming into the night, but bear with me...

We'll go line by line, and start with the first section:

Code:
{Y}{}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 11 elements
{
.
.
.
}
This first line is really insignificant in a way - just know that it is your heading section and that the important stuff is between the starting, {, and closing, }, braces.

Next:

Code:
	{U}{uid} = {1206884}
This is the unit identification (UID) of this hero. This is essentially the name of this file as well as the hero's ID used in certain hints. With your handy GREP tool (search all files in a folder) search for this UID in the *.LNG files: 1206884. As it turns out, you'll find the enemy heroes in: EN(G)_ENEMY_HEROES.LNG (it's like this for all KB variants). This file contains the hints for all the enemy heroes.

Code:
	{U}{au} = {1986885}
This next line is the actor UID. Once again searching on this turns up in EN(G)_ACTORS.LNG. Hero is the name of your enemy hero: actor_system_1986885_name=Beardless Joe. Usually if it is a person, there is also a *_desc just below their *_name: actor_system_1986885_sdesc_=Robber. This is Beardless Joe's description. Note that in AP / CW someone modded the *_name of the contract heroes by putting an * in front their names so that you knew they were a contract hero when you moused over them - they edited this file to do it.

Code:
	{W}{h} = {ehero_system_hint_1206884}
Next is the hint for the hero that uses the UID above. Note that you can change their hint if you'd like in EN(G)_ENEMY_HEROES.LNG.

Code:
	{A}{ato} = {ah_robber}
This one is the ATOM that they use while on the map. You can go look at AH_ROBBER.ATOM in DATA.KFS to see what it looks like, but it will just be their appearance on the map as they go about.

Code:
	{A}{sp} = {spell_healing}
Now we're starting to get to the good stuff! This is their spell list as the spells are named in SPELLS.TXT. Note that multiple spells are separated by "/" within the braces, i.e.: {spell_healing/spell_dispell}. Also be careful here, if you misspell the spell's name the game will crash when the hero tries to cast this spell.
Code:
	{U}{le} = {1}
The heroes level. This is used for determining spell levels. I overrode the spell level limitations in TL for my H3B mod such that levels 1-10 were Level 1, 11-20 Level 2, and 21-30 Level 3. I did this in ARENA.LUA. For AP / CW / WotN since the hero levels go up to 60 (or even higher if you'd like!), there is no longer a need to override this, but note that the only way to control the hero's spell levels is by changing their level or doing what I did.
Code:
	{U}{in} = {1}
	{U}{ma} = {10}
	{U}{atk} = {2}
	{U}{de} = {1}
Intellect, Mana, Attack, and Defense. Self-explanatory here...

Code:
	{Y}{fi}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{1} // 1 elements
	{
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
.
.
.
		}
	}
Once again more scary looking stuff, but like before these are just section headers that organize the information within their braces, {}. The {fi} on the first line above specifies that this is the fight section bonuses.

The last portion:

Code:
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 2 elements
			{
				{A}{level} = {1,2}
				{A}{belligerent} = {enemy}
			}
			{A}{pbonus} = {moral,-1,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
For this if you look in ITEMS.TXT you'll see that this follows the same rules for item bonuses / penalties in the fight section.

Let's look at an item in ITEMS.TXT for clarification; here's the Silver Chain item:

Code:
silber_chain {
  category=o
  image=heroitem_belt_silver.png
  hint_config=object_item
  label=itm_silber_chain_name
  hint=itm_silber_chain_hint
  information_label=itm_silber_chain_info
  maphint=
  mapinfo=
  atoms {
    1 {
      atom=
      lu=template_item_mb
      label=
    }
  }
  price=7700
  maxcount=1
  level=2
  race=neutral
  use {}
  fight {
    {
      filter {
        race=undead
      }
      pbonus=defense,-2,0,0,-100,0,0
      dbonus=
      rbonus=
      attack_on=
      attack_off=
    }
  }
  mods {
    intellect=count,1
  }
  propbits=belt
  params {}
}
Notice the fight section here. This is very similar to what (see above) this section is in the *.HERO file, it is just specified slightly differently (as you may have noticed they like to use braces around names and values). You can use ITEMS.TXT and EN(G)_ITEMS.LNG (this serves as your Rosetta Stone if you don't quite follow how they are listed - just note that it is possible that there are errors between ITEMS.TXT and their descriptions in EN(G)_ITEMS.LNG) to help with discerning how the bonuses are specified.

There are predominately 2 sections:
  1. Filter
  2. Bonus
The filter section is what you use to apply the bonus to a specified group. Note that if you omit this section it will apply to all units, of all levels, of all races, friend or foe on the battlefield.

Here's Beardless Joe's filter:

Code:
			{
				{A}{level} = {1,2}
				{A}{belligerent} = {enemy}
			}
The parameter, level, specifies which levels the modifier applies to and the parameter, belligerent, specifies which units the modifier applies to. In this case, this means units of Level 1 to 2 that are his enemy (i.e. your units).

Valid filters and their values are: belligerent (ally or enemy), daytime (time of day: night, evening, day, morning), level (you can specify it such as <3 for units less than level 3, etc.), loctype (i.e. dungeon, lava, etc. specified in ARENA.TXT as logic_bits), race (as specified in LOGIC.TXT, races), and unit (any valid unit ATOM).

The bonus section needs a bit more description but note that this is where you modify unit abilities.

Code:
			{A}{pbonus} = {moral,-1,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
The first one, pbonus, is a modifier to the filtered unit's Morale. The values that follow are described in the LUA function library for functions that modify hero abilities when a spell affects them and it works just the same here (see Attack library and act_apply_par_spell function). The first 3 numbers are a modification to:
  1. Absolute value
  2. Percent of base value
  3. Percent of current value
So in the case above -1, 0, 0, we modify the absolute morale by -1 and do not modify its base or current value on a percent basis. Typically for stats with values below 10 (i.e. Morale, Initiative, Speed / Action Points) you want to modify their absolute values and for those above you may want to consider percent changes.

The last 3 numbers apply to the bonus itself:
  1. Duration
  2. Delete on Damage
  3. Priority

So in the case above -100, 0, 0 mean: -100 on the duration means it never expires (i.e. a value of 1 means that it lasts 1 round), means that it is not removed if the unit is damaged, and has lowest, 0, priority. Usually your bonuses are always going to follow this pattern, but there are skills that affect your unit bonuses for the first round only so you may want to implement some bonuses like them and then you can specify 1, 0, 0.

Valid pbonus modifiers are: attack, defense, health, hitback (for retaliation - see this in GRIFFIN.ATOM, for example), initiative, krit (for critical hit), moral (for morale), and speed.

The dbonus modifier works just the same as pbonus, except it is a modifier to a unit's damage. Valid modifiers are (as specified in the resistances LOGIC.TXT, i.e. the damage types in the game): astral, fire, magic, physical, and poison (in WotN you can add cold). The 6 numbers following are the same as for pbonus.

The rbonus modifier works just the same as pbonus, except it is for a unit's resistances. Valid modifiers are the same as dbonus.

The last two, attack_on and attack_off, I'm not sure exactly what they do. I surmised that they enabled / disabled a unit's attacks, but it didn't seem to work during my very limited testing with TL. You could try to specify an additional attack (i.e. talent) for an ATOM and set it to disabled (look at how Dragon Arrows are implemented) and then try listing it in the attack_on section to experiment if it works in AP / CW / WotN.

Just like items, you can list multiple bonuses, i.e.:

Code:
	{Y}{fi}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{1} // 1 elements
	{
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 2 elements
			{
				{A}{level} = {1,2}
				{A}{belligerent} = {enemy}
			}
			{A}{pbonus} = {moral,-1,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
	}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 2 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {attack,2,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
	}
}
So in the example above, I added +2 Attack to all of Beardless Joe's units.

Once you are done editing the file, you compile the *.TXT file back into a *.HERO file with KB_DB_EDIT_0.75. If you edit them all (like I did in my H3B mod for TL) you can create another BATch file to compile them all back into *.HERO files.

In the next post, I'll paste my exact templates that I used for my H3B mod so that you can see how I implemented various bonuses for the enemy heroes and you can paste them into your editor and edit and use them if you'd like!



/C\/C\
Reply With Quote
  #3  
Old 03-18-2013, 02:04 AM
MattCaspermeyer MattCaspermeyer is offline
Approved Member
 
Join Date: Aug 2010
Posts: 549
Cool Here are the templates that I used for my H3B mod!

Here are the templates that I used for modifying the enemy heroes. Note that I forgot to mention that "//" are comments in the text file and ignored by KB_DB_EDIT when compiling.

Also, you can use SKILLS.TXT and EN(G)_SKILLS.LNG for more ideas on the types of modifiers you can implement.

Each of these can be pasted into your *.HERO.TXT file as follows: the fight section contains a bonus with a filter, so you simply highlight the text for each bonus from the start of the comment for the level you'd like (i.e. Level 1) up to but not including the comment for the next higher level (i.e. Level 2) to get all the bonuses for that skill type and level. Note that I've bolded intervening sections to make it easier for you to see what you would need to highlight (i.e. level 1 is normal so highlight up to but not including the bold of level 2).

I list each bonus as I implemented it and which skill it applied to in TL and for where I couldn't implement that skill how I changed it.

The first one I did was Training where it modified low level unit's Attack, Defense, and Critical Hit and it worked exactly the same as I implemented it for your hero (note that Attack and Defense are absolute bonuses, whereas Critical Hit is percent base):

Code:
                // Training
                // Level 1, 3 elements
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{level} = {<3}
			}
			{A}{pbonus} = {attack,2,0,0,-100,0,0}  // training level 1
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{level} = {<3}
			}
			{A}{pbonus} = {defense,2,0,0,-100,0,0}  // training level 1
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{level} = {<3}
			}
			{A}{pbonus} = {krit,0,10,0,-100,0,0}  // training level 1
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
                // Level 2, 3 elements
.
.
.
See text file in ZIP attachment
Next was Anger. Note since enemy heroes didn't have Rage or Rage Spirits that I modified it as such:

Code:
                // Anger
                // +1 Damager per level - pick resistance, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {}
			{A}{dbonus} = {physical,1,0,0,-100,0,0}  // anger, damage per level
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
Start Defense works exactly the same as your heroes - note the 1 round duration.

Code:
                // Start Defense
                // Level 1, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {}
			{A}{dbonus} = {}
			{A}{rbonus} = {physical,10,0,0,1,0,0}  // start defense level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
                // Level 2, 1 element
.
.
.
See text file in ZIP attachment
For Shot Commander it was the same implementation as your skill:

Code:
                // Shot Commander
                // Level 1, 12 elements
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {archer,thorn}
			}
			{A}{pbonus} = {attack,1,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // shot commander level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {archer,thorn}
			}
			{A}{pbonus} = {defense,1,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // shot commander level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {bowman,goblin}
			}
			{A}{pbonus} = {attack,2,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // shot commander level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {bowman,goblin}
			}
			{A}{pbonus} = {defense,2,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // shot commander level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {catapult,elf}
			}
			{A}{pbonus} = {attack,3,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // shot commander level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {catapult,elf}
			}
			{A}{pbonus} = {defense,3,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // shot commander level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {alchemist,cannoner,elf2,kingthorn}
			}
			{A}{pbonus} = {attack,4,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // shot commander level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {alchemist,cannoner,elf2,kingthorn}
			}
			{A}{pbonus} = {defense,4,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // shot commander level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {cyclop}
			}
			{A}{pbonus} = {attack,5,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // shot commander level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {cyclop}
			}
			{A}{pbonus} = {defense,5,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // shot commander level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {alchemist,archer,bowman,cannoner,catapult,cyclop,elf,elf2,goblin,thorn,kingthorn}
			}
			{A}{pbonus} = {krit,0,10,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // shot commander level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {alchemist,archer,bowman,cannoner,catapult,cyclop,elf,elf2,goblin,thorn,kingthorn}
			}
			{A}{pbonus} = {health,0,5,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // shot commander level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
                // Level 2, 13 elements
.
.
.
See text file in ZIP attachment
The enemy heroes don't have Tactics so I implemented it as such:

Code:
                // Tactics
                // Level 1, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {enemy}
			}
			{A}{pbonus} = {speed,-1,0,0,-100,0,0}  // Tactics, level 1
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
                // Level 2, 2 elements
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {enemy}
			}
			{A}{pbonus} = {speed,-1,0,0,-100,0,0}  // Tactics, level 2
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {enemy}
			}
			{A}{pbonus} = {initiatve,-1,0,0,-100,0,0}  // Tactics, level 2
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
NightTime Operations same as your hero's:

Code:
                // Nighttime Operations
                // Level 1, 6 elements
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{loctype} = {dungeon}
				{A}{~daytime} = {night,evening}
			}
			{A}{pbonus} = {attack,2,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // nighttime operations level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{~loctype} = {dungeon}
				{A}{daytime} = {night,evening}
			}
			{A}{pbonus} = {attack,2,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // nighttime operations level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{loctype} = {dungeon}
				{A}{daytime} = {night,evening}
			}
			{A}{pbonus} = {attack,2,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // nighttime operations level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{loctype} = {dungeon}
				{A}{~daytime} = {night,evening}
			}
			{A}{pbonus} = {defense,2,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // nighttime operations level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{~loctype} = {dungeon}
				{A}{daytime} = {night,evening}
			}
			{A}{pbonus} = {defense,2,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // nighttime operations level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{loctype} = {dungeon}
				{A}{daytime} = {night,evening}
			}
			{A}{pbonus} = {defense,2,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // nighttime operations level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
                // Level 2, 6 elements
.
.
.
See text file in ZIP attachment
Iron Fist - same:

Code:
                // Iron Fist
                // Level 1, 9 elements
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {skeleton}
			}
			{A}{pbonus} = {attack,1,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // iron fist level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {skeleton}
			}
			{A}{pbonus} = {defense,1,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // iron fist level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {footman,barbarian,barbarian2,goblin2,zombie,zombie2}
			}
			{A}{pbonus} = {attack,2,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // iron fist level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {footman,barbarian,barbarian2,goblin2,zombie,zombie2}
			}
			{A}{pbonus} = {defense,2,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // iron fist level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {footman2,dwarf,orc,werewolf,wolf}
			}
			{A}{pbonus} = {attack,3,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // iron fist level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {footman2,dwarf,orc,werewolf,wolf}
			}
			{A}{pbonus} = {defense,3,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // iron fist level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {horseman,knight,blackknight,demon,orc2}
			}
			{A}{pbonus} = {attack,4,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // iron fist level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {horseman,knight,blackknight,demon,orc2}
			}
			{A}{pbonus} = {defense,4,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // iron fist level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {footman,footman2,horseman,knight,barbarian,barbarian2,blackknight,demon,dwarf,goblin2,orc,orc2,skeleton,werewolf,wolf,zombie,zombie2}
			}
			{A}{pbonus} = {health,0,5,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // iron fist level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
                // Level 2, 10 elements
.
.
.
See text file in ZIP attachment
Onslaught same (once again note the 1-turn duration):

Code:
                // Onslaught
                // Level 1, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {initiative,1,0,0,1,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // onslaught level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
                // Level 2, 2 elements
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {initiative,1,0,0,1,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // onslaught level 2
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {speed,1,0,0,1,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // onslaught level 2
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
                // Level 3, 2 elements
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {initiative,2,0,0,1,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // onslaught level 3
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {speed,2,0,0,1,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}  // onslaught level 3
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
Dark Commander - same:

Code:
                // Dark Commander
                // Level 1, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {archdemon,archer,barbarian,barbarian2,bat,bat2,beholder,beholder2,blackknight,bonedragon,catapult,cerberus,cyclop,demon,demoness,devilfish,ghost,ghost2,goblin,goblin2,graywolf,hyena,imp,imp2,necromant,ogre,orc,orc2,pirat,pirat2,robber,robber2,shaman,skeleton,snake,snake_green,snake_royal,spider,spider_fire,spider_undead,spider_venom,vampire,vampire2,werewolf,wolf,zombie,zombie2}
			}
			{A}{pbonus} = {attack,3,0,0,-100,0,0}  // dark commander level 1
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
                // Level 2, 2 elements
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {archdemon,archer,barbarian,barbarian2,bat,bat2,beholder,beholder2,blackknight,bonedragon,catapult,cerberus,cyclop,demon,demoness,devilfish,ghost,ghost2,goblin,goblin2,graywolf,hyena,imp,imp2,necromant,ogre,orc,orc2,pirat,pirat2,robber,robber2,shaman,skeleton,snake,snake_green,snake_royal,spider,spider_fire,spider_undead,spider_venom,vampire,vampire2,werewolf,wolf,zombie,zombie2}
			}
			{A}{pbonus} = {attack,5,0,0,-100,0,0}  // dark commander level 2
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {archdemon,archer,barbarian,barbarian2,bat,bat2,beholder,beholder2,blackknight,bonedragon,catapult,cerberus,cyclop,demon,demoness,devilfish,ghost,ghost2,goblin,goblin2,graywolf,hyena,imp,imp2,necromant,ogre,orc,orc2,pirat,pirat2,robber,robber2,shaman,skeleton,snake,snake_green,snake_royal,spider,spider_fire,spider_undead,spider_venom,vampire,vampire2,werewolf,wolf,zombie,zombie2}
			}
			{A}{pbonus} = {initiative,1,0,0,-100,0,0}  // dark commander level 2
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
                // Level 3, 3 elements
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {archdemon,archer,barbarian,barbarian2,bat,bat2,beholder,beholder2,blackknight,bonedragon,catapult,cerberus,cyclop,demon,demoness,devilfish,ghost,ghost2,goblin,goblin2,graywolf,hyena,imp,imp2,necromant,ogre,orc,orc2,pirat,pirat2,robber,robber2,shaman,skeleton,snake,snake_green,snake_royal,spider,spider_fire,spider_undead,spider_venom,vampire,vampire2,werewolf,wolf,zombie,zombie2}
			}
			{A}{pbonus} = {attack,7,0,0,-100,0,0}  // dark commander level 3
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {archdemon,archer,barbarian,barbarian2,bat,bat2,beholder,beholder2,blackknight,bonedragon,catapult,cerberus,cyclop,demon,demoness,devilfish,ghost,ghost2,goblin,goblin2,graywolf,hyena,imp,imp2,necromant,ogre,orc,orc2,pirat,pirat2,robber,robber2,shaman,skeleton,snake,snake_green,snake_royal,spider,spider_fire,spider_undead,spider_venom,vampire,vampire2,werewolf,wolf,zombie,zombie2}
			}
			{A}{pbonus} = {initiative,1,0,0,-100,0,0}  // dark commander level 3
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {archdemon,archer,barbarian,barbarian2,bat,bat2,beholder,beholder2,blackknight,bonedragon,catapult,cerberus,cyclop,demon,demoness,devilfish,ghost,ghost2,goblin,goblin2,graywolf,hyena,imp,imp2,necromant,ogre,orc,orc2,pirat,pirat2,robber,robber2,shaman,skeleton,snake,snake_green,snake_royal,spider,spider_fire,spider_undead,spider_venom,vampire,vampire2,werewolf,wolf,zombie,zombie2}
			}
			{A}{pbonus} = {speed,1,0,0,-100,0,0}  // dark commander level 3
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
Holy Anger - implemented such that you pick two races that the enemy hero will apply this bonus to:

Code:
                // Holy Anger
                // +10% per level - pick two races, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{race} = {demon,undead}
			}
			{A}{pbonus} = {attack,0,10,0,-100,0,0}  // Holy Anger, +10% per level
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
Glory - can't change leadership so implemented this way:

Code:
                // Glory
                // +1 Speed per level, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {speed,1,0,0,-100,0,0}  // Glory
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
Learning - experience irrelevant for enemy heroes so have it apply to unit critical hit:

Code:
                // Learning
                // +20% per level, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {krit,0,20,0,-100,0,0}  // Learning, +20% per level
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
Reserve - no equivalent so implemented as such:

Code:
                // Reserve
                // -10% Enemy Critical Hit per level, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {enemy}
			}
			{A}{pbonus} = {krit,0,-10,0,-100,0,0}  // Reserve, -10% per level
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
Diplomacy (once again no equivalent):

Code:
                // Diplomacy
                // -1 Enemy Initiative per level, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {enemy}
			}
			{A}{pbonus} = {initiatve,-1,0,0,-100,0,0}  // Diplomacy
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
Keeper of the Light changed after I implemented this for the enemy heroes, but I left it the same. It kind of works similar to Holy Anger.

Code:
                // Keeper of the Light
                // +10% per level - pick two races, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{race} = {demon,undead}
			}
			{A}{pbonus} = {defense,0,10,0,-100,0,0}  // Keeper of the Light, +10% per level
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
For Tolerance I had it work the opposite:

Code:
                // Tolerance
                // -1 Enemy Moral per level, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {enemy}
			}
			{A}{pbonus} = {moral,-1,0,0,-100,0,0}  // Tolerance
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
For Inquisition I decided to change it to a bonus for units less than level 5:

Code:
                // Inquisition
                // Level 1, 3 elements
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{level} = {<4}
			}
			{A}{pbonus} = {health,0,5,0,-100,0,0}  // Inquisition level 1
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{level} = {<4}
			}
			{A}{pbonus} = {initiative,1,0,0,-100,0,0}  // Inquisition level 1
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{level} = {<4}
			}
			{A}{pbonus} = {speed,1,0,0,-100,0,0}  // Inquisition level 1
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
For the Spell Class skills I decided to make it a resistance to the predominant damage type of the spells in that class (or you could pick one if there were more than one predominant type), i.e. Order:

Code:
                // Order
                // +5% Magic Resistance per level, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {}
			{A}{dbonus} = {}
			{A}{rbonus} = {magic,5,0,0,-100,0,0}  // Order, +5% per level
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
Distortion:

Code:
                // Distortion
                // +5% Physical Resistance per level, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {}
			{A}{dbonus} = {}
			{A}{rbonus} = {physical,5,0,0,-100,0,0}  // Distortion, +5% per level
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
Once again, Concentration could have been implemented like yours, but enemy hero mana regeneration was added after this was implemented (because in TL the enemy hero mana ball does not show positive mana increases and so I wasn't sure at the time if I wanted to implement enemy hero mana regeneration because of this - have they changed this in AP / CW / WotN?).

Code:
                // Concentration
                // +5% resistance per level - pick resistance, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {}
			{A}{dbonus} = {}
			{A}{rbonus} = {fire,5,0,0,-100,0,0}  // Concentration, +5% per level - pick resistance
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
For Healer, I implemented the Health bonus part:

Code:
                // Healer
                // Level 1, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {health,0,2,0,-100,0,0}  // healer, level 1
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
                // Level 2, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {health,0,5,0,-100,0,0}  // healer, level 2
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
                // Level 3, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {health,0,10,0,-100,0,0}  // healer, level 3
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
For Chaos, it is like Order and Distortion except that you pick one of the 3 resistance types:

Code:
                // Chaos
                // +5% Fire, Physical, or Poison Resistance per level - pick element, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {}
			{A}{dbonus} = {}
			{A}{rbonus} = {fire,5,0,0,-100,0,0}  // Chaos, +5% per level - pick fire, physical, or poison
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
For Mega Mage it was applying bonuses to Mage units:

Code:
                // Mega Mage
                // Level 1, 3 elements
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {priest,priest2,druid,archmage,shaman,necromant}
			}
			{A}{pbonus} = {attack,4,0,0,-100,0,0}  // mega mage level 1
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {priest,priest2,druid,archmage,shaman,necromant}
			}
			{A}{pbonus} = {defense,4,0,0,-100,0,0}  // mega mage level 1
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {priest,priest2,druid,archmage,shaman,necromant}
			}
			{A}{pbonus} = {health,0,5,0,-100,0,0}  // mega mage level 1
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
                // Level 2, 4 elements
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {priest,priest2,druid,archmage,shaman,necromant}
			}
			{A}{pbonus} = {attack,4,0,0,-100,0,0}  // mega mage level 2
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {priest,priest2,druid,archmage,shaman,necromant}
			}
			{A}{pbonus} = {defense,4,0,0,-100,0,0}  // mega mage level 2
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {priest,priest2,druid,archmage,shaman,necromant}
			}
			{A}{pbonus} = {krit,0,10,0,-100,0,0}  // mega mage level 2
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {priest,priest2,druid,archmage,shaman,necromant}
			}
			{A}{pbonus} = {health,0,10,0,-100,0,0}  // mega mage level 2
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
                // Level 3, 5 elements
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {priest,priest2,druid,archmage,shaman,necromant}
			}
			{A}{pbonus} = {attack,4,0,0,-100,0,0}  // mega mage level 3
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {priest,priest2,druid,archmage,shaman,necromant}
			}
			{A}{pbonus} = {defense,4,0,0,-100,0,0}  // mega mage level 3
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {priest,priest2,druid,archmage,shaman,necromant}
			}
			{A}{pbonus} = {krit,0,15,0,-100,0,0}  // mega mage level 3
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {priest,priest2,druid,archmage,shaman,necromant}
			}
			{A}{pbonus} = {health,0,15,0,-100,0,0}  // mega mage level 3
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{unit} = {priest,priest2,druid,archmage,shaman,necromant}
			}
			{A}{pbonus} = {initiative,1,0,0,-100,0,0}  // mega mage level 3
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
For Necromancy it was give bonuses to the Undead similar to you hero's. As it turned out, Morale does not work for enemy units so I would change this to something different now as far as the Morale bonus.

Code:
                // Necromancy
                // +1 Undead Moral per level, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{race} = {undead}
			}
			{A}{pbonus} = {moral,1,0,0,-100,0,0}  // necromancy, +1 per level
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
For Higher Magic, I implemented enemy hero multi-cast differently and so this turned into a Resist All bonus (well except for Astral):

Code:
                // Higher Magic
                // Level 1 +2% Resist All, 4 elements
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {}
			{A}{dbonus} = {}
			{A}{rbonus} = {fire,2,0,0,-100,0,0}  // Higher Magic, level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {}
			{A}{dbonus} = {}
			{A}{rbonus} = {magic,2,0,0,-100,0,0}  // Higher Magic, level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {}
			{A}{dbonus} = {}
			{A}{rbonus} = {physical,2,0,0,-100,0,0}  // Higher Magic, level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {}
			{A}{dbonus} = {}
			{A}{rbonus} = {poison,2,0,0,-100,0,0}  // Higher Magic, level 1
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
                // Level 2 +5% Resist All, 4 elements
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {}
			{A}{dbonus} = {}
			{A}{rbonus} = {fire,5,0,0,-100,0,0}  // Higher Magic, level 2
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {}
			{A}{dbonus} = {}
			{A}{rbonus} = {magic,5,0,0,-100,0,0}  // Higher Magic, level 2
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {}
			{A}{dbonus} = {}
			{A}{rbonus} = {physical,5,0,0,-100,0,0}  // Higher Magic, level 2
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {}
			{A}{dbonus} = {}
			{A}{rbonus} = {poison,5,0,0,-100,0,0}  // Higher Magic, level 2
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
                // Level 3 +10% Resist All, 4 elements
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {}
			{A}{dbonus} = {}
			{A}{rbonus} = {fire,10,0,0,-100,0,0}  // Higher Magic, level 3
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {}
			{A}{dbonus} = {}
			{A}{rbonus} = {magic,10,0,0,-100,0,0}  // Higher Magic, level 3
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {}
			{A}{dbonus} = {}
			{A}{rbonus} = {physical,10,0,0,-100,0,0}  // Higher Magic, level 3
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
			}
			{A}{pbonus} = {}
			{A}{dbonus} = {}
			{A}{rbonus} = {poison,10,0,0,-100,0,0}  // Higher Magic, level 3
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
For Destroyer, the only way to implement spell Damage bonuses was via a mods {} section (as in ITEMS.TXT). Unfortunately, enemy heroes have no such section so the only way to make spells more damaging was to lower your resistances:

Code:
                // Destroyer
		// -10% Enemy Resistance for Level 1 - pick resistance, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {enemy}
			}
			{A}{pbonus} = {}
			{A}{dbonus} = {}
			{A}{rbonus} = {fire,-10,0,0,-100,0,0}  // Destroyer, level 1 - pick resistance
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		// -25% Enemy Resistance for Level 2 - pick resistance, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {enemy}
			}
			{A}{pbonus} = {}
			{A}{dbonus} = {}
			{A}{rbonus} = {fire,-25,0,0,-100,0,0}  // Destroyer, level 2 - pick resistance
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		// -50% Enemy Resistance for Level 3 - pick resistance, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {enemy}
			}
			{A}{pbonus} = {}
			{A}{dbonus} = {}
			{A}{rbonus} = {fire,-50,0,0,-100,0,0}  // Destroyer, level 3 - pick resistance
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
That's it with the equivalent enemy hero bonuses the next bonus was a Race bonus that certain heroes applied to their race. For example, Xeona, Raab Sotten, and Baal all had special Demon bonuses.

Code:
                // Race Bonus, 7 elements
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{race} = {demon}
			}
			{A}{pbonus} = {attack,0,20,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{race} = {demon}
			}
			{A}{pbonus} = {defense,0,20,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{race} = {demon}
			}
			{A}{pbonus} = {krit,0,20,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{race} = {demon}
			}
			{A}{pbonus} = {health,0,20,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{race} = {demon}
			}
			{A}{pbonus} = {initiative,2,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{race} = {demon}
			}
			{A}{pbonus} = {moral,2,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{race} = {demon}
			}
			{A}{pbonus} = {speed,2,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
Here was a bonus to give Unlimited Retaliation - this one is tricky because if your hitback is 1 and you add 1 to it then you get 2, but if hitback is 2 (i.e. Griffins and Demons) then you'll get 3, which causes them to retaliate just once so I had to fix hitback on combat start and during other times (i.e. unit summons) with an LUA script. Maybe they fixed this in AP / CW / WotN?

Code:
                // Unlimited Retaliation Bonus, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{race} = {demon}
			}
			{A}{pbonus} = {hitback,1,0,0,-100,0,0}
			{A}{dbonus} = {}
			{A}{rbonus} = {}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
This one shows applying both a damage and resistance bonus:

Code:
                // Damage and Resistance Bonus, 1 element
		{Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements
		{
			{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 1 elements
			{
				{A}{belligerent} = {ally}
				{A}{race} = {demon}
			}
			{A}{pbonus} = {}
			{A}{dbonus} = {fire,2,0,0,-100,0,0}
			{A}{rbonus} = {fire,10,0,0,-100,0,0}
			{A}{attack_on} = {}
			{A}{attack_off} = {}
		}
Okay - that's it! There are obviously a lot more, but this should prove quite helpful if you want to modify heroes by hand.

Feel free to ask any questions!

/C\/C\

P.S. Here is a text file with the complete bonuses as a ZIP:
Attached Files
File Type: zip Hero Templates.zip (3.0 KB, 2 views)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:57 AM.

Based on a design by: Miner Skinz.com

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2007 1C Company. All rights reserved.