|
|
MisterGoblin

 
Tavern Dweller
|
posted December 09, 2025 07:22 AM |
|
|
I have another question.
Currently i'm working on Arena map and making some small adjustment for a future pvp balance patch as well.
I figured out that Random Monsters that you place on a map, in this case Random Monster 4 - Can't Generate Sharpshooters as level 4 creature, even thought in hota.exe it has all necessary flags on. The same applies for Enchanters and Random Monster 6.
It seems they're turned off somewere.
Who knows how to fix that or were to find solution. Maybe some extra tools for Map Editors or documentation on Map Editor Modding?
Any useful tips would be great. Tnx!
____________
|
|
CsArOs

 

Hired Hero
|
posted December 10, 2025 09:43 PM |
|
Edited by CsArOs at 21:56, 10 Dec 2025.
|
The bible says:
"Refugee Camps specifically ban six units at the following addresses:
Sharpshooters 0C902B Enchanters 0C903A
Azure Dragons 0C8FEF Faerie Dragons 0C900D
Crystal Dragons 0C8FFE Rust Dragons 0C901C"
These creatures eerily match the creatures that cannot appear as random monster 4, 6 and 7. If I were you, I would try to test if this works.
@purerogue3 said: Quote: Hota does not respond to edits to the campfire/wagon/lean-to functions in the .exe
How does the DLL interfere with it - does it activate at start/end? of the function?
How do I stop it?
A general question.
Can you show me the function youre referring to? Maybe then I can try to find it and track it in the Cheat Engine. Or you can try doing so yourself.
@Exuberant asked: Quote: Does anyone know how to edit starting armies and skills for heroes from Cove and Factory using a hex editor? For "normal" heroes (those from the original 8 factions) the data starts around address 279... - it starts with Orrin and ends with Xeron, after that there are several copies of some generic Castle hero (some kind of dummies) and then that's it.
Where are the new heroes? Has anyone been able to edit heroes for the new factions?
Yes, I do know it. I've figured out pretty much the entire Hota.dat and most of what I've found is in the article on the wiki: https://heroes.thelazy.net/index.php/Hex_Editing_-_Guide
Phoenix4Ever asked: Quote: Can anyone find where Basic, Advanced and Expert Estates, Learning and Logistics and Advanced and Expert Mysticism are located, in HotA.dll, in newest version of HotA?
Yes, I know where they are. I'll let myself refer to my setting for MKC's Duel 3.0 template, although you can find the same data on my github (but I'm yet to update it for latest version )
#Estates:
(hota_dll, 0x19A102, b"xFAx00"),
(hota_dll, 0x19A10C, b"xF4x01"),
(hota_dll, 0x19A116, b"xE8x03"),
#Scouting
(EXE, 0x23E9D8, b"x05"),
(EXE, 0x23E9DC, b"x06"),
(hota_dll, 0x19A0E4, b"x06"),
(hota_dll, 0x19A0EE, b"x08"),
(hota_dll, 0x19A0F8, b"x0A"),
#First Aid
(hota_dll, 0x1ec490, b"xCDxCCx4Cx3DxCDxCCxCCx3DxCDxCCx4Cx3E"),
#Mysticism
(hota_dll, 0x1Ec470, b"xCDxCCxCCx3DxCDxCCx4Cx3Ex9Ax99x99x3E"),
(hota_dll, 0x19a15E, b"x05"),
(hota_dll, 0x19a16a, b"x0A"),
(hota_dll, 0x19a174, b"x0F"),
Learning I haven't bothered to look for, since I switched its table call.
|
|
purerogue3

 
   
Famous Hero
|
posted December 10, 2025 10:16 PM |
|
|
CsArOs said: Can you show me the function youre referring to? Maybe then I can try to find it and track it in the Cheat Engine. Or you can try doing so yourself.
How do you find the dll addresses in CE?
For example, the +1 speed it adds to slow spell..
I only know how to look in IDA
can you show us how to trace it using CE?
|
|
MisterGoblin

 
Tavern Dweller
|
posted December 11, 2025 11:21 AM |
|
|
CsArOs said: The bible says:
"Refugee Camps specifically ban six units at the following addresses:
Sharpshooters 0C902B Enchanters 0C903A
Azure Dragons 0C8FEF Faerie Dragons 0C900D
Crystal Dragons 0C8FFE Rust Dragons 0C901C"
These creatures eerily match the creatures that cannot appear as random monster 4, 6 and 7. If I were you, I would try to test if this works.
It works in SoD and Complete edition, does not in HotA.
I'm assuming with adition of new creatures, it overwrites somewhere.
____________
|
|
CsArOs

 

Hired Hero
|
posted December 13, 2025 03:22 PM |
|
Edited by CsArOs at 15:23, 13 Dec 2025.
|
purerogue3 said: I only know how to look in IDA
can you show us how to trace it using CE?
IDA is useful for editing SoD but it should be the first step when editing hota, not the go-to solution, since hota changes a lot in the game.
Finding adresses in hota.dll can be done in 2 different ways (that I know of). 1: look through hota.dll code for a pattern you recognize, and then test if this is actually what you think it is. But this requires a lot of experience hex-editing the game to find the patterns, but you might try.
Another, simpler option is to attach a stop in cheat engine at the point of entry or near the point of entry (note that cheat engine will even occasionally show those entry points with hota-edited code), and then use step-into (I believe its F7 key) to step into the hook of hota. Once you're there it will probably show you an unreadable address, but you can just write down the code present, and since no dll edits hota.dll, you can safely look for this hexadecimal code in imhex or frhed or whatever hex editor you're using.
Slow's speed effect is most likely hooked for wherever its formula is in the code.
MisterGoblin said: I'm assuming with adition of new creatures, it overwrites somewhere.
I don't know where it is then. You might want to look around there in the code, but I dont have other ideas myself. Table-editing by hota is the most difficult to locate since you cant just use cheat engine and step-into method I've described above.
|
|
purerogue3

 
   
Famous Hero
|
posted December 13, 2025 11:57 PM |
|
|
CsArOs
So I step-into (F7) the slow function at 444A21, pressing F8 into it shows a .dll address .. it does not appear to be it
More confusing, if i keep on pressing F7 or F8 it does not seem to end - am I doing something wrong?
Thanks, I did not know about the step-into key before!
|
|
AlexSpl

   
    
Responsible
Supreme Hero
|
posted December 14, 2025 12:14 AM |
|
Edited by AlexSpl at 00:45, 14 Dec 2025.
|
Actually, you can use (hardware) memory breakpoints in IDA. You know where your creatures speed value is. Set a breakpoint, cast slow and wait for that value to be changed. You will stop just after the instruction that wrote new value to the memory address where the speed value is currently stored. Then, just analyze the code above.
Hardware breakpoints 101
|
|
purerogue3

 
   
Famous Hero
|
posted December 14, 2025 12:47 AM |
|
|
Hi Alex
Yikes! I just tried what you suggested and my computer gained a mind of it's own.
I think i have to figure out what just happened
|
|
AlexSpl

   
    
Responsible
Supreme Hero
|
posted December 14, 2025 01:02 AM |
|
Edited by AlexSpl at 01:07, 14 Dec 2025.
|
Try them with gold. You can set your gold amount to any number you want (in-game), so it will be pretty much a unique number in the memory. Find this value and go (G) to the address. Set a breakpoint, make it hardware/write. Now, every time your gold changes your game will be stopped after the instruction that caused your gold to change its value.
And it will work for speed as well. You just have to obtain the combatManager address and the offset of your unit's speed.
|
|
purerogue3

 
   
Famous Hero
|
posted December 14, 2025 01:20 AM |
|
|
I was so surprise IDA went transformers BY ITSELF.. i was afraid my new pc would just snap or bill gates would contact me asking what I just pressed 
my pee brain is already overloaded by step-into.. I have to sleep on it and eat some fish oil
|
|
AlexSpl

   
    
Responsible
Supreme Hero
|
posted December 14, 2025 01:24 AM |
|
|
Or you just need a good example It's easier than you think with a good guide.
|
|
AlexSpl

   
    
Responsible
Supreme Hero
|
posted December 14, 2025 02:06 AM |
|
Edited by AlexSpl at 02:59, 14 Dec 2025.
|
This is your formula for speed -
[0x699420] + 0x54CC + 0x548 * (21 * side + index) + 0xC4
[] means you have to read value at the address within.
Then,
0. Attach to the HotA process.
1. Go (G) to the address you calculated.
2. Set a breakpoint.
3. Continue running the game (F9).
4. Cast Slow on the creatures @ (side, index).
5. Enjoy landing next to the code you seek.

This is my Griffins and their speed.
If you are lucky enough, you'll land just inside HotA.dll code (look for the current address in the input file IDA provides you). Or, you might land in the original code. And your value was returned from hook, but you know now where that hook is. Just look up the code.
Personally, I cannot recommend to mess with the HotA code. Your mods will wither if unsupported. If you are OK with mods working on a certain version of HotA, it's all right. But every new update will potentially ruin your work. Though, I think, every good story has its ending. And HotA will eventually have its own. Probably then 
... said AlexSpl when DoR isn't even a real thing as of now. Probably, HotA will end with lives of its creators or with lives of those who will replace them. Will HotA be alive in 2050? and in 2100? I miss the good old times when I just wanted to play Heroes
|
|
Phoenix4ever

 
     
Legendary Hero
Heroes is love, Heroes is life
|
posted December 14, 2025 07:53 AM |
|
|
Heh even a simple +1 to Slow formula seems to be damn complicated to reverse.
I don't mind editing the HotA stuff though, I do it every time a new version comes out. Hopefully I have a reason to do it all again by New Years...
|
|
CsArOs

 

Hired Hero
|
posted December 14, 2025 01:38 PM |
|
|
|
@AlexSpl While I'm also awaiting DoR with great expectations, I haven't had much trouble updating my mod to the new HD mod / HotA versions. Sure, some features sometimes get interfered with, but usually its a matter of a week or two before I can fix all the inconsistencies.
|
|
AlexSpl

   
    
Responsible
Supreme Hero
|
posted December 14, 2025 09:11 PM |
|
Edited by AlexSpl at 21:31, 14 Dec 2025.
|
Quote: This is your formula for speed -
[0x699420] + 0x54CC + 0x548 * (21 * side + index) + 0xC4
Actually, it's +0x4C8 and we land just inside
int __thiscall army::GetSpeed(const army *this)
before a hook.
Analyzing its code, we find the following increment of speed in HotA.dll -

There is another one similar entry (probably for another HotA function) -

Offsets for the file on disk are in the bottom left corner.
Cannot say it's all you need to edit to get rid of that +1 to speed, though.
|
|
purerogue3

 
   
Famous Hero
|
posted December 14, 2025 11:59 PM |
|
|
Works!
8B4C24088B410483B8B403000001B8010000007E02FF01 -> 9090
Alex, ..I/we are never going to get there
|
|
CsArOs

 

Hired Hero
|
posted December 15, 2025 12:08 PM |
|
|
|
Has anyone botehred to try to change the music in the game? How do you save mp3 files to be able to play the file through campaign editor or from the game itself without issue?
|
|
AlexSpl

   
    
Responsible
Supreme Hero
|
posted December 15, 2025 01:58 PM |
|
|
|
Have you tried 128 kbps/44.100 kHz? It's standard for H3 music (HotA uses the same bitrate and sampling rate).
|
|
CsArOs

 

Hired Hero
|
posted December 15, 2025 09:19 PM |
|
|
|
Now I have, and it works. Thanks, Alex!
|
|
MisterGoblin

 
Tavern Dweller
|
posted December 18, 2025 10:34 AM |
|
|
Recently i've been working on arena mod.
I've make some changes to "Attack A" table, so some creatures would have new abilities.
I shifted table from Vampire Lords (3F) (C1; -63) to Genies (24) (DC; -36). And adjusted table values.
Table has length of 73. Start from Vamp Lords up to Rust Dragons.
Now it starts from Genies up to Wywerns.
Everything was working fine, and suddenly i found out that Stormbirds from hota have Vampirism.
Ifound code in Hota.dll that references "Attack A" table from Exe, changed shifts. Birds no longer have Vampire ability (that's a good news), but Sea dogs lost their Accurate shot. I tried few thing, but nothing helps.
What i've figured out that in the end of subroutine it gives creatures value - 5, it's default/no abilities.
Could anyone help me out, what am I doing wrong.
I'll put few screens with code and pseudocode.

____________
|
| |
|
|