|
Thread: Another Heroes 3 Mod 2.0 | This thread is pages long: 1 2 3 · «PREV / NEXT» |
|
Andarch1

 
Tavern Dweller
|
posted May 24, 2025 10:49 AM |
|
|
BTB said: Since I'm pretty worn out from going so hard at this, my plan was just to make my source code public once 2.0 releases. Even that may take a little bit, though, since keeping the code sorted has taken a backseat to actually getting everything done.
Oh perfect, the source code would be amazing whenever you’re able to get around to it! I was actually hoping you’d say that.
|
|
BTB

 
   
Famous Hero
Moist & Creamy
|
posted May 25, 2025 09:59 AM |
|
|
Andarch1 said:
BTB said: Since I'm pretty worn out from going so hard at this, my plan was just to make my source code public once 2.0 releases. Even that may take a little bit, though, since keeping the code sorted has taken a backseat to actually getting everything done.
Oh perfect, the source code would be amazing whenever you’re able to get around to it! I was actually hoping you’d say that.
If there's anything in particular you're curious about, I can work on getting that out immediately. Otherwise, I need a bit of a break.
2.0 is now officially out, and the initial post has been edited to reflect that.
|
|
LordCameron

 
   
Famous Hero
Veteran of the Succession Wars
|
posted May 25, 2025 10:29 PM |
|
|
BTB said:
Andarch1 said:
BTB said: Since I'm pretty worn out from going so hard at this, my plan was just to make my source code public once 2.0 releases. Even that may take a little bit, though, since keeping the code sorted has taken a backseat to actually getting everything done.
Oh perfect, the source code would be amazing whenever you’re able to get around to it! I was actually hoping you’d say that.
If there's anything in particular you're curious about, I can work on getting that out immediately. Otherwise, I need a bit of a break.
2.0 is now officially out, and the initial post has been edited to reflect that.
I'm very interested in giving hydras regen. Was that straightforward or a nightmare you had to add in?
____________
What are Homm Songs based on?
|
|
BTB

 
   
Famous Hero
Moist & Creamy
|
posted May 26, 2025 01:14 AM |
|
Edited by BTB at 14:01, 27 May 2025.
|
LordCameron said:
BTB said:
Andarch1 said:
BTB said: Since I'm pretty worn out from going so hard at this, my plan was just to make my source code public once 2.0 releases. Even that may take a little bit, though, since keeping the code sorted has taken a backseat to actually getting everything done.
Oh perfect, the source code would be amazing whenever you’re able to get around to it! I was actually hoping you’d say that.
If there's anything in particular you're curious about, I can work on getting that out immediately. Otherwise, I need a bit of a break.
2.0 is now officially out, and the initial post has been edited to reflect that.
I'm very interested in giving hydras regen. Was that straightforward or a nightmare you had to add in?
Super straightforward since the routine already exists, you just have to add one more check or replace an existing one.
In fact, it's pretty easy to add a check in-line due to code inefficiency. A lot of times the code will look at the entire register instead of just one byte, and the neat thing about the EAX register is that the opcode to check the low or high byte only is just 2 bytes instead of 3. So we take the original code...
00446BD6 - 83 F8 3C - cmp eax,3C ;Wights
00446BD9 - 74 50 - je 00446C2B
00446BDB - 83 F8 3D - cmp eax,3D ;Wraiths
00446BDE - 74 4B - je 00446C2B
00446BE0 - 3D 90000000 - cmp eax,00000090;Trolls
00446BE5 - 74 44 - je 00446C2B
And turn it into...
00446BD6 - 3C 3C - cmp al,3C ;Wights
00446BD8 - 74 51 - je 00446C2B
00446BDA - 3C 3D - cmp al,3D ;Wraiths
00446BDC - 74 4D - je 00446C2B
00446BDE - 3C 6F - cmp al,6F ;Chaos Hydras
00446BE0 - 74 49 - je 00446C2B
00446BE2 - 3C 90 - cmp al,90 ;Trolls
00446BE4 - 74 45 - je 00446C2B
00446BE6 - 90 - nop
|
|
advipservices

 
Tavern Dweller
|
posted May 27, 2025 02:04 PM |
|
|
BTB said: Since I'm pretty worn out from going so hard at this, my plan was just to make my source code public once 2.0 releases. Even that may take a little bit, though, since keeping the code sorted has taken a backseat to actually getting everything done.
I've just tried 2.0 and found that damage formula is broken. Seems like attack+damage*quantity instead of normal
For example Archangel with 25 attack deals damage to orcs (5 defence) and result is 50-80 instead of 60-120 (double of 30-60 basic damage) because 25-5 should give additional 100% damage (doubles basic damage)
What i use:
Archive "Another Heroes 3 mod v2.0a.rar"
HD mod version HoMM3_HD_5.3_R5.exe
GoG Heroes 3 complete
|
|
BTB

 
   
Famous Hero
Moist & Creamy
|
posted May 27, 2025 02:09 PM |
|
|
That's very strange since I don't think I would have edited anything that would affect that, but I checked and you are indeed correct.
I'll have to poke around and see what I can figure out.
|
|
advipservices

 
Tavern Dweller
|
posted May 27, 2025 02:11 PM |
|
|
BTB said: That's very strange since I don't think I would have edited anything that would affect that, but I checked and you are indeed correct.
I'll have to poke around and see what I can figure out.
Many Thanks. waiting for fix because the problem is breaking all gameplay
|
|
purerogue3

 
  
Known Hero
|
posted May 27, 2025 04:25 PM |
|
|
Watching BTB mod is a thing of beauty.
If you ever get the motivation to append your guide, know there are many fans.
|
|
BTB

 
   
Famous Hero
Moist & Creamy
|
posted May 27, 2025 04:41 PM |
|
Edited by BTB at 16:42, 27 May 2025.
|
advipservices said:
BTB said: That's very strange since I don't think I would have edited anything that would affect that, but I checked and you are indeed correct.
I'll have to poke around and see what I can figure out.
Many Thanks. waiting for fix because the problem is breaking all gameplay
Okay, wow. Just snowing wow. I have no clue how long THAT snowbomb was in my code, but I found the problem. It was in the Bless/Curse code and it was accidentally overwriting the damage bonus with the difference in attack/defense. Just... Jesus Christ.
purerogue3 said: Watching BTB mod is a thing of beauty.
If you ever get the motivation to append your guide, know there are many fans.
Aw, thanks man. Good to hear <3
|
|
LordCameron

 
   
Famous Hero
Veteran of the Succession Wars
|
posted May 27, 2025 04:53 PM |
|
|
BTB said:
In fact, it's pretty easy to add a check in-line due to code inefficiency. A lot of times the code will look at the entire register instead of just one byte, and the neat thing about the EAX register is that the opcode to check the low or high byte only is just 2 bytes instead of 3. So we take the original code...
00446BD6 - 83 F8 3C - cmp eax,3C ;Wights
00446BD9 - 74 50 - je 00446C2B
00446BDB - 83 F8 3D - cmp eax,3D ;Wraiths
00446BDE - 74 4B - je 00446C2B
00446BE0 - 3D 90000000 - cmp eax,00000090;Trolls
00446BE5 - 74 44 - je 00446C2B
And turn it into...
00446BD6 - 3C 3C - cmp al,3C ;Wights
00446BD8 - 74 51 - je 00446C2B
00446BDA - 3C 3D - cmp al,3D ;Wraiths
00446BDC - 74 4D - je 00446C2B
00446BDE - 3C 6F - cmp al,6F ;Chaos Hydras
00446BE0 - 74 49 - je 00446C2B
00446BE2 - 3C 90 - cmp al,90 ;Trolls
00446BE4 - 74 45 - je 00446C2B
00446BE6 - 90 - nop
Awesome, I'll look into this and see if I have 1% of your skill.
Edit: It worked! Took me a moment to realize I should be editing the HD EXE and my offeset is 00046BD6 instead for whatever reason but got it figured. So if I want to add a fifth regenerating unit, I'd need to make room somewhere else in the file?
|
|
BTB

 
   
Famous Hero
Moist & Creamy
|
posted May 27, 2025 06:34 PM |
|
Edited by BTB at 20:18, 27 May 2025.
|
LordCameron said: Edit: It worked! Took me a moment to realize I should be editing the HD EXE and my offeset is 00046BD6 instead for whatever reason but got it figured. So if I want to add a fifth regenerating unit, I'd need to make room somewhere else in the file?
Well, you'd have to make room, yes, but in a lot of cases you don't have to look very far. For example, right after this we have the following:
00446BE7 - 8D 14 C5 00000000 - lea edx,[eax*8]
00446BEE - 2B D0 - sub edx,eax
00446BF0 - 8D 04 90 - lea eax,[eax+edx*4]
00446BF3 - 8B 15 B0476700 - mov edx,[006747B0]
00446BF9 - F6 44 82 10 10 - test byte ptr [edx+eax*4+10],10
00446BFE - 0F84 ED010000 - je 00446DF1
What we're doing here is multiplying EAX by 8 in the first instruction, then subtracting 1 to get EAX * 7, and then multiplying that result by 4 and adding 1 in the next instruction. This is really just a roundabout way of multiplying the unit ID by 29 (1Dh) to get the data range. This itself can simply be shortened to multiplying EAX by 1D, but if we look at why this is happening in the first place, we see that it's just checking the flags on the unit type to see if the unit is a living unit... which is a really crappy way to check it since those flags are stored with the stack (which is ESI at the moment).
Thus, we can shorten the hell out of this to:
00446BE5 - 90 - nop
00446BE6 - 90 - nop
00446BE7 - 90 - nop
00446BE8 - 90 - nop
00446BE9 - 90 - nop
00446BEA - 90 - nop
00446BEB - 90 - nop
00446BEC - 90 - nop
00446BED - 90 - nop
00446BEE - 90 - nop
00446BEF - 90 - nop
00446BF0 - 90 - nop
00446BF1 - 90 - nop
00446BF2 - 90 - nop
00446BF3 - 90 - nop
00446BF4 - 90 - nop
00446BF5 - 90 - nop
00446BF6 - 8A 86 84000000 - mov al,[esi+00000084]
00446BFC - A8 10 - test al,10
00446BFE - 0F84 ED010000 - je 00446DF1
(For the record, unlike my first example where it is entirely optimal just to check AL instead of EAX,this coding does make sense on a technical level, since it processes faster than a multiply command would. The difference is, of course, miniscule and entirely inconsequential on modern hardware, but I just wanted to clarify that in case an actual programmer sees this post and wonders what I'm smoking)
As for the offset, remember that runtime will add 400000 bytes, so subtract that if you're working in a hex editor.
|
|
advipservices

 
Tavern Dweller
|
posted May 27, 2025 09:23 PM |
|
|
BTB said:
advipservices said:
BTB said: That's very strange since I don't think I would have edited anything that would affect that, but I checked and you are indeed correct.
I'll have to poke around and see what I can figure out.
Many Thanks. waiting for fix because the problem is breaking all gameplay
Okay, wow. Just snowing wow. I have no clue how long THAT snowbomb was in my code, but I found the problem. It was in the Bless/Curse code and it was accidentally overwriting the damage bonus with the difference in attack/defense. Just... Jesus Christ.
Good news ) Waiting for uploading fix, thanks for your work
|
|
BTB

 
   
Famous Hero
Moist & Creamy
|
posted May 27, 2025 09:25 PM |
|
|
Well, it's already uploaded.
|
|
Andarch1

 
Tavern Dweller
|
posted May 29, 2025 05:19 AM |
|
|
BTB said:
Andarch1 said: Oh perfect, the source code would be amazing whenever you’re able to get around to it! I was actually hoping you’d say that.
If there's anything in particular you're curious about, I can work on getting that out immediately. Otherwise, I need a bit of a break.
2.0 is now officially out, and the initial post has been edited to reflect that.
Oh awesome. I'll check it out this week.
Nothing in particular I was thinking of just yet regarding the source code, so no rush on that
|
|
BTB

 
   
Famous Hero
Moist & Creamy
|
posted June 02, 2025 05:39 PM |
|
Edited by BTB at 22:57, 05 Jun 2025.
|
Version 2.0d (June 02, 2025)
• Fixed a bug where AI heroes with the Dispel spell would invisibly cast it every turn of combat
• Elemental terrain now correctly allows casting of high-level spells without the requisite skill
• Paralyzed units are correctly no longer able to retaliate
• Blinded units now correctly deal 50% damage when retaliating instead of 25%
• Killer Breath no longer displays resistance notifications erroneously and/or when the target is dead
• Corrected the in-game description of the Quicksand spell to indicate its 2-turn duration
• Corrected the in-game description of the Dragonscale Armor to indicate the correct stat boost
• Improved the formatting of the in-game description of spell scrolls
• Bull's Eye - fixed poor random unit placement in player 2's starting zone
• Dragon Quest - corrected an oversight where Bonmalmo was able to build the upgraded lv.5 dwelling
----------------------------------------------------------------------
Version 2.0e (June 05, 2025)
• Swapped the levels of the Dead Man's Boots (now a Minor artifact) and Vampire's Cowl (now a Treasure)
• Fixed improper handling of magical terrain SP discounts accidentally introduced in previous update
• Fixed a bug where Fortress & Conflux heroes had an aggression penalty for neutral/unaffiliated units
• Troglodytes will no longer show resistance notifications for Blind or Petrify
• Clarified the in-game and Printme descriptions of the Gremlin Engineer ability
• War of the Magi - player 1's second town no longer has dwellings built by default
----------------------------------------------------------------------
Version 2.0f (June 05, 2025)
• Fixed a bug with the Toxic Cloud spell that would crash the game when cast at expert/master level
|
|
lichking

    
  
Honorable
Known Hero
|
posted June 05, 2025 06:35 PM |
|
Edited by lichking at 19:41, 06 Jun 2025.
|
I haven't visited this site in ages. I am surprised it is still active!
Makes me wanna play again.
Ves?? Deth? Zud? Jinxer? PAN! PAN!! PAN??!!?? Dracos??? BLADE???!!!???!
Anybody out there? Just nod if you can hear me.
Any snows left???? Ratty???
EDIT: I didn't type "snows". Seems Val disabled the word "B@stards"
____________
SOUND THE CHARGE!! INTO GLORY RIDE!!!
|
|
BTB

 
   
Famous Hero
Moist & Creamy
|
posted June 05, 2025 06:53 PM |
|
|
Given that I don't recognize a single one of those names, might I suggest a DeLorean?
|
|
lichking

    
  
Honorable
Known Hero
|
posted June 05, 2025 07:38 PM |
|
|
HELL YEAH
My timeshift spell iddint workin.
Nice to 'meet' ya. Great to see this forum still open after all these years.
____________
SOUND THE CHARGE!! INTO GLORY RIDE!!!
|
|
BTB

 
   
Famous Hero
Moist & Creamy
|
posted June 05, 2025 09:02 PM |
|
|
Nice to meetcha.
I showed up here maybe about 5-6 years ago asking questions about how to change stuff. And then I basically just learned how to program and now here I am. I try to pay it forward and help out folks looking to change stuff on their own.
|
|
lichking

    
  
Honorable
Known Hero
|
posted June 06, 2025 07:38 PM |
|
|
It's nice to meet you, also. I joined this message board when Val first brought it up but I haven't visited it for a very long time.
I don't like MOST people. In my experience, most people lie, deceive, cheat and use others. IMO, most people are nothing more than a disease this planet suffers from.
You seem to be unlike most people.
I'm all for paying it forward and I try to do so as often as I can.
I deeply respect that trait in others.
Well met.
____________
SOUND THE CHARGE!! INTO GLORY RIDE!!!
|
|
|