Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 3.5 - WoG and Beyond > Thread: Heroes 3 Hacking Reference Guide (started by BTB in February 2020)
Heroes 3 Hacking Reference Guide This thread is 47 pages long: 1 2 3 4 5 ... 10 20 30 40 ... 43 44 45 46 47 · «PREV
BigPig2
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?

 View Profile
AlexSpl
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.

 View Profile
BigPig2
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.

 View Profile
AlexSpl
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.

 View Profile
BigPig2
BigPig2


Hired Hero
posted March 08, 2026 03:57 PM

Does it start with archery at 524B70 ?

 View Profile
AlexSpl
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).

 View Profile
BigPig2
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?

 View Profile
AlexSpl
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.

 View Profile
BigPig2
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?

 View Profile
Jump To: « Prev Thread . . . Next Thread » This thread is 47 pages long: 1 2 3 4 5 ... 10 20 30 40 ... 43 44 45 46 47 · «PREV
Post New Poll   Post New Topic   Post New Reply

Page compiled in 0.1156 seconds