Battle Mages: Sign of Darkness

Battle Mages: Sign of Darkness

Not enough ratings
I Dissected The Source Code of This Game So You Won't Have to be Confused Anymore or Experiment
By Redeloper
https://www.moddb.com/downloads/exmachina-unpacker-20-by-jtommy is what I used to accomplish this. Link to original download website is dead and I did not make this software. All credit for this dissection tool goes to a person who nicknamed themselves jTommy.

Simply put it where gamepacks are, activate and select gamepack flies for dissection. Also only 1 file can be dissected at once but that's not a problem.

Notepad++ with ctrl+F function is going to greatly help you with finding stuff.
   
Award
Favorite
Favorited
Unfavorite
Things to Learn From magic.lua Script (In Assistance of gameobjects.xml):
  • Critical hits don't actually deal double damage but that's way more complex and I don't quite understand the code when drawing comparisons with my years of expertise at replaying this game.
  • Drago demons and lesser demons deal 15 chaos damage in melee.
  • Magma demons deal 50 chaos damage in melee. This makes them more devastating to certain units than drago demons.
  • Magic spirits and greater magic spirits deal 23 energy damage in melee.
  • Nature elementals deal 60 nature damage in melee.
  • Phanom warriors deal 45 energy damage in melee. This is what makes them feel more powerful against paladins than they should be.
  • Sprites deal 15 nature damage in melee.
  • Demon imps deal 10 chaos damage in melee.
  • When something or someone does effect strong against certain mentioned units, it acts as 1.5 multiplier and it cannot stack. For example paladins deal 50% more damage to undead but totems of fury won't buff them to 125%. There are some special examples. Super titanite sword has 5 multiplier to vorogs, goblin spear/halberder does double damage to cavalry (orc hiena users and human knights) and black warriors do double damage to paladins. Forest guardians secretly deal 50% more damage to creatures with strong magical affilation. Lastly demon imps deal colossal 250 extra chaos magic to machines, which is extremely useful for killing golems in undead campaign's final level should Szi spawn them.
  • Also contrary to above statement bears actually won't deal 50% more damage to single unit squads but they do 33% more damage overall after 7:00 and before 22:00 (10:PM) hours.
  • And vorogs without any indication do 50% more damage to goblins, including vehicle users. Well, from plot perspective goblins do get surprised by them and their numbers but it didn't count for me. To make it a little bit more insulting, golems are considered to be a goblin unit in the game files.
  • Undead units deal 33% more melee damage after 22:00 and before 7:00, excluding dark warriors, acolytes, horror mages and crawling deaths. Would be a huge help if the game only mentioned this indirectly somehow. Also wolves also have this buff.
  • Horror mages have 5% chance to have enemies killed by lightning bolts turn into zombie.
  • Stalkers do 50% more damage to units with maximum HP of 300 or above. They're rangered attacks will also deal 15 extra cutting damage to those units. Mechanical are immune.
  • Physical ranged attacks that crit do 25 damage which cannot be reduced. Freelancers do 30 instead and headhunters do 35 instead. Really sucks if we consider how elves are supposted to be the best sharphooters.
  • Goblin halberders have 2% chance to deal 1000 damage of every regular melee damage type. This is supposted to be an instakill but it can be survived. Cavalery and mechanical units are immune.
  • When melee attack is supposted to slow or poison, it's going to last 30 seconds, assuming unit has no resistance to respective magic. Freezing is supposted to last 2 seconds on same basis. Also freezing breath actually only causes slowness.
  • Golems were supposted to have immunity to receiving poison from melee attacks but instead they were programmed not to receive any effect which would allow them to poison targets in melee.
  • Units that heal by dealing melee damage (effect or passive) heal 33% of damage dealt. Those effects cannot stack.
  • Here's how lycanthropes turning people into other lycanthropes work: They have 3% chance per melee hit to doom a squad member after 60 seconds pass. Also various stuff prevent that from happening. Undead and creatures strongly affilated with certain magic type are immune. Affected also have their attack reduced by 25 points and critical hits by 20 points until said minute passes. Overall it's a standalone status effect known by game files as "lycanthrope's curse".
  • When a member of forest guardians dies, there is a 15% chance for remaining squad members to become heroic for 30 seconds. Works within 2 units of range (short).
  • Orc bandits have 5% chance to cause "terror" for 30 seconds. It doesn't work on undead and units strongly affilated with certain magic type. Target takes 25% more time to do next melee attack and moves 50% slower.
  • Sacrifice heals 200 HP.
  • Flash storm was really hard to figure out. Initially deals 50 energy damage to all enemies and every drop does 5 energy damage with 5 seconds of slowing. If i read correctly, the moment spell is casted, every individual target has a highly random chance to become orb carriers. A number is set between 0 and 100 for everyone and if it's below 3, victim suffers from 3 orbs, else 2 orbs if below 7 and else 1 orb if below 15. Also non-enemy units are unaffected by this spell, at least I found nothing telling this spell how much damage should they receive.
  • Firestorm spawns 4 projectiles per second. They only do 10 chaos damage but won't cure slowing or freezing. Crappy spell.
  • Forest spirits spawn randomly 5 to 10 wood on death per squad member. It's not a part of inventory. This is also your best bet for completing 500 wood quest in preultimate level of the game.
  • Wave of darkness reduces armor by 50 points and sight by 90% for 4.5 second every 9 seconds. It does not work on undead.
  • Temporarily raised undead with flesh decay and destroy and raise last 60 seconds.
  • Wolfs and small skeletons spawned with scrolls last 60 seconds. Spawned with spells by units last 20 seconds and are very weak to dispel spell, if it actually wasn't limited to units strongly affilated with certain magic type. Speaking of dispel, it only deals 2 energy damage but if I understand critical hits for player magic attacks correctly, it's going to be 5% chance for 77 energy damage instead.
  • Szi's undead control causes captured units to have their leadership set to 1.
  • Resurrection gives 2 minutes of life and still living player's units heal 200 HP. Works on every unit.
  • It would be true if it came out while I was testing but it doesn't for some reason (in fact I saw a unit while I looked with alt key under perk to gain invulnerability to certain damage type): Doom spear reduces armor by 30 points, amplifies it to 60 after 5 seconds and 90 after 10 seconds pass since hit. This effect is bugged to be permanent and undead are immune to it. Non-enemies get armor reduced by 25 without amplifying, also permanently and works on undead.
  • Time of horror undead exist 25 seconds and restore 10 seconds with every 10 seconds of individual times of horror. Also the moment of casting heals 15 seconds of already existing undead. This spell doesn't care about relationship with the player whenever buffs or debuffs are to be applied. All that matters is undead status. Undead in range have 30 more armor, take 50% less time to do melee attack and move 50% faster. They regenerate 5 HP per second for 5 seconds every 10 seconds. Non-undead take 2.5 second longer to do next melee attack, have sight reduced by 50%, move 50% slower and take 5 seconds longer to start attacking next target. They are also poisoned for 10 seconds every 5 seconds after 10 seconds pass at least.
  • Sir 2000 HP demon slayer from second Szi's mission doesn't deal 50% more damage against any specific unit type.
  • While description of knights may imply some special ability in melee, they don't have any unlike orc bandits.
  • Warlords have 3% chance for entire squad to go berserk for 45 seconds if one of them hits something.
  • Orc berserkers and warlords have 34% chance to attack twice in a single strike.
  • 30 blunt damage with freezing and slowing reduced by 15 seconds has 34% chance to be done by orcish marauders and orcish bandits.

    By units strongly affilated with certain magic type I meant:
  • Demons.
  • Magic spirits (greater too).
  • Phantom warriors.
  • Sprites.
  • Nature elementals.
Levels of Items and Their Actual Properties if Hidden or False (gameobjects.xml):
A level of an object determines at which level of lair's expert it might drop. Lair expert levels above 1 drop items of a level below lair expert's level. For example level 3 items are dropped by level 4 lair expert. Also levelling lair expert after level 2 lowers chance for already unlocked drops since higher level drop might occur.

Even if immunities don't make sense, 4th multiplayer map features lairs pretty close and you can start very early with max level lair expert if you feel like gambler (bad idea).

If dropped item is a quest item, you can absolutely use it to complete quest even if it's a major one, although quest items without any effect in inventory cannot drop. You can even find items implied by the plot to be the only ones of their kind.

Standard of Glory: Level 3.
Banner of Bravery: Level 2.
Standard of Honor: Level 2.
Avenger: Level 2. Immune to lycanthrope's curse. Cannot benefit from vampirism.
Totem of Darkness: Level 2 actually. Immunities: chaos touch, burn eyes, damnation, fire schackles. For example immunity to chaos touch (with fire guardian item since they're more likely to get it earlier in the game) causes many player to have no idea why demon mages won't freeze them.
Fury Banner: Level 3. Immune to blood-to-ice. Unit cannot have freezing breath.
Steel Sword: Level 1.
Titanium Sword: Level 1.
Azurithe Sword: Level 2.
Sword of Heavens: Level 2.
Ice Warrior's Sword: Level 3. Immune to blood-to-ice.
Phantom Blade: Level 3. Melee attacks inflict slowness.
Blade of Justice: Level 3. Has nothing to do with being slow but on philosophical level I guess some would argue that any justice not served instantly is slow.
Thresh Club: Actually level 2. Blunt damage type receives 300% boost instead.
Moon Hammer: Level 3. Immunities: curse, rusty touch, restless bones, fear. Cannot benefit from laughing skulls.
Staff of Archmage: Level 3. Immune to fire schackles.
Demon Slayer: Level 2. Slash damage increased by 30% and remaining melee types by 10%. Immune to chaos touch.
Alamar's Bow: Level 3. Unit will use "alamar's arrows" as ammo, which deal 15 energy damage, 35 pierce damage and 10 second slowing. Immune to chaos touch. 50% more damage to demons.
Mecun's Blood Axe: Level 3. Immune to chaos touch. Slash damage increased by 50% and remaining by 30%.
This item is dropped by level 5 lair mastery but it's better not to know about it's existence until you progress the plot. Mecun's Axe's Immunities: chaos magic's negative status effects, hypnosis. Chaos resistance upped by 25 points. Slash attacks do triple damage and remaining types are doubled. Deals 50% more damage to demons.
Steel Armor: Level 1.
Titanium Armor: Level 1.
Azurithe Armor: Level 2.
Shining Plate: Level 3. Item is bugged to permanently rise energy resistance by 30 points.
Moon Shield: Level 3. Immunities: curse, rusty touch, fear, restless bones. Cannot benefit from laughing skulls. Raises energy resistance by 60 points and other magic types by 20.
Fire Guardian: Level 3. Immunities: chaos magic's negative status effects, hypnosis. Raises chaos damage resistance by 75 points and armor by 25.
Runic Shield: Level 3. Immune to hypnosis.
Shadow of Nosferat: Level 4. Drains 4 HP per second. Immunities: hypnosis, chaos magic's negative status effects, infect, weakness, plague touch, restless bones, fear, curse, rusty touch. Cannot benefit from laughing skulls and freezing breath. Raises armor by 75 points even of defenses at 0. Nature resistance goes up by 90 points.
Chain Armor: Level 1.
Wood Shield: Level 1. Raises nature resistance by 10. Cannot benefit from freezing breath. Immune to lycanthrop's curse.
Boots: level 1. Cannot benefit from freezing breath. Immune to lycanthrop's curse.
Dwarven Battle Gear: Level 4. Only equipped by melee units.
Chaos Ring: Level 1. Actually increases by 45 points. Unit is still affected by brain incineration and panic but other negative status effects won't apply.
Nature Ring: Level 1. No artifact in this game immunizes to earth to mud. Actually increases by 45 points. Also gives lycanthrop curse immunity.
Energy Ring: Level 1. Actually increases by 45 points. Immune to blood-to-ice. Cannot benefit from freezing breath.
Wonder Cyclops Eye: Level 1. Immunizes to burn eyes and fire schackles. Does not extend attack range.
Wardun's Ring: Level 2.
Tooth of The Great Dragon: Level 2. Target can be still inflicted with brain incineration and panic but other negative status effects won't apply. Chaos and only chaos resistance is increased by 100 points (max for non-immune units is 90, so it's a buffer).
Black Blood Rune: Level 3. Unit heals by inflicting melee damage. Cannot benefit from freezing breath, venom blades and vampirism. It only ever once turns people into lycanthropes in a scripted event.
Celestial Diadem: Level 4. Regenerates 10 HP per second even in combat. Immunizes to hypnosis, lycanthrop's curse, infect, plague touch and weakness.
Orkish Stone: Level 2. Regenerates 1 HP per second even in combat.
Copper Ring: Level 2. Regenerates 1 HP per second even in combat.
Ring of The Horror King: Level 4. PERMANENTLY turns all individuals in a squad into lesser demons who die after 2 minutes due to blue healthbar.
Orb: Level 3. Immunizes to blood-to-ice. Cannot benefit from freezing breath. Regenerates 1 HP per second even in combat.
Fate Ring: Level 3. Only increases speed by 2 if user is not chasing after unit. Actual 4 bonus applies when attacking.
Retort: Cannot drop from Lair Expert perk. Increases mana regeneration by 2. Polish translation got it's name wrong, as it reads "Odprawa", which actually mean in english "Briefing".
Exp Penalties Per Mission
When a certain amount of exp is reached in a level, a 40% experience gain penalty is applied, pressumably to disencourage grinding. This penalty is enforced on all sources, like quests, scrolls and even cheat code. This penalty stacks infinitely until a level is complete and further incrementation of it acts as if you gained full amount of exp.

1st mission of every campaign: 75 thousand.
2nd mission of every campaign: 250 thousand.
3rd mission of every campaign, multiplayer and tutorial for some reason: 500 thousand.
4th mission of every campaign, yeah, even chaos portal level: 750 thousand.
Various Stuff I Found That Doesn't Matter:
Guild Master absolutely only cares about an amount of individual units you have left once 12 orc berserkers are downed. This is the only condition necessary to beat tutorial, all other quests are actually optional. Having less than 6 units makes you barely pass the test and over 13 makes you pass in flying colors.

Capital of the human empire was the hardest level for devs to make. According to magic.lua this level was originally going to feature a unit "bleeding" mechanic, which dealt fixed amount of damage depending on current HP but actually healed when it was too low. Also, Alissa could originally report that Scalrim was destroyed by Hroll but the command can't believe it and decides to solve this mystery later.

You were actually going to encounter Airon in the last level of the game and protect him.

debug.lua has someone actually using a curse word and various cheats that didn't make it to the final game.

Goblin strategist has an unused line of dialogue in Russian which might be a placeholder actually. What does he say?

You could originally purchase golems from dwarves for 1250 gold at full price but since it's not the same model name as an actual one, the feature remains unused.

Szi could originally make a comment if a spell he tried to use couldn't work because it's an undead unit.

There was going to be a quest with Ugdug Clan being under attack after being liberated.

Game files actually contain player character portrait seen in some promotional material.

Elven Queen has her portrait refer to her as an empress.

Paying 1000 gold in multiplayer for bonus guards is INTENTIONALLY BROKEN. Towers were programmed to replenish their guards for every 1 million seconds of not fighting. Normally most sites in the game need 10 seconds of not fighting per new free defense unit. Said bonus guards are 2 phantom warriors. When I temporarily modded the game to have them respawn every second of safety, they showed up normally, including greater magic spirits I killed for experiments.

Tower upgrades in multiplayer were intentionally programmed to consume 90% less exp than it's required to make them.

Peons could originally outright go into goldmines to carry out 100 gold. They only carry out stone in the final game.

Troops getting enough exp to level up would use their own unique sound effect (but it's crappy). In the final game they just use a sound effect of spending a perk point.
Some Glitches
Spells programmed to be status effect mostly work by instantly applying their changes to stats and maybe do something else every x seconds of lasting. When they reach their end, they apply effects listed in "restore" section, most of the time being just inversions of what happens at the start of the spell. Items work the same way, that's why one of them permanently increases energy damage resistance by 30 points on every equip, as it's "restore" section does not directly counter the increase, easy fix.

By casting haste on your unit and levelling up enchanter perk to 5, the spell at the end will lower movement speed of that unit by 75% of it's base value, giving 25% speed reduction. Completing a mission won't do a thing about it considering how overpowered mana potion goes over to the next stage but perhaps modifying your unit in town to another is the only way. They do get animations of equipping items once they get modified, so this could equal a complete reset, except inventory.

Mana potion for some unfathomable reason despite being strictly programmed to increase mana regeneration by 3 points turns your offensive mages into semi-machine gunners. It's "restore" section works correctly. I think it increases mana regeneration by 3 points every tick or frame, whatever. It does not have a section for a "periodic" effect. It also only needs level 2 lair master to drop randomly and it's only 35 in gold to buy at full price. Edit: It's because of Idiot Programming https://tvtropes.org/pmwiki/pmwiki.php/DarthWiki/IdiotProgrammingVideoGames and to fix this, create a new action section identical to the first, replace mpr in second action section with a period of 120 seconds and remove timeout from first action section. Literally everything else follows this principle in some way but mana potion.

I have no idea if it's intentional but parts of the spells coming out directly from advanced scripts are unaffected by perks.

And despriction for spiritualist is outright a liar. Magic spirits won't give even more mana at nodes. Combat perk which lets your melee troops increase their defenses (by 10 percentage points per level) also seems to be lacking damage debuff and timeout that makes this command no longer in effect unless a different order is given. Contrasting perk does have a timeout of 30 seconds on level 1 increased by 10 seconds per new level but until it's over, movement orders cannot be given.

Third perk of magic power does not affect player's damage resistance until level 4. Level 1 gives 30% speed boost, rised by 10 percentage points on levels 2 and 3. If I read correctly, the player actually takes 30% more damage from level 4 onward, unless players are the only characters using this specifically named value for taking damage, which might actually work differently.

At the endgame of Pheren's campaign, you get to play as Szi, who gets his mana forcefully set to amount dependent on knowledge skill but because mages under your control abandon you afterwards, this results in mentor perk users lose mana depending on it's level and amount of controlled mage units. It cannot fall below 0. I actually don't know what exactly causes it and it's an assumption.
Gonna Expand This One Day:
Steam doesn't let me save drafts and I don't want to make this hidden. If you figured out something interesting or I am wrong about something, you can just tell in the comments. There are still cool things I found which I want to post.
15 Comments
Redeloper  [author] 12 Dec, 2023 @ 9:13am 
Note: Stone falling hazards have 1/21 chance to trigger, lava has 1/11.
Redeloper  [author] 12 Dec, 2023 @ 9:09am 
When it comes to confusing and super random lava damage in previous level, the game checks for player units every 5 seconds since the start of the level if they are in damage zones and then deals between 1 to 400 chaos damage to all troops in range at once. This one is reduced by chaos magic resistance normally.
Redeloper  [author] 12 Dec, 2023 @ 3:35am 
There are 6 hazard zones in the level, each having 1/11 chance to trigger if troop steps into it, so larger army is going to have higher chance to get someone hurt.. and Zoragon himself or Buzug can get totally one-shot no matter what. Type of hazard doesn't matter, they all ignore defenses dealing random damage up to 150% of maximum HP value from 0. A fully healed unit has about 1/3 chance to die. Once a hazard is triggered, no hazard can activate for 30 seconds in the level. Staying inside hazard that didn't trigger won't activate it but hazards can never be truly rid of.
Redeloper  [author] 12 Dec, 2023 @ 3:31am 
It must have something to do with berserk. Did you read tutorial again? I might update it again someday when I feel like it. I guess I could explain how hazards work in Pheren's dwarf mission. The only thing that comes to my mind is berserk perk. It screws your units for 30 seconds, increased by 10 seconds per upgrade... and guardian won't debuff their damage. I have no idea why Vorogs didn't betray you. Might have something to do with being in proximity of Goblin base. You can fix this by dismissing them... unless it's intentional by the devs.
ТедиАлександрова 9 Sep, 2023 @ 7:01am 
@Redeloper,

I did attack with everything I had (Berserk, Guardian included) and after I killed the goblins the Vorogs did not betray me but they just froze as well. Not all troops froze after a few tries though, but most of them and it is incremental, so half of my army freezes and in a few minutes the rest I am moving with, Vorogs did not betray me as I mentioned and they froze as well.
Redeloper  [author] 22 Aug, 2023 @ 8:59am 
Well, this is weird. The only other known instance to me happened with my friend who were tampering with game files for his balance purpose mod. Are you giving them Guardian and Berserk commands from perks? I updated the tutorial about how they work. Berserk starts to make your unit less obedient for 30 seconds with 10 seconds per upgrade level. Also, those Vorogs were going to betray you upon killing goblins anyway.
ТедиАлександрова 16 Aug, 2023 @ 7:17am 
@Redeloper
Sorry for the late response and thanks for answering!
I mean, in the Dwarf cave there is a point somewhere on the roads, where I have to attack another army after I talked to some kind of monster that became part of my army. So when I defeat this army, most of my troops freeze, I tried using cheats for gold to disband the troops, buy new ones but it still does the same. I even tried a pirate version of the game - same sh!t...
I may go with easywin when I find time to play, if it happens again.
Thanks again for the response, I will try to follow the thread and respond faster!
Redeloper  [author] 11 Jul, 2023 @ 9:11am 
You weren't really supposted to catch them, just wait it out. The Dwarf makes short teleportation on every death and if he teleports directly to his final destination, he won't jump down waterfall, which he is supposted to. Zoragon has a massive healing factor and constantly goes in the direction of the guild troops. I managed to kill him by disabling his movement with earth to mud at level 3 enchanter and plague touching him with infection. When he died, the mission softlocked.
‡Grandel‡ 8 Jul, 2023 @ 9:19pm 
In level 5, the ritual, you get a choice to follow two people. After I defeater the dwarf, the X marker is pointint somewhere out of the map and no item was dropped. Another bug or am I missing something?
Redeloper  [author] 29 Jun, 2023 @ 2:27pm 
Do you mean by getting stuck "a member of squad being far away from the rest"? Just order them to target position close to that squad member.