Sword of Moonlight Forum

Sword Of Moonlight Games => Complete Games => Diadem of Maunstraut => Topic started by: Vicious on November 03, 2009, 11:51:17 am

Title: Quick question
Post by: Vicious on November 03, 2009, 11:51:17 am
Heyo just started up DoM for the first time and I have a query.
Is there anyway to disable the ingame gamepad?
I prefer to map my controllers using an external program (Xpadder) and the in game config is interfering.
I can't set up my controller properly in game anyway (it only supports 8 of my 12 buttons and no analog mapping).

Also, what are the chances of the memory leak issue actually affecting me?
Is it even a problem on modern systems, because the game is kind of old now correct?
Title: Re: Quick question
Post by: Holy_Diver on November 03, 2009, 02:09:09 pm
As it happens I just programmed something to do just that. It has an option to hide controllers from SOM, but also you could replace your "xpadder" with it and remap your keyboard if you wanted to.

http://anon.swordofmoonlight.com/holy/SomEx_0.1_vanilla.zip

It's kind of an entire extension system, so you will need to make some changes here and there. I should probably include a README file in the next "release", I will try to write something up soon.

Quick instructions I think are to copy all of the files in the archive into the folder with the game's exe file.

Since you just want to work with controllers. You can probably get away with renaming SomEx.dll to dinput.dll. Alternatively you can open up the exe in a hexeditor and replace DINPUT.dll with SomEx.dll (or if renaming doesn't work for some reason)

Then you need to edit SOM_EX.INI. You can either change [.Joypad] to [Joypad] if you want to use this instead of "Xpadder" or you can just add the following above [.Joypad]

Code: [Select]
[Joypad]
do_hide_controllers_from_som = yes

If all you want is for the game to not see your controllers. Xpadder is probably a bit more sophisticated than extension at this point, however sooner or later the extension will be able to recognize what context the game is in, so you can change the button mapping if you are in the menu or in a text dialog. Also once the menu extension is in place you will be able to easily configure this stuff from in the game, but not nearly to the degree the ini file permits.

PS: I don't know that anyone has tested this. So if it crashes it's probably wanting a dll not in the archive, hopefully it will tell which. Anyway, let us know if you have any trouble or not.
Title: Re: Quick question
Post by: Holy_Diver on November 03, 2009, 02:12:54 pm
Also, what are the chances of the memory leak issue actually affecting me?
Is it even a problem on modern systems, because the game is kind of old now correct?

A memory leak is not like a virus or anything. It might cause your system to appear low in the physical memory dept under extreme circumstances as long the offending process is running. However even while it is running virtual memory paging would probably not be noticeable unless you're already strapped for physical memory.
Title: Re: Quick question
Post by: Vicious on November 03, 2009, 02:44:02 pm
Hrmm, when I rename SomEx.dll to DINPUT.dll DoM fails to initialize.
Is that what you meant when you said if it doesn't work for some reason I should Hex it in?

As for now I just want to hide the controller and configure it with xpadder instead of trying to set it up with this extension.

Also off topic question, what game is that mecha avatar of yours from? Looks almost like AC.
Title: Re: Quick question
Post by: Holy_Diver on November 03, 2009, 04:23:28 pm
Hrmm, when I rename SomEx.dll to DINPUT.dll DoM fails to initialize.
Is that what you meant when you said if it doesn't work for some reason I should Hex it in?

As for now I just want to hide the controller and configure it with xpadder instead of trying to set it up with this extension.

If it it "failed to initialize", then it is probably working. There is probably just some dll dependency I have in my system folder which I'm unaware of. It's probably you don't have a debugging mode wincrt library on your system.

Don't worry, I expected this to happen (clearly)

Quote
Also off topic question, what game is that mecha avatar of yours from? Looks almost like AC.

That I stole from this page here (http://www5f.biglobe.ne.jp/~yasuwo/R-SPE1a.htm)

It is an AC circa AC3 showing off its ever loving Moonlight :cool:

It's not from a CG movie, dunno the circumstances around it :smokin:


PS: In the meantime, you might try editing the game's .ini file and setting the controller to use variable to some other controller number. It's very possible SOM won't default to the first/only one.
Title: Re: Quick question
Post by: Vicious on November 03, 2009, 04:33:00 pm
Unfortunately it indeed does default to it even when I change the setting, maybe if I plugged in a secondary controller and hope it chooses it instead, but that'd still require me to plug it in anytime I want to play...
However.. now that I think about it if this game doesn't support xinput(most likely) then I could try my 360 controller instead...

And as for that link that's a nice collection of Moonlight swords, I wonder how many series have one...
And I figured it was AC but the resolution was throwing me off since it makes it look like a PS1 game almost, and at the time the original AC games on PS1 didn't have mechs that looked that japanese, they were more mechwarrior-ish back then. *is a fan*
Title: Re: Quick question
Post by: Holy_Diver on November 03, 2009, 04:38:24 pm
Plugging in a second controller and choosing it to play your game with would work. I'm not sure what xpadder (or xinput) is, I assumed it was a joystick to keyboard kinda deal (which is how the extension works)

If you can't wait for me to upload a new release, most likely the dlls you need to add to your folder are MSVCP80D.dll and MSVCR80D.dll. You can easily find those on the internet if you're in a rush. Be careful downloading dlls however because they can install/be malware on your system. You can probably find checksums for the dlls somewhere if you want to be more careful. They might be available on the MSDN.


Title: Re: Quick question
Post by: Holy_Diver on November 03, 2009, 05:11:32 pm
Hmmmm, apparently those dlls are buried somewhere in a crazy folder called C:\Windows\winsxs which I was not even aware of. It will probably be easier for you to find them on the internet. In the meantime I will work on a proper release mode build.


Errrr! Actually on a lark I looked in a program folder for a project I knew came with the debugging crt libraries and they happened to be the same versions. I use, and under a MB each, so I will just attach those now....


PS: The program I'm getting these from is LackeyCCG, so checkout that project first to decide if you trust it or not (you'll just have to trust me like it or not anyway won't you)
Title: Re: Quick question
Post by: Holy_Diver on November 03, 2009, 05:14:56 pm
^BTW: Don't release your games with these two dlls in them. Look me up and I will get your proper release builds within a day or two. No harm in making your games with these / experimenting with them like Vicious.
Title: Re: Quick question
Post by: AsusX2 on November 03, 2009, 05:39:59 pm
since you've got a far better grasp of these things, I think i'll wait and see what is comming. I'd hate to screw up my som again now that im networked. by libraries, do you mean like the libraries like in my V Studio
Title: Re: Quick question
Post by: Holy_Diver on November 03, 2009, 06:10:38 pm
since you've got a far better grasp of these things, I think i'll wait and see what is comming. I'd hate to screw up my som again now that im networked. by libraries, do you mean like the libraries like in my V Studio

There's nothing here that will mess anything up. Of course, if you edit a file, making backups is not a bad idea. If you just can't get these files to work in conjunction with SOM, just delete the files.

===================

Speaking of which!

I actually have not tested (or thought to test) these with an outputted game, so there might be further matters to attend to.

For those of you wanting to use this with a project in development. The SomEx.dll file needs to be in your tools folder with SOM_MAIN.exe. And you should hexedit som_db.exe if necessary. And the SOM_EX.INI file should be in your project folder beside SOM_DB.INI.

EDITED: For projects all the other dlls need to be in the tools folder as well, along with the two dlls above (which will be added to the next release -- the i18n release)


Title: Re: Quick question
Post by: AsusX2 on November 03, 2009, 06:17:10 pm
excellent.
Title: Re: Quick question
Post by: Holy_Diver on November 03, 2009, 06:25:16 pm
Speaking of support (in the first post)

This extension was designed to support everything. However you might be limited by your drivers, since currently only DX7 is supported (future releases will probably include 8/9/10 but SOM uses the DX7 interface so that's where we start)

A fallback is the Windows Multimedia Library mode, which I have to use with my controller because it's DX7 drivers don't support the 4th axis.

If you really want to use analog sticks, you might want to try the analog simulation mode. It can be a little jerky under some circumstances because it works by knocking out key signals per frame (like at half speed it sends a walk key every other frame to SOM)

^I've added some algorithms to really smooth it out, and will probably add some more. The smoothing can feel a little unnatural, but it's better than spazzing. But it's still not so bad, and I find using analog sticks without analog feedback feels really slippery, so you might try it just for that reason.

That said, all your buttons should be mappable and anything your driver supports should be there. Though I only support basic consumer controllers (so far) ...as opposed to massive industrial flight simulator type joystick rigs that track a thousand variables and support hundreds of buttons.
Title: Re: Quick question
Post by: HwitVlf on November 03, 2009, 07:42:24 pm
Heyo just started up DoM for the first time and I have a query.
Is there anyway to disable the ingame gamepad?
I prefer to map my controllers using an external program (Xpadder) and the in game config is interfering.
I can't set up my controller properly in game anyway (it only supports 8 of my 12 buttons and no analog mapping).

I use PPJoy to make a fake controller and set SoM's joystick to use the fake controller. That prevents SoM's auto-joystick detection form interfering when I use Joy2Key with a Xbox360 controller to play SoM via keyboard emulation.

PPJoy
http://www.simtel.net/free/Miscellaneous-Utilities/PPJoy/75176.html (http://www.simtel.net/free/Miscellaneous-Utilities/PPJoy/75176.html)
Joy2Key
http://www.electracode.com/4/joy2key/JoyToKey%20English%20Version.htm (http://www.electracode.com/4/joy2key/JoyToKey%20English%20Version.htm)