Compiling a working .dll (for mod use)

For Descent, Descent II and Descent3 level editing and modification assistance.
Post Reply
User avatar
sushi.h.a.
DBB Ace
DBB Ace
Posts: 65
Joined: Tue Oct 18, 2005 2:51 pm
Contact:

Compiling a working .dll (for mod use)

Post by sushi.h.a. »

I am now using VC++ 6 and I have finally been able to compile a dll, but it does not work in D3. :shock:
For example, I compiled Anarchy without changing anything and the dll was 233KB where as the actual Anarchy.dll from descent 3 is 125KB. To test my dll I opened the Anarchy.d3m and replaced the original Anarchy.dll with my Anarchy.dll and saved it. When I tried to run an Anarchy game in D3 I got the error “ERROR INITIALIZING GAME MODULE”. If you know how to work around that please let me know

If anyone knows how to make a dll based mod from start to finish please let me know.
If anyone knows of any working D3mod source code that you could direct me to, I could at least try compiling that to see if I can get anything to work.

Thanks everyone. :)
alexi
DBB Cadet
DBB Cadet
Posts: 5
Joined: Sun Mar 12, 2006 4:58 pm
Location: Lithuania, Vilnius
Contact:

Re: Compiling a working .dll (for mod use)

Post by alexi »

You didn't show your email.

\"anarchy.dll\" compiles easy (with MSVC 6).
But, I got \"ERROR INITIALIZING GAME MODULE\" too.
And was stusk on it like you.
Actually, D3SDK readme.txt descripts solution of this problem, but unclearly.
I was tried to run \"Co-op.d3m\", which was HOG2 package, with \"co-op.dll\" and \"coop.str\" inside, but unsuccessfully.
Probably because of bugs in HOG2 packer.

So that's what I found :
Whatever it be - \"coop.str\" (or \"anarchy.str\", in your case) needed mandatory !
Next : I was used just renaming of \"co-op.dll\" to \"Co-op.d3m\".
\"coop.str\" (if not packed in .d3m HOG2 package) can not be found in \".\\netgames\" directory by Descent 3 core (engine).
So I placed it into game root directory.

Then it works almost ok.
All can join my (maked from \"anarchy.dll\" source) co-op server.
But I can't join others co-op servers, even if they have the same \"Co-op.d3m\" (renamed \"co-op.dll\") and \"coop.str\".
And I can't run original \"Co-op.d3m\", in case if modified \"coop.str\" is accessible for Descent 3 core.

My explanations may have errors, but I hope it doesn't.
Happy coding.
User avatar
sushi.h.a.
DBB Ace
DBB Ace
Posts: 65
Joined: Tue Oct 18, 2005 2:51 pm
Contact:

Post by sushi.h.a. »

Thanks.
Sorry about the delayed reply. My main computer is presently nonfunctional.
Thanks for the suggestion.
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

Yeah, make sure that any files your mod loads from DLLGameInit are present in your .d3m.

Here is the source to King of the Hill 1.5, which might help you out.
User avatar
sushi.h.a.
DBB Ace
DBB Ace
Posts: 65
Joined: Tue Oct 18, 2005 2:51 pm
Contact:

Post by sushi.h.a. »

Thanks!
I thoroughly appreciate the help. I have been trying for about 2 years to simply get make the Anarchy source load a custom table file. With luck the one or two lines of code I’ve been looking for will be in “King of the Hill”.
If you have any more advice or information I would greatly appreciate it.
Thanks again.
Take care.
User avatar
Floyd
DBB Captain
DBB Captain
Posts: 561
Joined: Sat Apr 26, 2003 2:01 am
Location: Germany
Contact:

Re: Compiling a working .dll (for mod use)

Post by Floyd »

just in case i missed anything:
sushi.h.a. wrote:To test my dll I opened the Anarchy.d3m and replaced the original Anarchy.dll with my Anarchy.dll and saved it. When I tried to run an Anarchy game in D3 I got the error “ERROR INITIALIZING GAME MODULE”.
i got the same, and fixed it by providing the "anarchy.str" inside the anarchy.d3m file.
Post Reply