• gmcl_joystick - DirectInput module with simplified interface
    316 replies, posted
  • Avatar of viperfan7
  • try what I did, delete the joystick.txt file in the data folder, if that dosn't work, try downloading a new version of the DLL
  • Avatar of Night-Eagle
  • YummYummtheMan: Could you PM me a copy of your data/joystick.txt? [url=http://pastebin.ca/]Pastebin[/url] it if needed. If you could, maybe any error messages as well? The last few times I've ran into this was when a client was running a conflicting addon or the server had a conflicting addon installed. It may be possible that the server is running an outdated version. What is the server's Joystick version? Or the name/IP of the server?
  • Avatar of YummYummtheMan
  • I'm amazed at how quickly you responded. It's only for single player, I haven't played Gmod online yet. As for viperfan7, I was unable to find the joystick.txt file, I did a search of my Garrysmod folder, and nothing matching that name came up, and nothing in the location you specified. I did notice some error messages last time I started it up. In the location Steam/steamapps/yummyummtheman/garrysmod/garrysmod/data I only have the following: joyconfig.txt and smartsnap_offsets_custom, as well as folders for Adv_duplicator, CAF_Debug, Expression2 and Manuals, none of them have the requested joystick.txt file. I have a file named gmcl_joystick.txt that says: gmcl_joystick.dll Written by Night-Eagle Version 1.2 This is under info "name" "Joystick Module" "version" "28" "up_date" "7th May 2010" "author_name" "Night-Eagle" "author_email" "sedhdi" "author_url" "" "info" "Binary v1.2" "override" "0" "GCFRequires" Thanks again for taking the time to assist me with this. Edit: When I load the map, this is the last few lines in the console: Redownloading all lightmaps LuaChipDebug: Set Tag Result: CAF,LSC,LSE,RD,SB,joystick_v26 Hook 'gmod_wire_joystick' Failed: lua\entities\gmod_wire_joystick_multi\init.lua:229: attempt to index field 'wireModInstances' (a nil value) Addon: Life Support Entities got enabled Addon: Spacebuild Enhancement Pack got enabled The entire console message is here: [url]http://pastebin.ca/1929639[/url]
  • Avatar of Night-Eagle
  • [QUOTE=YummYummtheMan;24481041]joystick_v26[/QUOTE] The server is using an older version! They need to update Joystick Module to fix this error. (I thought that error looked familiar...I already fixed it! :) Hrm, the latest version is 28, but I named the file 27...but its contents are version 28....that is odd. But, yes, the server needs to update to version 28.
  • Avatar of YummYummtheMan
  • I uninstalled all the joystick mods, and re applied them. It gave me the same message. Hook 'gmod_wire_joystick' Failed: lua\entities\gmod_wire_joystick_multi\init.lua:229: attempt to index field 'wireModInstances' (a nil value) LuaChipDebug: Set Tag Result: CAF,LSC,LSE,RD,SB,joystick_v26 Addon: Life Support Entities got enabled Addon: Spacebuild Enhancement Pack got enabled Addon: Life Support got enabled Addon: Spacebuild got enabled Addon: Resource Distribution got enabled LuaChipDebug: Set Tag Result: CAF,LSC,LSE,RD,SB,joystick_v26 I'll go back to your site and try to redownload them. Edit: The item I just downloaded is joystick_27_Bin_v1_2_release I previously downloaded and installed joystick_26_rc_patch over top of the initial joystick_27_Bin_v1_2_release. When I saw your last message as stated above I found and deleted the files that both those addons put in, and reinstalled the joystick_27_Bin_v1_2_release. Trying it again with the fresh download. [editline]03:26AM[/editline] Upon closer inspection, I found vestiges of the 26 install. Cleaning and testing now. Thanks again for your patience and assistance. [editline]03:34AM[/editline] Here is a list of the files I found in the Garrysmod folder with joystick in the name. [url]http://i199.photobucket.com/albums/aa305/yummyummtheman/joystick.png[/url] I'm not sure if I should remove some or all of any of them. Might start messing with them through trial and error. [editline]03:39AM[/editline] Removed all of the ones in the picture, still gave me the version 26 error. Not sure what I'm missing. [editline]03:44AM[/editline] LuaChipDebug: Set Tag Result: CAF,LSC,LSE,RD,SB,joystick_v26 Hook 'gmod_wire_joystick' Failed: ...stick\lua\entities\gmod_wire_joystick_multi\init.lua:232: bad argument #1 to 'pairs' (table expected, got nil) Addon: Life Support Entities got enabled Addon: Spacebuild Enhancement Pack got enabled Addon: Life Support got enabled Addon: Spacebuild got enabled Addon: Resource Distribution got enabled LuaChipDebug: Set Tag Result: CAF,LSC,LSE,RD,SB,joystick_v26 LuaChipDebug: Set Tag Result: CAF,LSC,LSE,RD,SB,joystick_v26
  • Avatar of Night-Eagle
  • This module is packed in addon format. You have joystick.lua files in your garrysmod/Lua folder. Since the garrysmod/Lua folder takes precednece over garrysmod/addons, the outdated files in your Lua folders are being executed. You need to clean out your Lua directory. Look in the v27 archive. For every file in that archive, look in your Lua folder and delete the respective file if it exists. Then, when you reinstall the module, make sure that everything in the "addons/joystick" directory ends up in "addons/joystick".
  • Avatar of YummYummtheMan
  • Ok, I did a search in my Lua folder for anything pertaining to joysticks and deleted them, and reinstalled the mod. Now this is what I get: Redownloading all lightmaps LuaChipDebug: Set Tag Result: CAF,LSC,LSE,RD,SB,joystick_v28 Hook 'gmod_wire_joystick' Failed: ...stick\lua\entities\gmod_wire_joystick_multi\init.lua:232: bad argument #1 to 'pairs' (table expected, got nil) Addon: Life Support Entities got enabled Addon: Spacebuild Enhancement Pack got enabled Thanks again for the prompt responses and your time.
  • Avatar of Night-Eagle
  • Did you try (backing up) and deleting your garrysmod/data/joyconfig.txt file? What the hell, I fixed this exact same bug before...meh, it must have gotten eaten.
  • Avatar of Night-Eagle
  • [url=http://eagle.undo.it:8083/download?id=23&act=url][img]http://eagle.undo.it:8083/download?id=23&act=img[/img][/url] New version is out. All it does is add a type check; should solve the above error message. If I didn't make a typo.
  • Avatar of YummYummtheMan
  • Alright, this version allows me to use the Joystick multi, but not the regular joystick part. However I am still ecstatic that its working! Thank you so much for your assistance and for the time you have taken to help me with this glorious mod. Edited for clarity.
  • Avatar of YummYummtheMan
  • Sorry, I guess it wasn't clear enough. The joystick multi function works, and when hooked into a gyro pod advanced under Speedabs or Yawabs it works perfectly. The other stool, labeled just joystick that allows you to drag and drop what axis will work for pitch and yaw for Rovers, or for Gyropod's still doesn't seem to be functioning. Once the joystick multi started working, I played gmod until the morning without realizing it, so thank you again for enhancing this game, and for your assistance.
  • Avatar of YummYummtheMan
  • You've done plenty, I really appreciate everything. Flying with a joystick is 100 time easier and more fun than by conventional means. This is what console says when I load in: ================================ === Wire revision: 0 === === Local Wire revision:0 === ================================ Redownloading all lightmaps LuaChipDebug: Set Tag Result: CAF,LSC,LSE,RD,SB,joystick_v29 Addon: Life Support Entities got enabled Addon: Spacebuild Enhancement Pack got enabled Addon: Life Support got enabled
  • Avatar of viperfan7
  • Not sure if this is actually part of DirectInput, but could you possibly add support for force feedback functions, just that eventually I plan on making expression2 functions to use with this, and would be great if I could also add force feedback functions as well
  • [QUOTE=Night-Eagle;12819994]What would you like me to change?[/QUOTE] uhm well even though i installed everything and everything looks right and is wired i just can get the outputs to output anyhthing the stool says that the button is pushed but it still sends out a null am i doing somthing wrong
  • Avatar of Night-Eagle
  • [QUOTE=roychook;25012867]uhm well even though i installed everything and everything looks right and is wired i just can get the outputs to output anyhthing the stool says that the button is pushed but it still sends out a null am i doing somthing wrong[/QUOTE] Try the multi-joystick. Do any errors pop up? [QUOTE=viperfan7;24910908]Not sure if this is actually part of DirectInput, but could you possibly add support for force feedback functions, just that eventually I plan on making expression2 functions to use with this, and would be great if I could also add force feedback functions as well[/QUOTE] Remind me in December and I'll see if I can work on that. I might be working on a project that can use force feedback by then anyway.
  • Avatar of viperfan7
  • sure thing, until then I'll be learning lua and getting the E2 functions ready, I just have one question, is the binding system just a way to hook into the DLL or is it required for the entire thing to work, because what I'm thinking is the functions will get the state of the joystick directly.
  • Avatar of Night-Eagle
  • Are you considering writing your own configuration manager? Please, don't. If you have an idea you want implemented in the API, just ask. If you're worried about polling efficiency, the module never polls a device more than once per game tick, and cached device states do not create garbage in Lua. Special care was taken to minimize run-time overhead - if you see a problem here, tell me and I will seriously examine it. If you need a special interface, I'll be happy to program one and implement it as part of the standard so everyone can use it.
  • Avatar of viperfan7
  • nah, not going to make my own config manager when yours works perfectly, I'm just wondering because I'm not sure how E2 would be able to use the binding system, and with E2 it would probably be better if people could get info on button and axis state directly. eg. V = Entity:jmGetAxis("X") F = Entity:jmGetButton("1") instead of needing to create bindings for it
  • Avatar of Night-Eagle
  • Someone just needs to create a module for it. In fact, the Wire module (of this release) is completely independent of the actual Joystick module. I was hoping people would glean information off of it to make stuff like that.
  • Avatar of kimba23
  • Hey Night-eagle. I have use your module a lot and it is great. I am sure this is probably an out of range question... but having a similar module for gmac would be great... i will continue using this in windows, but again, a mac version would be great, but probably you do not have the time/resources to port this to the mac. Anyways, just putting it out there... Thanks!
  • Avatar of viperfan7
  • oh ok, then I guess I'll do just that, I think the only reason it hasn't been done yet is that quite frankly, your binding system works perfectly for entities.
  • Avatar of Night-Eagle
  • kimba23: DirectInput is proprietary, but OSX should have a similar API. However, I do not have a Mac to test on. Some Mac programmer could code an interface compatible with Joystick module - the actual application extension is rather simple.
  • Avatar of kimba23
  • [QUOTE=Night-Eagle;25134104]kimba23: DirectInput is proprietary, but OSX should have a similar API. However, I do not have a Mac to test on. Some Mac programmer could code an interface compatible with Joystick module - the actual application extension is rather simple.[/QUOTE] Thanks for the reply... I am not a programmer. maybe I can make a request. I try that.
  • Avatar of kimba23
  • Oops meant to edit instead of bump. Hey Night_eagle. I sent you a PM few days back. Should I post it here? It is kind of a request. Thanks!
  • Avatar of Dok
  • I'm afraid to install DLL's now, VAC might mistake it for a cheat.
  • Avatar of Night-Eagle
  • [QUOTE=Intoxicated Spy;25622071]I'm afraid to install DLL's now, VAC might mistake it for a cheat.[/QUOTE] Then download the source code, check it for memory injections/etc., and compile it yourself.