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
Thread: Heroes 3 Hacking Reference Guide This thread is 42 pages long: 1 10 20 ... 25 26 27 28 29 ... 30 40 42 · «PREV / NEXT»
BTB
BTB


Famous Hero
Moist & Creamy
posted October 02, 2022 05:08 PM

Guide has been updated with a lot more information. Link has also been changed; please update accordingly if linking externally.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Parascus
Parascus


Adventuring Hero
posted October 02, 2022 07:21 PM

Hi BTB,
cool stuff. I have two questions regrding the coding:
1) Under experience & level you write a code at 0DA69E with 83 fe 06 7e 11. That means if hero has level 6 or below EAX is set to 1,000. I do not see the 1,000 as well as in the following code 2,500 etc. Can you give me a hint to understand this? It might help  me through all of the code.
2) Sometimes you use unused byte chunks or overwrite some functions for own programming. Isn't it possible to expand the file? This way I could keep all functions and just have some additional functions.

Best Regards

Parascus
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
BTB
BTB


Famous Hero
Moist & Creamy
posted October 03, 2022 02:41 AM

1 - all of the code blocks behave a little bit differently. The one you're referring to only needs to know what the experience value separating the levels is, which in my example is 1,000 experience per level up until level 6.

2 - probably, but I don't know how. Free space isn't an issue for me because everything I overwrite are things I wanted gone in the first place.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Parascus
Parascus


Adventuring Hero
posted October 03, 2022 09:16 AM

Thanks BTB,

so I have to dive deep into the meaning of the code. I hope, I'll find more time for that because it seams realy promissing. For the second: yes, there are some parts I wouldn't mind to remove myself.
My HxD editor has two paste functions. The first is inserting and the second overwriting. Doing an insert without a selection of the same size notifies me, that the file will be expanded. I think that could work (for me).

Have a nice day

Parascus
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
BTB
BTB


Famous Hero
Moist & Creamy
posted October 03, 2022 09:59 AM

Parascus said:
Ting an insert without a selection of the same size notifies me, that the file will be expanded. I think that could work (for me).


Do not do this.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Parascus
Parascus


Adventuring Hero
posted October 03, 2022 10:07 AM

Hi BTB,

Thanks for the warning, I asume you have made some (bad) experiences. I'll keep the size.

Have a nice day.

Parascus
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
FfuzzyLogik
FfuzzyLogik


Known Hero
posted October 03, 2022 05:32 PM

If you insert anything, you risk to mess things up alooooot....
Many things in program do search for a "special position" where things must be.
So if you insert some lines of program, you must precisely know what search what and where... If you don't all things could be changed of location so won't be found by the exe... So crash the game...
____________
FfuzzyLogik.

If I'm crazy ? Sure, because its madness to be normal...

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Parascus
Parascus


Adventuring Hero
posted October 03, 2022 06:57 PM

Hi FfuzzyLogic,

Yes, inserting bytes will move all data and addresses will change. That way the complete exe woould be a mess. But I thought of appending some bytes and address them like suggested in other post. If I append them the addresses of the program should not change or do they?

Best regards

Parascus
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
DarkAtom
DarkAtom


Adventuring Hero
posted October 03, 2022 08:47 PM

Parascus said:
But I thought of appending some bytes and address them like suggested in other post. If I append them the addresses of the program should not change or do they?


You can't simply append bytes to an EXE, because Windows won't load them in memory when loading the EXE image. There are sections defined in the PE header (e.g. ".data", ".text" etc.) and they have predefined sizes. What you can do, however, is to define another section (or more) in which you can add stuff. You can do that manually by hex editing (look up the PE header format) or you can use programs designed for exactly that (I think one of them was PE Explorer).
____________
"If you get scared of doing what's right you might as well lay down and die" - Wulfstan, Heroes of Might and Magic V: Hammers of Fate

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Parascus
Parascus


Adventuring Hero
posted October 03, 2022 10:26 PM

Hi DarkAtom,

thanks for the hint ... everything is seams easy ... as long as you don't touch it. So I will first of all just change the simple things like images, skill values, creature stacks ... but maybe some day, I'll come back to the coding.

Good evening to all of you

Parascus
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Parascus
Parascus


Adventuring Hero
posted October 04, 2022 06:05 PM

I couldn't keep my hands off it and used PE Explorer to extend the first section (.text with properties IMAGE_SCN_CNT_CODE, IMAGE_SCN_CNT_EXECUTE and IMAGE_SCN_CNT_CODE, READ) from 239000h to 23F000h. But success is limited. While I can still launch and play the application, and the application is about 24K larger, I can't see where the new area is in HxD. I assumed that this is completely pre-assigned to 00.

The reason I want to do this is because I love the First Aid extension but don't have the memory gaps to implement it. So I would have to know where my new memory is now and how I then enter this address in the first-aid code in the jump instruction.

Has anybody of you have tried this and has a hint how I can find my new memory? Or is the whole approach for the bin?

Best regards

Parascus
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
BTB
BTB


Famous Hero
Moist & Creamy
posted October 04, 2022 08:35 PM

There are plenty of places to find free memory unless you are completely against removing anything from the game, even if it is absolute garbage (Eagle Eye and Disguise both come immediately to mind). Every hack in my guide that uses free space comes from something I really can't imagine someone NOT wanting to remove.

Even then, you can clear up free space without removing anything at all simply by condensing artifact checks.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Parascus
Parascus


Adventuring Hero
posted October 05, 2022 08:16 PM

Hi BTB,

ok I will finish reading the hacking guide (which is fantastic btw). Afterwards I will decide what to do.

In fact disguise is disgusting but I want to see if it is possible to tune eagle eye enough so it is usefull. I have played many times and the chain lightning spell I longed for was executed right in front of my nose. I'd like to have this possibility to learn spells.

One thing I could easily resign is every thing nautical. It might be better with the Admirals Hat ability. But water takes a lot of space where there could be easily some buildings.

Kind regards

Parascus
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
phoenix4ever
phoenix4ever


Legendary Hero
Heroes is love, Heroes is life
posted October 05, 2022 11:35 PM
Edited by phoenix4ever at 23:37, 05 Oct 2022.

Speaking of Disguise, can anything be done to replace this spell or somehow make it more fair and useable also VS Expert/Impossible AI?
I have tried banning it before, but that just makes it easier to learn powerful level 2 spells like Blind and Visions and it might make the AI less likely to pick Air Magic?  

BTB you know how level 7 units might sometimes join a hero. For some reason they do not cost rare resources, like they normally would, is it possible to change this?  

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Parascus
Parascus


Adventuring Hero
posted October 06, 2022 10:38 PM
Edited by Parascus at 22:50, 06 Oct 2022.

Hello,
I now tried to change Valeskas speciality into the static unit improvement.

First I changed he functions which increases the statistics as described (as I understood) at address 0x0E65AD with 8B 47 08 01 46 54 8B 47 0C 01 46 58 8B 47 10 01 46 50 8B 47 14 01 46 5C 01 46 60 8B 47 18 01 46 4C EB 1A.

As second step I changed the sepciality of Valeska at 0x278448 with 04 00 00 00 02 00 00 00 01 00 00 00 02 00 00 00 04 00 00 00 03 00 00 00 05 00 00 00.

But when I lok at the statistics of the archers, they are still:
Attack 6(8)
Defense 3(5)
Damage 2-3
Health 10
Speed 4

Asuming that the increased attack and defense comes because of the ground (gras) I expected something like:
Attack 6(9)
Defense 3(7)
Damage 2(5)-3(6)
Health 10(15)
Speed 4(8)

Any ide where I am wrong?

Best regards

Parascus

Edit: Interesting fact is that I've done the same to Edric (with Griffins) and it works.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
BTB
BTB


Famous Hero
Moist & Creamy
posted October 07, 2022 02:23 PM

phoenix4ever said:
Speaking of Disguise, can anything be done to replace this spell or somehow make it more fair and useable also VS Expert/Impossible AI?
I have tried banning it before, but that just makes it easier to learn powerful level 2 spells like Blind and Visions and it might make the AI less likely to pick Air Magic?


This is one of those things that comes down to the fact that you're editing HotA instead of the base game, because the ideal solution is simply removing Disguise and then adjusting the appearance rates of other spells as desired. I forget if it's every faction you can't edit in HotA or just Cove.

phoenix4ever said:
BTB you know how level 7 units might sometimes join a hero. For some reason they do not cost rare resources, like they normally would, is it possible to change this?


I imagine it could be done, but I'd have to figure out where that routine is. Personally I'd lean more toward lv. 7 units simply not offering to join at all, though.

Parascus said:
Hello,
I now tried to change Valeskas speciality into the static unit improvement.


If I had to guess, it's probably a typo somewhere in Valeska's specialty code (i.e. you offset it by 4 bytes by mistake or something rather) since it's actually working otherwise.

This sort of debugging is where Cheat Engine comes in extremely handy, btw.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Phoenix4ever
Phoenix4ever


Legendary Hero
Heroes is love, Heroes is life
posted October 07, 2022 02:37 PM

Thanks.
Editing spell probabilities is a good idea, though I don't know how to edit Cove.
It would also be easier to learn certain spells from shrines, as there are only 14 level 2 spells and not 15...

Currently I don't allow level 7 creatures to join, but if they cost rare resources and only 50% join and only for money, it might be okay...

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Phoenix4ever
Phoenix4ever


Legendary Hero
Heroes is love, Heroes is life
posted October 07, 2022 08:41 PM

Parascus said:
Hello,
I now tried to change Valeskas speciality into the static unit improvement.

First I changed he functions which increases the statistics as described (as I understood) at address 0x0E65AD with 8B 47 08 01 46 54 8B 47 0C 01 46 58 8B 47 10 01 46 50 8B 47 14 01 46 5C 01 46 60 8B 47 18 01 46 4C EB 1A.

As second step I changed the sepciality of Valeska at 0x278448 with 04 00 00 00 02 00 00 00 01 00 00 00 02 00 00 00 04 00 00 00 03 00 00 00 05 00 00 00.

But when I lok at the statistics of the archers, they are still:
Attack 6(8)
Defense 3(5)
Damage 2-3
Health 10
Speed 4

Asuming that the increased attack and defense comes because of the ground (gras) I expected something like:
Attack 6(9)
Defense 3(7)
Damage 2(5)-3(6)
Health 10(15)
Speed 4(8)

Any ide where I am wrong?

Best regards

Parascus

Edit: Interesting fact is that I've done the same to Edric (with Griffins) and it works.

Wait, does this mean you found a way to add speed bonus to a static creature specialty?
At which byte do you change speed bonus? (I might give Galthran a static creature bonus.)

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Parascus
Parascus


Adventuring Hero
posted October 07, 2022 09:21 PM
Edited by Parascus at 22:44, 07 Oct 2022.

Hi Phoenix4ever,

yes, thanks to the guide of BTB (http://btb2.free.fr/mods/h3/hacking.txt). You can find the passage with the phrase "HERO SPECIALTIES (28 bytes)" and there it is the first topic.

I'm fighting with crashes at this moment and don't know their reason. Greedy as I am I have changed to much at once and now I'm paying the price that betwwen two days heroes says good bye. But If have managed to get all stats up (atteck, defense, damage, health and speed) and I think the reason for the crashes lays somewhere else, e.g. wrong copying into the exe.

Have fun and also a nice evening

Parascus

Supplementals:
1. I now have redone some of my changes, among those a change of the speciality of Valeska and Edric to static unit improvement. So far no crashes.
2. I have checked speed again and allthough I tried to increase it by to it only gives one more speed point. Don't know way.
3. Every hero adds some points to attack and defense additionaly. Is this because castle heroes are on castle ground with castle units?

                                  01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20
The general changes at 0E65AD:     8B 47 08 01 46 54 8B 47 0C 01 46 58 8B 47 10 8B 47 14 01 46 5C 01 46 60 8B 47 18 01 46 4C EB 1A
The changes for Valeska at 278448: 04 00 00 00 02 00 00 00 03 00 00 00 03 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00
  with 01 -> speciality type
       05 -> Archer
       09 -> 3 additional attack
       0D -> 3 additional defense
       11 -> 2 addtional speed
       15 -> 2 additional damage
       19 -> 2 additional health points

____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Phoenix4ever
Phoenix4ever


Legendary Hero
Heroes is love, Heroes is life
posted October 07, 2022 10:48 PM
Edited by Phoenix4ever at 22:50, 07 Oct 2022.

Okay, I think I have discussed static creature bonus with BTB before, but then we could'nt figure out how to add the speed bonus. But maybe BTB figured it out later and added it to his guide?

Yeah, being greedy can be dangerous when it comes to hex editing, one wrong number can make the game crash.
I have made it a habit of writing down everything I change and how to change it back. Or you can take some back up.

But happy modding, Heroes 3 is a great game to experiment with.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 42 pages long: 1 10 20 ... 25 26 27 28 29 ... 30 40 42 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0752 seconds