快速导航: 中文版本 | English Version
KernelFix 是一款 Hacknet 的 Pathfinder / BepInEx 全局插件,提供两大核心功能:
- 高 DPI 显示修复 – 解决近代高分屏下分辨率错误放大的问题。
- 原生中文输入法支持 – 在游戏终端内完美使用 Windows 自带输入法,并自绘候选词窗口。
- 在游戏窗口创建前调用
SetProcessDPIAware()。 - 避免 Windows 的 DPI 虚拟化,使游戏分辨率列表与实际屏幕一致。
- 消除全屏/窗口模式下的模糊和错误缩放。
- 通过 ImeSharp 接入 Windows TSF (Text Services Framework)。
- 组合文本(拼音/字母)直接显示在终端光标处,并带有下划线。
- 候选词列表以半透明面板绘制在终端左下角,支持长词自动适应宽度。
- 使用 数字键 1‑9 或 空格键 选词上屏,使用
[]来切换候选页数。 - 兼容微软拼音、微软五笔以及绝大多数基于 TSF 的输入法。
- 提供 调试开关(
KernelFix.cs中的KernelFix.Debug),设为true可在控制台输出详细的输入法状态。
- 确保已安装 Pathfinder 框架(它自带了 BepInEx)。
- 下载
KernelFix.dll。 - 将文件放入游戏目录下的
BepInEx/plugins/文件夹内。 - 启动游戏,插件即自动生效。
无需额外安装 BepInEx – Pathfinder 已包含所需运行环境。
-
本模组仅支持 Windows 系统。如果你使用的是 macOS 或 Linux,且原版游戏已经能正常输入中文,则无需额外安装任何输入法模组;否则请使用
TAXCoreCNfix来获得基本的中文输入支持。 -
与
TAXCoreCNfix不兼容,两者同时加载会导致输入冲突。请在使用 KernelFix 前移除TAXCoreCNfix。 -
建议与 HacknetFontReplace 同时使用,以解决部分汉字显示为
?的问题。注:原版 HacknetFontReplace 可能无法正确渲染 UTF‑16 代理对字符(如 emoji),导致候选框中显示为空白或引发游戏异常。推荐使用修复版本 HacknetFontReplace_UTF16Fix,或避免在终端中打出此类字符。
-
需要 Pathfinder 框架,否则插件不会加载。
-
支持 Steam 及 非 Steam 版本的 Hacknet + Labyrinths。
- 克隆仓库:
git clone https://github.com/LDTchara/KernelFix.git
- 使用 Visual Studio 打开
KernelFix.sln(或通过dotnet命令行构建):dotnet build KernelFix.sln -c Release
- 项目引用(Harmony、BepInEx、FNA 等)指向游戏安装目录下的
libs文件夹,可按需调整。 - 采用 Costura.Fody 将
ImeSharp及其依赖嵌入 DLL,生成的KernelFix.dll即为独立文件,无需其他附加库。
KernelFix is a Pathfinder / BepInEx global plugin for Hacknet that delivers two major quality‑of‑life improvements:
- High‑DPI display fix – resolves incorrect upscaling on modern high‑DPI screens.
- Native Chinese IME support – fully integrates Windows IME into the terminal, with an on‑screen composition preview and a self‑drawn candidate list.
- Calls
SetProcessDPIAware()before the game window is created. - Prevents Windows DPI virtualization, matching the in‑game resolution list to the actual display.
- Eliminates blurry text and improper scaling in both fullscreen and windowed modes.
- Leverages Windows TSF (Text Services Framework) via ImeSharp.
- Composition text (pinyin / letters) is displayed directly at the cursor with an underline.
- Candidate list is drawn as a semi‑transparent panel in the lower‑left corner of the terminal, with automatic width adjustment for long phrases.
- Select candidates with number keys 1‑9 or Space, and use
[]to flip pages. - Compatible with Microsoft Pinyin, Microsoft Wubi, and most other TSF‑based IMEs.
- Includes a debug switch (
KernelFix.DebuginKernelFix.cs); set it totrueto log detailed IME status to the console.
- Make sure Pathfinder is installed (it bundles BepInEx).
- Download
KernelFix.dll. - Place it into
BepInEx/plugins/inside your Hacknet directory. - Launch the game – the plugin loads automatically.
No separate BepInEx installation is required – Pathfinder already provides it.
-
This mod only supports Windows systems. For players on other systems, please use
TAXCoreCNfixto get basic Chinese input support. (If the macOS or Linux version of Hacknet already supports native Chinese input, you may not need it.) -
KernelFix is incompatible with
TAXCoreCNfix. Using both simultaneously will cause input conflicts. Please removeTAXCoreCNfixbefore using KernelFix. -
It is recommended to use KernelFix together with HacknetFontReplace (modified version) to fix missing glyphs (displayed as
?).Note: The original HacknetFontReplace may not render UTF‑16 surrogate characters or emoji correctly; they will appear blank in the candidate list. The modified version linked above addresses this. If you choose not to use it, avoid typing such characters to prevent potential game issues.
-
Requires Pathfinder; the plugin will not load without it.
-
Works with both Steam and non‑Steam versions of Hacknet + Labyrinths.
- Clone the repository:
git clone https://github.com/LDTchara/KernelFix.git
- Open
KernelFix.slnin Visual Studio (or build withdotnet):dotnet build KernelFix.sln -c Release
- The project references (Harmony, BepInEx, FNA, etc.) point to the
libsfolder inside your Hacknet installation; adjust them if necessary. - Costura.Fody embeds
ImeSharpand its dependencies into the DLL – the outputKernelFix.dllis self‑contained and requires no extra libraries.
