0 of 0

File information

Last updated

Original upload

Created by

NeoH4x0r

Uploaded by

NeoH4x0r

Virus scan

Some manually verified files

104 comments

  1. NeoH4x0r
    NeoH4x0r
    • member
    • 10 kudos
    Locked
    Sticky
    Interim-workaround for mods like 3PCO:

    I just re-uploaded version 1.7.3.12 which was the last version to support ini options: send_movement_keys & send_major_movement_keys_only.

    This should server as interim workaround for mods like 3CPO that rely on the movement keys being coupled to the left-joystick.

    Please note that be enabling send_movement_keys you might experience a certain amount of lag with controller input.
    (This was the main reason for its removal)

    Make sure to back-up your current ini file before instaling 1.7.3.12.

    This is an example of the ini file (neoh4x0r-gad.ini) for mods like 3PCO:

    [Globals]
    ; 0=off 1=on (default is on)
    enable_plugin=1

    ; 0=off 1=on (default is off)
    enable_debug=0

    ; 0=off 1=on (default is off)
    enable_verbose_debug=0

    [Features]
    ; 0=off 1=on (default is on)
    ; the following controls will not be supported with a gamepad
    ; Forward/Back/StrafeLeft/StrafeRight/QuickInventory
    ; QuickMagic/QuickMap/QuickStats/Console/
    ; Screenshot/MultiScreenshot/AutoMove
    ; if this is turned off
    use_extended_controls=1

    ; 0=off 1=on (default is off)
    ; when using the gamepad to control movement
    ; either enable/disable sending the keyboard equivalent
    ; to scripts that listen for them
    send_movement_keys=1

    ; 0=off 1=on (default is off)
    ; when using the gamepad to control movement
    ; will not send diagonal movements if enabled
    ; note this has no effect if send_movement_keys is set to 0
    send_major_movement_keys_only=0

  2. NeoH4x0r
    NeoH4x0r
    • member
    • 10 kudos
    Locked
    Sticky
    Forum Post Link
     
    ==================================
    Add theses scripting functions in v1.7.3.4 (fixed in 1.7.3.5)
    ==================================
     
    float Function GetLX() global native
    float Function GetLY() global native
    float Function GetRX() global native
    float Function GetRY() global native
    int Function GetLSDirection() global native
    int Function GetRSDirection() global native
     
    ==================================
    You call them like this Controller.GetLX(); // if you wanted to get the controllers raw left stick left/right position
    -or-
    Controller.GetLSDirection(); // if you wanted to get the left stick's direction.
     
    They can also be used from actionscript code:
    by calling _global.skse.plugins.neoh4x0r-gpad.GetLX()
    -or-
    _global.skse.plugins.neoh4x0r-gpad.GetLSDirection()
    -- perhaps even: _global.GetLX()
     
    However, I do not develop flash or actionform  code so I am not sure if that is the correct namespace to use or how to
    import them into the actionscript (.as) file.
     
     
    Controler.psc (source)
    Spoiler:  
    Show


    Scriptname Controller Hidden


    ; valid positions are from -32768 to 32767
    ; you want the direction in form -1 to 1 (divide the result by 32768.0)


    ; valid directions are as follows
    ;
    ; enum
    ; {
    ; kDiretion_none = 0,
    ; kDiretion_up = 1,
    ; kDiretion_upright = 2,
    ; kDiretion_right = 3,
    ; kDiretion_downright = 4,
    ; kDiretion_down = 5,
    ; kDiretion_downleft = 6,
    ; kDiretion_left = 7,
    ; kDiretion_upleft = 8,
    ; };
    ;


    ; returns the left-stick position from right to left
    float Function GetLX() global native


    ; returns the left-stick position from up to down
    float Function GetLY() global native


    ; returns the right-stick position from right to left
    float Function GetRX() global native


    ; returns the right-stick position from up to down
    float Function GetRY() global native


    ; returns the left stick's direction
    int Function GetLSDirection() global native


    ; returns the left stick's direction
    int Function GetRSDirection() global native


  3. NeoH4x0r
    NeoH4x0r
    • member
    • 10 kudos
    Locked
    Sticky
    Forum post link
    With the release of v1.7.3.3 support was added for an ini confg file.
     

    There was a typo in the ini file and to avoid confusion ... this what is how it should read
    The confusing part was related to use_extended_controls (the default is 1 or on)...the
    description said if it was turned on support would be disabled for those keys.
     
    latest ini options as of 1.7.3.13
     


    [Globals]
    ; 0=off 1=on (default is on)
    enable_plugin=1


    ; 0=off 1=on (default is off)
    enable_debug=0


    ; 0=off 1=on (default is off)
    enable_verbose_debug=0


    [Features]


    ; NOTE: the following options have been removed
    ; * send_movement_keys 
    ; * send_major_movement_keys_only
    ; ** these were causes too many issues and slowing down controller input


    ; 0=off 1=on (default is on)
    ; with this enabled the following controls will be supported when using a gamepad
    ; Forward/Back/StrafeLeft/StrafeRight/QuickInventory
    ; QuickMagic/QuickMap/QuickStats/Console/
    ; Screenshot/MultiScreenshot/AutoMove
    ; if this is turned off
    use_extended_controls=1


    ; 0=off 1=on (default is off)
    ; requires use_extended_controls to be enabled (otherwise does nothing)
    ; the following controls will not be tapped when called with TapKey, etc
    ; Forward/Back/StrafeLeft/StrafeRight
    ; instead there underlying bound key will be used
    ; For instance: Input.TapKey(Input.GetMappedKey(17)
    ; 17 is W and by default that is bound to Forward
    ; When using a gamepad Forward is not bound to any gamepad button
    ; so the left joystick has to be set to simulate Forward
    ; this causes issues when you wanted to tap W for a hotkey mod
    ; and not make the character move
    ;
    ; so this disables simulating movement via the left joystick
    ;
    ; this will not however prevent AUTOMOVE from working with a gamepad
    ; if you wish to block that enable disable_joystick_automove
    ;
    disable_joystick_movement_simulation=0


    ; 0=off 1=on (default is off)
    ; requires use_extended_controls to be enabled (otherwise does nothing)
    ; will disable support for AUTOMOVE when using a gamepad
    disable_joystick_automove=0


     
    ----------------------------------------------------
    All hotkey mods (or any mod in general) should use 

    Function RegisterForKey(Int KeyCode) Native

    To listen for key down/up events.

     

    The author can also use

    Function RegisterForControl(string control) Native

    to listen for control down/up events

     

    However, some older mods use 

    Function RegisterForUpdate(float afInterval) native  and  Event OnUpdate()

    and call Input.IsKeyPressed(key) within the OnUpdate event.
     
    with the release of v1.7.3.3 ... this should no longer be an issue.
    The code hooks the keyboard events and detects when a key in in down/up state and
    makes it available through calls to IsKeyPressed.
     
    Also, TapKey/HoldKey/ReleaseKey use keybd_event / mouse_event to simulates key presses,
    this has the added benefit of triggering responses to the onKeydown/up events registered by RegisterForKey
    as well as passing them on to the game engine.
     
    An Example for a mod that has added functionally (not previously present) -- it use Input.IsKeyPressed.
    Flying Mod Beta by PorroOne
     
    When you fly in that mod, and press Forward/Back/StrafeLeft/StrafeRight -- animations will play based on the direction.
    Those will work correctly with a gampad (if use_extended_controls is set to 1)
     
     
    This might even fix an issue with FrostFall
     
    About Hand Warming Animations
    If you play Frostfall with hand-warming animations turned on, you will need to press the Jump, Ready Weapon, or Attack keys in order to exit the animation before becoming completely warm.

    This is because there is currently no way to detect analog joystick input from the controller.

    Keyboard users can tap a movement key to exit the animation.

     

     

     

    Again with use_extended_controls is set to 1

    Frostfall should be able to detect that the character is moving (because the code looks at the 

    joystick postion and translates that one of the mapped movement keys.

    ----------------------------------------------------
    The rest of this post is reserved for future use.
  4. MortiusVicimus8
    MortiusVicimus8
    • premium
    • 0 kudos
    Can you transfer this to Special Edition so it can be used for Cloud of Bats?
    Using the keyboard suck being limited to moving vertically and horizontally 
  5. Masterjax
    Masterjax
    • member
    • 2 kudos
    wrong mod, please delete.
  6. Spartocus
    Spartocus
    • premium
    • 2 kudos
    Has anyone heard if there is a port to SE here yet?

    Thanks folks!
    1. Spartocus
      Spartocus
      • premium
      • 2 kudos
      Anyone?
    2. Karunavai
      Karunavai
      • member
      • 95 kudos
      +1 :( need this in SE
    3. Spartocus
      Spartocus
      • premium
      • 2 kudos
      Any new news on SSE front?
    4. Spartocus
      Spartocus
      • premium
      • 2 kudos
      Any news yet here anybody?
    5. dakkarlee
      dakkarlee
      • member
      • 0 kudos
      SE port yet lol or how to get this to work on SE
    6. Darnexx
      Darnexx
      • premium
      • 308 kudos
      +1
    7. xxss5songokuxx
      xxss5songokuxx
      • member
      • 27 kudos
      Why don't you use Gamepad plus https://www.nexusmods.com/skyrimspecialedition/mods/27007?tab=description? I thought it was supposed to be based on this. What's better about this version?
  7. livipup
    livipup
    • premium
    • 46 kudos
    So this allows you to use your gamepad and keyboard at the same time?
  8. OmecaOne
    OmecaOne
    • premium
    • 209 kudos
    If I were to disable a key, let's say the one to draw your weapon:

    EquipKey = Input.GetMappedKey("Ready Weapon")
    Input.DisableKey(EquipKey)

    and then used RegisterForKey(EquipKey), would the script still get sent an OnKeyDown event for EquipKey?
  9. NYKevin
    NYKevin
    • supporter
    • 8 kudos
    The following Papyrus code (taken from Jaxonz Smart Looter Continued) does not work correctly when this mod is installed:

    Event OnKeyDown(Int keyCode)
    ; I added this code for debugging purposes:
    int i = 0
    int max = input.GetNumKeysPressed()
    Notification("Keys held: " + max)
    while i < max
    Notification("Found key " + input.GetNthKeyPressed(i))
    i+=1
    endwhile
    ; I did not touch this code:
    if input.IsKeyPressed(54) || input.IsKeyPressed(42) ;left or right shift held down.
    ; Do the thing I wanted to do.
    else
    ; Do something entirely different.
    endif

    Specifically, GetNumKeysPressed() returns 0 and neither of the IsKeyPressed() functions returns true, even when I'm holding down shift.

    Uninstalling this mod fixes the problem, but (obviously) the gamepad stops working.
  10. MoonpawF
    MoonpawF
    • member
    • 0 kudos
    How the hell do you fix the issue caused by the plugin that prevents other mods from detecting keys being held? it f*#@ing sucks
  11. SerchBoogie
    SerchBoogie
    • member
    • 11 kudos
    Ok I installed it but now how do I get the better gamepad support?. I'm trying to get 3pco to work correctly but it won't. And I don't notice any difference before and after installing this. how do I use this?, where is the better support?.

    Thanks.
    1. NeoH4x0r
      NeoH4x0r
      • member
      • 10 kudos
      TL:DR
      Long Story short:
      The support for sending WSAD, when moving the left joystick was removed becuase it greatly slowed down controller response.

      From the 3PCO page:

      GamePad Compatibility:
      Shoutout to YouTuber Inpa for making a step-by-step video on how to do this.
      https://www.youtube.com/watch?v=dRlDAVxcXO0&feature=youtu.be

      Native support is difficult, because 3PCO relies on reading the direction your character is moving. It's easy to do with keyboard but
      there is no easy way to do this with an analog stick (at least with Papyrus scripts). If you want to use a controller, use an external software,
      like XPadder, to map your controller's analog stick to your left-right keys on the keyboard.



      Note the youtube-video by Inpa mentions using "Better mouse and gamepad support".

      I suppose that I should add back the WSAD movement key support, but have it disabled by default and make a note that if enabled it will slow down controller response.

      PS: I will be opening a bug report about this
      =================================================================================================


      SerchBoogie (07 September 2019, 1:21PM)

      Ok I installed it but now how do I get the better gamepad support?.
      I'm trying to get 3pco to work correctly but it won't. And I don't notice any
      difference before and after installing this. how do I use this?, where is the better support?.

      Ruffi123456789 (20 August 2019, 12:14PM)

      I can't get this to work with 3rd Person Camera Overhaul. I'm using Gamepad plus plus,
      this mod and 3pco but it won't change direction when moving


      -------------------------------------------------
      Better Mouse and Gamepad Support was designed to make simulated mouse and gamepad input actually work when
      calling certain skse methods to tap/press/hold keys.

      Basically it corrects oversights in the SKSE simulated input functions (only keyboards were supported for
      fake keypresses -- mouse or gamepad buttons would not work).

      ** That is what the "better support" is refering to -- it fixes the above.

      -------------------------------------------------

      Decompiling the scripts from 3pco (in LoadCamINI.psc)

      The left / right keys are initially bound to Strafe Left/Strafe Right in auto-mode (meaning it will be
      the bound key for either keyboard or gampead buttons, depending on which is enabled.

      Exceprt from LoadCamINI.psc:
      function OnGameReload()

      parent.OnGameReload()
      Pages = new String[4]
      Pages[0] = "General"
      Pages[1] = "Sheathed"
      Pages[2] = "Melee"
      Pages[3] = "Ranged"
      leftKey = input.GetMappedKey("Strafe Left", 255)
      rightKey = input.GetMappedKey("Strafe Right", 255)


      Those lines at the bottom are the problem (at least for left/right key mapping)

      leftKey = input.GetMappedKey("Strafe Left", 255)
      rightKey = input.GetMappedKey("Strafe Right", 255)



      These are the bindigs in controlmap.txt

      Forward0x11 (W)0xff0xff1100x801
      Back0x1f (S)0xff0xff1100x801
      Strafe Left0x1e (A)0xff0xff1100x801
      Strafe Right0x20 (D)0xff0xff1100x801


      There are no bindings for Forward/Back/Strafe Left/Strafe Right for gamepads -- they have valuye 0xff, and that is what is returned by input.GetMappedKey.

      NOTE: that Gamepad Plus Plus (GPP) removed theses bindings completely. (a hotfix was added to restore them, i.e. GPP Movement Keys HotFix on the downloads page)

      Furthermore, it seems like there is no way to re-bind the left/right key in 3pco to some other key (keyboard, mouse, or gamepad).

      At first the keys left/right are set to 0xff,
      but when resetting the keys they get set to left=30 (0x1e) (A) and right=32 (0x20) (D).
    2. NeoH4x0r
      NeoH4x0r
      • member
      • 10 kudos
      I just posted an interim workaround...

      1) backup your current ini file: (neoh4x0r-gpad.ini) in the skse/plugins folder

      2) uninstall the version you have installed

      3) install version 1.7.3.12

      4) update neoh4x0r-gpad.ini with the settings listed in the first sticky post.

      (here I have debug/verbose_debugg enabled):

      [Globals]
      enable_plugin=1
      enable_debug=1
      enable_verbose_debug=1
      [Features]
      use_extended_controls=1
      send_movement_keys=1
      send_major_movement_keys_only=0


      5) By setting enable_debug/enable_verbose_debug to 1 a log file will be created in the SKSE folder (in your user's documents)
      EG: User's Home/My Games/Skyrim/SKSE/neoh4x0r-gpad.log

      6) Please let me know if this doesn't work (or there are other problems)
  12. Ruffi123456789
    Ruffi123456789
    • supporter
    • 0 kudos
    I can't get this to work with 3rd Person Camera Overhaul. I'm using Gamepad plus plus, this mod and 3pco but it won't change direction when moving
    1. NeoH4x0r
      NeoH4x0r
      • member
      • 10 kudos
      I will be posting a reply to SerchBoogie with a similar issue.
  13. UnknownLOL
    UnknownLOL
    • member
    • 8 kudos
    @NeoH4x0r:

    Hmm, I thought those settings were only relevant for actual gamepad users. I'm playing with keyboard and mouse. Also I haven't used Better Gamepad Key Support before, so I can't really say if the two mods worked together at some point or not.

    It looks like directional keys get detected alright, because I can use "double tap directional key" input method without problem. But when I change input method (in tkDodge mcm menu) to "directional key + dodge hotkey" it doesn't work. Dodge hotkey by itself is also not an issue - there are options to set it to dodge backward or forward without any extra movement key, just by tapping it. But it is less preferable, because it is a single direction dodge.

    To put it simple: a control scheme which uses "W, W" / "A, A"... etc for dodge works, a scheme which uses only hotkey (tested keyboard and mouse buttons) works. The option which doesn't work is "W/A/S/D + hotkey" combo.

    Tried the suggested settings anyway, still nothing. I would test an actual gamepad out of curiosity, but I don't have one at the moment.
    1. NeoH4x0r
      NeoH4x0r
      • member
      • 10 kudos
      Hmm, I thought those settings were only relevant for actual gamepad users. I'm playing with keyboard and mouse


      This plugin is designed for gampad users -- if you aren't using gampad then you really don't need to this plugin installed/running.

      I would remove BKGS from you skse/plugins folder and try using TkDodge again.

      This might be an issue with the way that tktk has written the OnKeyDown Event.

      Try pressing and holding the Directionkey -- while holding said key, then press the dodge key.


      This is a small snippet of code from aaaTKDodgeScript.psc

      OnKeyDown fires in reponse to a key being pressed (assuming that they key has been registered for)
      If you press backkey - OnKeyDown will fire but it will never pickup the dodgekey being pressed.

      The order to do the pressing: backkey (hold) and then dodgekey

      --------------------------------------------------

      function RegKey()
      self.RegisterForKey(forwardkey)
      self.RegisterForKey(leftkey)
      self.RegisterForKey(backkey)
      self.RegisterForKey(rightkey)

      function OnKeyDown(int KeyCode)
      if InputMethod == 0
      if input.IsKeyPressed(backkey)
      if KeyCode == dodgekey
      self.DoDodgeAction(aaaTKDodgeBack)
      endIf
    2. UnknownLOL
      UnknownLOL
      • member
      • 8 kudos
      "This plugin is designed for gampad users -- if you aren't using gampad then you really don't need to this plugin installed/running."

      I do need it though, it is a requirement for a hotkey mod I'm using (Fast Cast). Dodge works fine without BGKS or with its plugin disabled through ini file. Actually if I won't manage to find a solution I would rather remove TKDodge from my load order, since combat system in Skyrim wasn't designed for dodge anyway, I use it for a bit of extra mobility.

      Also, the issue would probably persist when using gamepad too, no? TKDodge supports gamepad (supposedly), but if used with BGKS it might mean it runs into the same issue. I can't be sure though, it needs testing.

      "Try pressing and holding the Directionkey -- while holding said key, then press the dodge key."

      That's what I'm doing - directional key is held down, then the dodge button. I'll try removing TKDodge, cleaning scripts and reinstalling, maybe that'll help.
    3. NeoH4x0r
      NeoH4x0r
      • member
      • 10 kudos
      I'll have to PM Curalmil about Fast cast -- because BKGS doesn't have anything to do with the controlmap.txt file (they should only SKSE for hotkeys and control lookups) -- BKGS only improves controller support ontop of what SKSE does.


      I'm afraid I don't understand what the issue with tKDodge is...

      You said "Dodge works fine without BGKS or with its plugin disabled through ini file", but then you
      say "directional key + dodge hotkey" doesn't work.


      By default (without a gamepad connected or enabled) if you hold a directional button and then
      press left-alt does it work then ?

      If it does work that way (without changing the dodgekey) -- then it would seem to be bug with how tkDodge
      updates and/or registers the dodgekey.

      PS: I have pm'd Curalmil about BKGS being a requirement for Fast cast (even if a controller is not used)
      The crux of the issue being that it only benefits gamepad users (and does't help non-gamepad users at all).
    4. UnknownLOL
      UnknownLOL
      • member
      • 8 kudos
      "You said "Dodge works fine without BGKS or with its plugin disabled through ini file", but then you say "directional key + dodge hotkey" doesn't work."

      Right. Directional key + dodge key works without BGKS, and doesn't work with it installed, there is no controversy.

      "By default (without a gamepad connected or enabled) if you hold a directional button and then press left-alt does it work then ?"

      Doesn't work either.

      Well, I'm out of ideas as to why it won't work myself. That's why I'm posting my finding here =)
      There are two posts with the same problem in TKDodge comment section, they never got any answer though.

      As for Fast Cast, I'm pretty sure the latest version doesn't work without BGKS - the hotkeyed spells and abilities are equipped, but aren't actually fired, I tried it.
    5. NeoH4x0r
      NeoH4x0r
      • member
      • 10 kudos
      I did some testing at it is partially true -- that Fast cast needs BKGS.

      The input automation in skse (simulated button taps/presses) was apparently broken for the mouse as well as the gamepad.

      If you were to setup a hotkey for 'flames', assigned it to a slot, then pressed the hotkey for that slot -- without BKGS installed and the attack setup as left mouse/right mouse button, then it would not work.

      However, if you then remapped left/attack right/attack to keyboard keys it would work without BKGS installed.

      I guess I'll update my list of mods as well as the description to indicate that it also impacts the mouse.

      Again -- broken code in SKSE where input simulation only works for the keyboard (not the mouse or gamepad).
    6. nsecuma
      nsecuma
      • member
      • 0 kudos
      Hi, and sorry for the thread necromancy, but I actually had the same issue and this was the only place I found any mention of it. I managed to put together a dirty workaround, and thought I'd mention it here in case someone ends up going down the same rabbit hole I did.
      In aaaTKDodgeScript.psc, where the issue is, I ended up having the script keep track of four booleans (RightKeyIsDown, LeftKeySsDown, BackKeyIsDown, ForwardKeyIsDown) to correspond to the up/down state of each of the four directional keys. In the event OnKeyDown is passed dodgekey, it then checks against these booleans to determine the behavior to take.
      It looks like this:

      Spoiler:  
      Show
      function OnKeyDown(int KeyCode)
      if InputMethod == 0
      if KeyCode == dodgekey
      ;movementdirection = 0 ;GetMovementDirection()
      if RightKeyIsDown
      self.DoDodgeAction(aaaTKDodgeRight)
      elseIf LeftKeyIsDown
      self.DoDodgeAction(aaaTKDodgeLeft)
      elseIf BackKeyIsDown
      self.DoDodgeAction(aaaTKDodgeBack)
      elseIf ForwardKeyIsDown && ForwardRoll == 1
      self.DoDodgeAction(aaaTKDodgeForward)
      endIf
      elseIf KeyCode == backkey
      BackKeyIsDown = true
      elseIf KeyCode == forwardkey
      ForwardKeyIsDown = true
      elseIf KeyCode == leftkey
      LeftKeyIsDown = true
      elseIf KeyCode == rightkey
      RightKeyIsDown = true
      endIf


      And in OnKeyUp I added this clause to the bottom:

      Spoiler:  
      Show
      if InputMethod == 0
      if KeyCode == dodgekey
      DodgeKeyIsDown = false
      elseIf KeyCode == backkey
      BackKeyIsDown = false
      elseIf KeyCode == forwardkey
      ForwardKeyIsDown = false
      elseIf KeyCode == leftkey
      LeftKeyIsDown = false
      elseIf KeyCode == rightkey
      RightKeyIsDown = false
      endIf
      endIf


      I put similar handlers in the busy state's OnKeyDown and OnKeyUp functions, so that if you change which keys you're pressing while in the middle of a dodge, it'll attempt to keep up with you. Overall, it works okayish - it does sometimes drop inputs, and I'm sure it's both heavier on scripts and more sensitive to script lag, but it's at least playable. Hope this helps somebody.