• gmcl_joystick - DirectInput module with simplified interface
    316 replies, posted
I heard that welt was fixing it up, but nothing seems to have come of it yet.
Is there anyone attempting to fix this?
[QUOTE=viperfan7;39151436]Is there anyone attempting to fix this?[/QUOTE] +1
I've managed to fix most of the errors, and now this (I hope) is all that stands between me and some analog control goodness: [code]Couldn't include file 'includes\modules\joystick.lua' (File not found) (@addons/joystick/lua/autorun/client/joystick.lua (line 63)) [ERROR] addons/joystick/lua/autorun/client/joystick.lua:63: Module not found! 1. require - [C]:-1 2. unknown - addons/joystick/lua/autorun/client/joystick.lua:63[/code] Line 63 of the file indicated simply says [code] require("joystick") [/code] I've made sure the relevant joystick.lua file is present in "garrysmod\includes\modules" folder, in which it is generating the files you would expect it to, and just in case, I have also copied it to "garrysmod\lua\includes\modules" folder, and for good measure, the "garrysmod\addons\joystick\lua\includes\modules" folder. Fruitless internet searches haven't turned up anything I'd consider relevant. Any insight would be appreciated!
[QUOTE=Tango91;39374400]I've managed to fix most of the errors, and now this (I hope) is all that stands between me and some analog control goodness: [code]Couldn't include file 'includes\modules\joystick.lua' (File not found) (@addons/joystick/lua/autorun/client/joystick.lua (line 63)) [ERROR] addons/joystick/lua/autorun/client/joystick.lua:63: Module not found! 1. require - [C]:-1 2. unknown - addons/joystick/lua/autorun/client/joystick.lua:63[/code] Line 63 of the file indicated simply says [code] require("joystick") [/code] I've made sure the relevant joystick.lua file is present in "garrysmod\includes\modules" folder, in which it is generating the files you would expect it to, and just in case, I have also copied it to "garrysmod\lua\includes\modules" folder, and for good measure, the "garrysmod\addons\joystick\lua\includes\modules" folder. Fruitless internet searches haven't turned up anything I'd consider relevant. Any insight would be appreciated![/QUOTE] it looks like garrysmod isn't loading or detect the module maybe? [editline]adas[/editline] module might need to be recompiled using the binaries for the new version of gmod
I'm pretty sure that gmod uses garrysmod\lua\bin\joystick.dll now...
Server: garrysmod\garrysmod\lua\bin\gmsv_joystick.dll Client: garrysmod\garrysmod\lua\bin\gmcl_joystick.dll It must be either of them. You can't have the gm_ prefix now. Doesn't work anymore.
I'm out of my depth here... I'll keep trying but here's the modified addon folder as it stands, if anyone else wants to give it a go: [url]https://www.dropbox.com/s/y6hiio3klpkmsar/joystick.zip[/url]
[QUOTE=Tango91;39400161]I'm out of my depth here... I'll keep trying but here's the modified addon folder as it stands, if anyone else wants to give it a go: [url]https://www.dropbox.com/s/y6hiio3klpkmsar/joystick.zip[/url][/QUOTE] can you post the source of the DLL as well?
[QUOTE=viperfan7;39401481]can you post the source of the DLL as well?[/QUOTE] I got the zipped folder containing both the addons folder and the .dll file from TweaK2007 a page back: [url]https://dl.dropbox.com/u/7934790/joystick.zip[/url]
ah ok [editline]29th January 2013[/editline] it sounds like the module needs rebuilt for the new version of gmod though, which shouldn't be too big of a deal, just recompile using the new binaries
Anyone still in need of this? I recently needed it for a plane I was going to make. So, I spent a day porting the module to LuaJIT and fixing some addon issues. I have the module working, but I haven't fixed the GUI theme or the wired joystick_multi controller (Using many single receivers works, though).
i would like it. especially if you could get the wired version working.
[QUOTE=Pandaman09;39432662]i would like it. especially if you could get the wired version working.[/QUOTE] Okay. Knowing that someone will use it gives me reason to finish. Also, the wired version does work. Just not the version that allows multiple inputs per receiver (The removal of varargs in functions really messed it up).
[QUOTE=zachar543;39432359]Anyone still in need of this? I recently needed it for a plane I was going to make. So, I spent a day porting the module to LuaJIT and fixing some addon issues. I have the module working, but I haven't fixed the GUI theme or the wired joystick_multi controller (Using many single receivers works, though).[/QUOTE] I fixed the GUI theme, I think, so if you have the fixed module that'd be great :)
[QUOTE=Tango91;39435641]I fixed the GUI theme, I think, so if you have the fixed module that'd be great :)[/QUOTE] Did you fix the rest of the errors caused by GMod 13's changes? Such as the changes in surface.CreateFont?
[QUOTE=zachar543;39439326]Did you fix the rest of the errors caused by GMod 13's changes? Such as the changes in surface.CreateFont?[/QUOTE] I believe so, yes.
[QUOTE=Tango91;39439567]I believe so, yes.[/QUOTE] Okay, I have the module working as far as I can tell. I am not sure if I did something wrong as I have not fully tested it (It is also my first time doing anything with GMod Binary Modules :P). If you guys find anything, I may be able to fix it. - [url=https://dl.dropbox.com/u/1706417/Garrysmod/gmcl_joystick/gmcl_joystick_src.zip]Fixed Source[/url] - [url=https://dl.dropbox.com/u/1706417/Garrysmod/gmcl_joystick/gmcl_joystick_win32.dll][del]Win32 Compiled Module[/del][/url] Use [post=39509830]This One[/post] If you have issues loading the module! The module goes in "garrysmod/lua/bin".
Combining your module with my modified addon folder only threw one error, which I fixed, but the GUI is still transparent :/ The fixed, fixed, version of the addons folder: [url]https://www.dropbox.com/s/kzhrmxyme8fqbhx/joystick2.zip[/url]
I'm getting some script errors when I try to use this: 1: "Unknown command: joyconfig", The config menu seems like it's missing. 2: As i try to spawn the joystick_multi it gives me this script error: [code] [ERROR] .../joystick/lua/entities/gmod_wire_joystick_multi/init.lua:309: attempt to index global 'arg' (a nil value) 1. MakeWireJoystick_Multi - .../joystick/lua/entities/gmod_wire_joystick_multi/init.lua:309 2. LeftClick - ...ick/lua/weapons/gmod_tool/stools/wire_joystick_multi.lua:156 3. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/shared.lua:249 [/code] 3: This last version you added does not have the module in it.
Hmm, I can't seem to get the module to load... I dropped it in lua/bin/ and when it tries to require("joystick") I get the error [code][ERROR] addons/joystick2/lua/autorun/client/joystick.lua:63: Couldn't load module library! 1. require - [C]:-1 2. unknown - addons/joystick2/lua/autorun/client/joystick.lua:63[/code] Which in turn breaks everything else, I think causing the error in the post above me. wat
This is interesting, when I use the DLL from the download I get a "MSVCP110.dll is missing" error. But when I compile it myself I don't. (if you don't get that error, this might still work) Anyway, when I use the version I compile, it loads just fine so long as A) I have both the gm[b]cl[/b] AND gm[b]sv[/b] dll files (As far as I know they are identical, just different names), and B) I rename it to ...joystickmodule... rather than ...joystick... (Make sure you update the autorun/client/joystick.lua's require line to reflect that as well) [b]It works fine[/b], aside from the broken GUI. Which I think was a problem the other guys where having? And the joystick multi still gives that error. If you are having the MSVCP110.dll error, I can upload my compile of the dll file. I don't know if it will help though.
Hmm, tried copying the one above to gmsv and still got the same "couldn't load module library" error, could you upload yours?
Hopefully this helps. By the way, these [b][i][u]HAVE[/u][/i][/b] to go in garrysmod/garrysmod/lua/bin They WILL NOT work if you put them in an addon folder. No matter what you think. I've tried. [url]https://dl.dropbox.com/s/0iz356r3dnkgtfl/joystickmodule.zip?dl=1[/url] I should make sure this is clear. [b]I HAVE LITERALLY NOT DONE ANYTHING TO THE SOURCE CODE FOR THESE DLL FILES[/b] All I did was copy the code into my gmod dll sdk example file rather than the code Garry had, then recompiled with changed names. All the work is still done by the guy above me who posted the link. I don't know why I had to recompile them for them to work for me (I have an idea, but I'm not sure). Hopefully they will solve all your problems too.
it works it works it works :v: I will begin work on cleaning up the gui now!
I love you all! <3
[QUOTE=TweaK2007;39510159]it works it works it works :v: I will begin work on cleaning up the gui now![/QUOTE] HAZZA! Strange. Wonder why my compile worked but the original author's didn't. Well, for whatever reason. YAY, joystick module!
One of the issues I had started to fix, which I thought Tango91 already had, was the usage of varargs in the multi-joystick controller. Varargs were removed due to incompatibility with LuaJIT. (eg. function(a, b, ...) <- No longer works!) Also, the most likely reason for my compile not working is I compiled with VS2012, hence the "MSVCP110.dll is missing" error. For my compiled version you would need the 2012 C++ Runtimes. Sorry, didn't think about that at the time. :P Thanks for the recompile, Labrasones. By the way, this module is only client side. "gmsv_" will not do anything!
[QUOTE=zachar543;39516806]One of the issues I had started to fix, which I thought Tango91 already had, was the usage of varargs in the multi-joystick controller. Varargs were removed due to incompatibility with LuaJIT. (eg. function(a, b, ...) <- No longer works!)[/QUOTE] I'm not sure where you're getting that it was removed, you just have to add a single line [code]local arg = { ... }[/code] Anyway, I've got the multi controller working now, and the ui is looking a little better now... but for some reason none of the buttons are doing anything so I'll have to figure out what's goin on there... [img]http://i50.tinypic.com/14x2i43.jpg[/img] Getting there!
Enjoy :v: [url]https://dl.dropbox.com/u/7934790/gmod/joystick.zip[/url]
Sorry, you need to Log In to post a reply to this thread.