STS2 dev notes
Last updated:
- Published on
Overview
概述
These pages are community-style tutorials for Slay the Spire 2 modding: engine behavior, APIs, Godot UI, and multiplayer patterns. They are maintained alongside DevMode and are not limited to DevMode’s own features. Titles and examples use generic placeholders (your-mod, MYMOD-…) instead of any single mod’s name.
本目录收录 《杀戮尖塔 2》模组开发相关的笔记与教程:引擎行为、常用 API、Godot 战斗 UI、多人确定性同步等。内容与 DevMode 本体的「用户指南 / 扩展接口」互补,不局限于 DevMode 功能。文中示例已统一为中性占位(如 your-mod、MYMOD-…),避免绑定某一具体模组。
Pages
目录
| Page | Topics |
|---|---|
| Harmony basics | Patch targets, Prefix/Postfix, registration, injections |
| Card API | DynamicVar, Power, CardPileCmd, OrbCmd, CommonActions |
| Localization | JSON keys, BBCode, NL vs \n |
| Image sizes | Card, power, relic, portrait dimensions |
| Pitfalls | Damage multipliers, pile UI, map overlay, export presets |
| Combat UI | Power icons, energy icons, custom bars, tooltips |
| Skill tree (example) | Rules vs view, Harmony entry |
| Summon / minions | MonsterModel, AddPet, MinionPower |
| Pets (advanced) | .tscn layout, CreateVisuals patch, positioning |
| Multiplayer sync (case study) | Deterministic extra state via INetMessage |
| 页面 | 内容 |
|---|---|
| Harmony 入门 | 补丁目标、补丁类型、注册、参数注入、维护 |
| 卡牌 API | DynamicVar、Power、CardPileCmd、OrbCmd、CommonActions |
| 本地化 | JSON key、BBCode、NL 与 \n |
| 图片规格 | 卡牌、能力、遗物、立绘等尺寸 |
| 踩坑备忘 | 伤害乘数、牌堆 UI、地图叠层、export_presets |
| 战斗 UI | 能力图标路径、能量图标、自定义条、悬停 |
| 技能树(示例架构) | 规则与视图分离、Harmony 入口 |
| 召唤物 | MonsterModel、AddPet、MinionPower |
| 宠物(进阶) | 场景结构、CreateVisuals 补丁、定位 |
| 多人同步(案例) | 确定性额外状态与 INetMessage |