|
|
BTB

 
   
Famous Hero
Moist & Creamy
|
posted March 06, 2026 08:00 AM |
|
|
|
That's how misinformation tends to spread. People just accept what they're told without questioning it.
|
|
BigPig2

 
 
Adventuring Hero
|
posted March 06, 2026 05:05 PM |
|
Edited by BigPig2 at 18:04, 06 Mar 2026.
|
I found something interesting in your fizmig, @AlexSpl, under difficulty settings (Easy) it says:
Quote: An AI player does not recruit new heroes if there are 9 or more heroes on the map (including heroes from human players and their own; other AI players' heroes do not affect this limit).
While thelazy wiki says:
Quote: AI player does not hire new heroes if there are 9 or more heroes on the map (including the heroes of other players)
which clearly suggests other AI players as well. While I have never really tested it I do definitely get the impression the latter is correct, in games agains 8 opponents I usually end up seeing 1-2 AI players with 5-6 heroes while all the rest run around with 1-2 heroes each.
|
|
BigPig2

 
 
Adventuring Hero
|
posted March 07, 2026 11:51 AM |
|
|
Ive been studying the code sections starting 12C0B0 and 124B70, which I understand are the locations of AI skill priority calculations (why is there two of them btw?) but I am having no luck finding anything I can interpret as the formulas. I can understand they can be complicated but I was expecting to be able to identify the formulas of the form:Quote: 2. Logistics
Value = [(1000 + Army_Power) * 1/10]
as there should be several of them (or in fact majority of them) with just varying constants but I cant see code that could match it.
I have also been thinking a bit about the spell duration question and I am wondering if a relatively easy fix could be applicable here after all. If I can identify the location where the "spell duration = SP" is defined, which I assume is done globally, I could maybe jump out of it to some empty lines and replace it with "spell duration = 1 + SP/8" and jump back in? this would likely not affect the workings of the +duration artifacts and I could maybe even extend it to cover spells like firewall and force field with a simple byte switch in their definitions? I can probably figure out the code for this by myself (although any hints are very, very welcome) but I have no clue how to go about finding the formulas location..
|
|
Phoenix4ever

 
     
Legendary Hero
Heroes is love, Heroes is life
|
posted March 07, 2026 12:52 PM |
|
|
Hi Alex
I have a few questions, you might know something about:
"How much" does it take for AI to pick a certain magic school? I think spells have different weights for AI and it needs a certain "amount of weight" for it to pick a magic school?
If it has the hero Gem and only knows Summon Boat will it then pick Water Magic? If it has Coronius and only knows Slayer, will it then pick Fire Magic?
If it knows 4-5 high level spells of each school, will it then try to learn all magic schools?
Or is there somewhere to find information about AI and magic schools and what it takes for AI to pick a magic school?
|
|
BigPig2

 
 
Adventuring Hero
|
posted March 07, 2026 01:03 PM |
|
Edited by BigPig2 at 13:24, 07 Mar 2026.
|
If I understand your question correctly, the answer is here, in a thread you might recognize. Additionally, I understand ANY school of magic (regardless of probabilities, and I assume also bans for the class?) can also be learned as part of the "every 3rd/4th level for magic/might heroes" procedure (see the previous page in this thread).
Edit: Whats wrong with my link syntax? This was copied raw from AlexSpl's post where it showed as a neat blue link..
Edit2: Oh I see, its a forum rank thing.
|
|
Phoenix4ever

 
     
Legendary Hero
Heroes is love, Heroes is life
|
posted March 07, 2026 01:30 PM |
|
|
Thanks BigPig
I remember that thread, but I wanted Alex to elaborate a bit more, if he knows.
I wanted to know "how much" it takes for AI to pick a certain magic school and if it will pick all 4 magic schools, if given the chance.
I don't really like that most spell specialists start without magic school, so I had an idea that maybe they should start with a magic school instead of Wisdom or perhaps for better balance, allow magic schools to be bought early, via Seer's Huts, near starting towns.
It can take a long time to get expert in a magic school, since I play with 10 skills per hero. (I consider this minimum.)
I have also been buffing Fire Magic for a long time, but it still feels underwhelming to me, except for a few spells like Berserk.
|
|
BigPig2

 
 
Adventuring Hero
|
posted March 07, 2026 01:43 PM |
|
|
My understanding, based off that thread and the code on the last few pages here, is that the AI evaluates all 28 skills at each level up or new skill opportunity and grabs every skill in the top 8 - number of skills already possessed. Additionally the school of magic skill priorities will vary in time depending on the spells known to hero (of which the one which gives the highest "the_strongest_spell_efficiency_delta" value is taken into account)
In practice, my impression is this often leads to AI not choosing these skills when it probably should and that's one of the reasons why I am also desperate to learn how to adjust all of these functions.
|
|
BigPig2

 
 
Adventuring Hero
|
posted March 07, 2026 01:47 PM |
|
Edited by BigPig2 at 13:49, 07 Mar 2026.
|
Phoenix4ever said: I don't really like that most spell specialists start without magic school, so I had an idea that maybe they should start with a magic school instead of Wisdom
I 100% agree, and might do the exact same thing.
Quote: I have also been buffing Fire Magic for a long time, but it still feels underwhelming to me, except for a few spells like Berserk.
Same. The weakness of fireball and inferno spells was in fact one of the things that pushed me over the edge to get into modding H3 and one of the first things I modified.
Edit: This and setting dimension door to be dual Air+Fire, and town portal to Earth+Water.
|
|
Phoenix4ever

 
     
Legendary Hero
Heroes is love, Heroes is life
|
posted March 07, 2026 01:49 PM |
|
|
Okay, maybe we have some similar thoughts then. 
Another problem is that AI might heroes will often end up without Wisdom, meaning they can't naturally learn extremely important spells like Town Portal, Dimension Door and Fly.
If we really wanted AI to be competitive, it would always pick Wisdom and Earth Magic and probably also Logistics, but this would also make the game 100 times harder. 
I have moved Dimension Door to Fire Magic, but it's always only 1 cast per day.
Putting TP also in Water Magic is perhaps sympathetic, but you will probably always pick Earth Magic for Slow and Resurrection any way. (Maybe not Resurrection, if playing Necro.)
|
|
BigPig2

 
 
Adventuring Hero
|
posted March 07, 2026 01:55 PM |
|
Edited by BigPig2 at 14:02, 07 Mar 2026.
|
Phoenix4ever said: Another problem is that AI might heroes will often end up without Wisdom
I believe there is two culprits to this:
1. the "every 3rd/6th level" rule places Wisdom/school of magic skill offer on the left side, meaning it only gets picked if the skill on the right hand side is not desirable. (source: somewhere on this forum)
2. The skill value for Wisdom: [the_strongest_spell_efficiency_delta(1, 1, 0, 0, 0, 0, 0) * Spell_Power * 1/2]
is based on the power of the hero's best spell (which for might heroes is likely not all that powerful) and could use a buff.
Edit:Quote: you will probably always pick Earth Magic for Slow
Which is why slow is also Water+Earth, and Haste - Air+Fire. It's a work in progress and in the long run I want to split out mass versions of at the very least these two (+ maybe Curse/Bless but thats not nearly as urgent) and potentially make them 4-School or even School-less. This, however, is currently beyond my abilities so I am still thinking how best to solve it.
Edit2: And dramatically reducing all of their durations is also a factor I believe will help bring the buff/debuff spells into balance.
|
|
Phoenix4ever

 
     
Legendary Hero
Heroes is love, Heroes is life
|
posted March 07, 2026 02:02 PM |
|
|
Yes, since might heroes can only learn up to level 2 spells naturally, they don't have access to the most powerful spells and will like not pick Wisdom then. I don't know about Necromancers, hopefully they will at least pick Wisdom.
In the thread you linked to, you can see in Alex example that Ufretin will pick Air, Earth and Water Magic, but no Wisdom, that's just stupid. 
Hmm Slow also in Water could work. Then we only miss Resurrection of the spells that makes Earth Magic a must-have skill.
Putting Haste in Fire Magic will make Fire Immune creatures immune to Haste though. (I'm not a fan of Fire Immunity either.)
I don't think it's possible to have a spell, without it belonging to a school sadly.
|
|
BigPig2

 
 
Adventuring Hero
|
posted March 07, 2026 02:11 PM |
|
Edited by BigPig2 at 14:15, 07 Mar 2026.
|
I havent really thought about it all that much before but now that I do, I feel like a significant part of the blame for that might go to the "every 3rd/6th level" rule. If it does indeed place Wisdom in the "else" part of the procedure then its value wont even make any difference at those level ups, it will only get chosen if the other skill is undesirable. And beyond a certain level there is no skill slots left and/or there is other skills might heroes will score higher on..
Edit:Phoenix4ever said: Putting Haste in Fire Magic will make Fire Immune creatures immune to Haste though.
It does. But I dont really mind it.. Phoenixes are way OP (no offence) and I nerfed them anyway. And I feel like its an ok tradeoff for the immunity to the fire spells I buffed.. I also weakened Haste slightly so its a bit less of a loss. I mean, theyre immune to Armaggeddon, theyre strong enough.
|
|
Phoenix4ever

 
     
Legendary Hero
Heroes is love, Heroes is life
|
posted March 07, 2026 02:18 PM |
|
|
Yes I have tested it a lot in the past and I find AI might heroes will very often end up without Wisdom and that's just not good. Or maybe they actually pick it, but will get it so late that they ever only manage to get it to basic level.
Wisdom is a skill I pick for all heroes 100% of the time, it's that important.
So an interesting buff could be like all might heroes also gain Wisdom, all spell specialists get their relevant magic school.
The question is, what does the rest of the heroes get and how will this affect balance...
Yeah Phoenixes are OP when you get 4 in SoD, in HotA you only get 3 and they are more expensive as well, so better balanced I think.
I also nerfed Slow and Haste a bit.
|
|
BigPig2

 
 
Adventuring Hero
|
posted March 07, 2026 02:31 PM |
|
|
Phoenix4ever said: Wisdom is a skill I pick for all heroes 100% of the time, it's that important.
I agree. But I see that as a design imperfection. Id rather give might heroes the necessities at lvl 1-2 magic and let them utilise other skills to their advantage. I am nerfing the benefits of School of magic skills, I'v moved some utility spells (Mirth/Sorrow, Mis/Fortune, all Protection from - spells) down to lower levels and I have greatly increased the cost of Armaggeddon and movement spells (100/90/80/80), I will limit the number of casts of Town portal still once I figure it out. And I increased the cost of mage guilds to 5/10/15/20 to both make high level magic more difficult to get and give resources more utility as I find I often sell more than half of them for gold mid game.
|
|
Phoenix4ever

 
     
Legendary Hero
Heroes is love, Heroes is life
|
posted March 07, 2026 02:39 PM |
|
|
So that means you have a lot more level 1 & 2 spells? That will also make it harder to learn Slow and Haste for example.
Your AI might heroes still probably won't learn TP, DD and Fly though, unless they get them from artifacts.
I know how to change movement cost of TP, so you can cast it fewer times per day, if you are interested?
Remember that every nerf you make, will also nerf AI however.
|
|
BigPig2

 
 
Adventuring Hero
|
posted March 07, 2026 02:47 PM |
|
|
Phoenix4ever said: I know how to change movement cost of TP
I believe thats in BTB's txt and that is indeed the back up plan if I cant figure out a direct limit. Either way its no longer a very high priority as I feel the increased mana cost does the job so far, I do need to observe how AI uses it more though.
|
|
Phoenix4ever

 
     
Legendary Hero
Heroes is love, Heroes is life
|
posted March 07, 2026 02:57 PM |
|
|
Yeah I think BTB has it in his guide as well.
At one point I made TP always only take me to the nearest town, while AI could use it as normal. It made the game a lot more challenging, but sometimes also frustrating. But TP is pretty damn overpowered in it's original state, that's for sure.
Well it was nice talking to you. Always interesting sharing opinions about the game.
|
|
BigPig2

 
 
Adventuring Hero
|
posted March 07, 2026 03:08 PM |
|
|
Yes I have read about your experiments while searching for my answers (many of which came in replies to your questions, btw, so thanks again!). What made you switch back?
I mean TP is just so obviously, needlessly, OP. 12sp, unlimited casts (+Intelligence, mana vortex) and its in the same school as slow, shield and animate/res. And meteor shower. AND Implosion. Surprised Armaggeddon isnt an earth spell.
|
|
Phoenix4ever

 
     
Legendary Hero
Heroes is love, Heroes is life
|
posted March 07, 2026 03:08 PM |
|
|
I like the idea of Earth Magic not being a must-have skill.
I might make TP belong to all magic schools, that will also make it easier to learn for both humans and AI.
Slow could possibly belong to Air, Earth and Water or maybe just Earth and Water.
Same with Resurrection or it could just be permanent without Earth Magic, like Animate Dead.
Yeah TP is very overpowered. I liked the challenge for a while, but then it became a bit too annoying. A limit of how many times it could be cast per day, would make sense though, perhaps also higher mana cost, but again we are also making it harder for the AI then.
|
|
BigPig2

 
 
Adventuring Hero
|
posted March 07, 2026 04:19 PM |
|
Edited by BigPig2 at 16:33, 07 Mar 2026.
|
Phoenix4ever said: I like the idea of Earth Magic not being a must-have skill.
I just dont like the idea of a must-have skill (or spell etc) to begin with. It limits the variety and the fun. The skills cant all be equally valuable but there should be no one that missing out on makes you want to restart.
Quote: Slow could possibly belong to Air (...)
I have slow and TP in earth+water and haste and DD in air+fire, this way you can go either fire+water or air+earth to get all 4. I toyed with the idea of sharing bless and curse in a similar way (but maybe across, i.e. air+water vs earth+fire) but then I though air and earth really have enough going for them as is. Overall I have also been tuning down the benefits of school of magic skills, reducing the mana discounts and bonus damage in favour of higher "power" multipliers.
Quote: A limit of how many times it could be cast per day, would make sense though, perhaps also higher mana cost, but again we are also making it harder for the AI then.
So, my feeling is AI heroes do not really utilise movement spells well, to the point it sometimes/often feels like they might have been better off spending that mana/movement points elsewhere.
I also believe (but might be wrong) that AI considers benefit vs mana cost when selecting to cast a spell so hopefully higher mana cost would make it more conservative with movement spells? I have not had enough time to test any of this yet though. I wouldnt mind that one bit as I am also hoping to make AI use a broader variety of spells, again, in the long run.
|
| |
|
|