|
|
转自n网:https://www.nexusmods.com/clairobscurexpedition33/mods/622
Flag Menu Hotkey - Keyboard & Controller Support
旗帜菜单快捷键 - 键盘和手柄支持
Quick access to expedition flags (save points) with customizable hotkeys
快速访问探险旗帜(存档点),并可自定义快捷键
Press a button to instantly open the nearest flag menu - any zone with an expedition flag, will not work in the overworld/continent.
按下按钮即可立即打开最近的旗帜菜单 ——任何带有远征旗帜的区域在主世界/大陆上都无法使用。
Features 特征
- Keyboard Hotkey - Press F6 (or any key you configure) to open the nearest flag menu
键盘快捷键 ——按 F6(或你配置的任何键)打开最近的旗帜菜单 - Controller Support - Full controller support with customizable buttons
手柄支持 ——完全支持手柄,按钮可自定义 - Easy Configuration - Simple config.ini file
简单配置 - 简单 config.ini 文件
Configuration 配置
Edit config.ini to customize your hotkeys, default config:
编辑 config.ini 自定义快捷键,默认配置:
[Settings]
; Keyboard hotkey uses UE4SS Key table names (keyboard virtual key codes).
KeyboardKey = F6
; Available buttons:
; DPAD_UP, DPAD_DOWN, DPAD_LEFT, DPAD_RIGHT
; START, BACK
; LEFT_THUMB, RIGHT_THUMB (stick clicks / L3, R3)
; LEFT_SHOULDER, RIGHT_SHOULDER (LB, RB)
; A, B, X, Y (face buttons)
; Set to NONE to disable gamepad hotkey
GamepadButton = DPAD_RIGHT
; true = pressing hotkey while menu open will close it
; false = pressing hotkey while menu open will "refresh" (re-open nearest)
ToggleClose = false
; Optional: prints the last seen gamepad key name to console (for figuring out naming)
DebugGamepad = false
Available Gamepad Buttons:
可选手柄按键:
- D-Pad: DPAD_UP, DPAD_DOWN, DPAD_LEFT, DPAD_RIGHT
方向键 :DPAD_UP,DPAD_DOWN,DPAD_LEFT,DPAD_RIGHT - Face Buttons: A, B, X, Y
面板按键 :A、B、X、Y - Shoulders: LEFT_SHOULDER (LB), RIGHT_SHOULDER (RB)
肩膀:LEFT_SHOULDER(线卫),RIGHT_SHOULDER(跑卫) - Special: START, BACK
特殊: 开始,返回 - Stick Clicks: LEFT_THUMB (L3), RIGHT_THUMB (R3)
摇杆点击 :LEFT_THUMB(L3),RIGHT_THUMB(R3) - Disable: NONE 禁用 :无
Installation 安装
Requirements: 要求:Experiment UE4SS_v3.0.1-844-gb4e69e2 included
实验 UE4SS_v3.0.1-844-gb4e69e2 包含
Install Steps: 安装步骤:
1. Extract the mod archive to your game's Mods folder:
1. 将模组归档解压到游戏的 Mods 文件夹:
[Game]/Sandfall/Binaries/Win64/← ue4ss folder and dwmapi.dll goes here
---
ue4ss/Mods/FlagMenuHotkey/
├── dlls/
│ └── main.dll
├── scripts/
│ ├── main.lua
│ └── readini.lua
└── config.ini
2. Enable the mod in mods.txt (\Sandfall\Binaries\Win64\ue4ss\Mods\mods.txt:
2. 启用 mods.txt (\Sandfall\Binaries\Win64\ue4ss\Mods\mods.txt 中的模组:
FlagMenuHotkey : 1
3. (Optional) Edit config.ini to change buttons
3. (可选)编辑 config.ini 以更改按钮
4. Launch the game
4. 启动游戏
Technical Details 技术细节
This mod consists of two components:
该模组由两个部分组成:
Lua Script - Main logic for menu interaction:
Lua 脚本 ——菜单交互的主要逻辑:
- Finds nearest expedition flag in the zone
在该区域发现最近的探险旗帜 - Handles keyboard input via UE4SS RegisterKeyBind
通过 UE4SS 注册键绑定处理键盘输入 - Polls C++ mod for gamepad input via LoopAsync
Polls C++ mod 用于通过 LoopAsync 输入手柄
C++ DLL - Gamepad input bridge:
C++ DLL - 手柄输入桥接:
- Polls XInput API for controller state
- Detects configured button presses
检测已配置的按键按键 - Exposes IsGamepadHotkeyPressed() function to Lua
向 Lua 暴露 IsGamepadHotkeyPressed()函数 - Reads configuration from config.ini at runtime
运行时从 config.ini 读取配置
Why a C++ mod?
为什么选择 C++模组?
UE4SS's Lua RegisterKeyBind() only supports keyboard input. Native gamepad input requires C++ integration with the XInput API, which this mod provides as a bridge.
UE4SS 的 Lua RegisterKeyBind() 只支持键盘输入。原生手柄输入需要与 XInput API 集成 C++,该模组提供了该接口作为桥接。
|
|