Skip to content

ステップバイステップチュートリアル:サバイバルホラーワールドをゼロから作る

ここでは 「No, I'm not a Human」 にインスパイアされたホラーサバイバルゲームを作ります。設定はシンプルです — 終末がやってきて、外には人間に擬態した「来訪者」たちが徘徊しています。あなたは家に一人きり。毎晩誰かが扉をノックします。覗き穴から人間か怪物かを判断し、選択を下して14晩を生き延びてください。

このチュートリアルを終える頃には、Yuminaの中核となる作成スキル — エントリ、変数、ディレクティブ、コンポーネント、ロアブック — をしっかり身につけているはずです。今後どんなワールドを作るにしても、すべてはここから始まります (•̀ᴗ•́)و


ステップ1:新しいワールドを作成

左ナビゲーションの 作成 ボタンをクリックし、Blank Project を選択します。エディタの上部にある入力フィールドにワールド名を入力します。

  • 名前The Imposters

エディタの各セクションにまだ馴染みがない場合は、まず 仕組み に目を通してから戻ってきてください。


ステップ2:キャラクター設定エントリを書く

左ナビゲーションの ロアブック をクリックします。

左側にいくつかのグループが見えるはずです。PRESETS にはYuminaのデフォルトエントリ(Fiction Mode、Task、Instructionsなど)がすでに入っています。これらはAIの挙動を整えるためのデフォルト指示です。今は無視して、システムに慣れてから戻ってきましょう。

自分のエントリを作成しましょう。PRESETS グループの中にいることを確認し、右上の + Add Entry をクリックします。

このゲームでは、AIはキャラクターを演じるのではなく ゲームマスター(GM) として振る舞います。シーンを描写し、すべてのNPCを演じ、物語を進める役割です。そのため最初のエントリで、AIに自分の役割と責務を伝えます。

キャラクター設定エントリの作成

フィールド
名前Game Master Setup
送信種別Instruction(AIはこれを従うべきルールとして扱います)
タグPreset をクリック

Content フィールドに以下を記入します。

You are a fair and impartial horror survival game GM. The game lasts 14 days (14 nights).

Setting: The apocalypse has begun. The city is overrun with "Visitors" — entities that look exactly like humans. The player is alone at home. Every night, someone knocks on the door asking for help. The player must observe through the peephole, talk through the door, and use various methods to judge whether the visitor is human or a monster, then decide whether to open the door.

Your responsibilities:
- Each night, describe the knocker's appearance and behavior
- Give clues fairly without directly revealing their identity
- During the day, let the player freely explore the apartment, use items, and make phone calls
- Maintain a suspenseful and tense atmosphere
- At the end of each reply, provide 3–5 suggested options (in A/B/C/D/E format)

Begin each reply with a phase header:
- Night: **Night X**
- Day: **Day X**

重要なポイントをいくつか挙げます。

  • このエントリは PRESETS にあります → 常にAIに送信され、すべての会話で表示されます。コア設定はここに置く必要があります
  • 送信種別 = Instruction → AIはこれをキャラクターの台詞ではなくシステム指示として扱います
  • タグ = Preset → 整理目的のためです

このエントリはゲームの「憲法」 — AIの振る舞い方すべてを定めるものです。


ステップ3:オープニングメッセージを書く

First Message セクションに切り替えて Add Greeting をクリックします(あるいはロアブックで role: greeting の新規エントリを作成してもかまいません — 効果は同じです)。

ファーストメッセージの編集

**Night 1**

The television screen flickers with static. An emergency broadcast drones on in a mechanical voice, repeating the same warning: "…Currently confirmed Visitor characteristics: teeth that are unnaturally uniform and porcelain white. Residents are advised to exercise caution and avoid opening doors to unknown individuals…"

You're alone in the apartment. It's a modest place — bathroom, living room, bedroom, study, kitchen, and a storage room. There's a peephole on the front door. The storage room has a handgun. The study has a landline telephone. The fridge has a few days' worth of food.

Outside the window, the street is deserted. Or at least — it looks that way.

Then comes the knocking.

***Knock… knock… knock.***

A young woman's voice drifts through the door, trembling and tearful: "Please… let me in… there's something out here chasing me…"

**Suggested choices:**
A. Open the door and let her in
B. Talk to her through the door and ask a few questions
C. Refuse and tell her to leave
D. Look through the peephole to observe her carefully
E. Other (type any action you want to take)

良いオープニングの要素は次の通りです。

  1. プレイヤーがどこにいて何が起きているかを即座に伝える
  2. 利用できるリソースと環境を明示する
  3. プレイヤーをすぐに行動へと駆り立てる決断で終わらせる

ステップ4:ゲーム変数を作成

Variables セクションに切り替えて Add Variable をクリックします。5つの変数を作成します。

変数の作成

1. 体力

フィールド
IDplayer_hp
表示名Player HP
タイプNumber
デフォルト値3
最小値0
最大値5
Behavior RulesDecrease by 1 when the player is attacked by a Visitor or makes a fatal mistake. Drop directly to zero if the player lets the Pale Stranger inside or admits to being alone. Game over at 0.

2. エネルギー

フィールド
IDenergy_current
表示名Energy
タイプNumber
デフォルト値3
最小値0
最大値8
Behavior RulesBody-checking a visitor and shooting both cost 1 point. Peephole observation and talking are free. Restore to max during the day. Cannot perform energy-consuming actions when energy is 0.

3. 日数カウント

フィールド
IDgame_day
表示名Game Day
タイプNumber
デフォルト値1
最小値1
最大値14
Behavior RulesIncrease by 1 after each complete night-day cycle. The game concludes when Day 14 ends.

4. フェーズ

フィールド
IDgame_phase
表示名Game Phase
タイプString
デフォルト値Night
Behavior RulesValue is "Night" or "Day". Night is for handling door-knocking events; Day is for freely exploring rooms and using items.

5. 武装状態

フィールド
IDplayer_has_gun
表示名Has Gun
タイプBoolean
デフォルト値True
Behavior RulesPlayer starts with a handgun. Shooting a visitor costs 1 energy but may accidentally harm a human. Describe the consequences after a shooting.

Behavior Rules とは?

Behavior Rules はコードではなく、AI向けに書く自然言語の指示です。AIが返信を生成する際に、どの変数をいつ更新すべきかを知るためにこれを読みます。AI向けの「カンニングペーパー」だと考えてください φ(>ω<*)


ステップ5:変数は実際にどう変わるのか

変数を設定したけれど、AIはいつそれを変えればよいと知るのか? — そう疑問に思うかもしれません。

朗報です。AIに手動で教える必要はありません。 ワールドに変数がある限り、Yuminaエンジンが自動的に2つのことを行います。

  1. ディレクティブのフォーマットをAIに自動的に伝える:エンジンは毎ターンこっそりとAIに指示セットを差し込み、[variableID: operation value] 構文を使って状態を更新するよう伝えます。この点について何もする必要はありません。
  2. 書いたbehavior rulesを自動的にAIに送る:ステップ4で各変数に書いたルールは、AIに毎ターン見えます。これを使ってAIは何をいつ更新するかを判断します。

例えば、health 変数のbehavior rulesに「来訪者に攻撃されたとき、または危険な選択をしたとき減少する」と書きました。ゲーム内でプレイヤーが攻撃されると、AIは返信の末尾に [health: -20] を含めます。エンジンがこれを検出し、自動的にhealthを100から80に下げます。

つまり、behavior rulesを明確に書けば書くほどAIのパフォーマンスは向上します。 ステップ4で書いたルールを見直しましょう。各変数について「いつ、どのように変わるのか」を明確に指定しているか確認してください。

AIの出力ではディレクティブはどう見える?

AIの返信の最後にこのようなものが現れます。

[health: -20]
[energy: -15]

これがディレクティブです。エンジンが自動的に抽出して適用するので、プレイヤーに見える返信には決して現れません。

ディレクティブ構文をさらに

+(加算)と -(減算)以外にも、set(特定の値に設定)、toggle(ブール反転)などがあります。詳細は → AIディレクティブとマクロ


ステップ6:見た目を整える — AI生成のインターフェース

この時点でワールドはプレイ可能です。しかしプレイヤーに見えるのはプレーンテキストだけで、雰囲気も没入感もありません。本物のホラーゲームのような味わいのインターフェースを作りましょう。

「コードを書く?」 いいえ — AIに任せましょう ( ̄▽ ̄)ノ

方法1:Yumina内蔵のStudio AIを使う(推奨)

  1. エディタ上部の Enter Studio をクリック
  2. AI Assistant パネルを開く
  3. 以下を送信します(そのままコピーできます)。
Rewrite the root component (index.tsx) as a post-apocalyptic horror survival UI.
Reference the style of "No, I'm not a Human".
Keep the outer shell as `<Chat renderBubble={(msg) => ...} />` — let the platform continue to
handle the input box, streaming cursor, and swipes; we only take over the bubble style.

I need these effects:

1. Phase title:
   - If the AI reply contains "🌑 **NIGHT X**", extract it and render as a CRT monitor-style title bar
     (dark green glowing text, scanline effect, subtle flicker)
   - If it contains "☀️ **DAY X**", render as a warm-toned title bar (amber text)
   - Remove the title from the message body — display it separately

2. Knocking effect:
   - If the reply contains ***bold italic text*** (triple asterisks), extract it and render as
     a knocking animation — large red text with a shaking effect

3. Bottom HUD status bar:
   - Monospace font, dark green background
   - Display: ⚡ Energy (energy_current variable), ❤️ HP (player_hp variable),
     🔫/🚫 armed status (player_has_gun variable)
   - Compact single-line display

4. Narrative text area:
   - Dark background (deep green-black), subtle border glow
   - Light green text, generous line spacing for readability
   - Rendered with renderMarkdown

5. Choice buttons:
   - If the AI reply contains "Suggested Choices:" or "**Your choices:**", extract the options
     (A. B. C. D. E.) and render as clickable buttons
   - Click to automatically send the corresponding option
   - Dark green tones, brighter on hover

6. Overall vibe: black-green CRT monitor aesthetic, low saturation, oppressive end-of-world feel

My variables:
- player_hp — health, number, 0–5
- energy_current — energy, number, 0–8
- game_day — current day, number, 1–14
- game_phase — "Night" or "Day"
- player_has_gun — whether armed, true/false
  1. AIがコードを生成し承認カードを表示します。Canvasパネルにライブプレビューが映ります
  2. 満足なら Approve をクリック。修正したい? — 「ノックエフェクトをもっと派手に」「選択ボタンが離れすぎている」など対話を続けてください

Studio AIによるインターフェース生成

生成された効果のプレビュー

これでスタイリッシュなフロントエンドが楽々と完成しました!

方法2:外部AI(Claude、ChatGPTなど)を使う

別のAIに慣れているならそれでも構いません。上記の効果説明と末尾のYumina技術情報を一緒に送信します。

Yumina technical info (please follow these rules when writing code):
- Root component: export `export default function MyWorld() { return <Chat renderBubble={(msg) => ...} /> }`
- `<Chat />` is the platform-provided chat building block — it handles the input box, message
  list, streaming cursor; we only customize each bubble via renderBubble
- Inside renderBubble, the msg object exposes: `contentHtml` (pre-rendered HTML), `rawContent`
  (raw text), `role` ("user" / "assistant"), `messageIndex`, `isStreaming`,
  `renderMarkdown(text)` (turns markdown into formatted HTML)
- useYumina() gives you variables, e.g. useYumina().variables.player_hp
- useYumina().sendMessage(text) sends a message as the player (for clickable options)
- Built-in Icons library (no import), e.g. Icons.Heart, Icons.Zap
- Tailwind CSS and React hooks supported
- Inject animations with useEffect + document.createElement("style")
- React, Chat, useYumina, Icons are all globally available in the sandbox — no imports needed

コードを得たら次を行います。

  1. エディタに戻り → カスタムUI セクション → index.tsx を開く
  2. コードを貼り付け(デフォルトの return <Chat /> を置き換え)
  3. 下部に Compile Status: OK と表示されれば完了です

コードを理解する必要はありません

このコードが何をしているか知らなくても問題ありません。貼り付け後に下部に Compile Status: OK と表示されていれば動作しています。エラーが出たらエラーメッセージをそのままAIに送り返して修正を依頼しましょう ∠( ᐛ 」∠)_

思い通りの結果にならなかったら?

AIに直接伝えてください。「ヘルスバーが細すぎる、もっと太くして」「背景を真っ黒に変えて」「点滅エフェクトを追加して」 — 数回イテレーションすればイメージに近づきます。


ステップ7:ロアブックエントリを書く

先ほどのエントリは PRESETS グループにあり常に送信されます。しかし、関連がある時だけ参照できれば十分な情報もあります — そのためのものが CHAT HISTORY グループです。

ロアブック に戻り、左側で CHAT HISTORY グループを展開し、そのグループの下の + Add Entry をクリックして、いくつかキーワードトリガーのエントリを作成します。

1. ドアノックのルール

フィールド
名前Knocking Event
送信種別Instruction
キーワードdoorknockopenknocking
Door-knocking event rules:
- Each night has 2–3 visitors, appearing one by one
- Player options: observe through peephole (free), talk through the door (free), request a body check (costs energy), open or refuse
- Letting a human in = may provide help | Letting a Visitor in = dangerous
- Keep descriptions suspenseful when portraying knock scenes — never directly reveal identity

2. 覗き穴観察

フィールド
名前Peephole Observation
送信種別Instruction
キーワードpeepholepeekobservelook
Peephole observation rules:
- Can only see the visitor's head and upper body
- Focus descriptions on: facial expression, teeth, eyes, skin texture
- Visitors' disguises have subtle flaws (unnaturally uniform teeth, abnormal pupils, strange skin texture)
- Humans have normal imperfections (cavities, dark circles, scars)
- Never directly reveal identity — describe only what is seen

3. 部屋の探索

フィールド
名前Room Search
送信種別Instruction
キーワードsearchcheckrummageexploreroom
Room search rules (daytime only):
- Storage room: can find the handgun
- Kitchen: food supplies, can restore a small amount of energy
- Study: telephone, can call for information
- Describe environmental details to build unease

キーワードトリガーの仕組み

各AI応答の前に、エンジンは最近のメッセージをスキャンします。マッチするキーワードがあれば → 対応するエントリが一時的にAIに送られます。誰も言及していなければ → AIには見えず、トークン予算が浪費されません。効率的かつ精密です (≧▽≦)

スキャン深度は ロアブック セクション内 Entry SettingsScan Depth 設定 — デフォルトは2、4まで上げることを推奨します。


ステップ8:テスト

中核となるコンテンツは完成です。テストしてみましょう!

エディタ上部のバーで Save をクリックし、左ナビゲーション下部の金色の PLAY ボタンを押します。エディタはそのままセッションへ移動します — このワールド用に保存済みのセッションがあればそれを再利用し、なければ新規セッションが自動作成されます。次の項目を確認してください。

確認項目確認方法動かないときは
オープニングメッセージが表示される入った瞬間に最初のメッセージが自動表示されるFirst Message セクションに挨拶が書かれているかチェック
カスタムUIが有効メッセージにCRT風のフェーズタイトルとHUDが表示されるindex.tsx にrenderBubbleコードがありCompile StatusがOKかチェック
ディレクティブが動作操作後に変数が変わる(HUDの値が更新される)各変数のbehavior rulesが明確に書かれているかチェック
ロアブックがトリガーされる「peephole」と言及するとAIがルールに従うキーワードの綴りとScan Depthの設定をチェック

ステップ9:概要情報を埋める

テストが通ったら Overview に切り替えて、公開前の詳細を記入します。

  1. カバー画像 をアップロード(ホラーの雰囲気が伝わるもの)
  2. 説明文 を書いてプレイヤーに何が体験できるか伝える
  3. タグ を追加:horrorsurvivalmysteryinteractive fiction
  4. 言語 を設定:ワールドが書かれている言語を選択(例 English
  5. 上部の Save をクリック

概要情報


ステップ10:公開

  1. エディタ上部のバーで Publish ボタン(Save の隣)をクリック
  2. 公開ダイアログで コンテンツレーティングGeneral または18+向け Sensitive Content)、可視性、他者編集可否を設定
  3. 利用規約に同意して公開ボタンを押す

完了です! あなたのワールドが公開されました ヽ(✿゚▽゚)ノ


あなたが学んだこと

概念やったこと
エントリシステム設定とオープニングメッセージを記述 — AI挙動の基盤
変数HP、エネルギー、日数カウンタを作成 — ゲーム状態の骨格
ディレクティブエンジンがAIに自動で教える。明確なbehavior rulesを書くだけ
カスタムUIAIにステータスパネルを生成させた — 自分でコードを書かずに
ロアブックキーワードトリガーのルールエントリ — オンデマンドの知識ベース

これら5つの要素が組み合わさることで、完成度の高いインタラクティブワールドが生まれます。

さらに何ができるか

このチュートリアルでは最も基本的な機能だけを使いました。Yuminaにできることはまだまだあります。

  • ルールエンジン — HPが0になったときに自動でデスエンディングをトリガー、AIの記憶に頼る必要なし
  • カスタムUIガイド — メッセージを吹き出し、ビジュアルノベルのシーン、戦闘ログなどに変える
  • オーディオ — BGMと効果音を追加、地下室に入ったら不気味なミュージックに自動切り替え
  • 条件付きエントリ — 変数の値に基づいてエントリを有効化(終盤プロットの開示など)

個別システムをさらに深掘りしたい場合は、ルールエンジンカスタムUI変数 の各リファレンスページに複雑な状態管理を扱う実例が掲載されています。


本物をプレイする

このチュートリアルでは簡易版を作りました — 5変数、いくつかのエントリ、1つのレンダラー。しかしYumina上の本格版「No, I'm not a Human」には次のものが含まれます。

  • 20以上のキャラクター:人間8人(レジ係のSarah、退役エンジニアのMarcus、看護師のElena…)、人間に擬態した来訪者6体(配達員のJake、少女のLily…)、特殊キャラクター(Pale Stranger、謎のWho、猫の女性)
  • 25以上の変数:体力とエネルギーだけでなく — 部屋の状態、来訪者の記録、FEMAレポート数、各種インベントリアイテム(コーヒー、エナジードリンク、キャットフード…)
  • 完全な覗き穴システム:各キャラクターの覗き穴用スプライト — 人間には自然な不完全さ、来訪者には微妙な兆候
  • CRTモニター風レンダラー:夜/昼フェーズアニメーション、ノックの揺れエフェクト、クリック可能な選択ボタン、底部HUD

yumina.io にアクセスして 「No, I'm not a Human」 を検索し、フルバージョンを体験してください — あなたのワールドがどんな姿になりうるかを実感できます。その後、戻ってきて作り続けましょう ᕕ( ᐛ )ᕗ