Hotkeys 快捷鍵

作者 heinous_hat·版本 v1.3.1·更新於 2018-09-23

Hotkeys 快捷鍵

模組介紹 作者原文

Hotkeys 快捷鍵

因此,我已經將針對UI功能的一小部分關鍵任務集合在一起,我覺得這對於玩Civ6至關重要,而不會盲目,瘋狂或者變得非常惱火。遠非LUA主管,我想打開討論的主題,並嘗試建立某種“最佳實踐”方法,以進一步進行關鍵輸入修改。這些關鍵功能對我沒有任何問題,但可以進行一些審查。我主要擔心的是效率,而不是提高UI性能。

前兩個添加了一種方法來切換正常的靜態UI地圖元素,以生成“乾淨的地圖”視圖。就個人而言,我發現這在尋找資源實例或獲得領土概述時非常重要。其他已作爲MinimapPanel中的控件存在,但目前缺少鍵分配。也許Firaxis會添加這些......他們缺席似乎很奇怪。

肘節單元圖標ù

切換城市橫幅X.

切換資源圖標R.

切換產量圖標Y.

我認爲'治癒'並且可能還有一些其他單位命令也缺少任務。我會在地圖鍵後看那些。

所有添加都是在Ingame.lua中對DefaultMessageHandler進行的。根據civ5的經驗,將這些放置在這裏是唯一(?)方式在整個轉彎週期中激活鍵。單位圖標和城市橫幅的工作方式與civ5完全一樣......我只按照當前慣例從wParam切換到uiKey。對於資源和產量,我直接從MinimapPanel中提取了函數。也許有更好的方法,但我還沒有找到它。除了產量顯示之外,執行速度很快......顯着滯後,就像從面板執行時一樣。我希望Firaxis能夠在某些時候取代它。

以下是DefaultMessageHandler的更改...已標記添加的鍵部分。完整的InGame.lua附在下面..

So, I've hacked together a small collection of key assignments for UI functions that I find essential for playing Civ6 without going blind, mad or otherwise becoming really irritated. Far from LUA competent, I'd like to open the subject for discussion and try to establish some sort of "best practice" approach to further key input modding. These key functions are working for me without issue, but could bear some scrutiny. My main concern is efficiency and not honking up UI performance.

The first two add a means to toggle normally static UI map elements in order to produce a "clean map" view. Personally, I find this essential when hunting for resource instances or getting a general overview of territory. The others already exist as controls in MinimapPanel, but currently lack a key assignment. Perhaps Firaxis will add these... it seems strange that they're absent.

toggle unit icons U

toggle city banners X

toggle resource icons R

toggle yield icons Y

I think 'heal' and possibly some other unit commands are missing assignments as well. I'll look to those after the map keys.

All additions are made to DefaultMessageHandler in Ingame.lua. From experience with civ5, placing these here is the only(?) way to have the keys active during the entire turn cycle. Unit icons and city banners work exactly as in civ5... I only switched to uiKey from wParam, following current convention. For resources and yields, I lifted the functions directly from MinimapPanel. Perhaps there's a better way, but I haven't found it. Execution is fast with the exception of the yield display... that noticeably lags, just as it does when performed from the panel. I would expect Firaxis to replace that at some point.

Here are the changes to DefaultMessageHandler... added key section is marked. Full InGame.lua is attached below...

安裝與使用 安裝:按包內說明操作

  1. 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
  2. 這類遊戲沒有通用的模組管理器:有的模組直接替換遊戲檔案、有的放進遊戲專屬的 Mods 資料夾、有的要先裝遊戲對應的社群載入器或工具,以包內說明為準。
  3. 嚴格按說明放置檔案;標註「前置依賴」的模組需要把依賴一併裝好。
  4. 啟動遊戲確認載入成功;部分遊戲需要在設定或模組選單裡手動啟用。

不同遊戲、不同模組的安裝位置差異很大,包內說明是最可靠的依據。

檔案與校驗

檔案名稱
Hotkeys 快捷键
檔案大小
2.5 KiB
SHA-256
f35aa7b45062708d8d95d7e7bdd7c710f4f57cc6460a61750163a340ae400f51
入庫時間
2026-10-08 05:53