MOD介绍:
动机
我想要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!
资源查找:
回复区
昵称:
邮箱:
内容: