Skip to content

Commit 3ca6760

Browse files
committed
2026-04-25 0.104
1 parent d9363a8 commit 3ca6760

8 files changed

Lines changed: 29 additions & 10 deletions

File tree

BaseLib/05 - 添加新能力/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public class TestPower : CustomPowerModel
1616
public override async Task AfterCardDrawn(PlayerChoiceContext choiceContext, CardModel card, bool fromHandDraw)
1717
{
1818
await PowerCmd.Apply<StrengthPower>(Owner, Amount, Owner, null);
19+
// await PowerCmd.Apply<StrengthPower>(choiceContext, Owner, Amount, Owner, null); // 测试版
1920
}
2021
}
2122
```

Basics/03 - 选择基础库/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
## 对比
88

9-
以下表格为这些基础库目前为止(2026.04.22)支持的功能表格。
9+
以下表格为这些基础库目前为止(2026.04.25)支持的功能表格。
1010

1111
| 功能 | BaseLib | RitsuLib | 说明 |
1212
|-----------|------|------|------|
@@ -20,7 +20,7 @@
2020
| 血条覆盖层(中毒灾厄) ||| - |
2121
| 不挂载脚本场景转换 ||| - |
2222
| 人物非spine动画兼容 ||| - |
23-
| customenum ||| baselib支持对任意enum扩展,目前不稳定仍在开发阶段;ritsulib不支持,但统一管理(例如关键词) |
23+
| customenum ||| baselib支持对任意enum扩展;ritsulib不支持,但统一管理(例如关键词) |
2424
| 一代本地化符号 ||| * |
2525
| FMOD音频 | 🚧 || - |
2626
| 缺少资源时占位警告 ||| - |
@@ -31,6 +31,7 @@
3131
| 手牌发光管理 ||| - |
3232
| 卡牌支持AnyPlayer ||| - |
3333
| 快捷键绑定 ||| - |
34+
| 新牌堆 ||| - |
3435
| 内容物ID | 命名空间第一段大写,例如`TEST-TEST_CARD` | modid与分类,例如`TEST_CARD_TEST_CARD` | - |
3536
| patch | 原始`harmony` | 原始`harmony`以及封装patch系统 | - |
3637
| 非原生玩法内容 ||| 避免重复造轮子。但是会带来臃肿不兼容、抢占patch、抢占你的命名的问题。 |
Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
之前是0.99至0.103的内容,现已废弃
1+
## 0.103 至 0.104测试版
2+
3+
### 函数签名变动
4+
5+
* 一些函数开始传入`PlayerChoiceContext`参数,与下面的进行配合。
6+
7+
* 一些效果执行函数,例如`PowerCmd.Apply`等,需要一个`PlayerChoiceContext`参数。如果你的函数传入参数有对应类型添加即可。如果你找不到这个类型的参数,传入`new ThrowingPlayerChoiceContext()`
8+
9+
* `CardPileCmd.AddGeneratedCardToCombat`等,之前传入`addedByPlayer``bool`类型的参数的位置,改成了`Player? creator`。所以如果之前是`false`的现在填`null`,是`true`的话填`cardPlay.card.Owner`(卡牌里)或者`Owner`(能力里),根据语境。
10+

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 《杀戮尖塔2》模组制作指南
22

3-
支持版本:`public-beta`
3+
支持版本:`正式版`
44

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

RitsuLib/04 - 添加卡牌属性/README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,25 @@
55
* 新建一个类:
66

77
```csharp
8-
[RegisterOwnedCardKeyword(nameof(Unique), LocKeyPrefix = "TEST_UNIQUE", IconPath = "res://icon.svg")]
9-
// [RegisterOwnedCardKeyword(nameof(Unique2), LocKeyPrefix = "TEST_UNIQUE2", IconPath = "res://icon.svg")] // 如果要加更多关键词,添加特性
8+
[RegisterOwnedCardKeyword(nameof(Unique), IconPath = "res://icon.svg", CardDescriptionPlacement = ModKeywordCardDescriptionPlacement.BeforeCardDescription)]
9+
// [RegisterOwnedCardKeyword(nameof(Unique2), IconPath = "res://icon.svg")] // 如果要加更多关键词,添加特性
1010
public class MyKeywords
1111
{
1212
public static readonly string Unique = ModContentRegistry.GetQualifiedKeywordId(Entry.ModId, nameof(Unique));
1313
// public static readonly string Unique2 = ModContentRegistry.GetQualifiedKeywordId(Entry.ModId, nameof(Unique2));
1414
}
1515
```
1616

17-
* 添加一个本地化文件,`{modId}/localization/{Language}/card_keywords.json`。使用的键是我们定义的`LocKeyPrefix`
17+
* `CardDescriptionPlacement`代表这个关键词的描述加在卡牌的位置。`BeforeCardDescription`表示在描述之前。默认不显示。
18+
19+
* `IconPath``CardDescriptionPlacement`都是可选的。
20+
21+
* 添加一个本地化文件,`{modId}/localization/{Language}/card_keywords.json`。使用的键是`TEST_KEYWORD_{id大写}`
1822

1923
```json
2024
{
21-
"TEST_UNIQUE.description": "卡组中只能有一张同名牌。",
22-
"TEST_UNIQUE.title": "唯一"
25+
"TEST_KEYWORD_UNIQUE.description": "卡组中只能有一张同名牌。",
26+
"TEST_KEYWORD_UNIQUE.title": "唯一"
2327
}
2428
```
2529

RitsuLib/05 - 添加新能力/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public class TestPower : ModPowerTemplate
3232
public override async Task AfterCardDrawn(PlayerChoiceContext choiceContext, CardModel card, bool fromHandDraw)
3333
{
3434
await PowerCmd.Apply<StrengthPower>(Owner, Amount, Owner, null);
35+
// await PowerCmd.Apply<StrengthPower>(choiceContext, Owner, Amount, Owner, null); // 测试版
3536
}
3637
}
3738
```

RitsuLib/14 - 添加新人物/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ public class TestCardPool : TypeListCardPoolModel
3434
public override Color DeckEntryCardColor => new(0.5f, 0.5f, 1f);
3535
// 能量表盘文字轮廓颜色
3636
public override Color EnergyOutlineColor => new(0.5f, 0.5f, 1f);
37+
// 如果你想用原版卡框换色,加这两行。这里是hsv而不是rgb颜色
38+
private static readonly Material? _poolFrameMaterial = MaterialUtils.CreateHsvShaderMaterial(0.67f, 0.5f, 1f);
39+
public override Material? PoolFrameMaterial => _poolFrameMaterial;
3740

3841
// 卡池是否是无色。例如事件、状态等卡池就是无色的。
3942
public override bool IsColorless => false;

RitsuLib/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
https://github.com/BAKAOLC/STS2-RitsuLib
44

5-
> 以下内容使用ritsulib0.0.60
5+
> 以下内容使用ritsulib0.2.3
66
77
先依赖ritsulib才能查看这里里面的文章。
88

0 commit comments

Comments
 (0)