I am now using VC++ 6 and I have finally been able to compile a dll, but it does not work in D3.
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.
Compiling a working .dll (for mod use)
- sushi.h.a.
- DBB Ace
- Posts: 65
- Joined: Tue Oct 18, 2005 2:51 pm
- Contact:
Re: Compiling a working .dll (for mod use)
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.
\"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.
- sushi.h.a.
- DBB Ace
- Posts: 65
- Joined: Tue Oct 18, 2005 2:51 pm
- Contact:
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.
Here is the source to King of the Hill 1.5, which might help you out.
- sushi.h.a.
- DBB Ace
- Posts: 65
- Joined: Tue Oct 18, 2005 2:51 pm
- Contact:
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.
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)
just in case i missed anything:
i got the same, and fixed it by providing the "anarchy.str" inside the anarchy.d3m file.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”.