SSE GUI
在Skyrim遊戲中添加自定義HUD / GUI疊加的基礎。
截圖 共 1 張
模組介紹 作者原文
在Skyrim遊戲中添加自定義HUD / GUI疊加的基礎。
動機
我想要Skyrim的舒適小工具。內置的HUD對於想像力來說太有限了。事實上,我已經找到了一個GUI框架來創建新的小部件(HUD元素),但其他人可能不喜歡它。它們仍然可以捕獲視頻輸出和鍵盤/鼠標輸入。
這個怎麼運作?
通過使用SKSE及其加載,庫被注入到天際過程中。視頻渲染管道是...擁抱(?)以及鼠標和鍵盤輸入(基於DInput(facepalm))。作爲副作用,Skyrim現在開始接收用於通過鍵盤和鼠標點擊的窗口消息(也稱爲非獨佔模式) - 這允許用戶打開他們的手掌並開始從操作系統接收更多信息,如特殊鍵盤事件,鼠標點擊和東西。通過點擊“插入”按鈕(可以在運行時配置),遊戲停止接收輸入事件並作出反應。這允許用戶開始使用他們的小部件!所以它是遊戲導航和GUI導航之間的切換。
備註
這不是什麼新鮮事,很多遊戲和黑客都是用類似的行爲製作的。我不知道Skyrim特有的功能,因此我花了很多時間來發現自己如何做(也就是發明三角輪)。
雖然它主要用於疊加,但輸入和輸出的操作帶來了許多其他選擇。我在這裏集思廣益,但考慮:鍵盤記錄器,低級鍵重映射,鼠標靈敏度調整,可能自動生成按鍵,視頻捕捉,渲染測量或調整等。
一切聽起來不錯,但你可以看看ImGui或類似的項目,以獲得可能的靈感。
參考
像往常一樣,GitHub上的源代碼用於開發人員文檔 - 基本上是README和C / C ++頭文件。
以及即將推出的參考模型如何使用,最好通過實例學習!
——————————————————————————————————————————————————
Motivation
I wanted cozy widgets for Skyrim. The builtin HUD is too limiting for the imagination. In fact, I already found a GUI framework to create new widgets (HUD elements), but others may not like it. They can still benefit of capturing the video output and keyboard/mouse input though.
How it works?
By using SKSE and its loading, the library is injected into the Skyrim process. The video rendering pipeline is... hugged(?) as well as the mouse and keyboard input (based on DInput (facepalm)). As side effect, Skyrim now starts to receive window messages for clicking with the keyboard and the mouse (aka non-exclusive mode) - this allows users to open their palms and start receive more information from the operating system, like special keyboard events, mouse clicks and stuff. By taping the Insert button (may be configured at runtime) the game stops receiving and reacting to input events. This allows users to start working with their widgets! So it is a toggle between game navigation and GUI navigation.
Remarks
This is not something new and many games and hacks were made with similar behaviour. I'm not aware of such functionality specially for Skyrim hence I spent wealthy amount of time to discover how to do it myself (aka inventing the triangle wheel).
While it is intended primary for overlays, the manipulation of input and output bring many other options. I'm brainstorming here, but consider: keyloggers, low-level key remaps, sensitivity tunings for mouse, probably automated generation of key presses, video capturing, render measurements or adjusts and etc.
All sounds good, but you can look at ImGui or similar projects for inspiration of what is possible.
References
As usual the source code at GitHub for developer documentation - basically the README and the C/C++ header files.
And the upcoming reference mod for how to use, best learn by example!
安裝與使用 安裝:按包內說明操作
- 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
- 這類遊戲沒有通用的模組管理器:有的模組直接替換遊戲檔案、有的放進遊戲專屬的 Mods 資料夾、有的要先裝遊戲對應的社群載入器或工具,以包內說明為準。
- 嚴格按說明放置檔案;標註「前置依賴」的模組需要把依賴一併裝好。
- 啟動遊戲確認載入成功;部分遊戲需要在設定或模組選單裡手動啟用。
不同遊戲、不同模組的安裝位置差異很大,包內說明是最可靠的依據。