New system for code mods - D2Mod.dll

Discuss applications of D2Mod (v1.10), NefEx (v1.11+), and PlugY, and post suggestions for future plugins.

Moderators: Nefarius, Yohann, SVR

Post Reply

0
No votes
 
Total votes: 0

User avatar
SVR
Retired staff
Arch-Angel
Posts: 1449
Joined: Sat Nov 02, 2002 11:04 pm
Location: Texas
Contact:

Hand-picked

New system for code mods - D2Mod.dll

Post by SVR » Fri Apr 16, 2004 7:24 am

Here is a system I made so we don't have to edit the D2 dlls anymore.
This is just the start. A lot of features can be added to improve distribution of mods overall.

If you want to make plugins for the D2Mod system please PM me.
If you want to use the D2Mod System in your full mod, contact me for pointers and help with custom configurations.


*** Changes ***

[05/21/2004] - Version 1.02
  • *Custom Mpq Support - no need to mod patch_d2.mpq. Use your own MPQ!
    *PlugY initialization - just put PlugY = plugy.dll in your ini. Note - The plugy.ini must be in your mod folder (or where ever your shortcut runs)

    *Install concept changed. Plugins should go into your own Mod folder with your d2mod.ini. You can have as many mod folders as you want, each with different plugins and/or settings. If you don't mind the d2 folder being cluttered, everything will still work if put there.
Here's the main component...
D2Mod System Version 1.02

Once installed you will be able to run the available plugins and easily turn them off & on.

Available Plugins:
========================


D2ModStatFix.zip - Fixes the cap on Life, Mana & stamina. Also includes StatBar which allows you to display you own stats in the Stamina bar.

D2ModMercMod.zip - Updated Hireling mod. Now equips correct selected positions and allows additional weapon types via the ini file.

*** needs update CustDmRg by pmpch - allows changing of the limits that are used to calculate skill and missile damage

CustomTbl3 by AFJ666 - Add up to 3 extra string tables.

Extended Levels by AFJ666 - Allows you to add up to 1024 levels to your mod!

Books Of Lore by Myhrginoc - Add an awesome Tome messaging system to your mod!
(--- Requires CustomTbl3 ---)

Utility Kit - Allows you to change an extensive range of settings. Thanks to ChaosEnergy for his great list of changes!

LvlReq Fix by AFJ666 - Enables the LvlReq column to work properly for potions & such.

Portal Missles - Adds a new missile function to open portals and fixes the Red Portal no-name problem. Uses a different missile format than Kingpins tutorial so read the portal.txt.

Download LevelFX
Add a new text file to control special effect (snow,starfield,parralax) on any level.
Last edited by SVR on Thu Mar 19, 2009 9:36 pm, edited 14 times in total.

User avatar
XVampireX
Banned
Crusader
Posts: 78
Joined: Mon Mar 08, 2004 6:43 pm
Location: Castlevania

Re: New system for code mods - D2Mod.dll

Post by XVampireX » Fri Apr 16, 2004 7:35 am

Very good project! Keep on building more of these plugins!

Ill be checking.
"The only thing required for evil to triumph is for good men to do nothing" - Castlevania: Symphony of the Night

Martial Arts Master.

User avatar
Joel
Retired staff
Dominion
Posts: 6921
Joined: Mon May 27, 2002 7:19 am
Location: Orsay
Contact:

Hand-picked

Re: New system for code mods - D2Mod.dll

Post by Joel » Fri Apr 16, 2004 8:45 am

Hmm, is there a way to know HOW to plug our own function into that ?
like maybe porting all the big plug in like Message System or anything else to this. How does it handle overlapping code change ?
What does the DLL requires to export ?

basically, can we get a develloper's read me :p Cause well, i'll have an handsomem quantity plug in to add to these ^^
"How much suffering, mortal, does it take before you lose your grace?"
Shadow Empire (coming soon) | forum

User avatar
ChaosEnergy
Forum Regular
Angel
Posts: 676
Joined: Wed Dec 03, 2003 3:48 pm
Location: NRW
Contact:

Re: New system for code mods - D2Mod.dll

Post by ChaosEnergy » Fri Apr 16, 2004 9:00 am

HI

as I already stated a while before, how about an INI like in PlugY.dll
which will always keeped actual here at keep
So you have a readable, and eitable list
with offset+code+name and switch to activate/deactivate.

I think all of us shall be able to set a 0 or a 1 for activating a part in ini
preferable all switches are on top

[Hireling]
Activate=1
[SkillsperLvlUp]
Activate=0
....

[Hireling]
Offset: xxx
Code: yyy
Offset: xxxx
Code: yyyy
[SkillsperLvlUp]
...

At hits point I remember that I wanted to translate my implemantation list .)
@SVR I will send it later via PM
Chaos Empire Net
chaosenergy(a)chaosempire.net
Chaos Empire ® is a registered Trademark of Hans-Jürgen Ohler
Copyright by Hans-Jürgen Ohler (aka ChaosEnergy)2003 - 2015

User avatar
mouse
Retired staff
Angel
Posts: 519
Joined: Mon Aug 12, 2002 8:51 pm
Location: near Portland, OR, USA

Re: New system for code mods - D2Mod.dll

Post by mouse » Fri Apr 16, 2004 11:17 pm

great job svr! looks very, very promising - as soon as the required dll edits (titles, skillpoints,belt semi-fix, some others) are supported/plugin-ed i'd love to move my mod over to the new system - somewhat dependant on the following:

i'm not code savvy enough to know about the differences between realm and non-realm play, but it seems like this would only work for non-realm, and those of us with private realms would still need modded dll's for the realm server files? is this the case or is there another workaround?

ideally i'd at least put out a single player version that supports the system though, because it looks that useful!

User avatar
SVR
Retired staff
Arch-Angel
Posts: 1449
Joined: Sat Nov 02, 2002 11:04 pm
Location: Texas
Contact:

Hand-picked

Re: New system for code mods - D2Mod.dll

Post by SVR » Sat Apr 17, 2004 6:01 am

Joel";p="167921" wrote:Hmm, is there a way to know HOW to plug our own function into that ?
I'm Working on the D2ModSDK ;-)

Right now I need prototypes. I'll send you the SDK as it is. You can add the prototypes you need.
I'll start another thread on the SDK and leave this one for mods discussion.
mouse";p="167981" wrote:and those of us with private realms would still need modded dll's for the realm server files?
I don't know what dlls run on a private server. If someone woud let me know I will setup a server-side d2mod.dll to handle it.
ChaosEnergy";p="167925" wrote:How about an INI ...
So you have a readable, and eitable list with offset+code+name and switch to activate/deactivate.
D2Mod uses an ini. We could probably maintain it with the mods listed on this page.
But I won't put switches in. All you need is to put a ';' in front of ModX=mymod.dll to deactivate it.

D2Mod doesn't care about anything in the ini except for those Mod1,2,3 ... keys in the [D2Mod] section. The mod dlls are passed the ini name on init and are free to use it as needed as long as they use there own [section].

User avatar
ThresholdRPG
Junior Member
Paladin
Posts: 151
Joined: Mon Feb 03, 2003 9:33 am
Location: Washington, DC

Re: New system for code mods - D2Mod.dll

Post by ThresholdRPG » Sat Apr 17, 2004 8:05 am

SVR: This is absolutely great.

I have been slowly inching towards implementing some .dll changes to my mods but have been a tad hesitant. This will really help a lot.
-Aristotle @ Threshold RPG

Threshold RPG - Our World, Your Imagination

http://www.thresholdrpg.com

User avatar
mrelfire
Angel
Posts: 518
Joined: Mon May 27, 2002 9:27 am
Location: France

Post by mrelfire » Sat Apr 17, 2004 10:45 am

I have tryed, but it seems I miss something.
I launch your bat (and register your dll), put the 2 other plugins:
but nothing happens.
do I have to launch diablo.Exe with some parameters to use your dll ?

I have only the "Extended Levels" plugins from Afj666

P.S.
Your idea is great :D :D :D :D....... :D
Last edited by mrelfire on Sat Apr 17, 2004 4:15 pm, edited 2 times in total.

User avatar
Montreal
Posts: 73
Joined: Wed Dec 03, 2003 9:46 am

Post by Montreal » Sat Apr 17, 2004 4:13 pm

SVR, this plugin system is AMAZING dude!

With a SDK and more documentation... it's possible to reprogramming almost all aspects of D2...

With a advanced knowledge... it's possible to create new elements... or books of skill (D1 like)... :) just in a plug-and-play mode... :lol:

For example, I'm modify my dlls to enable runewords on any item.... 2 skills points p/ level, players 127 ... all of this "features" can be translate into plugins?

User avatar
SVR
Retired staff
Arch-Angel
Posts: 1449
Joined: Sat Nov 02, 2002 11:04 pm
Location: Texas
Contact:

Hand-picked

Post by SVR » Sat Apr 17, 2004 5:45 pm

mrelfire";p="168077" wrote:do I have to launch diablo.Exe with some parameters to use your dll ?
Nope. Did the bat Dialog popup and you click "ok" to install ?
The bat will install or uninstall if already installed, so running it twice will have no effect ;-)

Also check the ini file is in the Diablo II folder and has the dlls listed you want to run.

D2Mod may not function correctly with other mods but I don't think that is your problem. Extended levels doesn't use any of the same addresses.
Montreal";p="168150" wrote:all of this "features" can be translate into plugins?
Yep. You can add any code edits (that normally work). You can also do some things you can't do with normal CE. In particular, allow the dlls to relocate and have your code still work.

User avatar
mrelfire
Angel
Posts: 518
Joined: Mon May 27, 2002 9:27 am
Location: France

Post by mrelfire » Sat Apr 17, 2004 6:45 pm

I have rolled back the dll for testing,
and the plugins has worked perfectly.


Do you have in your boxes, the plugins "à votre sauce", to allow me to use this new way of life for diablo ?

thanks in advance
Last edited by mrelfire on Sat Apr 17, 2004 6:50 pm, edited 1 time in total.

User avatar
SVR
Retired staff
Arch-Angel
Posts: 1449
Joined: Sat Nov 02, 2002 11:04 pm
Location: Texas
Contact:

Hand-picked

Post by SVR » Sat Apr 17, 2004 7:11 pm

mrelfire";p="168195" wrote:I have rolled back the dll for testing,
and the plugins has worked perfectly.
I assume you mean to the original d2 dlls. Great ;-)
Do you have in your boxes, the plugins "à votre sauce", to allow me to use this new way of life for diablo ?
Uh, I don't know what you mean ;-)
But I will be releasing the SDK soon so anyone with VC6 can make mod dlls easily.

User avatar
pmpch
Forum Legend
Arch-Angel
Posts: 1171
Joined: Thu Dec 19, 2002 12:21 am
Location: Switzerland
Contact:

Post by pmpch » Sat Apr 17, 2004 8:39 pm

SVR";p="168201" wrote:But I will be releasing the SDK soon so anyone with VC6 can make mod dlls easily.
Excellent SVR.
I assume several changes can be combined into one dll, instead of using several. Right?
Bedevere: Well, now, uh, Launcelot, Galahad, and I, uh, wait until nightfall, and then leap out of the RABBIT, taking the French, uh, by surprise. Not only by surprise, but totally unarmed!
King Arthur: Who leaps out?

User avatar
SVR
Retired staff
Arch-Angel
Posts: 1449
Joined: Sat Nov 02, 2002 11:04 pm
Location: Texas
Contact:

Hand-picked

Re: New system for code mods - D2Mod.dll

Post by SVR » Sat Apr 17, 2004 8:50 pm

Yepper ;-)

For multi-paks like that, one should add switches into its ini section for each part allowed to be switch on/off.

I think I'll try Chaos's mod next and play with that idea.
Last edited by SVR on Sat Apr 17, 2004 8:56 pm, edited 1 time in total.

User avatar
Joel
Retired staff
Dominion
Posts: 6921
Joined: Mon May 27, 2002 7:19 am
Location: Orsay
Contact:

Hand-picked

Post by Joel » Sat Apr 17, 2004 8:53 pm

can it be possible to get a Borland C++ Free compiler version, VC6 is quite expensive. Use _msfastcall instead of fastcall to make BCC output VC6 comaptible code
"How much suffering, mortal, does it take before you lose your grace?"
Shadow Empire (coming soon) | forum

User avatar
SVR
Retired staff
Arch-Angel
Posts: 1449
Joined: Sat Nov 02, 2002 11:04 pm
Location: Texas
Contact:

Hand-picked

Post by SVR » Sat Apr 17, 2004 9:07 pm

Don't know Joel. I don't have BC++ so I can't test it. __stdcall also mangles the name and I don't know if BC++ is the same.

Try to fix the headers to _msfastcall and see what happens.

User avatar
Montreal
Posts: 73
Joined: Wed Dec 03, 2003 9:46 am

Post by Montreal » Sat Apr 17, 2004 11:30 pm

Hum... I'm a Delphi programmer... I will translate the headers... :cool: as soon is released...

User avatar
Joel
Retired staff
Dominion
Posts: 6921
Joined: Mon May 27, 2002 7:19 am
Location: Orsay
Contact:

Hand-picked

Post by Joel » Sun Apr 18, 2004 7:15 am

SVR";p="168231" wrote:Don't know Joel. I don't have BC++ so I can't test it. __stdcall also mangles the name and I don't know if BC++ is the same.

Try to fix the headers to _msfastcall and see what happens.
I told you that frome xperience :)

__stdcall is same between BCC and VC6.
fastcall on borland swap the value in ecx and edx. We have to use _msfastcall insetad ^^

basically a small :

Code: Select all

#ifdef MSVC
#define FASTCALL fastcall
#else
#define FASTCALL _msfastcall
#endif
and everything is right :)
"How much suffering, mortal, does it take before you lose your grace?"
Shadow Empire (coming soon) | forum

User avatar
mrelfire
Angel
Posts: 518
Joined: Mon May 27, 2002 9:27 am
Location: France

Post by mrelfire » Sun Apr 18, 2004 7:50 am

I would like to confirm my precedent post:
- I have revert to the original dll and it is working fine
- it seems an incompatibility between "Extended Levels" plugins from Afj666 and your plugin

and a small question : do you plan to convert this plugin from Afj666 to your new type of plugins (is it automated ?)

User avatar
SVR
Retired staff
Arch-Angel
Posts: 1449
Joined: Sat Nov 02, 2002 11:04 pm
Location: Texas
Contact:

Hand-picked

Post by SVR » Sun Apr 18, 2004 2:59 pm

basically a small : ...
Done. What about name mangling & import libs ? If I remember correctly BCC won't link lib's built with VC6.

do you plan to convert this plugin from Afj666
If afj allows ;-)

User avatar
DarthDevilous
Posts: 96
Joined: Fri Feb 20, 2004 7:15 pm
Location: Switzerland
Contact:

Post by DarthDevilous » Mon Apr 19, 2004 12:41 pm

Right now it only supports dll mods but I am adding support for "text" mods that let you write a txt file with your code edits and D2Mod.dll will apply them.
What about other files types? I'm writing a dt1 loading class in C++, maybe it could be used to make a dt1 modding plugin. Work on that SDK!
Regret Nothing - Learn Everything
ds1edit Loader - News & Feedback thread | Get Firefox!

User avatar
DeClineD
Retired staff
Angel
Posts: 883
Joined: Mon Dec 01, 2003 11:09 pm
Location: Denmark

Re: New system for code mods - D2Mod.dll

Post by DeClineD » Mon Apr 19, 2004 1:30 pm

Is there anyway to combine this with PlugY???
Can i just add this dll to the plugY.ini?
That would be cool... :cool:
Terms of Service
Beginner's guide v1.4 (Word|PDF)
Avatar by Go][um

User avatar
SVR
Retired staff
Arch-Angel
Posts: 1449
Joined: Sat Nov 02, 2002 11:04 pm
Location: Texas
Contact:

Hand-picked

Post by SVR » Tue Apr 20, 2004 4:32 am

What about other files types
What I mean by "text" mods is a text file with the code edits listed in it. This dll doesn't effect the files you mod "normally".
Is there anyway to combine this with PlugY???
You *cannot* put this in plugy's INI.
They should both work together though. I haven't tried it.

User avatar
lord_james
Junior Member
Paladin
Posts: 141
Joined: Sat Mar 06, 2004 10:35 pm
Location: Maine
Contact:

Post by lord_james » Tue Apr 20, 2004 4:37 am

SVR";p="168766" wrote: They should both work together though. I haven't tried it.
I would like to confirm that PlugY and D2mod work together just fine WITHOUT adding D2mod to the plugY ini.

Edit: Quoted less from SVR and rewrote from scratch to clarify point.
Last edited by lord_james on Tue Apr 20, 2004 4:49 pm, edited 1 time in total.
I have nothing to say down here.

User avatar
Alkalund
Retired Admin
Throne
Posts: 7597
Joined: Sun May 26, 2002 5:54 pm
Location: Toronto, Ontario, Canada
Contact:

Hand-picked

Post by Alkalund » Tue Apr 20, 2004 5:19 am

Fantastic idea!!! I only hope a BCC SDK version is possible :)

Post Reply

Return to “PlugY|NefEx|D2Mod”