Skip to content

Commit ee9eb95

Browse files
committed
2026-04-25 ritsulib
1 parent 3ca6760 commit ee9eb95

30 files changed

Lines changed: 160 additions & 174 deletions

_config.kira.yml

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ background: # 既是博客的背景,又是文章默认头图
44
width: 1600
55
height: 900
66
favicon:
7-
href: https://kira.host/assets/Pictures/Others/116359b4ccf19917.jpg # 网站图标
8-
type: image/png # 图标类型,可能的值有(image/png, image/vnd.microsoft.icon, image/x-icon, image/gif)
7+
href: /SlayTheSpire2ModdingTutorials/icon.ico # 网站图标
8+
type: image/x-icon # 图标类型,可能的值有(image/png, image/vnd.microsoft.icon, image/x-icon, image/gif)
99

1010
# 附加图标库 使用说明:https://kira.host/hexo/config/icon.html
1111
# iconlib: //at.alicdn.com/t/font_3299330_el19bsi97h8.css
@@ -40,122 +40,122 @@ docsTree:
4040
path: /docs/03-choose-base-library/,
4141
},
4242
{
43-
title: 04 BaseLib,
43+
title: 04 RitsuLib,
4444
open: true,
4545
children:
4646
[
47-
{ title: 00 总览, path: /docs/03-baselib/ },
47+
{ title: 00 总览, path: /docs/04-ritsulib/ },
4848
{
4949
title: 01 添加卡牌,
50-
path: /docs/03-baselib/03-01-add-card/,
50+
path: /docs/04-ritsulib/04-01-add-card/,
5151
},
5252
{
53-
title: 02 自定义模组配置,
54-
path: /docs/03-baselib/03-02-mod-config/,
53+
title: 02 自定义配置,
54+
path: /docs/04-ritsulib/04-02-custom-config/,
5555
},
5656
{
5757
title: 03 添加新遗物,
58-
path: /docs/03-baselib/03-03-add-relic/,
58+
path: /docs/04-ritsulib/04-03-add-relic/,
5959
},
6060
{
6161
title: 04 添加卡牌属性,
62-
path: /docs/03-baselib/03-04-card-properties/,
62+
path: /docs/04-ritsulib/04-04-card-properties/,
6363
},
6464
{
6565
title: 05 添加新能力,
66-
path: /docs/03-baselib/03-05-add-power/,
66+
path: /docs/04-ritsulib/04-05-add-power/,
6767
},
6868
{
6969
title: 06 添加新药水,
70-
path: /docs/03-baselib/03-06-add-potion/,
70+
path: /docs/04-ritsulib/04-06-add-potion/,
7171
},
7272
{
7373
title: 07 添加先古之民,
74-
path: /docs/03-baselib/03-07-add-ancient/,
74+
path: /docs/04-ritsulib/04-07-add-ancient/,
7575
},
7676
{
7777
title: 08 添加充能球,
78-
path: /docs/03-baselib/03-08-add-orb/,
79-
},
80-
{
81-
title: 09 局内保存,
82-
path: /docs/03-baselib/03-09-run-save/,
83-
},
84-
{
85-
title: 10 mod联动,
86-
path: /docs/03-baselib/03-10-mod-integration/,
78+
path: /docs/04-ritsulib/04-08-add-orb/,
8779
},
8880
{
8981
title: 11 添加新怪物,
90-
path: /docs/03-baselib/03-11-add-monster/,
82+
path: /docs/04-ritsulib/04-11-add-monster/,
9183
},
9284
{
9385
title: 12 添加新事件,
94-
path: /docs/03-baselib/03-12-add-event/,
86+
path: /docs/04-ritsulib/04-12-add-event/,
9587
},
9688
{
9789
title: 13 添加新附魔,
98-
path: /docs/03-baselib/03-13-add-enchantment/,
90+
path: /docs/04-ritsulib/04-13-add-enchantment/,
9991
},
10092
{
10193
title: 14 添加新人物,
102-
path: /docs/04-add-new-character/,
94+
path: /docs/04-ritsulib/04-14-add-new-character/,
10395
},
10496
],
10597
},
10698
{
107-
title: 05 RitsuLib,
108-
open: true,
99+
title: 05 BaseLib,
100+
open: false,
109101
children:
110102
[
111-
{ title: 00 总览, path: /docs/04-ritsulib/ },
103+
{ title: 00 总览, path: /docs/03-baselib/ },
112104
{
113105
title: 01 添加卡牌,
114-
path: /docs/04-ritsulib/04-01-add-card/,
106+
path: /docs/03-baselib/03-01-add-card/,
115107
},
116108
{
117-
title: 02 自定义配置,
118-
path: /docs/04-ritsulib/04-02-custom-config/,
109+
title: 02 自定义模组配置,
110+
path: /docs/03-baselib/03-02-mod-config/,
119111
},
120112
{
121113
title: 03 添加新遗物,
122-
path: /docs/04-ritsulib/04-03-add-relic/,
114+
path: /docs/03-baselib/03-03-add-relic/,
123115
},
124116
{
125117
title: 04 添加卡牌属性,
126-
path: /docs/04-ritsulib/04-04-card-properties/,
118+
path: /docs/03-baselib/03-04-card-properties/,
127119
},
128120
{
129121
title: 05 添加新能力,
130-
path: /docs/04-ritsulib/04-05-add-power/,
122+
path: /docs/03-baselib/03-05-add-power/,
131123
},
132124
{
133125
title: 06 添加新药水,
134-
path: /docs/04-ritsulib/04-06-add-potion/,
126+
path: /docs/03-baselib/03-06-add-potion/,
135127
},
136128
{
137129
title: 07 添加先古之民,
138-
path: /docs/04-ritsulib/04-07-add-ancient/,
130+
path: /docs/03-baselib/03-07-add-ancient/,
139131
},
140132
{
141133
title: 08 添加充能球,
142-
path: /docs/04-ritsulib/04-08-add-orb/,
134+
path: /docs/03-baselib/03-08-add-orb/,
135+
},
136+
{
137+
title: 09 局内保存,
138+
path: /docs/03-baselib/03-09-run-save/,
139+
},
140+
{
141+
title: 10 mod联动,
142+
path: /docs/03-baselib/03-10-mod-integration/,
143143
},
144144
{
145145
title: 11 添加新怪物,
146-
path: /docs/04-ritsulib/04-11-add-monster/,
146+
path: /docs/03-baselib/03-11-add-monster/,
147147
},
148148
{
149149
title: 12 添加新事件,
150-
path: /docs/04-ritsulib/04-12-add-event/,
150+
path: /docs/03-baselib/03-12-add-event/,
151151
},
152152
{
153153
title: 13 添加新附魔,
154-
path: /docs/04-ritsulib/04-13-add-enchantment/,
154+
path: /docs/03-baselib/03-13-add-enchantment/,
155155
},
156156
{
157157
title: 14 添加新人物,
158-
path: /docs/04-ritsulib/04-14-add-new-character/,
158+
path: /docs/04-add-new-character/,
159159
},
160160
],
161161
},

icon.ico

99.3 KB
Binary file not shown.

source/_posts/00-home.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ permalink: /
55
---
66
# 《杀戮尖塔2》模组制作指南
77

8-
支持版本:`public-beta`
8+
支持版本:`正式版`
99

1010
《杀戮尖塔2》原生支持模组,所以你可以直接制作模组并使用。
1111

source/_posts/03-baselib/03-01-add-card.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ public class TestCard : CustomCardModel
6969
* 想做什么样的卡牌,看原版代码哪张有类似的效果,参考即可。
7070

7171
* 添加一个`Pool`的attribute,并指定要添加的颜色卡池,然后会自动注册。
72+
7273
* 继承`CustomCardModel`而不是`CardModel`
74+
7375
* <b>注意</b>:通过`baselib`添加卡牌,其id会变成`{命名空间第一段大写}-{原卡牌id}`,例如`namespace Test.Scripts;``TEST`,原始卡牌id为`TEST-CARD`,是`TestCard`的大写snake-case,最后变成`TEST-TEST_CARD`
7476

7577
## 卡图
@@ -102,7 +104,7 @@ public class TestCard : TestCardModel
102104
}
103105
```
104106

105-
![示例卡图](../../../../../images/image10.png)
107+
![示例卡图](../../images/image10.png)
106108

107109
你也可以通过新增一个`abstract`类,避免每张卡都写一遍卡图路径,并且方便管理一些自定义功能。
108110

@@ -138,7 +140,7 @@ public class TestCard : TestCardModel {}
138140

139141
`~`打开控制台输入`card TEST-TEST_CARD`获得这张卡。
140142

141-
![示例卡牌](../../../../../images/image11.png)
143+
![示例卡牌](../../images/image11.png)
142144

143145
## 最终项目参考
144146

source/_posts/03-baselib/03-02-mod-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@ public sealed class TestModConfig : SimpleModConfig
6464

6565
```
6666

67-
![示例配置](../../../../../images/image12.png)
67+
![示例配置](../../images/image12.png)
6868

6969
更多请参考`baselib``BaseLib.Config`下的类。

source/_posts/03-baselib/03-03-add-relic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class TestRelic : CustomRelicModel
3838

3939
然后放一张图片`test/images/relics/test_relic.png`。路径不一定是`test`,组织风格自定义,参考上面卡图部分。这里偷懒三张图片用了一样的,可以自己修改。
4040

41-
![示例遗物](../../../../../images/image13.png)
41+
![示例遗物](../../images/image13.png)
4242

4343
然后写一个本地化文件,`{modId}/localization/{Language}/relics.json`
4444

source/_posts/03-baselib/03-04-card-properties.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class MyKeywords
3737
public override IEnumerable<CardKeyword> CanonicalKeywords => [MyKeywords.Unique];
3838
```
3939

40-
![alt text](../../../../../images/image23.png)
40+
![alt text](../../images/image23.png)
4141

4242
## 添加新动态变量
4343

@@ -76,7 +76,7 @@ public class MyKeywords
7676
`:diff()`表示这个值一旦和基础值不同,就会变红色或绿色(例如升级时增加数值,预览变成绿色)。
7777

7878

79-
![alt text](../../../../../images/image26.png)
79+
![alt text](../../images/image26.png)
8080

8181
## 添加卡牌提示文本
8282

source/_posts/03-baselib/03-05-add-power.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public class TestPower : CustomPowerModel
2323
public override async Task AfterCardDrawn(PlayerChoiceContext choiceContext, CardModel card, bool fromHandDraw)
2424
{
2525
await PowerCmd.Apply<StrengthPower>(Owner, Amount, Owner, null);
26+
// await PowerCmd.Apply<StrengthPower>(choiceContext, Owner, Amount, Owner, null); // 测试版
2627
}
2728
}
2829
```
@@ -38,4 +39,4 @@ public class TestPower : CustomPowerModel
3839

3940
然后使用`PowerCmd.Apply<TestPower>(...)`给予即可。或者使用控制台`power TEST-TEST_POWER 1 0`
4041

41-
![alt text](../../../../../images/image25.png)
42+
![alt text](../../images/image25.png)

source/_posts/03-baselib/03-07-add-ancient.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public class TestAncient : CustomAncientModel
102102
}
103103
```
104104

105-
![alt text](../../../../../images/image27.png)
105+
![alt text](../../images/image27.png)
106106

107107
场景示例`test_ancient.tscn`
108108
```

source/_posts/03-baselib/03-08-add-orb.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public class TestOrb : CustomOrbModel
7676

7777
使用`await OrbCmd.Channel<TestOrb>(choiceContext, cardPlay.Card.Owner)`以生成。
7878

79-
![alt text](../../../../../images/image28.png)
79+
![alt text](../../images/image28.png)
8080

8181
`test_orb.tscn`:
8282

0 commit comments

Comments
 (0)