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 ]
New Server | HOMM1: info forum | HOMM2: info forum | HOMM3: info forum | HOMM4: info forum | HOMM5: info forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 5 - Modders Workshop > Thread: How can i find hex offsets?
Thread: How can i find hex offsets?
vulcancolak
vulcancolak


Known Hero
posted July 27, 2017 02:58 PM

How can i find hex offsets?

I want to improve my mod and i need to edit exe file.

For example, i need to edit few hardcoded things like the logistigs movement bonus etc etc. I know no-one can say "go to the xxx offset, here it is the values of logistics" at least i need to learn how to people find offsets? Is there a secret technique or the trick about that?

And here is the another question. (you don't need to answer actually. It is my feelings)

Question is, why the people hide their knowledge from people?
I know there are few active users can answer all of my questions but why they are not helping me? During the edit my heroes 5 mod, 100 or 95 questions i find by myself.

I am asking it to myself all the time because while editing games (warcrat 3, starcraft, starcraft 2, diablo 2, red alert 3 etc etc) if i see someone asking the question that i know, i am helping him.

Is it about personality? Or am i stupid? Since the beginning of Heroes 5 modding nobody helped me exactly. Only 2 users told me "you can find x file in x folder" that's all. Should i hide my knowledge from people? Am i idiot for helping people?

Thanks for reading. I just wanted to share my feelings with all of you. I feel better now.

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


Promising
Supreme Hero
disrupting the moding industry
posted July 27, 2017 04:13 PM
Edited by dredknight at 16:14, 27 Jul 2017.

Hello Vulcancolak,

It is not like people dont want to help you or any other person asking questions but what you ask we either dont know or it is known by a very few people who come and go on very rare occasion.

For example the answer to the question you ask is not known by anyone except Deflaktor and he comes around like once every 3-4 months and then go again.

Any questions related to Hex editing are top of the top editing in heroes so really noone can answer them and what can be answered is already on this page and that page.

The small knowledge I have gained on hex editing is gathered from here and there on the internet so I cant be much of a help.

Cheers
____________
Find an opponent at HoMM55 Tavern! | NCF Utility Alpha

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


Known Hero
posted July 27, 2017 04:52 PM

Thanks and yes i know and i am trying to find with cheat engine but the my question is uhm let me give you example


--------------------
Someone: Hey is there anybody know how can i change the values of xxx

me: (hmmm i know and he needs help, i will help him)

vulcancolak: Yes. You can change it at here (solution)
---------------------

Since the starting modding i already asked many perceptible questions (for example where can i change logistic values, starting bonuses etc) and i know few of them knows how to do. But they never helped me.

As i said i think it is about personality. Not everyone likes to teach somethings to someone but i like. Thank you for your helping again.

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


Promising
Supreme Hero
disrupting the moding industry
posted July 27, 2017 10:14 PM

Sure that is one way to think about it. But also check the other side that most of the modding staff here are between 25-40 and do this as a hobby. Some are married, have children, come home tired from work or may go through an everyday struggle.

I dont know how modding other games work but heroes V modding is not a straight to do process. Lets say I figure out something and do it.
And you ask me about it a year later. I will probably remember I have done that thing but it will require some time and effort to get the exact thing you are asking about.

Forums of this kind are working on the best effort rule (if we can and when we you can) because modding does not provide any gain besides the pure satisfaction that a person contributes for the pleasure of a society or just want to have fun with other people doing the same stuff.

I think the best way to describe it is - Imagine that posting a question without ever getting an answer is like waiting for a friend that never showed up for a meeting because his mother got in an accident but you don't know it.

Cheers!



____________
Find an opponent at HoMM55 Tavern! | NCF Utility Alpha

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


Responsible
Undefeatable Hero
posted July 31, 2017 02:41 AM

I haven't come here for years, but I used to mod a lot (sadly, I do not remember all the details of how to do it, and never knew how to edit hexes (except, if we are talking dark magic spells, pretty sure they were pretty easy to edit )

I learnt most stuff alone, mostly by downloading other mods and looking at how they were done (could be considered like sharing your technics, in a way) but I think we had some helpful people. the problem is that while a lot of technics aren't particularly hard to understand, it still takes a while to make a tutorial and making one isn't a guarantee people will read it anyway.

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


Promising
Known Hero
posted August 02, 2017 11:08 PM
Edited by Deflaktor at 23:47, 02 Aug 2017.

I can try to explain my standpoint.

The thing is, hex editing is not easy. There are lots of tutorials on how to do that or do this, but they all tell you how to do one specific thing. If you want to do things on your own, you will need a lot of knowledge and intuition. You need to have an inherent feeling on how certain parts of the game might have been programmed and be able to identify such patterns in a forest of seemingly random operations.

My background is, that I started writing own assembler programs in school. Later I was hacking super mario world for a few years. I also studied software engineering so that helps also. But I learned how to use cheat engine on my own by following tutorials and YouTube videos.

You don't need all that background knowledge to get started in hex editing. But you also need to know that you need to start small.

Also, probably the most important thing is patience. It took me way over 10 hours of searching through random code in heroes 5 to make the permanent and endless simultaneous turns hack. Actually I gave up several times only to resume it again a few weeks later. It is extremly frustrating to go to hundreds of thousands of opcodes and to not find a single hint. You won't feel like you are getting any closer to your goal.

It was my first hack on a x86 exe file and I got a lot better now, so it would probably take me less than half the time now. Nevertheless I am never sure if I'm going to find the thing in the code that I am looking for. It is still like a treasure hunt. You might find it if you search long enough, but there is still a possibility that you will never find it.

If you still want to try, you can ask me and I will try to answer your questions and point you to some tutorials.


EDIT: my standard procedure in finding values is as follows:

1. Research as many related values as possible. You might never know when you need them. If you want to change logistics values, I have made a patch which changes some related values: https://deflaktor.github.io/Heroes5/Homm5Patcher/movement.yml
So for logistics it would be nice to know what percentage they change, how much hero movement usually costs, how much a single step costs and so on

2. Now you need to find a trade off between how close the values that you have are to the one you need to find and how easy you can modify the values that you have in game. In the logistics example you are pretty lucky since the related values you have are pretty close to the one you want to find (hero movement costs, logistics percentage) and also very easily modifiable in game (you just move your hero on the map)

3. You find the memory location of the related values using cheat engine. (search the hero movement value, move him a bit, enter the new movement value, repeat until only one value left in cheat engine).

4. This step depends now on your intuition. In the case of logistics, you attach the chest engine debugger to the game and place a write breakpoint on the hero movement value. Then you move him a bit and the game stops executing. Now you can look at the surrounding code which decreases the hero movement value. There are several possibilities how this might be handled: (1) the game decreases by the normal value and adds back a certain amount later for having logistics, (2) the game uses predefined values to subtract from hero movement points depending on logistics mastery level, (3) the game calculates a percentage value and multiplies it with the decrease value. Imo it should probably be case (3). So now you need to look around the code and just try to understand it. Sometimes you need to follow other procedures, sometimes you are not even at the right code place an there might be another breakpoint triggering later. You just don't know at this point and you need to try every possibility out. The hard part here is that you might be going in a completely wrong direction and you will never know.

5. When you find the value in cheat engine you will need to copy the surrounding the Hex values in the memory and find this sequence of Hex values in the exe file using a hex editor. You can't use the address chest engine tells you, since it is a memory address and the physical address in the file is usually a different one.
____________
My Heroes5 Dump /// My Heroes5 Patcher

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


Responsible
Famous Hero
AI Wizard
posted August 03, 2017 10:53 AM
Edited by Quantomas at 10:54, 03 Aug 2017.

That is a very good example.

Movement depends on many more variables: the moon week can affect it, there are different movement values for the current week, when you start a day, for the current turn, for movement over water, for movement over land, whether you can fly, equipped artifacts affect it, the terrain does and hero native terrain.

These are typically maintained for each hero.

Now, if you change the value that is subtracted from the current movement points as the hero moves from one tile to the next, you alter only the hero movement points remaining for the current turn.

This breaks the AI (vanilla and otherwise) because the AI lookahead is based on the stored movement values. There is already pretty elaborate code in the vanilla to ensure that hero movement is projected correctly with all the parameters applied. Now, if you change how much movement points are subtracted only, the actual hero movement and the AI is out of sync.

Well, one day we will need to have a level-headed talk how to implement the features worth saving properly.

@vulcancolak
As Deflaktor explained, you have to spend way more time and effort seriously before you earn the right to complain that the dedicated modders don't help you out.

And as Deflaktor also mentioned, most new modders, basically more often than not just fans who want to try out something new, simply cannot be bothered to read what was said and explained before. That makes trying to help out new modders somewhat a barrel without a bottom.

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


Known Hero
posted August 03, 2017 02:28 PM

I want to thank you all of you for your kindness. Tonight i will check and read everything i am at work. I also hacked many nes roms because it was so easy and i can get maximum (worst scenario) 30 offsets (i am using cheat engine) and 30 is amazing number but in the heroes 5 i cannot lower number below 800. I will read everything and thank you so much

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread »
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0597 seconds