I was looking for the code to remove the experience penalties for killing monsters that are based on character and monster level following the information here viewtopic.php?t=16356
I found the following code (File Offset 17E2F0)
(Here's a side by side comparison, you can skip all the code blocks here if you want
https://www.diffchecker.com/vKCkOp5y )
[code]
Executable modules, item 1
Base = 00400000 (main)
Name = Game
File version = 1.14.3.71
Path = Game.exe
CPU Disasm
Address Hex dump Command Comments
0057E2F0 /$ 56 PUSH ESI
0057E2F1 |. 8BF0 MOV ESI,EAX
0057E2F3 |. 3BF2 CMP ESI,EDX ; ESI= mlvl, EDX= clvl
0057E2F5 7F 27 JG SHORT 0057E31E ; Jump if mlvl > clvl
0057E2F7 |. 2BD6 SUB EDX,ESI
0057E2F9 |. 83FA 0B CMP EDX,0B
0057E2FC |. 7C 05 JL SHORT 0057E303
0057E2FE |. BA 0A000000 MOV EDX,0A
0057E303 8B1495 68166E00 MOV EDX,DWORD PTR DS:[EDX*4+6E1668]
0057E30A 81FA 00010000 CMP EDX,100 ; Compare XP rate read from table to 100 (dec 256)
0057E310 |. /74 32 JE SHORT 0057E344 ; If equal, jump out of here, apply no penalty
0057E312 |. 68 00010000 PUSH 100 ; Arg1 = 100
0057E317 |. E8 4450F0FF CALL 00483360
0057E31C |. 5E POP ESI
0057E31D |. C3 RETN
0057E31E 83FA 19 CMP EDX,19 ; LVL 25 check
0057E321 7C 0C JL SHORT 0057E32F
0057E323 |. 85F6 TEST ESI,ESI
0057E325 |. 7E 08 JLE SHORT 0057E32F
0057E327 |. 56 PUSH ESI ; /Arg1 => ARG.EAX
0057E328 |. E8 3350F0FF CALL 00483360 ; \Game.00483360
0057E32D |. 5E POP ESI
0057E32E |. C3 RETN
0057E32F |> 2BF2 SUB ESI,EDX
0057E331 |. 83FE 0B CMP ESI,0B
0057E334 |. 7C 05 JL SHORT 0057E33B
0057E336 |. BE 0A000000 MOV ESI,0A
0057E33B 8B14B5 94166E00 MOV EDX,DWORD PTR DS:[ESI*4+6E1694]
0057E342 |.^ EB C6 JMP SHORT 0057E30A
0057E344 |> 8BC1 MOV EAX,ECX
0057E346 |. 5E POP ESI
0057E347 \. C3 RETN
[/code]
I'm thinking to change this I would just change two of these jumps to ignore the penalty code like this
[code]
Address Hex dump Command Comments
0057E2F5 7F 27 JG SHORT 0057E31E ; Jump if mlvl > clvl
->
0057E2F5 90 NOP ; Never jump, ignore levels
0057E2F6 90 NOP
Address Hex dump Command Comments
0057E310 |. /74 32 JE SHORT 0057E344 ; If equal, jump out of here, apply no penalty
->
0057E310 EB 32 JMP SHORT 0057E344 ; ALWAYS jump out of here, apply no penalty
[/code]
Which would make the full code as follows in runtime
[code]
CPU Disasm
Address Hex dump Command Comments
0057E2F0 /$ 56 PUSH ESI
0057E2F1 |. 8BF0 MOV ESI,EAX
0057E2F3 |. 3BF2 CMP ESI,EDX ; ESI= mlvl, EDX= clvl
0057E2F5 90 NOP ; Never jump, ignore levels
0057E2F6 90 NOP
0057E2F7 |. 2BD6 SUB EDX,ESI
0057E2F9 |. 83FA 0B CMP EDX,0B
0057E2FC |. 7C 05 JL SHORT 0057E303
0057E2FE |. BA 0A000000 MOV EDX,0A
0057E303 8B1495 68166E00 MOV EDX,DWORD PTR DS:[EDX*4+6E1668]
0057E30A 81FA 00010000 CMP EDX,100 ; Compare XP rate read from table to 100 (dec 256)
0057E310 EB 32 JMP SHORT 0057E344 ; ALWAYS jump out of here, apply no penalty
0057E312 |. 68 00010000 PUSH 100 ; Arg1 = 100
0057E317 |. E8 4450F0FF CALL 00483360
0057E31C |. 5E POP ESI
0057E31D |. C3 RETN
0057E31E 83FA 19 CMP EDX,19 ; LVL 25 check
0057E321 7C 0C JL SHORT 0057E32F
0057E323 |. 85F6 TEST ESI,ESI
0057E325 |. 7E 08 JLE SHORT 0057E32F
0057E327 |. 56 PUSH ESI ; /Arg1 => ARG.EAX
0057E328 |. E8 3350F0FF CALL 00483360 ; \Game.00483360
0057E32D |. 5E POP ESI
0057E32E |. C3 RETN
0057E32F |> 2BF2 SUB ESI,EDX
0057E331 |. 83FE 0B CMP ESI,0B
0057E334 |. 7C 05 JL SHORT 0057E33B
0057E336 |. BE 0A000000 MOV ESI,0A
0057E33B 8B14B5 94166E00 MOV EDX,DWORD PTR DS:[ESI*4+6E1694]
0057E342 |.^ EB C6 JMP SHORT 0057E30A
0057E344 |> 8BC1 MOV EAX,ECX
0057E346 |. 5E POP ESI
0057E347 \. C3 RETN
[/code]
Here's a side by side comparison
https://www.diffchecker.com/vKCkOp5y
And that seems to work, I would just like to make sure I'm not missing something that could end up breaking with this approach. Anyone see any possible problems by proceeding so?
1.14d Remove Experience Penalties
This forum is for discussions on how to edit what can not be edited through the txt files, needless to say this isn't about battle net hacking.
Moderators: Nefarius, Havvoric
Wissle
- devurandom
- Angel
- Posts: 897
- Joined: Sat Mar 07, 2015 9:07 pm
Re: 1.14d Remove Experience Penalties
Post by devurandom » Thu Jul 20, 2017 10:20 pm
should be ok.
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin
Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..
Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..
devurandom
Jump to
- The Phrozen Keep Forums
- ↳ Staff Announcements
- ↳ Keep Updates
- ↳ File Center Announcements
- ↳ Keep Polls
- ↳ Members area
- ↳ Member news
- ↳ Job Offerings
- ↳ Multi-Player Matchups
- ↳ Member Аnnouncements
- ↳ Feedback
- ↳ Site support
- ↳ Mod Spotlight & Quick links
- ↳ Keep Discord
- Diablo Universe
- ↳ Diablo II Legacy Modding and Discussion
- ↳ General Mod Making
- ↳ Tools
- ↳ Multimedia
- ↳ Map Editing
- ↳ Code Editing
- ↳ PlugY|NefEx|D2Mod
- ↳ Skill Clinic
- ↳ Mod Concepts & Research
- ↳ Mac Modding
- ↳ Diablo II Chatter
- ↳ Diablo II Resurrected Discussion
- ↳ Other Diablo Games
- Diablo II Legacy Mods
- ↳ Apokaliptic
- ↳ Plugins by Nizari
- ↳ Back to Hellfire
- ↳ Battle for Elements
- ↳ Black Omen Productions
- ↳ Mods by Nefarius
- ↳ Shadow Empires
- ↳ Blackened
- ↳ Diabolic Studios
- ↳ Diabolic Studios Site
- ↳ The Hordes of Chaos
- ↳ Dark Alliance
- ↳ Eastern Sun
- ↳ Eastern Sun Rises
- ↳ Escape From The Afterlife
- ↳ Le Royaume des Ombres
- ↳ Mods by Lady Isabelle
- ↳ Talonrage's Requiem of Sorrow
- ↳ Zy-El: Trial by Fire
- ↳ The Sandbox
- ↳ Unsupported Mods
- ↳ Nezeramontias
- ↳ Ancestral Recall
- ↳ Kingdom of Tenai
- ↳ Mods by GuyAskingQuestion
- ↳ The Fury Within: Ancients & Awakening
- ↳ Darkness Weaves
- ↳ V&K Mods
- ↳ New Dawn & North Star
- ↳ Baldur's Gate Mod
- ↳ Sir_Generals Rune Mod
- ↳ Dragons' Uprising
- ↳ Seasons After
- ↳ CryptForge
- ↳ d2:elements
- ↳ Underkill
- ↳ Pagan Heart
- ↳ Hades Mods
- ↳ Apocalypse
- ↳ Cubaholics
- ↳ Hades Underworld
- ↳ Sanctum Arcanum
- ↳ Arcanum Archives
- ↳ Rise of the Old Gods
- ↳ Elder Scrolls Mod
- ↳ Legacy of the Horadrim
- Diablo I Discussion
- ↳ Diablo I Chatter
- ↳ Diablo I Modding
- ↳ Devilution
- ↳ Infernity
- ↳ Belzebub
- ↳ Tchernobog
- ↳ EQUINE
- ↳ Crucible
- ↳ D1Legit
- Other Games
- ↳ It Lurks Below
- Miscellaneous
- ↳ Off-Topic
- ↳ Testing
- Currently Unavailable
- ↳ Upcoming Forums
- ↳ Limbo
- ↳ Seven Lances
- ↳ Wheel of Time
- ↳ Tactics Central
- ↳ Mod Reviews
- ↳ DoomsDay
- ↳ Time of Heroes
- ↳ Bloodwars, Inc.
- ↳ Darque Onyx Mods
- ↳ Cabal Wars - Aeons Tide
- ↳ Deathfile's Sanctuary
- ↳ A Pledge To Evil
- ↳ When Worlds Collide II
- ↳ Prophecy of Shadows
- ↳ Valhalla
- ↳ Darque Onyx Site
- ↳ Visions of Valor
- ↳ Cheater's Choice Series
- ↳ Dark Sabbath
- ↳ Corrupted Death
- ↳ Belize's Revenge
- ↳ Brother Laz
- ↳ Chaos Empire
- ↳ Odin's Runeword Mod
- ↳ Stormbringer
- ↳ The Dark Omen
- ↳ Mods By Laz
- ↳ The Stairway to Oblivion
-
- Login
-
- Who is online
- In total there are 56 users online :: 0 registered, 0 hidden and 56 guests
Most users ever online was 1797 on Tue Nov 25, 2008 1:27 pm
Users browsing this forum: No registered users and 56 guests
Recent Forum Topics
-
- Menu
-
- Community
-
- Modding Resources