Project Zomboid

Project Zomboid

71 hodnocení
BindAid - Input Handler
2
2
2
   
Ocenit
Přidat do oblíbených
Oblíbeno
Odebrat z oblíbených
Velikost souboru
Přidáno
Aktualizováno
199.853 KB
10. bře. 2023 v 14.26
16. bře. 2023 v 11.31
Poznámky ke změnám (3) – zobrazit

Klikněte na „Odebírat“ pro stažení položky
BindAid - Input Handler

Popis
Supports B41+. Works in Multiplayer
A new save is not required



Input Binding Manager for Project Zomboid which provides optimizations for keyboard input events and additional Mouse button support with optional keyboard emulation.

Features
  • Keyboard Input Optimization
  • Modifier key Support (Currently for Modders. Now Syncs in MP!)
  • Additional Mouse Button Support
  • Mouse Button Keyboard Emulation
  • Autohide the Mouse Cursor
  • Easy API for Modders!

Modifier Key
By default, Left Control is set to be the "Aim" key with the keyboard. I believe the key can be put to better use, and intend to replace the key's usage to be a Modifier. I HIGHLY RECOMMEND that you unset the default "Aim" key to nothing (you have Right Click), or change the Modifier key to something else.

For now the Modifier key is mostly a Modder's tool, but in the future I plan on allowing vanilla keybindings to be set with the Modifier.

Mod Options

Mod Options is REQUIRED to configure this mod; however, it is not a requirement for its operation. When your first install this mod, please take some time to set up its configuration based on your own needs using Mod Options. Further information on the available options is available below.

When Mod Options is NOT enabled for a save, your configuration will still be read and applied. THIS MEANS Server Owners can safely include this mod without also requiring Mod Options, and user configuration will still be used.

Keyboard Input Optimization

A full breakdown is available here: BindAid's Keyboard Input Optimization - What It Be, and How It Do

In summary, there are 4 general events that are triggered for input handling, and each event will call multiple functions for each keypress.
Event
Trigger
# of Functions
OnKeyStartPressed
When a key is pressed
10
OnKeyKeepPressed
When a key is held, every frame
9
OnKeyPressed
When a key is released
26
OnCustomUIKey
When a key is released
1

This occurs for ALL keypresses, whether they have actions bound or not. Multiple keypresses multiply the number of functions called per frame. This is not an issue for most people, but I have organized and optimized how this is handled so only 1 function is called during the event, which then calls the keypress if applicable.

This feature can be disabled in the Mod Options configuration. If changed while in-game, a restart is required.

Compatibility

I have created this in a way that should have maximum compatibility. If you have any issues with a vanilla key not being triggered, I would recommend disabling this optimization and letting me know. I cannot fix all mod compatibility, and some may require changes by the Modders. For Modders, please see: BindAid - Modder's Resource

  • Mods that add their own NEW keys are not affected.
  • Mods that modify vanilla functions for keypresses will be compatible as long as their changes are made no later than OnGameStart, and any modifications are forwarded.

Mouse Buttons

That's right, BindAid provides support for additional Mouse Buttons! Project Zomboid provides support for an additional 6 Mouse Buttons, but only has events bound on Left and Right Click. I have added Events to handle more Mouse Buttons!

You will need to select the number of Mouse Buttons that you would like to have support for in the Mod Options. A restart of the game is required after you have made this change.

The Mouse Buttons have 2 different modes: Mouse Button Events (default) and Keyboard Emulation. An option is available to enable both methods to run as well.

Mouse Button Events

When Mouse Button Events are in use, the additional Mouse Buttons are handled similarly to keybind events. Modders can hook into these events to allow additional actions to be done on a Mouse Button Press/Hold/Release. Please see: BindAid - Modder's Resource

THIS MEANS, BY DEFAULT, MOUSE BUTTONS PERFORM NO NEW ACTIONS! MODDERS MUST ADD SUPPORT FOR THIS!

Keyboard Emulation

New in the "Key Bindings" Options Tab will be the Mouse Buttons that are supported under the "BindAid" section, each set to a key bind of "None". Setting a Key here on a Mouse Button will instead cause an emulated Keypress to be done instead of the Mouse Event! For example, you can bind "Reload" to the Middle Mouse Button.

NOTE!!! The Emulated Keypress is ONLY done in Lua, so it will not trigger functions defined in Java. This means you cannot assign a key to "Move Forward" or something like that; it won't work. Actions such as Reloading, Shout/Emote, and many others are available, as well as new keybinds added by other mods (the main target).

Workshop ID: 2945066057
Mod ID: BindAid
Populární diskuze Zobrazit vše (3)
8
28. čvn. 2024 v 8.36
Report Bugs Here
dhert
4
13. bře. 2023 v 1.03
PŘILEPENO: BindAid - Modder's Resource
dhert
0
10. bře. 2023 v 14.31
PŘILEPENO: BindAid's Keyboard Input Optimization - What It Be, and How It Do
dhert
Počet komentářů: 28
153timothy7 7. zář. v 6.49 
Loving the mod in SP b41!
Made my game much easier and it was a life savor!
I'm using it to speed up the game while crafting, pry opening doors, reading books and stuff.
Don't know if it's my mouse problem or something else, but my mouse 4 button is not working.
Still love the mod!
Khajo 4. srp. v 9.02 
For me it Only works when im not on the server and only the server has this mod installed So try to get that freaking mod on a server where the admins just say No

Yayy Dog shit
Fill-Lips 28. čvc. v 9.20 
For anyone wanting to use this mod for those side mouse buttons, Build 42 (Unstable as of this comments posting) has support for them without the need for this mod.
sneakyfildy 3. čvc. v 12.12 
ok so I made it work.
1. In the main menu go to MODS, select BindAid and ModOptions and click "enable" at the right panel
2. then in OPTIONS > Mods, "Run mouse and emulated events" - check (also I've unchecked auto-hide but I don't think it matters). I think it worth restarting the game after that,
3. OPTIONS > Key bindings, scroll to the very bottom. There I put "[" and "]" keys into "Mouse button 3" and "Mouse button 4" fields.
3. OPTIONS > Key bindings, For example "Inventory" - I set to "[" key (press on keyboard), it asks "remove/keep both" I choose "keep both", after that it starts to work in-game.
sneakyfildy 3. čvc. v 11.57 
how to use it?
Fred 12. čvn. v 9.16 
it does kinda work, I can bind R to middle mouse button and reload with it, or bind Q to Mouse 4 and shout/emote

but i cant bind the Fancy Handywork's modifier key to anything regardless of keyboard key it is, the mouse does nothing
LongNoseDog 8. bře. v 7.02 
how the hell do you even work this mod a tutorial would be greatly appreciated
Wiking 19. pro. 2024 v 6.17 
Is this build42 compatible or will it need an update?
Avsky 2. pro. 2024 v 18.19 
I am trying to bind "backward" movement to mouse 4 or 5 but it does not work, can you please explain how to do it?
ItsBlade 11. říj. 2024 v 10.02 
Tried setting it to the same key as my push-to-talk key. Straight up doesn't work. Using a Logitech G502 Lightspeed, neither of the mouse4 or mouse5 buttons work with the assigned keybinds