Repository navigation
Troubleshooting.zh
Miooowo edited this page Aug 5, 2026
·
1 revision
可能缺少 nuget.org 源:
dotnet nuget add source https://api.nuget.org/v3/index.json然后重新 restore / 构建。
在 Rider:File → Settings,搜索 toolset,选择名称中带 Rider 的 MSBuild 版本。
路径自动探测失败。在 Directory.Build.props 或 local.props 中设置:
<Sts2Path>C:/Steam/steamapps/common/Slay the Spire 2</Sts2Path>换成你的真实安装路径。Windows 下托管数据目录通常是其下的 data_sts2_windows_x86_64。
Publish 需要 MegaDot/Godot。在 .csproj 同级创建 Directory.Build.props,将 GodotPath 设为 .NET / mono 可执行文件。
- 确认游戏
mods/{你的Mod}/下存在.pck。 - 非代码改动必须 Publish,不能只 Build。
- 若随包发布 pck,确认
{项目名}.json中has_pck为true。
- 文件需位于
{ModFolder}/localization/**/*.json。 - 不要留下空 JSON。
- 键格式:
{MODID}_{CATEGORY}_{ORIGINAL_ID}.title/.description。 - 官方模板已预置
eng/zhs——若被删请恢复。
- 必须在
mods中安装运行时 STS2-RitsuLib(仅有 NuGet 不够)。 - 确认
{项目名}.json的依赖包含STS2-RitsuLib。 - 对齐游戏分支 / API:模板面向 0.110.1 与包
STS2.RitsuLib。更旧分支可能需要STS2.RitsuLib.Compat.*与对应 RitsuLib 变体包。 - 自动注册需要在初始化里调用 RitsuLib 发现 / 注册(角色模板已包含;Empty/Content 可能需要同样写法——见 RitsuLib 教程)。
引用平台相关的 sts2.dll、同时以 MSIL 构建 Mod 时常见。模板已压制该警告。
从 nuget.org 还原。模板固定为 0.0.1-preview。有新版本时再更新 PackageReference。
- Setup(中文)
- RitsuLib 教程
- Discord #sts2-modding:https://discord.com/invite/SlayTheSpire