|
|
AlexSpl

   
    
Responsible
Supreme Hero
|
posted April 19, 2026 05:05 PM |
|
|
Quote: I cant seem to find where the curse effect is applied though? Do you know which function handles it?
There are no Curse specialists, Curse spell effect is here - 442F84h.
Quote: Also, I cant see a spell damage function with cases for different spells
See combatManager::CastSpell() @ 5A0140h. Modified by hero::modify_spell_damage() @ 4E59D0h.
|
|
BigPig2

 

Hired Hero
|
posted April 19, 2026 05:58 PM |
|
Edited by BigPig2 at 11:43, 20 Apr 2026.
|
Ok so this is some good news, it seems like virtually all damage type spells do call ModifySpellDamage either directly or through AreaEffect (which seems to call MSD regardless of spell if I understand the syntax correctly?), including spells that dont have specialists like Titan's/Lightning, Destroy Undead and yes, Land mine (also Armageddon).
While all the enchantments, regardless of having a specialist or not get routed through SetSpellInfluence. And here only some have the hero bonus actually applied although I feel like you could probably hijack some of the existing cases by switch manipulation?*
The code in SetSpellInfluence keeps referring to a "jumptable 00444701" with 49 cases but I cant see any table at that address?
*So here is what I am thinking. Currently we have:
Quote: case SPELL_MIRTH:
this->mirthBonus = effect;
break;
case SPELL_SORROW:
this->sorrowPenalty = effect;
break;
case SPELL_FORTUNE:
v22 = (hero *)casting_hero;
this->fortuneBonus = effect;
if ( v22 )
this->fortuneBonus += hero::GetHeroSpellBonus(v22, spell, this->sMonInfo.level, effect);
break;
case SPELL_MISFORTUNE:
this->misfortunePenalty = effect;
break;
And I wonder, if I could turn it into:
Quote: case SPELL_MIRTH:
this->mirthBonus = effect;
jump to XYZ;
case SPELL_SORROW:
this->sorrowPenalty = effect;
jump to XYZ;
case SPELL_FORTUNE:
this->fortuneBonus = effect;
v22 = (hero *)casting_hero; (address XYZ)
if ( v22 )
this->fortuneBonus += hero::GetHeroSpellBonus(v22, spell, this->sMonInfo.level, effect);
break;
case SPELL_MISFORTUNE:
this->misfortunePenalty = effect;
jump to XYZ;
Could this be doable?
Edit2: So I had a closer look and its not as easy as I had hoped. While I believe the call to GetHeroSpellBonus is generic and can be reused, the ASM instruction to pass the value back needs to be marked with the spell ID "manually". Some form of this should still be possible but it would involve more shifting stuff around and probably adjusting pointers that get broken in the process..
|
|
ivankid

 
Tavern Dweller
|
posted April 25, 2026 07:22 AM |
|
|
Need help on banning a skill in random map.
I have tried to open RMG editor> open file> Random map> select skill > move to disable> saved.
then I created the game with random map and the skill is still in magic town.
Is there a guide for this?
|
|
Phoenix4ever

 
     
Legendary Hero
Heroes is love, Heroes is life
|
posted April 26, 2026 08:28 AM |
|
|
|
Anyone knows how to add Firebirds, from HotA, 50% Fire Resistance to other creatures?
|
|
AlexSpl

   
    
Responsible
Supreme Hero
|
posted April 26, 2026 02:59 PM |
|
|
If you meant Fire Damage Reduction then you can add a case there (44B180h) -
int __fastcall modify_spell_damage(int damage, SpellID spell, TCreatureType creature)
{
int result; // eax
switch ( creature )
{
case CREATURE_STONE_GOLEM:
result = damage / 2;
break;
case CREATURE_IRON_GOLEM:
result = damage / 4;
break;
case CREATURE_AIR_ELEMENTAL:
case CREATURE_STORM_ELEMENTAL:
if ( spell != SPELL_ARMAGEDDON
&& spell != SPELL_LIGHTNING_BOLT
&& spell != SPELL_CHAIN_LIGHTNING
&& spell != SPELL_TITANS_LIGHTNING_BOLT )
{
goto LABEL_20;
}
result = 2 * damage;
break;
case CREATURE_EARTH_ELEMENTAL:
case CREATURE_MAGMA_ELEMENTAL:
if ( spell != SPELL_METEOR_SHOWER )
goto LABEL_20;
result = 2 * damage;
break;
case CREATURE_FIRE_ELEMENTAL:
case CREATURE_ENERGY_ELEMENTAL:
if ( spell != SPELL_ICE_BOLT && spell != SPELL_FROST_RING )
goto LABEL_20;
result = 2 * damage;
break;
case CREATURE_WATER_ELEMENTAL:
case CREATURE_ICE_ELEMENTAL:
if ( spell != SPELL_FIREBALL && spell != SPELL_INFERNO && spell != SPELL_ARMAGEDDON )
goto LABEL_20;
result = 2 * damage;
break;
case CREATURE_GOLD_GOLEM:
result = 15 * damage / 100;
break;
case CREATURE_DIAMOND_GOLEM:
damage /= 20;
goto LABEL_20;
default:
LABEL_20:
result = damage;
break;
}
return result;
}
- like for golems.
|
|
Phoenix4ever

 
     
Legendary Hero
Heroes is love, Heroes is life
|
posted April 26, 2026 06:32 PM |
|
|
Yes Fire Damage Reduction.
Thank you Alex, sadly it's beyond my level.
|
|
purerogue3

 
   
Famous Hero
|
posted April 26, 2026 06:36 PM |
|
|
|
Is it possible to give a range penalty to arrow towers (where would they be located?) because one of the great imbalances is how besieging archers always get massarced to the point you want to avoid it altogether, air shield at 50% is not a good solution.
|
|
Phoenix4ever

 
     
Legendary Hero
Heroes is love, Heroes is life
|
posted April 27, 2026 12:34 PM |
|
|
Yeah, I also feel arrow towers do a bit too much damage in HotA.
If you play as Rampart your Grand Elves gets destroyed, if you play as Factory, first your Halflings gets easily destroyed and then your Bounty Hunters, leaving you with only few ranged units left.
I suppose they did that to make Ballistics more important, but even with Expert Ballistics you will still have some casualties.
|
|
purerogue3

 
   
Famous Hero
|
posted April 27, 2026 04:26 PM |
|
|
The problem is there is no way they can get "out of range" - the only way is to 'fool' the ai by moving a flying unit or teleporting a ground unit within 1 turn striking range. That makes tactical options singular and boring.
Archers are already disadvantaged by the siege discount, shooting your way in should be an option
Tower damage vs siege defender advantages from the moat,2/3-to-1 drawbridge advantages, flyers/teleported is another area
My gripe there is that it works too much like magic - especially with the ignoring defense
It can be fine-tuned definitely
|
|
phoenix4ever

 
     
Legendary Hero
Heroes is love, Heroes is life
|
posted April 27, 2026 06:50 PM |
|
|
I don't know if anyone but HotA Crew, knows how to change arrow tower damage, in HotA, but I would almost prefer original (low) arrow tower damage and maybe just remove Ballistics entirely or make it an "AI-skill" only.
With only 8 skill slots there is no room for Ballistics. I play with 10 skill slots and I still don't feel there is room for Ballistics...
|
|
purerogue3

 
   
Famous Hero
|
posted April 27, 2026 08:16 PM |
|
|
BTB - just cut and paste, don't know if hota overwrites it, maybe not
I'm struggling with Ballistics/Artillery thing - joining, cutting them completely, leaving them as is are all viable options
It depends how you want to play
One thing I'm definitely for is the non mixing "compromises" that mash a million different ideas into one, although you can't help it because
Accepting the flaws but keeping it pure i prefer at this moment
If you have everything on one hero I surmise you only like to play one hero
I've changed my view on 'main'/'support' heroes
because the game is finite
even tempted to add scouting as a stand-alone option.. even considering adding (rogue/visions) spying ability unnecessary
|
|
BigPig2

 

Hired Hero
|
posted April 28, 2026 12:46 PM |
|
Edited by BigPig2 at 21:37, 01 May 2026.
|
Studying the CastSpell function, I believe the following question has been asked before: "Can spell power damage modifier be set to vary according to School of Magic skill level?"
I believe it can and fairly easily but it needs to be done individually for each spell. For example, Magic Arrow can be set to do so by changing the 4D at 1A0CEA to 75 in SoD (look for a sequence of 0F AF 4D 1C), HotA may or may not have changed it. This changes the damage formula to: 10 + SP * mastery bonus
The spell description displays damage according to the old formula but that's probably not any more difficult to fix either (I do not yet know which function handles this).
Edit:
1A0863: 0F AF 4D 1C -> 0F AF 75 1C - Land Mine
1A0B49: 0F AF 55 1C -> 0F AF 45 1C - Firewall
1A0D8E: 0F AF 55 1C -> 0F AF 75 1C - Ice Bolt
1A0E4F: 0F AF 75 1C -> 0F AF 4D 1C - Lightning/Titan bolt
1A0EC1: 0F AF 55 1C -> 0F AF 75 1C - Implosion
1A104A: 0F AF 55 1C -> 0F AF 4D 1C AND (for quick combat??):
1A110C: 0F AF 4D 1C -> 0F AF 75 1C - Death Ripple
1A1247: 0F AF 55 1C -> 0F AF 4D 1C - Destroy Undead
1A4DD6: 0F AF 5D 14 -> 0F AF 4D 14 AND (why tho?):
1A4E50: 0F AF 55 14 -> 0F AF 45 14 - Frost Ring, Fireball, Inferno, Meteor Shower
1A4F8D: 0F AF 7D 0C -> 0F AF 4D 0C AND (why?):
1A5513: 0F AF 55 0C -> 0F AF 45 0C - Armageddon
1A66AC: 0F AF 4D 10 -> 0F AF 45 10 (I THINK, this formula is written slightly differently) - Chain lightning
I do not know why some of the spells run the formula twice.
Edit3:
1A1C66: 0F AF 4D 1C -> 0F AF 45 1C - Resurrect & Animate Dead (shared)
046312: 0F AF 4D 0C -> 0F AF 7D 0C - Cure
Edit4:
1A8696:
0F AF B1 10 20 00 00 8B 94 81 14 20 00 00 ->
0F AF B4 81 14 20 00 00 8B 91 10 20 00 00 - Hypnotize
Now the issue with the damage displayed in the spellbook is that it appears to be calculated the same way (TSpellbookWindow::get_spell_description starting 19BDA0) for all spells, either SP * power factor + mastery bonus OR SP * mastery bonus + power factor (as per modifications in this post) so if you only change some of the spells you end up having to choose which group has damage displayed correctly in the spellbook (not an issue with res/animate or hypnotize tho).
Edit2: Re: Ballistics. Has anyone experimented with adjusting the settings in Walls.txt as a way to buff/nerf ballistics/earthquake?
|
|
BigPig2

 

Hired Hero
|
posted May 09, 2026 12:57 PM |
|
|
Diplomacy again
Hi guys. I wonder if this idea has come up before. So, you know how diplomacy is pretty universally acknowledged to be broken due to its role in the wandering monster join event (I dont think the surrender discount is considered a big deal?). Diplomacy is checked at three different points in the process (see: http://heroescommunity.com/viewthread.php3?TID=28341):
AlexSpl said: [Charisma (Ch)]
Ch = Power_Factor + Diplomacy_Level + Sympathy;
(...)
if Ch >= X there are two cases:
a) if Sympathy + Diplomacy_Level + 1 >= X neutrals will join for free
b) Only if the first condition is false: if Sympathy + 2 * Diplomacy_Level + 1 >= X neutrals will join for gold
So I was thinking, how about giving some of this power away to another, relatively mediocre yet thematially relevant skill: Leadership, it matches the idea of charisma pretty well doesnt it? So instead of the formulas above, how about:
Ch = Power_Factor + Leadership_Level + Sympathy;
if Ch >= X there are two cases:
a) if Sympathy + Leadership_Level + 1 >= X neutrals will join for free (or you could share the power even further and mix it up even more by making this a "lucky" occurence)
b) Only if the first condition is false: if Sympathy + 2 * Diplomacy_Level + 1 >= X neutrals will join for gold (or whatever strength you want to afford Diplomacy here)
I feel like this distributes the power diplomacy wields in a much less broken way and gives a boost to a skill (or two) that could really use it? What do you guys think?
I had a look at the code and its not a single byte hex edit as the skill value is loaded only once at the beginning of the subroutine but it wouldnt take much and could be done with a relatively minor jump-patch or even without if one were to sacrifice the easy difficulty +1 bonus.
|
|
Phoenix4ever

 
     
Legendary Hero
Heroes is love, Heroes is life
|
posted May 09, 2026 01:42 PM |
|
|
Well that will obviously buff Castle and nerf Necropolis and Conflux, so if that is what you want, god speed captain.
Diplomacy is pretty hard to balance.
I have my own rules for it, for example level 7 units can't join.
|
|
BigPig2

 

Hired Hero
|
posted May 09, 2026 02:27 PM |
|
Edited by BigPig2 at 18:31, 09 May 2026.
|
Thats a good point, it does buff castle somewhat. Are knights considered a strong class btw?
However, note that in case of spreading it out onto all 3 skills (Leadership, Luck, and Diplomacy) you need at least 2 skills to achieve the harvesting efficiency that Diplomacy normally gives you all by itself. And if you diversify only the latter two tests you can then bring Diplomacy's power from up to 90% chance to join for cash down to something more sensible.
And yes, it is a nerf to Necropolis but does it affect Conflux? Or do you mean by buffing a skill of limited usefulness to them? I cant say I have an issue with either of these two factions suffering to be honest but it is good to point out.
Edit: I might be wrong, because I dont really understand the reason why this is in the code to begin with, but if I am reading it correctly the value "X" used for comparison in the formulas above is subject to shl and sar asm instructions earlier on in the routine (respectively multiplication and division by a power of 2) and, again, if I understand the code correctly, you can double it by changing the 0F at A73D2 to 10 or 1B at A73DE to 1A. This would effectively double wandering monster aggression factor for the purposes of all three formulas, theoretically. This needs to be verified by someone with a better understanding of the code than mine though.
|
|
AlexSpl

   
    
Responsible
Supreme Hero
|
posted May 09, 2026 06:28 PM |
|
Edited by AlexSpl at 19:47, 09 May 2026.
|
Diplomacy effect shouldn't be stronger than that of weekly growth of units wishing to join. Once a player (with all its heroes) has joined full weekly growth of units, he cannot join more units of that tier until next week. Diplomacy skill levels can cap the highest tier that will offer to join. None - 1-4 tier, Basic - 1-5 tier, Advanced - 1-6, Expert - 1-7 for full price, including resources.
So, if you have joined 7 Elves, you cannot join elves (Grand Elves included) anymore this week, but if you want, you can join an additional Dragonfly.
Basically, having that kind of Diplomacy is equal, in the best scenario, to owning a whole town, if you'll manage to find units of all 7 tiers that wish to join within a week. Probably, it's a good idea to drop army strength as a factor for joining calculations. Diplomacy slot alone is already great price, not mentioning that you actually buy units that wish to join.
As for remaining creatures. Say, you have 1 Peasant and Expert Diplomacy and attack a stack of 10 Archangels, then you can buy 1 Archangel, if Archangels are in the good mood, and have an option to attack Archangels, or just step back to the cell where you came from. Remaining 9 Archangels become 'Savage' (X = 10). You cannot join Archangels from that stack anymore.
Another good option, but weaker, doesn't require paying for units. If units want to join, they join you in the battle, fighting on your side. If they survive a fight, you can keep them for free. In this scenario, it would be appropriate to rename Diplomacy to Bribe (if you pay for service) or Charm (if you don't). At the beginning of a battle, you are given two options - bribe or charm - with bribing having a better chance to success (the higher your Diplomacy level and Luck modifiers, the better chance to charm; bribing is much easier, but requires gold and resources; failed attempt to charm doesn't exclude bribing, but you loose your positive Luck modifiers for calculations).
|
|
Nightshine

 
 
Adventuring Hero
|
posted May 11, 2026 11:24 PM |
|
|
Hey guys, question - I've always liked to edit portraits in the game, I have my own private set and all that. But it seems that HotA.lod can no longer be viewed or edited by MMArchive? Any way I can work around that?
|
|
Olegmods 

 
Tavern Dweller
Wrath of the Creators lead dev
|
posted May 11, 2026 11:31 PM |
|
|
Nightshine said: Hey guys, question - I've always liked to edit portraits in the game, I have my own private set and all that. But it seems that HotA.lod can no longer be viewed or edited by MMArchive? Any way I can work around that? 
Pack your portraits in HotA_lng.lod or HotA_ext.lod (IIRC that's how they're called).
|
|
Nightshine

 
 
Adventuring Hero
|
posted May 12, 2026 12:36 AM |
|
|
Thanks, the ext file worked great
|
|
BigPig2

 

Hired Hero
|
posted May 13, 2026 04:31 PM |
|
Edited by BigPig2 at 16:38, 13 May 2026.
|
Phoenix4ever said: Diplomacy is pretty hard to balance.
I mean it is and it isnt.. You have all the creative ideas AlexSpl listed, and I'm sure many more that have been discussed before if you want to go plugins route. But even with relatively simple hex editing there is a lot you can achieve by just manipulating the constants and elements of the three formulas, especially if you're willing to scrap the easy mode +1 hidden bonus to Diplomacy.
You can, for example, just halve the odds of passing each test by doubling the monster aggression value in one or multiple checks. You can achieve flat increase/decrease by messing with the +1 constant in each formula. And, like I mentioned, you can get other skills involved instead. I think the number of creatures joining should also be pretty easy to multiply/divide by a power of 2 (and other numbers if you really want - its just a bit more code).
The only thing I dont see a way to do with hex is changing the price of joining per unit as the way I understand it only the type and number of units is passed to the function that adds them to the hero's army, I might be wrong here as I havent studied this too well. I personally feel doubling the cost would go a long way towards balance.
Edit: Scratch that, it might actually be pretty easy, maybe.
The question is really, assuming the existing principles stay unchanged, what odds/numbers would bring Diplomacy to ordinary skill strength?
|
| |
|
|