Назад к модам
Card magnification blur repair
Прочее

Card magnification blur repair

от JingMeng9vv0.2

解决原版检视界面把普通尺寸卡牌整体放大后,标题、描述、费用和立绘一起变糊的问题。Its goal is to fix the blur caused by the vanilla inspect screen enlarging a normal-sized card, which makes the title, description, cost, and portrait all become blurry together.

Создано

10 мар. 2026 г.

Обновлено

10 мар. 2026 г.

Открыть на Nexus Mods

Описание

Это описание предоставлено автором мода на Nexus Mods на английском языке.
项目地址:https://github.com/li-xuanhong/Sts2CardRenderProbe

原版问题


原版检视界面会实例化普通卡牌场景 `card.tscn`,然后直接把整张卡做 2 倍缩放。

这会带来两个结果:

1. 文本和 UI 一起被放大,导致标题、描述、费用、类型牌匾发糊。
2. 立绘也跟着同一套缩放链走,容易受到额外的模糊和显示误差影响。

当前 mod 的处理方式

本 mod 不直接修改原版检视逻辑,而是在检视界面上额外挂接一个新的显示层。

运行时流程如下:

1. 监听进入检视界面的 `NCard` 节点。
2. 识别它是否位于 `InspectCardScreen` 下。
3. 读取原检视卡当前的标题、描述、费用、类型、立绘等内容,生成签名。
4. 当卡内容变化时,复制原始 `CardContainer`。
5. 将复制出的卡面内部布局、字号和相关控件按检视尺寸重新烘焙,而不是继续依赖根节点整体放大。
6. 在检视界面中挂载新的 overlay 卡面,并隐藏原来的缩放卡。
7. 让新的 overlay 跟随原检视卡的位移、透明度和开场动画。
8. 对检视立绘单独做兼容处理,确保尺寸、位置和清晰度都保持稳定。

因此,原版的翻页、升级预览和关闭逻辑仍然是游戏自己在驱动,mod 只替换“最终显示层”。

安装

将以下文件放入游戏的 `mods` 目录:

- `Sts2CardRenderProbe.dll`
- `Sts2CardRenderProbe.pck`

默认游戏路径示例:

```text
C:\SteamLibrary\steamapps\common\Slay the Spire 2\mods
```

Github:https://github.com/li-xuanhong/Sts2CardRenderProbe


The vanilla problem

The vanilla inspect screen instantiates the normal `card.tscn` card scene and then directly scales the whole card by 2x.

This causes two main problems:

1. Text and UI are enlarged together, so the title, description, cost, and type plaque become blurry.
2. The portrait stays inside the same scaled rendering chain, which makes it more likely to suffer from extra blur or display inaccuracies.

What this mod does

This mod does not rewrite the original inspect logic. Instead, it attaches a new display layer on top of the inspect screen.

Runtime flow:

1. Watch for `NCard` nodes entering the inspect screen.
2. Detect whether the card is under `InspectCardScreen`.
3. Read the current title, description, cost, type, portrait, and related content from the original inspect card and generate a signature.
4. When the card content changes, duplicate the original `CardContainer`.
5. Re-bake the duplicated internal layout, font sizes, and related controls to inspect size instead of relying on root-node scaling.
6. Mount the rebuilt overlay card into the inspect screen and hide the original scaled card.
7. Keep the new overlay synchronized with the original inspect card's movement, transparency, and opening animation.
8. Apply additional compatibility handling for the inspect portrait so that size, position, and clarity remain stable.

Because of this, the game's original page switching, upgrade preview, and close logic are still fully driven by the game itself. The mod only replaces the final visual presentation layer.

Installation

Put the following files into the game's `mods` directory:

- `Sts2CardRenderProbe.dll`
- `Sts2CardRenderProbe.pck`

Example game path:

```text
C:\SteamLibrary\steamapps\common\Slay the Spire 2\mods
```