forums | blogs | polls | tutorials | downloads | rules | help

Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in remember_me_form_alter() (line 78 of /var/www/siegetheday.org/sites/all/modules/contrib/remember_me/remember_me.module).

DLL and DS2

HardLess's picture

I was looking around Dungeon Siege 1 modding, when I remembered that some mods in DS1 where using DLL in order to add new functions into the game or modify some part hard-coded in the executable. So I have made some research on Dungeon Siege 2...

I have found an old post on DLL in DS2. The post was pretty discouraging, because it seems that DLL can only be use with the Dungeon Siege 2 Mod. So I have carry on my research and I find the Siege University 1 and the last topic is about importing new dlls with new functions into DS1. And reading some posts on the GPG forums, I have learn that the basics given in the Siege University 1 can be use in DS2.

So this is pretty cool BUT the problem is still that the Dungeon Siege 2 Mod is the only executable that can handle dlls importation.

Then I was wondering if a DLL-injector can do the trick :), but it seems that it doesn't or I'm not really good at this. And thinking about DLL-injector, I remembered the Succubus manager and the All-Saves made by Elys.

I know that the Succubus Manager has a resource in order to modify and add some new stuff. BUT what I'm interested in is some option of the Succubus Manager and also the All-Saves. How does Elys manage to get rid of the save bug/protection and how does the Far-hack works. Does Elys is using some kind of DLL-injection or it's pretty simple stuff.

If anyone has an answer that could be really great. There could be so much possibilities with dlls.

Thanks in advance,

HardLess.

Her web site is still operational http://karamail.nerim.net/elys/forums/viewtopic.php?t=421 and she also can be found sometimes on IRC on channel #herena_forge. She is no longer modding Dungeon Siege however she might help if you are very polite and ask nice.

Elf

HardLess's picture

Thanks bare_elf,

I'll try to talk to her, and I would be as polite as my bad english allows me :).

HardLess.

HardLess wrote:
Thanks bare_elf,

I'll try to talk to her, and I would be as polite as my bad english allows me :).

HardLess.

HardLess, Elys speaks French and maybe some other languages too. Elys lives in France
Elf

HardLess's picture

Oh,

That's cool :), I won't look like an idiot.

Thanks again, this will help me a lot.

HardLess.

HardLess wrote:
Oh,

That's cool :), I won't look like an idiot.

Thanks again, this will help me a lot.

HardLess.

Elys don't like Babos though so be careful lol, just kidding, she hasn't been on irc in long time so will need to try her website, but even then dll's are like programming, so would have to have a compiler to make em, so if you don't have compiler or programming experience may not be able to make em, probally waste her time.

HardLess
Here is a link to a tutorial on dlls
http://www.tutorialspoint.com/dll/index.htm
You might wish to read it.

Elf

HardLess's picture

My goal is to learn, I don't really care how much time it could take me it's my field of study.
I have some basics in C++, the problem isn't the language but it's the way it could interact with the game.

Thanks bare_elf, but I have find a tutorial in french :P.

HardLess.

HardLess wrote:
My goal is to learn, I don't really care how much time it could take me it's my field of study.
I have some basics in C++, the problem isn't the language but it's the way it could interact with the game.

Thanks bare_elf, but I have find a tutorial in french :P.

HardLess.


* Although I do not read or speak French this web site might be what you want.
http://www.lecbna.org/pages/tuto/Dll/

Elf

As you say, the retail DS2 exe does not have the DSDLL loading functionality of DS1. It's only supported by DS2MOD.

Basically DSDLL are DLL with exported functions using microsoft debug naming scheme. When DS1 or DS2Mod starts, it loads any *.DSDLL presents in the current folder and then read the Export Table to add the functions to the game engine. How it works is detailed in the various tutorial released by GPG at the time.

The DS2 Succubus mod does not use DSDLL functionality, and does not add any engine functionality to the game. It just hook some part of the executable to replace it with its own modified code, and since the modified code is bigger than the initial code, an easy way to do this is just to add the replacement code in a DLL, inject the DLL in the running game (there is many ways to do that) and reroute the executable with a Call or Jumps to your own code at the various places you need to do modifications.

HardLess's picture

Hi Elys,

I thank you a lot for your answer and I will try to understand and learn from this. I have made some research around mid function hooking in C++, and it seems that I have to learn about assembly and dll injection.

Thank you again I will try to make a good use of your information,

HardLess.

EDIT: I know that with mid function hooking it's possible to modify a function, but could it be possible to add a new function ? Thanks in advance.

If you mean you want to add a new function available from SKRIT, you will have to reverse-engineer the part of dungeon siege.exe that manage the table of all existing native SKRIT functions and then code a way to inject your own function in it.

HardLess's picture

I have a lot to learn in order to make my first test, I don't really know if I'll be able to do what I want but at least I'll try.

Thanks again Elys it's really cool to have some help from you, I hope I'll come back with something one day.

See you,

HardLess.