|
Thread: When does AI actually pick Wisdom? | This thread is pages long: 1 2 3 · «PREV / NEXT» |
|
AlexSpl
Responsible
Supreme Hero
|
posted March 21, 2024 07:57 PM |
|
Edited by AlexSpl at 20:04, 21 Mar 2024.
|
It seems it's a common issue. Weak AI heroes don't bother to pick secondary skills from map objects even if AI has a single Might hero and that skill is Offense (at University). For example, Jenova, being locked by strong blocks near her starting town, picked Offense from University only on the 4th month So, without good spells and high Spell Power Might heroes will hardly ever pick Wisdom at map objects.
|
|
AlexSpl
Responsible
Supreme Hero
|
posted March 21, 2024 08:13 PM |
|
|
Futher testing revealed that Jenova lvl1 and with Mage Guild lvl2 built eventually picked Wisdom from a Witch's Hut with 50 Spell Power But hasn't bothered with 20 Spell Power though So, actually formulas work, and, alas, Might heroes should have very high Spell Power to be allured by free Wisdom skill
|
|
Phoenix4ever
Legendary Hero
Heroes is love, Heroes is life
|
posted March 21, 2024 08:33 PM |
|
|
Thanks for testing Alex.
Well that just proves my point, AI might heroes will (almost) never get Wisdom. That sucks.
I feel like the only solution, is to have all might heroes start with Wisdom, unless you have a better solution?
What about Necromancers?, I assume they will pick Wisdom.
Perhaps that is also the reason AI seems to spam so much Blind and Slow, because it only has level 1-2 spells.
|
|
AlexSpl
Responsible
Supreme Hero
|
posted March 21, 2024 08:45 PM |
|
Edited by AlexSpl at 20:49, 21 Mar 2024.
|
Necromancers probably will after gaining enough Spell Power and good spells.
Btw, I assume that's a bug. When evaluating secondary skills, AI skips skills with weight 0 and evaluates those which are banned. Not good. For example, AI heroes cannot learn Water Magic from University, if the weight of this skill is 0 for them. And banned skills, if strong, just take their place in the secondary skills evaluation queue, preventing AI hero from picking another good skills, which are not banned. I think, both issues have to be addressed.
|
|
Phoenix4ever
Legendary Hero
Heroes is love, Heroes is life
|
posted March 21, 2024 08:50 PM |
|
|
Interesting, maybe you can report it here: heroescommunity.com/viewthread.php3?TID=39912
so HD Mod or HotA can fix it?
|
|
AlexSpl
Responsible
Supreme Hero
|
posted March 21, 2024 09:23 PM |
|
Edited by AlexSpl at 21:41, 21 Mar 2024.
|
Well, skills with weight 0 cannot be learned by your heroes either*, so this is no longer an issue. Still, I clearly remember that earlier you could pick Necromancy with Knight. Was it fixed globally?
*) The only possibility is to learn such a skill from a Witch's Hut. Still, at Universities you can learn banned skills, but not those with weight 0. Counter-intuitive
|
|
Phoenix4ever
Legendary Hero
Heroes is love, Heroes is life
|
posted March 21, 2024 10:01 PM |
|
|
Yeah I remember it was possible to learn Necromancy with a few classes, in earlier versions. I don't think Knight could learn it though, but maybe Warlock, Heretic and Witch or something like that.
Yeah Witch Huts and adventure scholars does'nt respect class restrictions, but Universities do, kinda weird.
|
|
AlexSpl
Responsible
Supreme Hero
|
posted March 21, 2024 10:16 PM |
|
Edited by AlexSpl at 22:20, 21 Mar 2024.
|
Well, we'll see what the HotA team decides. I, personally, think that -
a) Heroes should learn skills with weight 0 only at Witch's Huts (not from Scholars).
b) Universities should not teach banned skills.
c) Probably we need a special map object for campaigns only (Shadow Guild) to be able to learn banned skills.
|
|
AlexSpl
Responsible
Supreme Hero
|
posted March 22, 2024 12:43 PM |
|
Edited by AlexSpl at 13:00, 22 Mar 2024.
|
Just exact values of secondary skills for AI from a real game.
Hero:
Ufretin the lvl1 Ranger, 1-3-1-1.
Secondary Skills:
Basic Resistance, Basic Luck.
Army:
14 Centaurs, 6 Dwarves.
Spells:
Cure, Haste, Magic Arrow, Bless, Shield,
Ice Bolt, Disguise, Fortune, Lightning Bolt.
Pathfinding 0 (grass-only map)
Archery 80
Logistics 322
Scouting 161
Diplomacy 32
Navigation 228
Leadership 64
Wisdom 5
Mysticism 1
Luck 0 (already knows)
Ballistics 403
Eagle Eye 0 (doesn't have Wisdom)
Necromancy 0 (weight 0)
Estates 652
Fire Magic 0 (weight 0)
Air Magic 623
Water Magic 456
Earth Magic 405
Scholar 0 (doesn't have Wisdom)
Tactics 64
Artillery 0 (no Ballista)
Learning 161
Offense 225
Armorer 225
Intelligence 2
Sorcery 0 (too low value, truncated to 0)
Resistance 0 (already knows)
First Aid 0 (no First Aid Tent)
Top 6 (8 - 2, which Ufretin already knows) secondary skills for AI are the following -
1. Estates (652).
2. Air Magic (623). Very high number. When a hero doesn't know a magic school there's a comparison with Expert Mastery during efficiency calculations. Also Ufretin knows Lightning Bolt which has high AI value for lvl2 spell.
3. Water Magic (456).
4. Earth Magic (405).
5. Ballistics (403).
6. Logistics (322).
This means Ufretin will ignore all the other secondary skills, at least, while he is a lvl1 hero.
And Wisdom has only 5 pts. even with strong lvl2 spells! So, without good Spell Power, it's almost impossible for Might heroes to learn Wisdom. Exceptions? There are some. For example, AI is offered two new skills at level-up - Wisdom (5+) and, say, Pathfinding (0). It will take Wisdom. Or Wisdom and Intelligence, it will take Wisdom as well.
|
|
phoenix4ever
Legendary Hero
Heroes is love, Heroes is life
|
posted March 22, 2024 03:03 PM |
|
|
Great, so Ufretin will pick Air, Water and Earth Magic, but no Wisdom, makes perfect sense.
Seems in line with what I usually experience and yeah AI almost always has Ballistics.
Btw. was that Wisdom calculation with the 1/2 multiplier or without it?
I assume it was with multiplier and without, it would then have weight 10?
I really think all heroes should start with Wisdom, if nothing but for AI's sake.
|
|
AlexSpl
Responsible
Supreme Hero
|
posted March 22, 2024 03:43 PM |
|
|
Quote: Btw. was that Wisdom calculation with the 1/2 multiplier or without it?
With unchanged formula.
Quote: I really think all heroes should start with Wisdom, if nothing but for AI's sake.
Or you can just boost Wisdom value by rewriting its evaluation. Starting with Wisdom will mean maximum 7 free slots for secondary skills (when a hero starts only with Wisdom). Probably we could make heroes learn Wisdom by adding Basic Wisdom as a bonus the very first time they pick any magic school? At least for AI heroes (they cheat anyway).
|
|
phoenix4ever
Legendary Hero
Heroes is love, Heroes is life
|
posted March 22, 2024 03:52 PM |
|
|
Hmm yeah, there are a few possibilities, I could also make AI events that give Basic Wisdom around the entrance to all towns, that way (almost) all AI heroes should learn Wisdom anyway.
I have allowed 10 skills, 8 skills was not enough imo, it does however take a long time to master Wisdom, magic schools and Logistics, which is a small downside.
|
|
AlexSpl
Responsible
Supreme Hero
|
posted March 22, 2024 06:21 PM |
|
Edited by AlexSpl at 18:29, 22 Mar 2024.
|
For Wisdom skill efficiency there's 1/2 multiplier implemented as sar instruction, which easily can be converted to shl, providing multiple multiplier options (2, 4, 8, 16, 32, 64). 64 is pretty good, as 10 * 64 = 640, and Wisdom will be one of those skills with highest estimate, at least, as long as AI heroes have small armies.
|
|
Phoenix4ever
Legendary Hero
Heroes is love, Heroes is life
|
posted March 22, 2024 07:00 PM |
|
|
Okay, so that means instead of divide by 2, it will multiply by 64?
Any idea how to do that?
|
|
AlexSpl
Responsible
Supreme Hero
|
posted March 22, 2024 07:23 PM |
|
|
Actually, shl eax, 2 or more will take 3 bytes. But... There's another option. Go to 124CF5, you will see there B8 01 00 00 00. This 1 is that 1/2. Writing here 128 (80 00 00 00) will give you 128/2 = 64 multiplier. Don't bother with the second case, as it works for heroes with 99+ Spell Power.
|
|
Phoenix4ever
Legendary Hero
Heroes is love, Heroes is life
|
posted March 22, 2024 08:11 PM |
|
|
So replace 01 with 80?
That's easy, I will probably test it tomorrow, thanks for your help and insight.
|
|
bloodsucker
Legendary Hero
|
posted March 22, 2024 08:13 PM |
|
|
phoenix4ever said: I could also make AI events that give Basic Wisdom around the entrance to all towns.
It's a map by map situation but one of the buffs I give to AI is to put an event that doesn't disappear after first visit, right in front of all towns, and this gives eight secondary skills on a series ranked by me, from Earth to Pathfinding. I also teach the best level one and two spells in it. Enemies may become a bit to similar to one another but they certainly fight better.
Nowadays, new Secondary Skills and spells are enough too remove this hero from the pool if he loses his first battle, though.
____________
|
|
AlexSpl
Responsible
Supreme Hero
|
posted March 22, 2024 08:15 PM |
|
|
You can replace 01 with even bigger number if you want Wisdom to be actual skill in the long run. It won't break anything, as Magic heroes already know Wisdom (except Necromancers). It just will make it less dependant on Spell Power and available spells.
|
|
Phoenix4ever
Legendary Hero
Heroes is love, Heroes is life
|
posted March 22, 2024 08:26 PM |
|
|
Okay, I guess putting 256 would be 100, 512 would be 200 etc.
I am still considering just letting all heroes start with Wisdom, the question is what would magic heroes get then, maybe a logical magic school or maybe that +1 stat they miss, that might heroes have...
|
|
AlexSpl
Responsible
Supreme Hero
|
posted March 22, 2024 08:36 PM |
|
|
Quote: Okay, I guess putting 256 would be 100, 512 would be 200 etc.
256 would be x128. But you can write there any number you want.
Giving Might heroes Wisdom is an option, but remember that it's from scripting realm. I, personally, hate scripting in Heroes. AI, ideally, should think by itself. No scripts, no cheats. If you've played recent HMMs (6 & 7), you know how scripts could ruin your game experience.
But the solution with multipliers is not ideal as well. The best solution is to write your custom evaluation function for every skill. The aforementioned solution is just a shortcut which will work. Still, you understand that the task to teach AI to pick right skills is much harder than this.
|
|
|
|