• gmcl_joystick - DirectInput module with simplified interface
    316 replies, posted
  • Avatar of Night-Eagle
  • New version is out. I'm looking to work in tandem with a gamemode developer using JM, so CONTACT ME!!! [url=http://eagle.undo.it:8083/download/?id=14&act=url][img]http://eagle.undo.it:8083/download/?id=14&act=img[/img][/url]
  • Avatar of LemONPLaNE
  • I can report that the new version has the same problem as CapsAdmin described. JM v27 was the only joystick-related addon, and it was on single player, so a freshly started server as well. [IMG]http://bayimg.com/image/oamooaacl.jpg[/IMG]
  • Avatar of Night-Eagle
  • Okay, yeah, I've fixed this bug before, I misplaced the fix...and the debug notes...and Wiremod decided to delete their forum database. I have a general idea of what the problem is. The problem was related to an addon I don't have installed. Let's see, 200 days / 403.82 KB * 111.39 KB... I'll have a fix up in 55.17 days tops. Only kidding...or am I? Seriously, screenshot is not necessary, but if you really want to go out of your way and drain bandwidth, post results of [code] lua_run PrintTable(jcon) lua_run_cl PrintTable(joynet) lua_run_cl PrintTable(jcon) [/code] [b]Also with complete disregard for any hint of professionalism:[/b] Sorry for yelling at you - I've been yelled at all day by people who don't make the slightest effort to explain their problems in a rational manner - but your explanation is better than most. I'm digging around in my backups for the right version now. [editline]11:41PM[/editline] Okay, to say that CapsAdmin "described" the problem is...unfortunate at best. Could you please pastebin a console dump directly after the symptoms appear, then pastebin the results of the aforementioned console commands?
  • Avatar of Night-Eagle
  • Every DirectInput device is supported. If it shows up in your Game Controllers or Joystick settings in Windows, it is supported.
  • Avatar of TastyTerrorist
  • why is it when I use different controllers, some of them have "nill" as their outputs? Edit: Repeat of what others have said. The problem is (I think) in the wire mod instances and hasn't been fixed in v27. TY for a still awesome module though. Hook 'gmod_wire_joystick' Failed: lua\entities\gmod_wire_joystick_multi\init.lua:229: attempt to index field 'wireModInstances' (a nil value)
  • Avatar of Night-Eagle
  • [QUOTE=TastyTerrorist;22270093]why is it when I use different controllers, some of them have "nill" as their outputs? Edit: Repeat of what others have said. The problem is (I think) in the wire mod instances and hasn't been fixed in v27. TY for a still awesome module though. Hook 'gmod_wire_joystick' Failed: lua\entities\gmod_wire_joystick_multi\init.lua:229: attempt to index field 'wireModInstances' (a nil value)[/QUOTE] That error is not possible in version 27. [lua] // lua/entities/gmod_wire_joystick_multi/init.lua Lines 229-231: if not jcon.wireModInstances then jcon.wireModInstances = {} end [/lua] Here, jcon.wireModInstances is not being indexed - the indexing occurs on line 232. You either have conflicting addons installed or have not installed the latest version. Please post a directory listing of your addons folder / purge your addons folder.
  • Avatar of Lancelot
  • Nice mod. I'm finding it quite useful with my aircraft! I'm not sure if someone has asked this already, but can I make each module take more inputs? I have more buttons on the stick that I'd like to use.
  • Avatar of viperfan7
  • I do believe this newest engine update has broken this mod, anyone want to tell me how I would go about rebuilding the DLL to work with the new engine?
  • Avatar of Night-Eagle
  • [QUOTE=viperfan7;23197116]I do believe this newest engine update has broken this mod, anyone want to tell me how I would go about rebuilding the DLL to work with the new engine?[/QUOTE] What error(s) are you getting? Symptoms?
  • Avatar of Lancelot
  • [QUOTE=Night-Eagle;23313019]What error(s) are you getting? Symptoms?[/QUOTE] It`s not the engine update. It`s working fine for me.
  • I just wanted to say that this addon is the coolest thing I've found yet since coming back to gmod (just started playing again a couple of weeks ago when I was randomly googling and ran across wiremod, before that I hadn't really played since 2006, even though I purchased it as soon as possible when it was released... anyway, back to... whatever it was I was talking about earlier) I haven't tried this addon on any public servers yet; perhaps I will... I'm not too fond of typical internet persons (you know the ones). However, my post is primarily because I've just completed setting this up and I would like to point out that my Logitech G27 is fully supported. And by fully supported, I mean that I've managed to map all 28 buttons (that includes the 5-way pov hat) and all 4 axes (steering, gas, brake, clutch). After creating the adv dupe of my joystick modules and a demo board, I then tried to find any glaring issues but failed. Kudos to you, sir.
  • Avatar of LemONPLaNE
  • One request I have for this is to have the Multi Joystick have a selectable amount of inputs. 8 are too few, since even the most rudimentary joysticks have at least 6 buttons and 4 axises. The Wii Classic Controller, which is the one I use the most when using controllers in GMod, has 6 axises, a hatswitch, and 9 buttons.
  • Avatar of Night-Eagle
  • LemONPLaNE, the purpose of the design of the Joystick configuration page is to map your gamepad to your contraption, not your contraption to your gamepad. This grants the following advantages: -If one changes their gamepad, they do not have to modify their contraption -If one wishes to share their contraption with another player, the contraption does not have to be redesigned for the other player's gamepad. In fact, when you link a Wire input SENT to a vehicle or chair, players may instantly share a contraption with others. Here is a typical configuration I use for an aircraft: 1. Throttle (analog) 2. Pitch (analog) 3. Yaw (analog) 4. Roll (analog) 5. Action 1 (digital) 6. Action 2 (digital) However, creating an entity with a variable number of inputs is possible. Perhaps someone on the Wire team will be happy to assist.
  • Avatar of Lancelot
  • [QUOTE=Night-Eagle;23534740]However, creating an entity with a variable number of inputs is possible. Perhaps someone on the Wire team will be happy to assist.[/QUOTE] E2 can already do that. Talk to Syranide.
  • Avatar of viperfan7
  • [QUOTE=Night-Eagle;23313019]What error(s) are you getting? Symptoms?[/QUOTE] Well, the binding menu works fine, but I am getting nil output from the wiremod side of it, and sorry for the late reply, been away all week.
  • Avatar of Night-Eagle
  • Try deleting data/joyconfig.txt Make sure you have no other Joystick modules installed as this will cause problems.
  • Avatar of dracotonisamond
  • i can confirm this to be working at the moment. but my new saitek X52 doesn't exactly work 100%. a few of the hats are detected as buttons a few buttons dont work and one stick isnt functional. and does anybody else notice that the throttle is always backwards? 100% is 0 and 0 is 100%
  • Avatar of Lancelot
  • No, the joystick is backwards. The way Night-Eagle has it setup is fine. The reason is because you have the highest resistance at "full throttle", so the joystick gets the lowest ADC bin when you have it the top.
  • Avatar of viperfan7
  • [QUOTE=dracotonisamond;23633195]i can confirm this to be working at the moment. but my new saitek X52 doesn't exactly work 100%. a few of the hats are detected as buttons a few buttons dont work and one stick isnt functional. and does anybody else notice that the throttle is always backwards? 100% is 0 and 0 is 100%[/QUOTE] The issue with the buttons is most likely in the profiling software for it, myself, I have bother the upper pan hat and throttle hat set to act as 4 buttons, seems to work perfectly
  • I know a huge issue is with the way SBEP binds its controls with the joystick module. If I don't touch any of the binds setup by SBEP it works, but as soon as I mess with one it gives an error in the console and joystick only outputs nil. Does anyone know what files must be edited in SBEP to remove all of the joystick related functions and binds? I know there is a whole bind in one of the gyropod files.
  • Avatar of Pogostick
  • I know this is a hell of a necrobump, but the download link is missing in the original post. I need this for the WAC chopper so I can fly it well with my joystick. Can anyone help?
  • Avatar of Night-Eagle
  • The download link is not missing. The server/uplink probably experienced a hiccup and has corrected itself without administrative attention.
  • Avatar of viperfan7
  • Well, this is just a random request, but any chance of a way to have lua functions to interface with the X52 Pro, since I cant code in C++ and I'm not sure how gmod would react to me using a C# wrapper for DirectOutput.
  • Avatar of Night-Eagle
  • There is a chance, but this module's scope is limited to DirectInput. DirectOutput [i]appears[/i] to be a proprietary Saitek API for the X52's display screen and would not fit within the scope of this project.
  • Avatar of viperfan7
  • ya, your right about it being proprietary, just putting the request in here in case someone who knows what their doing sees it, not directed at anyone in particular, meh, time I got to learning C++, shouldn't be too hard to make
  • I can't download the joystick addon and there are no instructions on install, I assume its a straight out addon?
  • Avatar of Night-Eagle
  • [QUOTE=Rathion;24427313]I can't download the joystick addon and there are no instructions on install, I assume its a straight out addon?[/QUOTE] [QUOTE=readme.txt] 1. Delete any previous joystick modules 2. Extract to <Drive>:/Program Files/Steam/Steamapps/<E-mail>/garrysmod/garrysmod 3. Go back to step 1 and delete /all/ joystick modules because you failed to heed my warning the first time 4. Extract to <Drive>:/Program Files/Steam/Steamapps/<E-mail>/garrysmod/garrysmod (again) [/QUOTE] I don't see how you know that there are no instructions on install if you can't download the addon...I just downloaded it and copy+pasted the readme.txt file. If you need help translating it into your native language, I'm sure we can find someone to help you with that. To answer your question, because the module has a binary application extension, it is required to consist of content in both the "addons" and "lua" folders. The archive is made appropriately. [editline]10:06PM[/editline] I'm getting questions about whether or not people are free to use this in their own projects: Of course you can use it, that's why I made it for "developer integration". In fact, I was hoping the Wire team would have replaced my Wire entities by now... Developers: read the pretty documentation file in the download; there is also an example script that is mentioned in the release post. You'll never need to look at the Lua files in the addon aside from the example script. Developers, read these files: addons/joystick/documentation.txt addons/lua/autorun/server/joyexample.lua addons/lua/autorun/client/joyexample.lua Note that the client example isn't actually necessary and doesn't directly interface with Joystick Module - it is simply used to monitor if the server is receiving input. (If you want to use the module client-side, use <tblReg>:Get()) The server is doing most of the work, and most of the server's bindings are available on the client - read the documentation a couple times. The only confusing thing I found in the documentation is that I use "JCON Registry" instead of <tblReg> once. Note that the documentation will only make sense on the second read-through (at the very least). Another potential hangup is that joystick.Get(<pl>, <strUID>) is used server-side whereas <tblReg>:Get() is used client-side. Let me take this time to make a point that the API [i]automatically[/i] networks the client's inputs to the server - you should definitely not do this on your own, as it would double the bandwidth consumption.
  • Avatar of YummYummtheMan
  • Thank you for creating and taking the time to continue updating this addon. Please excuse my noobishness. I am attempting to utilize this glorious mod to let me pilot my Space Build ships (also suffering from a sever case of noobishness) to previously unknown heights of control. The joystick and all input and buttons show up flawlessly in the config screen, and I can easily assign inputs to the gyro pod selection (very intuitive UI for the joystick config page by the way). However once that step is completed, nothing I do seems to affect the ship in any way shape or form. When I am viewing the joystick module, all I see are nil values. However I cannot be sure that it won't change when I enter the vehicle seat. With my preliminary diagnostic skills, I wired some led indicators to each output, sat in the seat, and played with the joystick. Nothing lit up, implying to me that it may still be outputting nil values. From what I have read in this thread, there might be conflicts with the addons I have installed: specifically Gcombat, CAF, LS3 and SBEP. I guess what this long and rambling missive is attempting to determine from you veterans is this: I cannot rule out the possibility of use error. I keep hearing of a wire chip, but I am assuming it is the entity that is placed in the videos that shares the model with the Ranger. My process is spawning a gyro pod advanced, welding a seat to it, setting the gyro pod active, slamming a joystick chip on it, configuring the inputs, and then linking it to the gyro pod. I have also tried the multi joystick, with similar results. Thanks for bearing with me through this rambling post. Edit: Other information that may or may not be pertinent, my Gmod is up to date, I downloaded the link you put in the beginning of this post yesterday, I play singleplayer, I'm using a Sidewinder Force Feedback 2 joystick from Microsoft, and I'm on Windows 7. Heres a screenshot of my addons folder. [url]http://i199.photobucket.com/albums/aa305/yummyummtheman/gmodaddons.png[/url]