Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/COMMANDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cloud (Incendo) + Paper Brigadier を使用して実装。
```

- `player`: プレイヤー名(オンライン / オフライン両対応)
- `questType`: クエストキー(例: `BotQuest`, `@test/party_quest`
- `questType`: クエストキー(例: `test/bot_quest`。`@<namespace>/types/` 内のYAMLは `<namespace>/<ファイル名>` 形式のキーで登録される
- 既に解放済みのプレイヤーはスキップ(idempotent)

### progress
Expand Down
6 changes: 2 additions & 4 deletions docs/DATA_MODEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ data class QuestType(
val description: List<String> = emptyList(),
val category: String = "lq:general",
val location: Location? = null,
val giver: String? = null,
val playLimits: PlayLimits = PlayLimits(),
val acceptConditions: AcceptConditions = AcceptConditions(),
val maxPlayers: Int? = null,
Expand All @@ -77,12 +76,11 @@ data class QuestType(
### YAML ↔ コード マッピング

| YAML キー | Kotlin フィールド | 形式 |
|---|---|---|
| --- | --- | --- |
| `Title` | `title` | String |
| `Description` | `description` | List\<String\> |
| `Icon` | `icon` | `"MATERIAL"` または `"MATERIAL:CMD"` |
| `Aura` | `icon.aura` | Boolean |
| `Giver` | `giver` | String? |
| `Category` | `category` | `"lq:general"` など |
| `Location` | `location` | `"world,x,y,z[,yaw,pitch]"` |
| `Options.MaxParty` | `maxPlayers` / `minPlayers` | `"min-max"` または `"max"` |
Expand Down Expand Up @@ -229,7 +227,7 @@ Flyway + Exposed で管理。全テーブルは `V1__InitialSetup` マイグレ
### テーブル一覧

| テーブル | 用途 |
|---|---|
| --- | --- |
| `quest_progress` | プレイヤーのクエスト進捗 |
| `quest_completions` | クエスト完了履歴 (プレイ制限計算用) |
| `player_quest_types` | プレイヤーの解放済み QuestType |
Expand Down
22 changes: 11 additions & 11 deletions docs/QUEST_FORMAT_DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ SmashAttack: # ID が YAML キー
## 設計案一覧

| 案 | スタイル | DSL度 | YAML構造度 | 特徴 |
|---|---|---|---|---|
| --- | --- | --- | --- | --- |
| **案 A** | MM-DSL 寄り | 強い | 弱い | インライン文字列でアクション/条件を記述 |
| **案 B** | MM-構造寄り | 弱い | 強い | MM命名に則した YAML ブロック、DSL最小限 |
| **案 C** | MM-バランス | 適度 | 適度 | 見やすさと MM らしさの妥協点 |
Expand Down Expand Up @@ -121,7 +121,7 @@ ForestExploration: # ID = YAML キー
### 評価

| 項目 | 評価 |
|---|---|
| --- | --- |
| **MM らしさ** | ◎ スキル DSL の雰囲気を強く継承 |
| **記述効率** | ◎ 一行で多くの情報を詰め込める |
| **可読性** | △ DSL 記法に慣れが必要。複雑な条件は見づらい |
Expand Down Expand Up @@ -217,7 +217,7 @@ ForestExploration:
### 評価

| 項目 | 評価 |
|---|---|
| --- | --- |
| **MM らしさ** | ○ Options ブロック、命名規則、構造の雰囲気は MM 風 |
| **記述効率** | △ やや verbose。ただし明確 |
| **可読性** | ◎ 何の設定か一目でわかる |
Expand Down Expand Up @@ -291,7 +291,7 @@ ForestExploration:
### 評価

| 項目 | 評価 |
|---|---|
| --- | --- |
| **MM らしさ** | ◎ 過不足ない MM っぽさ |
| **記述効率** | ○ 短いものは簡略、複雑なものは構造化 |
| **可読性** | ○ インラインと構造化の境界が明確 |
Expand All @@ -304,7 +304,7 @@ ForestExploration:
## 比較表: 同じ設定を3案で書き比べ

| 設定項目 | 案 A (DSL) | 案 B (構造) | 案 C (バランス) |
|---|---|---|---|
| --- | --- | --- | --- |
| **アイコン** | `IRON_SWORD;cmd:5001;aura` | `Material: IRON_SWORD`<br>`CustomModelData: 5001`<br>`Aura: true` | `"IRON_SWORD:5001"` + `Aura: true` |
| **アクション** | `mythicitem{give=MMOre;amount=5}` | `Type: MythicItemGive`<br>`Item: MMOre`<br>`Amount: 5` | `MythicItem: MMOre,5` |
| **完了条件** | `kill_zombie:10` | `KillZombie:`<br>`Amount: 10` | `KillZombie: 10` |
Expand All @@ -318,45 +318,45 @@ ForestExploration:
### 1. ID 位置

| 方式 | 例 | 採用案 |
|---|---|---|
| --- | --- | --- |
| **YAML キー** | `ForestExploration:` → ファイル名と一致推奨 | A/B/C 全案 |
| **内部フィールド** | `Id: "lq:forest_exploration"` | 旧来方式 |

### 2. アイコン記法

| 方式 | 例 | 採用案 |
|---|---|---|
| --- | --- | --- |
| **インライン文字列** | `IRON_SWORD;cmd:5001;aura` | 案 A |
| **構造化** | `Material: IRON_SWORD` + `CustomModelData: 5001` | 案 B |
| **ハイブリッド** | `"IRON_SWORD:5001"` + `Aura: true` | 案 C |

### 3. アクション記法

| 方式 | 例 | 採用案 |
|---|---|---|
| --- | --- | --- |
| **MM スキル DSL** | `mythicitem{give=MMOre;amount=5}` | 案 A |
| **構造化 YAML** | `Type: MythicItemGive`, `Item: MMOre`... | 案 B |
| **簡略 Type:Params** | `MythicItem: MMOre,5` | 案 C |

### 4. 完了条件 (Objectives)

| 方式 | 例 | 採用案 |
|---|---|---|
| --- | --- | --- |
| **Map<String, Int>** | `KillZombie: 10` | 案 C (シンプル) |
| **構造化 (拡張準備)** | `KillZombie: { Amount: 10, Type: MOB_KILL }` | 案 B (将来拡張) |
| **key:value 文字列** | `"kill_zombie:10"` | 案 A (統一性) |

### 5. Options ブロック

| 方式 | 例 | 採用案 |
|---|---|---|
| --- | --- | --- |
| **MM 式 Options** | `Options: { PlayLimits: ..., DeathLimit: ... }` | 案 B, C |
| **トップレベル直置き** | `PlayLimits: ...` `DeathLimit: ...` | 案 A (旧来互換) |

### 6. 受注条件名

| 方式 | 例 | 採用案 |
|---|---|---|
| --- | --- | --- |
| **旧来方式** | `requirements:` (objectives と混同しやすい) | 現行 |
| **MM 命名** | `Requirements:` | A/B/C (明確化) |
| **AcceptConditions** | `AcceptConditions:` | 構造案 |
Expand Down
15 changes: 6 additions & 9 deletions docs/QUEST_SYSTEM.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ data class QuestType(
val description: List<String> = emptyList(),
val category: String = "lq:general",
val location: Location? = null,
val giver: String? = null,
val playLimits: PlayLimits = PlayLimits(),
val acceptConditions: AcceptConditions = AcceptConditions(),
val maxPlayers: Int? = null,
Expand All @@ -35,12 +34,11 @@ data class QuestType(
### YAML ↔ コード マッピング

| YAML キー | Kotlin フィールド | 形式 |
|---|---|---|
| --- | --- | --- |
| `Title` | `title` | String |
| `Description` | `description` | List\<String\> |
| `Icon` | `icon` | `"MATERIAL"` または `"MATERIAL:CMD"` |
| `Aura` | `icon.aura` | Boolean |
| `Giver` | `giver` | String? |
| `Category` | `category` | `"lq:general"` など |
| `Location` | `location` | `"world,x,y,z[,yaw,pitch]"` |
| `Options.MaxParty` | `maxPlayers` / `minPlayers` | `"min-max"` または `"max"` |
Expand All @@ -65,7 +63,6 @@ QuestName:
- "&7説明文"
Icon: "DIAMOND:5001"
Aura: true
Giver: "&e依頼人"
Category: "lq:general"
Location: "world,100,64,200"

Expand Down Expand Up @@ -116,7 +113,7 @@ QuestName:
各周期の制限回数。

| 周期 | 説明 | リセットタイミング | 実装状況 |
|---|---|---|---|
| --- | --- | --- | --- |
| `Daily` | 日間制限 | 毎日 0:00 | ✅ |
| `Weekly` | 週間制限 | 毎週月曜 0:00 | ✅ |
| `Monthly` | 月間制限 | 毎月1日 0:00 | ✅ |
Expand All @@ -130,7 +127,7 @@ QuestName:
`Requirements` セクションで定義。

| 条件 | YAML | 型 | 実装 |
|---|---|---|---|
| --- | --- | --- | --- |
| PvE レベル | `Requirements.PvELevel` | Int? | ✅ (チェックのみ) |
| 所持金 | `Requirements.Money` | Double? | ✅ (チェックのみ) |
| パーティ必須 | `Requirements.PartyMode` | Boolean | ✅ |
Expand Down Expand Up @@ -185,7 +182,7 @@ class Progresses(requirements: Map<String, QuestRequirement>) {
### アクション種別

| Type | ActionType | 説明 | 実装 |
|---|---|---|---|
| --- | --- | --- | --- |
| `Command` | `COMMAND` | コンソールコマンド実行 | ✅ |
| `Item` | `ITEM_GIVE` | Minecraft アイテム付与 | ✅ |
| `MythicItem` | `MYTHIC_ITEM_GIVE` | MythicMobs アイテム付与 | ⚠️ 未実装 |
Expand All @@ -194,7 +191,7 @@ class Progresses(requirements: Map<String, QuestRequirement>) {
### トリガータイミング

| トリガー | 実行タイミング |
|---|---|
| --- | --- |
| `OnFirstComplete` | 各プレイヤーが初めてクエストをクリアした時 |
| `OnComplete` | クエストクリアのたび毎回 |

Expand All @@ -209,7 +206,7 @@ class Progresses(requirements: Map<String, QuestRequirement>) {
### EndReason

| 値 | 意味 |
|---|---|
| --- | --- |
| `COMPLETE` | 全要件達成 |
| `CANCEL` | プレイヤーによる中断 |
| `DEATH_LIMIT` | 死亡回数上限超過 |
Expand Down
19 changes: 5 additions & 14 deletions wiki/QUEST_CREATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ QuestName:
- "&7説明文2行目"
Icon: "MATERIAL" # 必須、または "MATERIAL:CMD"
Aura: true # 任意(エンチャント光沢)
Giver: "&e依頼人" # 任意
Category: "lq:general" # 必須
Location: "world,x,y,z" # 必須

Expand Down Expand Up @@ -133,20 +132,12 @@ Icon: "PLAYER_HEAD:base64string"
Aura: true
```

### Giver(任意)

クエストの依頼人名。

```yaml
Giver: "&e村長"
```

### Category(必須)

ビルトインカテゴリ:

| キー | 表示名 | 説明 |
|---|---|---|
| --- | --- | --- |
| `lq:general` | General | 一般クエスト |
| `lq:daily` | Daily | デイリークエスト |
| `lq:story` | Story | ストーリークエスト |
Expand Down Expand Up @@ -179,7 +170,7 @@ Options:
受注・完了可能回数の周期制限。

| 周期 | リセット |
|---|---|
| --- | --- |
| `Daily` | 毎日 0:00 |
| `Weekly` | 毎週月曜 0:00 |
| `Monthly` | 毎月1日 0:00 |
Expand Down Expand Up @@ -231,7 +222,7 @@ Objectives:
```

| プレフィックス | 意味 | 例 |
|---|---|---|
| --- | --- | --- |
| `Break` | ブロック破壊 | `BreakStone` |
| `Place` | ブロック設置 | `PlaceDirt` |
| `Kill` | エンティティ討伐 | `KillZombie` |
Expand Down Expand Up @@ -259,7 +250,7 @@ Actions:
```

| Type | 説明 | Params | 実装 |
|---|---|---|---|
| --- | --- | --- | --- |
| `Command` | コンソールコマンド | `"コマンド文字列"` | ✅ |
| `Item` | アイテム付与 | `"material,amount"` | ✅ |
| `MythicItem` | MythicMobs アイテム | `"ItemName,amount"` | ⚠️ 未実装 |
Expand Down Expand Up @@ -431,7 +422,7 @@ mkdir -p plugins/SimpleQuest/@custom/types
### よくある間違い

| 問題 | 原因 | 対策 |
|---|---|---|
| --- | --- | --- |
| 読み込まれない | ディレクトリ名に `@` がない | `@namespace` にリネーム |
| 同上 | インデントがずれている | スペース2個で統一。タブ禁止 |
| アイコン表示されない | Material 名が間違い | [Paper Javadoc](https://jd.papermc.io/paper/1.21/org/bukkit/Material.html) で確認 |
Expand Down