|
|
silverG

 
  
Known Hero
|
posted June 07, 2021 08:56 PM |
|
Edited by silverG at 23:37, 07 Jun 2021.
|
Didn't test it in an unmodified HD version, but I think I have figured it out, at least why the game carshes for the first time.... Seems if have "misspelled" a hex sequence at the Capitol income and the Capitol caused the game to crash for producing a NEGATIVE amount.
The second crash occured when the enemy has it's turn, and thei heore actually ended it's turn on a MOUNTAIN. Now I don't know how to fix that.... XD
I guess I ought to stick with vanila.....
I am removing all First Aid/Eagle Eye specialities and replacing them with some useful Heroe Specialities.
Update: - all my updates/hax run smoothly in Vanlia, except when trying to add the Hero Speciality: Estates (the one that Lord Haart - Castle - has). As soon as I assign this Skill Speciality to any other Hero and start the game with that Hero, the game crashes immediately.
Everything else seems to be working just fine. Except for the Citadel/Castle hack... haven't tested that ... yet.
|
|
silverG

 
  
Known Hero
|
posted June 11, 2021 05:37 PM |
|
Edited by silverG at 23:04, 11 Jun 2021.
|
So, any luck finding how to edit the gold mines, or the Archer Tower damage?
Question: by Water wheels:
in Vanila the original code is at 0AA761 E8 7B D6 FF FF
the free space above original destination is at 0A7DD1
by changing the 7B to 6C the water wheels still provide 1,000 gold after week 2, even though the code in the free space at 0A7DD1 has been changed to :
56 ; push ESI onto the stack (temporary storage; we need to use ESI)
8B 35 38 95 69 00 ; load global data into ESI (we need this to get the week number)
8A 86 40 F6 01 00 ; move week number into AL
5E ; pop ESI off of the stack
0A7DEC ; 8A 07- change to:
------
90 90 ; NOPs out code that originally loaded the multiplier into AL
and also by the Witch hut jump sequence:
0A7E64 ; 03 BA 01 00 00 00 B9 D8 73 69 00 6A 00 6A - change the 01:
------
01 > 02 ; adds a "cancel" button to the dialogue window
0A8215 ; 6A 01 56 8B CB E8 B1 - change to:
E9 EF A2 FF FF jmp 4A2179 ; jump to free space (Fountain of Fortune) - mine is at A2510
0A2509 ; 85 D8 25 4A 00 8B 87 05 01 00 00 0C 20 - change to:
------
8B 0D D0 92 69 00 mov ecx,[6992D0] ; (prepares ECX to check player response)
81 79 38 05780000 cmp [ecx+38],7805 ; did player click "OK" (yes)?
0F 85 03 5D 00 00 jne 4A7E8F ; if no, skip code to update hero skills
6A 01 push 01 ; (displaced code from jump)
56 push esi ; ""
8B CB mov ecx,ebx ; ""
E9 F4 5C 00 00 jmp 4A7E8A ; return to original code - the vanila is at A821A (E8 B1 A0 03 00 5E)
Please help... 
|
|
BTB

 
   
Famous Hero
Moist & Creamy
|
posted June 11, 2021 11:06 PM |
|
|
The easiest way for me to give you a hand - from which you would pretty quickly learn to figure out these problems on your own - would be if you had Cheat Engine installed. Using that, you can pull up the relevant code block and post a screenshot of it, from which we can diagnose the problem with a few clicks.
|
|
silverG

 
  
Known Hero
|
posted June 11, 2021 11:10 PM |
|
|
Luckly, I do have Cheat Engine >
|
|
BTB

 
   
Famous Hero
Moist & Creamy
|
posted June 11, 2021 11:14 PM |
|
|
Sweet! Well, in that case just pull up memory view and post a screenshot of the relevant code block (alt+printscreen).
|
|
silverG

 
  
Known Hero
|
posted June 11, 2021 11:18 PM |
|
Edited by silverG at 23:21, 11 Jun 2021.
|
When searching in Cheat engine everything is moved by 400,000, right?
So 0AA761 would be actually 4AA761? Or?
|
|
BTB

 
   
Famous Hero
Moist & Creamy
|
posted June 11, 2021 11:25 PM |
|
|
Correct. Runtime offsets all addresses by 40000.
|
|
silverG

 
  
Known Hero
|
posted June 11, 2021 11:34 PM |
|
|
[img] [/img]
Hope this works
|
|
silverG

 
  
Known Hero
|
posted June 11, 2021 11:37 PM |
|
|

This is the other one, with free space I assume.
|
|
BTB

 
   
Famous Hero
Moist & Creamy
|
posted June 11, 2021 11:44 PM |
|
Edited by BTB at 23:49, 11 Jun 2021.
|
Works just fine, yeah. Could I get you to expand that first column, though, so I can see what addresses we're looking at?
EDIT:
Ok, got my notes pulled up here... you said you changed 0A7DD1 to the new Water Wheel code. That's supposed to go at 0A7A41.
|
|
silverG

 
  
Known Hero
|
posted June 11, 2021 11:49 PM |
|
|
you mean like so:

I think I have figured it out, just double click on the jmp or any other commands and then enter the correct/designated address, right?
Then Cheat Enginge takes care of the rest....
|
|
silverG

 
  
Known Hero
|
posted June 11, 2021 11:51 PM |
|
|
BTB said: Works just fine, yeah. Could I get you to expand that first column, though, so I can see what addresses we're looking at?
EDIT:
Ok, got my notes pulled up here... you said you changed 0A7DD1 to the new Water Wheel code. That's supposed to go at 0A7A41.
In Vanila it's 0A7DD1...
Not editing HD, because it keeps crashing.
|
|
BTB

 
   
Famous Hero
Moist & Creamy
|
posted June 11, 2021 11:51 PM |
|
Edited by BTB at 23:52, 11 Jun 2021.
|
Correct, you can double click on any ASM command and replace it with what you want. The primary use here is going to be changing jumps if you decide to use different free space than what I suggest.
...or if you're editing the vanilla .exe, pretty much every long jump and call is going to be wrong
|
|
silverG

 
  
Known Hero
|
posted June 12, 2021 12:00 AM |
|
Edited by silverG at 00:20, 12 Jun 2021.
|
So.. this is what I've got:



And you were right, it keeps crashing
|
|
BTB

 
   
Famous Hero
Moist & Creamy
|
posted June 12, 2021 02:33 PM |
|
|
Well, one of the benefits of modding HD is that HD will generate a crash log giving you the exact address of failure.
That said, your problem here is that you're using jnp instead of jmp.
|
|
SilverG

 
  
Known Hero
|
posted June 12, 2021 07:50 PM |
|
|
BTB said: Well, one of the benefits of modding HD is that HD will generate a crash log giving you the exact address of failure.
That said, your problem here is that you're using jnp instead of jmp.
Thanks for the info BTB.
What's the diference between "jnp" and "jmp"?
|
|
BTB

 
   
Famous Hero
Moist & Creamy
|
posted June 12, 2021 08:02 PM |
|
|
SilverG said:
BTB said: Well, one of the benefits of modding HD is that HD will generate a crash log giving you the exact address of failure.
That said, your problem here is that you're using jnp instead of jmp.
Thanks for the info BTB.
What's the diference between "jnp" and "jmp"?
Jmp is literally jump. Jnp is "Jump if no parity", which is a conditional jump.
|
|
SilverG

 
  
Known Hero
|
posted June 12, 2021 08:18 PM |
|
Edited by SilverG at 21:18, 12 Jun 2021.
|
BTB said:
SilverG said:
BTB said: Well, one of the benefits of modding HD is that HD will generate a crash log giving you the exact address of failure.
That said, your problem here is that you're using jnp instead of jmp.
Thanks for the info BTB.
What's the diference between "jnp" and "jmp"?
Jmp is literally jump. Jnp is "Jump if no parity", which is a conditional jump.
Ooooooh, understood.
So I should be using "jmp"... ofc
Apart from the Arena changes, neither the Water Wheel, nor the Which Hut changes aren't working in Vanila....
|
|
BTB

 
   
Famous Hero
Moist & Creamy
|
posted June 12, 2021 09:17 PM |
|
|
I don't think I've ever seen JNE used, honestly. Most commonly in this code you'll see JE (jump if equal) or JNE (jump if not equal). Depending on where you're at or who you're talking to, these may also be expressed as JZ (jump if zero) or JNZ (jump if not zero), which are effectively the same thing and both will be accepted by Cheat Engine's assembler.
|
|
silverG

 
  
Known Hero
|
posted June 12, 2021 09:25 PM |
|
|
BTB said: I don't think I've ever seen JNE used, honestly. Most commonly in this code you'll see JE (jump if equal) or JNE (jump if not equal). Depending on where you're at or who you're talking to, these may also be expressed as JZ (jump if zero) or JNZ (jump if not zero), which are effectively the same thing and both will be accepted by Cheat Engine's assembler.
Apart from the Arena changes, neither the Water Wheel, nor the Which Hut changes aren't working in Vanila....
|
|
|