[1.14+] Code Edit Viability

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

Post Reply
MRCelSynap
Posts: 20
Joined: Thu Mar 23, 2017 4:52 pm
Contact:
Canada

[1.14+] Code Edit Viability

Post by MRCelSynap » Sat Jun 09, 2018 8:31 am

I played around with the code edits back when 1.14 came out just to get a feel for it, with the removal of the DLL's and refactoring really removing a lot of blankspace on the EXE, I was wondering how viable it is to release a mod in 1.14 that involves code edits in the long run.

Partially for open discussion, mostly looking for pros/cons to working with the most recent version, as well as expansion options (such as the dll injects that made d2mod.dll possible back in the day).

Any input on this would be appreciated!
Check me out on Twitch as I will be periodically streaming my modding progress

User avatar
devurandom
Forum Regular
Angel
Posts: 652
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Re: [1.14+] Code Edit Viability

Post by devurandom » Sat Jun 09, 2018 9:05 am

comes down to a persons ability to port code from previous version to 1.14, and how much time you want to spend doing this. Assembly in 1.14 looks a lot different from previous version due to compiler optimization & monolithic exe.


FearedBliss already posted a nice collection of basic code edits for 1.14 on the keep.
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin

The most dangerous man to any government is the man who is able to think things out... without regard to the prevailing superstitions and taboos. Almost inevitably he comes to the conclusion that the government he lives under is dishonest, insane, & intolerable." ~ H.L. Mencken

User avatar
Necrolis
Site Admin
Throne
Posts: 8939
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: [1.14+] Code Edit Viability

Post by Necrolis » Sat Jun 09, 2018 1:58 pm

Lack of space isn't an issue, this can be easily gotten around via a PE edit and tons of padding being added to the code section. Injecting a dll is also another option, now you just hijack the EP, LoadLibrary and get back to the EP.

In many ways 1.14+ is simpler, the only issue is dealing with compiler optimizations. 1.14x also fixes the compat issues, so there are less issues to worry about there too. As with previous versions, as devurandom mentions, just about your patience to port code. The only other downside is you cant do full dll replacement, like the graphics driver for instance.
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

FearedBliss
Posts: 75
Joined: Sat Oct 16, 2010 4:29 pm

Re: [1.14+] Code Edit Viability

Post by FearedBliss » Mon Jun 11, 2018 1:19 pm

devurandom and Necrolis are right.

All of my mods are for 1.14 since I always follow Blizzard's latest version for me to rebase my mods on (Only two, Singling and Succulent). 1.14 has been a joy to work with for sure, in the beginning it was a bit frustrating simply because it's no longer modular, but I actually prefer it this way since my code edits are a bit easier to maintain. When I use X32DBG, I like to use the export patch feature in order to get a single file with the offset changes, this of course works the same for pre 1.14 versions as well, but the nice thing about having everything in Game.exe is that once D2 starts up, I can load my patches immediately. Before, I would need to start a Single Player game first so that the remaining Dlls are loaded (Ex: D2Game, etc). If I didn't do this before I loaded the patch, then the patch wouldn't load completely.

But yea, Don't feel scared to use 1.14 as the base from your mod, it's great. Most of the code still looks the same though so porting some stuff (depending on complexity) is actually pretty easy, there might be some minor things that look different but usually it looks 60-95% the same. Patterns are your friend.

MRCelSynap
Posts: 20
Joined: Thu Mar 23, 2017 4:52 pm
Contact:
Canada

Re: [1.14+] Code Edit Viability

Post by MRCelSynap » Fri Jun 15, 2018 9:10 am

This thread was amazingly useful for feedback, thank you everyone who responded :D

As stated I have tinkered before, obviously much less support is available in the way of plugins but that doesn't bother me, I like the added challenge, will certainly look to open up options! ^_^
Check me out on Twitch as I will be periodically streaming my modding progress

Post Reply

Return to “Code Editing”