Menu β–Ύ β–΄

Is it possible to make a "walk button", if so how, if not could it be implemented?

2019-04-27
2019-08-24
  • ANTOINE VIEILLEFONT

    Hello.

    I would like to lower the saturation (scale ; maximum output) of the virtual left ministick by pressing, or holding a key, to make a character walk for exemple instead of constantly running.
    Is it actually possible to do, if so I need some help please x) if not could it be implemented?

    Thanks for this tool !

    Antoine from France.

     
  • VIRTUAL

    VIRTUAL - 2019-04-28

    You can do this through an internal joystick (a new internal device).

    Example:

    Keyboard [W] Press/Release => internal joystick Axis [Y] +/- 50%
    Keyboard [S] Press/Release => internal joystick Axis [Y] -/+ 50%
    Keyboard [D] Press/Release => internal joystick Axis [X] +/- 50%
    Keyboard [A] Press/Release => internal joystick Axis [X] -/+ 50%
    internal joystick Axis [X] Change => virtual Left Stick [X] = 100%*Input
    internal joystick Axis [X] Release => virtual Left Stick [X] Release
    internal joystick Axis [Y] Change => virtual Left Stick [Y] = 100%*Input
    internal joystick Axis [Y] Release => virtual Left Stick [Y] Release
    Keyboard [F1] Press => internal joystick sensitivity Axis [X] = 25%
    Keyboard [F1] Press => internal joystick sensitivity Axis [Y] = 25%
    Keyboard [F2] Press => internal joystick sensitivity Axis [X] = 100%
    Keyboard [F2] Press => internal joystick sensitivity Axis [Y] = 100%
    
     
    πŸ‘
    1
  • ANTOINE VIEILLEFONT

    Thanks, it is working, however I need to release direction key and press it again for the change to apply to the axis, is there a way to apply it directly as I press or hold the modifier?

     
  • VIRTUAL

    VIRTUAL - 2019-04-28

    Try this:

    Keyboard [F1] Press => internal joystick sensitivity Axis [X] = 25%
    Keyboard [F1] Press => internal joystick sensitivity Axis [Y] = 25%
    Keyboard [F1] Release  => internal joystick sensitivity Axis [X] = 100%
    Keyboard [F1] Release  => internal joystick sensitivity Axis [Y] = 100%
    
     
    • ANTOINE VIEILLEFONT

      This is already what I have. To get 25% I need to release directional key and press it again.
      Same if I want to return to 100%. The change only apply after I release and press directional key again.

       
  • VIRTUAL

    VIRTUAL - 2019-04-28

    I found that only the X axis of the internal joystick is working correctly. I will fix it in the next update. Now you need to use 2 internal joysticks for 2 axes.
    I attached a picture with an example.

     
    ❀️
    1

    Last edit: VIRTUAL 2019-04-28
    • ANTOINE VIEILLEFONT

      So it looks to be working fine when I monitor using DiView or Joy.cpl, but in game (State of Decay GOTY 1) the character doesn't stop, like if the stick would not come back to center, I also can't go straight due to that issue.

      Muarf, making a walk button looks more complicated than I though x /

       
      • VIRTUAL

        VIRTUAL - 2019-04-29

        I fixed the errors in the internal joystick module. New controls:

         
        πŸ‘
        1
        • ANTOINE VIEILLEFONT

          It work as it should, sadly in game, the ministick seems to not recenter, another problem is that when the character walk and I turn the mouse, the character accelerate Oo. Is that cause the mouse kinda emulate both the right mini stick + a bit of left ministick?

           
          • VIRTUAL

            VIRTUAL - 2019-04-30

            Try using soft sensitivity switching. I attached an example of a settings file (there are additional settings for internal devices). Controls:

            P.S. While doing this example I found several errors in the module "calculator" and corrected them.

             
            • ANTOINE VIEILLEFONT

              As soon as I press Lshift the VXbox is stuck at center. Doesn't seem to be working on my side. I think the problem isn't with the sensitivity switch however, I can just run the game with zqsd setup, and see the problem that the VXbox stick doesn't recenter - come back to neutral. (Even if it does when monitoring in Joy.cpl).

               
              • VIRTUAL

                VIRTUAL - 2019-05-01

                Perhaps the point is that the value of the axis in the game can not change instantly (<1 millisecond). It is necessary to check the smooth (~ 25-100 milliseconds) reduction / increase (from 0% to 50%, from 50% to 0%, from 50% to 100%, from 100% to 50%, ...). Below is a picture with an example where auto-reset is disabled.

                 
                • ANTOINE VIEILLEFONT

                  Indeed that seems to be the problem. Now, need to find a way to do "soft / smooth" axis modification with keyboard press and release x /

                   
  • VIRTUAL

    VIRTUAL - 2019-05-02

    Attached a file with settings. Details:
    - 84 bindings.
    - 10 timers (4 timers for each axis + 2 timers for changing sensitivity). The interval is 10 milliseconds.
    - 8 calculators (3 calculators for each axis + 2 calculators for changing sensitivity).
    - Min. sensitivity set to 25%. Stored in the calculator β„–8 (the initial value of the operand 2 = 0.25).
    - The dead zone for the internal joystick (axis X, Y) is set to 5%.

    P.S.: Do not forget to download the latest version of the program (1.0.6.2).

     
    ❀️
    1

    Last edit: VIRTUAL 2019-05-02
    • ANTOINE VIEILLEFONT

      Waooh, thanks a lot for your work, we (More you than me x) ) are getting close! The character still doesn't stop all the time when I release directional key. And when I move the mouse, if the "character, or virtual ministick.." isn't perfectly centered then the character accelerate. I'll need some time to digest all that profile :sweat-smile: then I'll try to smooth things even more maybe? I tried to increase the deadzone but it doesn't help.

      Edit : I think I've found the problem. The character stop correctly and doesn't accelerate again when I move the mouse, when I release the directionnal key when the mouse isn't moving.

       

      Last edit: ANTOINE VIEILLEFONT 2019-05-02
  • ANTOINE VIEILLEFONT

    I think I've found the problem. The character stop correctly and doesn't accelerate again when I move the mouse, when I release the directionnal key when the mouse isn't moving.

    Yep, I confirm.

    (Old draft)


    Hello πŸ‘‹
    I pretty much given up trying to get a "walk button" for that game (State of Decay). I'm trying to make one for BioShock Infinite now and am getting pretty close.

    Here is what I have at the moment :

    On top of that I also have this on AutoHotKey :

    ~$LControl Up::
    {
        SendInput z
        If GetKeyState("z", "P")=1
        {
            Send {z down}
            Return
        }
        If GetKeyState("q", "P")=1
        {
            Send {q down}
            Return
        }
        SendInput q
        Return
    }
    

    This is so that when I release LControl it send both a Z and Q quick pulsation (1ms) no matther what direction I am currently moving so that both X and Y ministick sensitivity revert back to "walking". The correct walking sensivity, either only on one axis at a time, in that case sensitivity is 70%, or in diagonal, both X and Y at the same time in which case it need to be 50% otherwise the character start running. It also check if I'm currently holding either Z or Q and if so it hold them down as well.

    It works, but sometime the virtual ministick doesn't reset correctly. I guess this is because many axis sensivity modification are happening at the same time.. Any advise for me 😊

    Thanks in advance.

     

    Last edit: ANTOINE VIEILLEFONT 2019-08-06
  • VIRTUAL

    VIRTUAL - 2019-08-08

    The virtual controller 1.0.6.4 allows you to set the maximum rate of change of the axis value of the internal joystick. Try this configuration file to check the β€œwalk button”.
    You can try different values of the maximum speed (400%/s, 250%/s, 100%/s, ...).

     
  • ANTOINE VIEILLEFONT

    Nice new feature! πŸ‘
    Your profile work, mine is crach after a few moment, probably too many calcul at the same time 😣
    The problem I'm trying to solve with my messy profile πŸ˜… is that when going in diagonal, the character move faster than in straight line.
    aΒ² + bΒ² = cΒ²
    To prevent that my idea is for exemple :
    When I move forward (Y axis), to decrease sensitivity of the X axis, and vice versa.

    I'll try to debug my profile this week end.

    Thanks again for that new "max rate" feature πŸ‘

     
    • VIRTUAL

      VIRTUAL - 2019-08-09

      You probably need a circular region of axis values:

      Instead of a rectangular area:

      The rectangular area is universal. Each axis is independent. In the circular region, two axes must be connected.
      In the next update, I will probably add a circular area for vXbox devices.

       
      ❀️
      1
    • VIRTUAL

      VIRTUAL - 2019-08-23

      Try a new version.

       
      ❀️
      1

      Last edit: VIRTUAL 2019-08-23
      • ANTOINE VIEILLEFONT

        Working perfectly for BioShock Infinite, thanks you very much! (●'β—‘'●)

        I tried quickly in State of Decay but in this one there is still a problem.
        If I release the virtual left ministick while the mouse is moving, it is like the ministick doesn't recenter completely. From this point moving the mouse faster make the character walk/run faster.
        I'll try to solve this one later.

        thanks again πŸ‘

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.