Barotrauma 潜渊症

Barotrauma 潜渊症

评价数不足
Draw Weapon Key
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
8.278 KB
3 月 28 日 下午 7:55
12 月 9 日 上午 11:30
6 项改动说明 ( 查看 )

订阅以下载
Draw Weapon Key

描述
Draw Weapon Key

Allows you to draw or holster weapons with a single hotkey (or key combination).

If an item that can store weapons is equipped in the belt / clothes / diving suit slot, the mod will use that item.
If there are no such items, it will use an empty belt to store heavy weapons.

If the character holds any non-weapon items, the mod tries to unequip them to make space.

By default, the mod is activated with the same button as "Toggle Inventory" in the control settings.
You can change this key (or combination) through a configuration file.

Thanks to the authors of these mods for their code examples:
Mod 1
Mod 2



Changing the Hotkey

Configuration file location:
<Your Save Folder>/ModConfigs/DrawWeaponKey.json

Default content:
{ "keys": ["ToggleInventory"] }

You can use:
Game input actions (InputType) — e.g. "ToggleInventory", "Run", "Use"
Physical keys (Keys) — e.g. "Q", "LeftControl", "F"

All keys in the combo must be of the same type.

Examples:
// Single key { "keys": ["Q"] } // Combination (InputType) { "keys": ["Run", "ToggleInventory"] } // Combination (physical keys) { "keys": ["LeftControl", "Q"] }



Special Key Names (for JSON config)

Modifiers: LeftShift, RightShift, LeftControl, RightControl, LeftAlt, RightAlt
Arrows: Up, Down, Left, Right
Function keys: F1–F24
Control keys: Enter, Escape, Back, Tab, CapsLock, Space, Delete, Insert, Home, End, PageUp, PageDown
Numbers (top row): D0–D9
Numpad numbers: NumPad0–NumPad9
Punctuation: OemComma (,), OemPeriod (.), OemMinus (-), OemPlus (=), OemQuestion (/), OemSemicolon (;), OemQuotes ('), OemOpenBrackets ([), OemCloseBrackets (]), OemPipe (\)
Other keys: PrintScreen, Scroll, Pause, Apps, LWin, RWin

Letters and digits can be written directly: "A", "B", "1", "2", etc.



Example paths:
Windows:
C:\Users\<YourName>\AppData\Local\Daedalic Entertainment GmbH\Barotrauma\ModConfigs\DrawWeaponKey.json

Linux:
~/.local/share/Daedalic Entertainment GmbH/Barotrauma/ModConfigs/DrawWeaponKey.json
9 条留言
Mad  [作者] 12 月 9 日 上午 11:35 
Hello, @Baguette.
The mod was broken for the HMG and toolbelt case, and possibly for some other cases as well. I’ve updated the mod for this scenario. Please let me know if the fix works for you or if you encounter any other issues with this mod.
Baguette 12 月 5 日 上午 6:21 
The mod doesn't work for me for some reason.
At first I thought it was due to other mods I use but I tried with a clean install, client side lua etc and with only this mod active. Different keys in the file etc but it still doesn't swap or draws an HMG from the toolbelt. I don't know if it's a me problem or if the mod just doesn't work anymore. I'm quite confused, any help or clarifications are welcome ^^
achachala 10 月 13 日 下午 3:57 
You are a legend!
Mad  [作者] 10 月 13 日 上午 5:05 
Hello @achachala.
I’ve started working on adding the ability to set the key through a configuration file.
achachala 10 月 12 日 下午 2:17 
Is there a way I can change the key to something else? I would like to use it with the inventory swap mod.
Mad  [作者] 8 月 28 日 上午 11:42 
@Mr. Orgasm
В отличии от мода Inventory Swap Hotkey мой мод работает только с оружием и не производит свап вещей с пояса инструментов.
Мод Quick Swap Hand~Bag просто меняет местами пояс инструментов с оружием в руках.
Такие моды как Anime Waifu добавляют возможность хранить оружие в слотах одежды\патронташа и т.п. С данным модом становится удобно быстро достать из данного слота оружие и убрать его обратно. Без мода приходиться навестись мышкой на слот одежды и кликнуть 2 раза на оружие внутри, а убрать его обратно можно только перетащив.
Mr. Orgasm 8 月 27 日 上午 8:28 
А в чем отличие вашего мода от тех двух других что вы упомянули?
Old_Molten 8 月 22 日 上午 9:09 
Очь полезный мод, спасибо
.trait0r 5 月 25 日 下午 2:35 
Очень нужный мод. Жаль, что так мало оценок