[REL] Fast Click 1.0.0

Discussion in 'Released Mods' started by wondible, October 3, 2015.

  1. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Commands are registered immediately instead of waiting to see if it is an area command - which means you have no area commands. Hold ALT or continue holding the command mode key to escape to the area-capable version.

    Not applied to build mode, in order to preserve lines, areas, and facing.

    - https://github.com/JustinLove/fast_click
    - http://wondible.com/pa/fast_click_v1.0.0.zip
    - PAMM

    Dependencies

    Live Game Input Refactor

    Changes

    ## 1.0.0

    - Can hold command mode key for area capable.
    - Remove patrol special case
    - ALT escape for contextual action
    - Special case move command to contextual action to support Cover The Line
    Last edited: October 7, 2015
  2. underscore1112

    underscore1112 Member

    Messages:
    74
    Likes Received:
    36
    i love you.
    killerkiwijuice likes this.
  3. underscore1112

    underscore1112 Member

    Messages:
    74
    Likes Received:
    36
    incompatible with cover the line </3
    stuart98 likes this.
  4. underscore1112

    underscore1112 Member

    Messages:
    74
    Likes Received:
    36
    i'm guessing that my issues were stemming from the game waiting to see if my commands are going to be area commands? This has resolved my issues, but functions oddly due to the whole alt thing. Is it possible for an implementation that only affects basic right and left click?
    Also, would it be possible for instead of holding alt, to press and hold a hotkey for a specific command for it to be an area command? I never had any issues with the actual area commands, its just the situations I gather where area commands are not even applicable that are making the game ignore inputs.
    Also, is there a way to make this compatible with cover the line mod? This mod seems to cause cover the line not to function which i use liberally, so I can't use this until I can use both in conjunction :/
  5. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    "probably". The input routine sees "mousedown", then captures all input to make sure it receives "mouseup", and in some cases "mousemove" for interactive feedback. The two issues are 1. the command can't be issued until the mouseup 2. all input gets sunk into the capture between them.

    Theoretically this can be improved my making the click command a strict subset of the hold command; that would be hard to impossible with shift commands because you would need to replace only the last item on the queue if it turned into an area.

    Do you mean not affecting explicit command modes?

    Might be.

    I believe I left out the alt escape from default right click since nothing in vanilla uses hold. I think you'd need some kind of mode or modifier to know whether to go on mousedown, or wait for a line.
    underscore1112 likes this.
  6. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    I ran across something interesting reviewing my hold-to-pan code from keybind extensions. "mousetrap waits for a keyup event before sending the NEXT keydown event."

    So if you're going really fast, the scenario is (vanilla handler)

    - keydown (say attack command mode)
    - mousedown (input capture begins)
    - keyup (eaten by by capture, doesn't get to mousetrap)
    - mouseup (performs command and exits capture)
    - keydown (ignored by mousetrap because it's waiting for keyup)
    - keyup (mousetrap resets)
    underscore1112 and cptconundrum like this.
  7. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Fast Click 1.0.0

    - Can hold command mode key for area capable.
    - Remove patrol special case
    - ALT escape for contextual action
    - Special case move command to contextual action to support Cover The Line
    underscore1112 likes this.
  8. underscore1112

    underscore1112 Member

    Messages:
    74
    Likes Received:
    36
    nice! thanks you, i'll try it out when i get a chance
  9. underscore1112

    underscore1112 Member

    Messages:
    74
    Likes Received:
    36
    so far so good, it is taking a little getting used to but it is functioning well!
    wondible likes this.
  10. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Let me know if you come up with something more natural. Maybe some day I'll try a captureless rewrite, though often those kinds of exercises teach me why it was done that way in the first place.
  11. underscore1112

    underscore1112 Member

    Messages:
    74
    Likes Received:
    36
    I will definitely keep this in my thoughts.

    I cannot thank you enough for taking the time to make this. I wanted badly to jump ship and go elsewhere with my gaming adventures. I certainly was not ready though. This has alleviated a great amount of frustration for me.
  12. jackburton176

    jackburton176 Member

    Messages:
    63
    Likes Received:
    15
    does this make you kill faster?
  13. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    The vanilla handlers are a couple milliseconds slower because they wait for the mouse button to be released before issuing a command. If those couple of milliseconds make a difference in your game, rock on.

    During those couple of milliseconds, it was also capturing and ignoring keydown and keyup events, which was causing noticeable issues for some people.
  14. elodea

    elodea Post Master General

    Messages:
    1,694
    Likes Received:
    3,040
    how did i never know about this wonderful mod?

    nice

Share This Page