1. Post #81
    Gold Member
    Airdoo's Avatar
    April 2007
    508 Posts
    Can we get a re-upload someone, please?

  2. Post #82
    Mr Donovan's Avatar
    August 2008
    124 Posts
    I have reuploaded the module addon here: http://www.garrysmod.org/downloads/?a=view&id=71730

    Ignore the this file has been reported notice, garrysmod.org does that automatically now for DLLs.

  3. Post #83
    Grocel's Avatar
    October 2008
    1,225 Posts
    Ignore the this file has been reported notice, garrysmod.org does that automatically now for DLLs.
    Garrysmod.org does delete DLLs automatically later. ;)

  4. Post #84
    jonney934's Avatar
    December 2007
    238 Posts
    This one shouldn't delete.

    Reply With Quote Edit / Delete Reply United States Show Events Friendly Friendly x 1 (list)

  5. Post #85

    March 2005
    10 Posts
    Got this in the console after installing:
    Code:
    ERROR! Module 'joystick' not found!
    Also "joyconfig" doesn't seem to work, and there's no new entities in the spawn menu. Just unzip to /addons/ right? So I've got "../addons/Joystick Module/" is that correct?

  6. Post #86

    March 2007
    21 Posts
    You have to copy the gmcl_joystick.dll from addons/joystick/lua/includes/modules/ to lua/includes/modules I think.

  7. Post #87

    May 2009
    4 Posts
    Great.
    jonney thx for reupload

  8. Post #88

    October 2008
    11 Posts
    Please the Links are not working any more i want and need it :D its awesome for me PS3 controller :D

    Edited:

    Hey the links are not any more working :( ilike this mod so can you reuploud it please cuz its freaking awesome :D

  9. Post #89

    May 2009
    4 Posts

  10. Post #90
    Gold Member
    Night-Eagle's Avatar
    January 2005
    815 Posts
    garrysmod.org doesn't like binaries. They get deleted every time I upload them.

    Yay, I have a fileserver.
    Please don't hack my fileserver.


  11. Post #91
    Gold Member
    evan_madore's Avatar
    December 2006
    265 Posts
    So is the new one? Or is it still old? in the OP you said something about a new version coming last month, I assume this is not it yet.

  12. Post #92
    Gold Member
    Night-Eagle's Avatar
    January 2005
    815 Posts
    I need a weekend to standardize the binary - I only want to make one release to ease the update process. Previous updates only changed the script. Maybe next weekend.

    I still have 12 days. :3:

  13. Post #93
    LauIsFun's Avatar
    August 2009
    69 Posts
    I need a weekend to standardize the binary - I only want to make one release to ease the update process. Previous updates only changed the script. Maybe next weekend.

    I still have 12 days. :3:
    Glad to see you're still contributing

  14. Post #94
    Gold Member
    evan_madore's Avatar
    December 2006
    265 Posts
    Cannot wait for this. The current one is soo slow behind what you are actually doing, it makes any vehicle difficult to drive with a wheel + pedals.

  15. Post #95
    F12Bwth's Avatar
    March 2006
    609 Posts
    Are you going to release it this week? Today? right now?... please.

  16. Post #96
    Gold Member
    evan_madore's Avatar
    December 2006
    265 Posts
    Hopefully soon, one of the mot useful things in gmod.

  17. Post #97
    Gold Member
    Airdoo's Avatar
    April 2007
    508 Posts
    Will this fix the bug with prop protection? The "receiver" can't bind itself to the joyconfig command. If you need more info I can probably get it for you relatively quickly.

  18. Post #98
    Gold Member
    Night-Eagle's Avatar
    January 2005
    815 Posts
    I'm not aware of a bug with prop protection.
    The reason the current version sucks is a .125 second delay on the server. The new version is as fast as using Garry's numpad thruster.

  19. Post #99
    Gold Member
    evan_madore's Avatar
    December 2006
    265 Posts
    Release the new version!!!!!

  20. Post #100
    Gold Member
    Airdoo's Avatar
    April 2007
    508 Posts
    It's Simple Prop Protection that it doesn't work with, but I don't know what version it is either, for both, sorry.

  21. Post #101
    Gold Member
    Night-Eagle's Avatar
    January 2005
    815 Posts
    The update you've all been waiting for:

    Now supports 800x600 resolutions!

  22. Post #102
    Gold Member
    evan_madore's Avatar
    December 2006
    265 Posts
    Did you forget a DL link?!!!?

  23. Post #103
    Gold Member
    Night-Eagle's Avatar
    January 2005
    815 Posts
    No, my server is down.
    Garrysmod.org put a ban on awesome files, so I can't upload it there.

    Edited:

    Server is back up.

  24. Post #104
    Gold Member
    Airdoo's Avatar
    April 2007
    508 Posts
    THANK YOU! I will test and report back to see if it works, if not i will bring the lua error.

  25. Post #105
    Gold Member
    evan_madore's Avatar
    December 2006
    265 Posts
    FINALLY! Thank you. It is up on ZeosPanteras Private Build Server for the truck competitions now.
    Reply With Quote Edit / Delete Reply United States Show Events Disagree Disagree x 1 (list)

  26. Post #106
    Gold Member
    TomatoSoup's Avatar
    December 2006
    253 Posts
    Getting an infinite loop error on my dedicated server, but not on singleplayer. Complains about line 2 in the joyserializer.lua. The line that's like
    local serials = string.explode("", LotsOfCharactersAndSymbolsAndNumbers)
    

    Thanks for your time.

  27. Post #107
    Gold Member
    Night-Eagle's Avatar
    January 2005
    815 Posts
    Getting an infinite loop error on my dedicated server, but not on singleplayer. Complains about line 2 in the joyserializer.lua. The line that's like
    local serials = string.explode("", LotsOfCharactersAndSymbolsAndNumbers)
    

    Thanks for your time.
    Hrm. I remember that string explode wasn't working correctly at one point, but garry fixed that months ago. Try deleting your lua includes extension folder (the one that includes the string.explode definition) then running the dedicated server update.

    The actual code is:
    local serials =
    string.Explode("",[[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz,.<>?:[]{}\|1234567890-=!@#$%^&*()_+]])
    
    (Perfectly legal)

  28. Post #108
    fishface60's Avatar
    May 2007
    430 Posts
    Well this update blows my semi-related project out of the water.
    *scrunches up source code*
    I'm glad actually, since this will probably work better and has already got a lot of people following it.

    I wonder if the following are feasible additions
    [list][*]Adding Mouse input, the change in position would be useful as would the mouse buttons.[*]The ability to add a callback for when an input has changed, with parameters for the player and the new value, possibly also the old value.[/list]
    This is just the addon I needed to get into Contraption mood.

  29. Post #109
    Gold Member
    Deco Da Man's Avatar
    July 2007
    1,015 Posts
    local serials =
    string.Explode("",[[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz,.<>?:[]{}\|1234567890-=!@#$%^&*()_+]])
    
    holy shit.

    local serials = {}
    for p, c in string.gmatch("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz,.<>?:[]{}\|1234567890-=!@#$%^&*()_+", "().") do
    	serials[p] = c
    end
    
    Or the right way to do it:
    local serials = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P"
    ,"Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j"
    ,"k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z",",",".","<",">"
    ,"?",":","[","]","{","}","|","1","2","3","4","5","6","7","8","9","0","-","=","!"
    ,"@","#","$","%","^","&","*","(",")","_","+"}
    
    Reply With Quote Edit / Delete Reply Australia Show Events Dumb Dumb x 1 (list)

  30. Post #110
    Gold Member
    Night-Eagle's Avatar
    January 2005
    815 Posts
    holy shit.
    *wall of text*
    Yes, let's save 8 picoseconds.
    That's only called once per initialization.
    local serials = {}
    for p, c in string.gmatch("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz,.<>?:[]{}\|1234567890-=!@#$%^&*()_+", "().") do
    	serials[p] = c
    end
    
    You forgot backslash. ("\|")

    ...he comes at night, so I wouldn't go to sleep if I were you...

    Edited:

    local serials = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P"
    ,"Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j"
    ,"k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z",",",".","<",">"
    ,"?",":","[","]","{","}","|","1","2","3","4","5","6","7","8","9","0","-","=","!"
    ,"@","#","$","%","^","&","*","(",")","_","+"}
    
    ...backslash is going to be pissed...

    Edited:

    Well this update blows my semi-related project out of the water.
    *scrunches up source code*
    I'm glad actually, since this will probably work better and has already got a lot of people following it.

    I wonder if the following are feasible additions
    [list][*]Adding Mouse input, the change in position would be useful as would the mouse buttons.[*]The ability to add a callback for when an input has changed, with parameters for the player and the new value, possibly also the old value.[/list]
    I do intend to add mouse clicks, but mouse movement is a bit more of a challenge.
    I guess I could track delta for one, but this may require locking the player's view.
    I could track absolute direction, but this breaks into a few cases: dealing with the fact that there is twice as much yaw than pitch and what to use as the forward direction.

    Perhaps the easiest way to do it is to have the binding register require the user to supply a forward frame of reference and allow the user to select between absolute and delta.
    For delta, the register will lock the view towards the provided direction.
    For absolute, the register will use the forward direction as the center.

    I'm not sure exactly how I should implement mouse movement, anyone else have an opinion on this?
    This is just the addon I needed to get into Contraption mood.
    Same here.

    Edited:

    Oh, and there is a callback function for joystick updates:
    hook.Add("JoystickUpdate","gmod_wire_joystick",function(pl,header)
    	//DON'T MODIFY header, IF WE DO, ALL INPUT WILL BE FUBAR
    	for uid,bit in pairs(header) do
    		for k,v in pairs(jcon.wireModInstances[uid]) do
    			k:PollJoystick(pl)
    		end
    	end
    end)
    
    function ENT:PollJoystick(pl_upd)
    	if self.lastpoll == CurTime() then
    		return
    	end
    	self.lastpoll = CurTime()
    	
    	local pl
    	if self.Pod then
    		if self.Pod:IsValid() then
    			pl = self.Pod:GetPassenger()
    		end
    	else
    		pl = self:GetPlayer()
    	end
    	
    	if pl == pl_upd and IsEntity(pl) then
    		self.value = 0
    		if joystick and joystick.Get then
    			self.value = joystick.Get(pl,self.uid)
    			if self.type == "analog" then
    				self.value = self.value and (self.value)/255*(self.max-self.min)+self.min or 0
    			else
    				self.value = self.value and self.max or self.min
    			end
    			Wire_TriggerOutput(self.Entity,"Out",self.value)
    		end
    	else
    		//TODO: Reset outputs to 0 on player pod exit as option - this can be done by the player using adv pod controller and if statements
    	end
    end
    
    Header is basically a table with all UIDs that the player currently has bound.
    A few important points:
    [list][*]The table is indexed by the UID[*]The table values probably mean nothing to you[*]You should not change the table in any way (for efficiency reasons, the table is shared with Joystick Module)[/list]
    I'll look into making a register-specific callback.
    Reply With Quote Edit / Delete Reply Show Events Funny Funny x 3 (list)

  31. Post #111
    Gold Member
    evan_madore's Avatar
    December 2006
    265 Posts
    I say you do not need mouse movement. It can easily be done within e2.
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 3 (list)

  32. Post #112

    June 2007
    4 Posts
    Yay new version of awesomeness!
    More wire inputs buttons is a necessity, how could one survive otherwise?
    Reply With Quote Edit / Delete Reply Sweden Show Events Agree Agree x 2 (list)

  33. Post #113
    fishface60's Avatar
    May 2007
    430 Posts
    I say you do not need mouse movement. It can easily be done within e2.
    The point is that this way you can have a single interface for your own customisable controls, if you went the E2 route you've got to explicitly say to do something on mouse click, whereas the Joystick module (change the name, it's got more than just joysticks in it) lets you pick any key, mouse button or joystick button to control it however you want.

    I do intend to add mouse clicks, but mouse movement is a bit more of a challenge.
    I guess I could track delta for one, but this may require locking the player's view.
    I could track absolute direction, but this breaks into a few cases: dealing with the fact that there is twice as much yaw than pitch and what to use as the forward direction.

    Perhaps the easiest way to do it is to have the binding register require the user to supply a forward frame of reference and allow the user to select between absolute and delta.
    For delta, the register will lock the view towards the provided direction.
    For absolute, the register will use the forward direction as the center.

    I'm not sure exactly how I should implement mouse movement, anyone else have an opinion on this?
    Paradukes implemented some form of mouse movement for the boarding pods in SBEP by getting the mouse from the SetupMove hook
    function SBEPCCC(ply, data)
    	local cmd = ply:GetCurrentCommand()
    	ply.SBEPYaw = cmd:GetMouseX()
    	ply.SBEPPitch = cmd:GetMouseY()
    end
    I think this gives the delta of the mouse, the Boarding Pods lock the view themselves, I think it should be up to the addon maker whether to lock the view and how to implement it, so you could have a mouse look toggle.
    Oh, and there is a callback function for joystick updates:
    I had a bit of a look at it, it always seemed to have the values in the header as being 1 and it won't tell you which of the inputs was updated so you'd have to do your own checking to see if it was yours which updated.
    Plus it was only available serverside and I can see uses where it'd be useful clientside as well.

    Edited:

    There's also a minor memory useage concern in the jcon.register function.
    The catreg.getdigital, catreg.getraw ... functions are defined separately for each registered bind. This means each function
    If you defined the functions outside the jcon.register function, in another table and made the catreges inherit the functions from that then the functions would take up the same memory for one bind as n binds.
    The usual way of doing this is metatables.
    I've made the changes to my local copy to see if it works ok and I've had no errors so far.
    Instead of setmetatable(destination, source) you could do table.Inherit(destination, source), this is faster to index, has a reference to its inherited table (as destination.BaseClass) and iteration will return all the values of it, but takes up more memory.

  34. Post #114
    Gold Member
    Night-Eagle's Avatar
    January 2005
    815 Posts
    I think it should be up to the addon maker whether to lock the view and how to implement it, so you could have a mouse look toggle.
    This is the part I want an opinion on. The interface behind this - think from the perspective of someone writing an interface for the Joystick module. They do joystick.Get(pl,uid) to fetch a value of an input, but how does the script know where to lock the view/the forward direction?

    If you say joystick.Get(pl,uid,dir), what if the programmer doesn't really have a forward direction in mind? We could set it to the player's current direction, but what if they're making a third-person gamemode and are updating the player's direction all the time?
    How does the programmer let JM know that the view should be locked?
    What if the player wants to override the programmer's decision - should that be handled by JM or the programmer? Should it even be allowed?
    Are we really sure we want the default behavior to lock the player's view?

    Adding mouse movement functionality does complicate fetching data - how do we provide this functionality with minimum input from the interface programmer?

    About the extra memory usage - eh, that's a simple fix. Define two locals in outer scope and reference 'em.

    Edited:

    I'm seeing four different types of mouse input:
    [list][*] Delta, explicit forward (I can't think of a use for this...anyone?)[*] Delta, locked (Apply a force)[*] Absolute, bounded 180 pitch, 360 yaw, explicit forward (Aim a turret with player view) (This is a bit impractical to make interchangeable with a joystick input, we must consider what the user had intended to make.)[*] Absolute, bounded 180 pitch, 180 yaw, locked (Used in Diamond Blue) (How does the user know where center is?)[/list](explicit forward means unlocked with the programmer providing a forward direction as a reference)
    Can we agree on this, or does someone see another possibility?

    Perhaps some of these problems could be solved by mapping a joystick input to the mouse...

    Another possibility is that we deal with mouse input on a per-interface basis. This could get a bit hairy, and I'd want some examples to test first.

  35. Post #115
    Gold Member
    TomatoSoup's Avatar
    December 2006
    253 Posts
    Hrm. I remember that string explode wasn't working correctly at one point, but garry fixed that months ago. Try deleting your lua includes extension folder (the one that includes the string.explode definition) then running the dedicated server update.
    Tried, still getting infinite loop.

  36. Post #116
    Gold Member
    Night-Eagle's Avatar
    January 2005
    815 Posts
    Tried, still getting infinite loop.
    Does this cause an infinite loop?
    function a()
    seperator = ""
    str = [[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz,.<>?:[]{}\|1234567890-=!@#$%^&*()_+]]
    
    	if ( seperator == "" ) then
    		local tab = {}
    		
    		for i=1, string.len( str ) do
    			table.insert( tab, string.sub( str, i, i ) )
    		end
    		
    		return tab
    	end
    
    	local tble={}	
    	local ll=0
    	
    	while (true) do
    	
    		l = string.find( str, seperator, ll, true )
    		
    		if (l != nil) then
    			table.insert(tble, string.sub(str,ll,l-1)) 
    			ll=l+1
    		else
    			table.insert(tble, string.sub(str,ll))
    			break
    		end
    		
    	end
    	
    	return tble
    	
    end
    a()
    
    Or this
    function a()
    seperator = ""
    str = [[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz,.<>?:[]{}\|1234567890-=!@#$%^&*()_+]]
    
    	if ( seperator == "" ) then
    		return string.ToTable( str )
    	end
    
    	local tble={}	
    	local ll=0
    	
    	while (true) do
    	
    		l = string.find( str, seperator, ll, true )
    		
    		if (l != nil) then
    			table.insert(tble, string.sub(str,ll,l-1)) 
    			ll=l+1
    		else
    			table.insert(tble, string.sub(str,ll))
    			break
    		end
    		
    	end
    	
    	return tble
    	
    end
    a()
    
    Or this
    function a()
    seperator = ""
    str = [[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz,.<>?:[]{}\|1234567890-=!@#$%^&*()_+]]
    return string.Explode(seperator,str)
    end
    a()
    
    

  37. Post #117
    Gold Member
    TomatoSoup's Avatar
    December 2006
    253 Posts
    I'll test those in JUST a second, I have another symptom:
    Code:
    autorun/server/joystick.lua:179: Infinite Loop Detected!
    And the third one causes an infinite loop.

  38. Post #118
    Gold Member
    Night-Eagle's Avatar
    January 2005
    815 Posts
    Does this string.Explode work?
    http://luabin.foszor.com/code/lua/in...ons/string.lua

    If it does, copy that code into lua/includes/extensions/string.lua

  39. Post #119
    Gold Member
    TomatoSoup's Avatar
    December 2006
    253 Posts
    Actually, I just discovered I had an addon that enhanced/added more functions, and string.Explode was one of them. I've changed the modified string.Explode to string.LongExplode (because it says it's for use with longer separators). I'll tell you how it works in just a minute.

    Yeah, it works now. If anybody else has GLX and is getting errors, try removing it.
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 1Useful Useful x 1 (list)

  40. Post #120
    Gold Member
    Night-Eagle's Avatar
    January 2005
    815 Posts
    Tell whoever made that addon to look at this thread.

    That's exactly why we don't make copies of anyone else's original code and release a modified version of it.
    Reply With Quote Edit / Delete Reply Show Events Agree Agree x 1 (list)