Page 1 of 1

Compiling a working .dll (for mod use)

Posted: Mon Jan 30, 2006 1:47 pm
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. :)

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

Posted: Sun Mar 12, 2006 7:51 pm
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.

Posted: Wed Aug 30, 2006 1:33 am
by sushi.h.a.
Thanks.
Sorry about the delayed reply. My main computer is presently nonfunctional.
Thanks for the suggestion.

Posted: Wed Aug 30, 2006 8:49 am
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.

Posted: Thu Aug 31, 2006 2:10 pm
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.

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

Posted: Sun Mar 11, 2007 6:37 pm
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.