|
|
BigPig2

 

Hired Hero
|
posted March 07, 2026 10:47 PM |
|
Edited by BigPig2 at 00:49, 08 Mar 2026.
|
I mean it only makes sense itd count AI heroes only, otherwise itd be some inverse difficulty scaling that limits the AI more when the player is doing better (approximately). Its clearly a way to contain the AI. Btw, you dont happen to know the addresses of these limits in the code?
Edit: Found it. The limit of heroes per AI player (5 difficulties) starts at 260518, followed immediately by limits for total between all AI players (also 5) at 26052C.
Also, you mention mistranslation, I am curious, is fizmig sourced from other languages as well?
|
|
AlexSpl

   
    
Responsible
Supreme Hero
|
posted March 08, 2026 01:00 AM |
|
Edited by AlexSpl at 01:02, 08 Mar 2026.
|
So, this -
Quote: AI player does not hire new heroes if there are 9 or more heroes on the map (including the heroes of other players)
should be -
Quote: AI player does not hire new heroes if there are 9 or more AI heroes on the map (including the heroes of other AI players)
with some exceptions mentioned by FizMiG.
Quote: Also, you mention mistranslation, I am curious, is fizmig sourced from other languages as well?
I believe, yes.
As for AI choices you asked, look at 524B70h. You may notice some 'magic numbers' in instructions (like mov eax, 66666667h or mov eax, 51EB851Fh). They are for optimized division.
|
|
BigPig2

 

Hired Hero
|
posted March 08, 2026 01:04 PM |
|
|
AlexSpl said: So, this -
(..)
should be -
I mean both empirically and common sense, yes.
Quote: As for AI choices you asked, look at 524B70h. You may notice some 'magic numbers' in instructions (like mov eax, 66666667h or mov eax, 51EB851Fh). They are for optimized division.
Well these are hard to comprehend, Im gonna need some time to study them more.
In another thread you indicate another memory location: "sub_52C0B0", what is that about?
Also, I am sure this must have popped up before but I cant seem to find an answer to this: is there an easy way to disable a creature upgrade (both the unit and the building)? I am toying with the idea of removing skeleton warriors.
|
|
AlexSpl

   
    
Responsible
Supreme Hero
|
posted March 08, 2026 02:58 PM |
|
|
Quote: In another thread you indicate another memory location: "sub_52C0B0", what is that about?
It's the function AI_choose_secondary_skill() which calls the mentioned earlier get_skill_value().
Quote: Also, I am sure this must have popped up before but I cant seem to find an answer to this: is there an easy way to disable a creature upgrade (both the unit and the building)? I am toying with the idea of removing skeleton warriors.
You can alter gTownEligibleBuildMask at 697740h. But it is filled in runtime, so it will be impossible in hex (at least, directy). And try to remove Skeleton's upgrade in the function GetMonsterUpgrade() at 47AAD0h.
|
|
BigPig2

 

Hired Hero
|
posted March 08, 2026 03:57 PM |
|
|
|
Does it start with archery at 524B70 ?
|
|
AlexSpl

   
    
Responsible
Supreme Hero
|
posted March 08, 2026 04:39 PM |
|
|
|
No, switch jmp at 524C12h, and the cases for each skill start at 525184h (4 bytes for each, ending with First Aid at 52515Bh).
|
|
BigPig2

 

Hired Hero
|
posted March 08, 2026 04:59 PM |
|
|
|
Is that last address correct? It seems to be before the one for start? Or am I reading it wrong?
|
|
AlexSpl

   
    
Responsible
Supreme Hero
|
posted March 08, 2026 05:47 PM |
|
Edited by AlexSpl at 17:49, 08 Mar 2026.
|
|
The table itself is at 525184h and it contains addresses for the switch jmp. So, the address containing the code for First Aid is at 52515Bh.
|
|
BigPig2

 

Hired Hero
|
posted March 08, 2026 06:44 PM |
|
|
|
I am struggling to read this, so up until 125184 it sets up by calculating all the coefficients etc then this section just puts the relevant ones together for each skill? But there dont seem to be enough formulas here? And I was expecting some of them to repeat themselves?
|
|
|
|