TRPGシナリオ自動生成&共有

<!DOCTYPE html>
<html lang="ja">
<head>
  <meta charset="UTF-8">
  <title>TRPGシナリオ自動生成&共有</title>
  <style>
    body {
      font-family: 'Segoe UI', sans-serif;
      background: #f4f4f4;
      padding: 20px;
      max-width: 800px;
      margin: auto;
    }
    h1, h2 {
      text-align: center;
    }
    select, button, textarea {
      width: 100%;
      padding: 10px;
      margin-top: 10px;
      font-size: 1rem;
    }
    .box {
      background: #fff;
      padding: 15px;
      border-radius: 8px;
      margin-top: 20px;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    .scenario {
      background: #f9f9f9;
      border-left: 5px solid #4CAF50;
      margin-bottom: 10px;
      padding: 10px;
      border-radius: 5px;
      position: relative;
    }
    .btns {
      margin-top: 10px;
      display: flex;
      gap: 10px;
    }
    .copy, .save, .delete {
      cursor: pointer;
      border: none;
      padding: 8px 12px;
      border-radius: 4px;
    }
    .copy { background: #2196F3; color: white; }
    .save { background: #4CAF50; color: white; }
    .delete { background: #f44336; color: white; }
  </style>
</head>
<body>
  <h1>🎲 TRPGシナリオ自動生成サイト</h1>

  <div class="box">
    <label>ジャンル選択:</label>
    <select id="genre">
      <option value="fantasy">ファンタジー</option>
      <option value="horror">ホラー</option>
      <option value="scifi">SF</option>
    </select>
    <button onclick="generateScenario()">📜 シナリオを生成する</button>
  </div>

  <div id="scenarioBox" class="box"></div>

  <h2>🗃 保存済みシナリオ</h2>
  <div id="savedScenarios" class="box"></div>

  <script>
    const data = {
      fantasy: {
        title: ["封印の迷宮", "聖騎士の試練", "魔王復活の予兆", "失われた王国"],
        world: ["中世の王国", "古代の神殿", "天空都市", "エルフの森"],
        incident: ["魔法の暴走", "伝説の剣の発見", "精霊の異変", "竜の襲撃"],
        npc: ["若き魔導士", "忠義の騎士", "隠者の賢者", "裏切り者の巫女"],
        goal: ["真実を解明せよ", "封印を強化せよ", "儀式を阻止せよ", "遺跡の謎を解け"]
      },
      horror: {
        title: ["呪われた村", "深夜の廃病院", "封印されたビデオ", "血塗られた儀式"],
        world: ["雨の山奥", "閉鎖された病院", "地下の儀式場", "忘れ去られた洋館"],
        incident: ["突然の失踪事件", "見えない何かの影", "不気味な手紙", "鏡の中の誰か"],
        npc: ["精神を病んだ神父", "警察官の幽霊", "語らぬ老婆", "首のない少女"],
        goal: ["脱出せよ", "謎を暴け", "呪いを解け", "儀式を止めろ"]
      },
      scifi: {
        title: ["星間戦争の火種", "機械反乱の夜", "消えた宇宙船", "記憶を失った地球"],
        world: ["宇宙コロニー", "月面都市", "異星の遺跡", "サイバーパンク都市"],
        incident: ["AIの暴走", "重力異常", "通信断絶", "テレポート事故"],
        npc: ["サイボーグ兵士", "記憶を失った博士", "企業スパイ", "異星の子供"],
        goal: ["原因を究明せよ", "AIを停止せよ", "人類を救え", "真実を暴け"]
      }
    };

    function generateScenario() {
      const genre = document.getElementById("genre").value;
      const g = data[genre];

      const title = rand(g.title);
      const world = rand(g.world);
      const incident = rand(g.incident);
      const npc = rand(g.npc);
      const goal = rand(g.goal);

      const scenarioText = `【タイトル】${title}\n【舞台】${world}\n【事件】${incident}\n【NPC】${npc}\n【目的】${goal}`;
      const html = `
        <div class="scenario">
          <pre>${scenarioText}</pre>
          <div class="btns">
            <button class="copy" onclick="copyText(\`${scenarioText.replace(/`/g, '\\`')}\`)">📋 コピー</button>
            <button class="save" onclick="saveScenario(\`${scenarioText.replace(/`/g, '\\`')}\`)">💾 保存</button>
          </div>
        </div>
      `;
      document.getElementById("scenarioBox").innerHTML = html;
    }

    function rand(arr) {
      return arr[Math.floor(Math.random() * arr.length)];
    }

    function copyText(text) {
      navigator.clipboard.writeText(text).then(() => {
        alert("コピーしました!");
      });
    }

    function saveScenario(text) {
      let saved = JSON.parse(localStorage.getItem("trpgScenarios") || "[]");
      saved.push(text);
      localStorage.setItem("trpgScenarios", JSON.stringify(saved));
      alert("保存しました!");
      showSaved();
    }

    function deleteScenario(index) {
      let saved = JSON.parse(localStorage.getItem("trpgScenarios") || "[]");
      saved.splice(index, 1);
      localStorage.setItem("trpgScenarios", JSON.stringify(saved));
      showSaved();
    }

    function showSaved() {
      const box = document.getElementById("savedScenarios");
      const saved = JSON.parse(localStorage.getItem("trpgScenarios") || "[]");
      if (saved.length === 0) {
        box.innerHTML = "<p>保存されているシナリオはありません。</p>";
        return;
      }
      box.innerHTML = saved.map((s, i) => `
        <div class="scenario">
          <pre>${s}</pre>
          <div class="btns">
            <button class="copy" onclick="copyText(\`${s.replace(/`/g, '\\`')}\`)">📋 コピー</button>
            <button class="delete" onclick="deleteScenario(${i})">🗑 削除</button>
          </div>
        </div>
      `).join("");
    }

    // 初回ロード
    showSaved();
  </script>
</body>
</html>

投稿者: chosuke

趣味はゲームやアニメや漫画などです

「TRPGシナリオ自動生成&共有」への21件のフィードバック

  1. A piece that brought a sense of order to a topic I had been finding chaotic, and a look at shadowglowcorner continued that organising effect, content that imposes useful structure on messy subjects is doing genuine intellectual work and this site is providing that organisational function across multiple posts I have read recently here.

  2. Now saved this in a way that I will actually find again rather than the casual bookmark approach, and a stop at silverpetalstore earned the same careful saving, organising my reading bookmarks so that high quality sources rise to the top is something I should do more of and this site triggered that organisation today.

  3. Decided to read more before commenting and the more I read the more I wanted to say something, and a stop at silverpetalcollective pushed that impulse further, when content provokes the urge to participate rather than just consume it is doing something quite specific and worth recognising clearly when it happens during reading.

  4. Without comparing too aggressively to other sources this one stands out for the right reasons, and a look at velvetorchidmarket continued that distinctive quality, content that distinguishes itself through substance rather than style tricks is content with lasting differentiation and this site has clearly chosen substance based differentiation as its core editorial strategy.

  5. Honest assessment is that this is one of the better short reads I have had this week, and a look at hypergoodsstation reinforced that, the bar for short content is low because most of it sacrifices substance for brevity but this site manages both at once which is harder than it sounds for most writers attempting it.

  6. A clear case of writing that does not try to do too much in one post, and a look at trendybuyarena maintained the same scoped discipline, posts that try to cover too much end up covering nothing well and this site has clearly chosen scope discipline as a core editorial principle which shows up clearly in what I read.

  7. Reading this in pieces during a long afternoon and finding it consistently rewarding, and a stop at futuretrendzone fit naturally into the same fragmented reading pattern, sites whose posts can be read in segments without losing the thread are well suited to how I actually read these days and this one is built well.

  8. A piece that handled a controversial angle without becoming heated, and a look at frostpinecollective continued that calm engagement, content that can address contested topics without inflaming them is doing rare diplomatic work and this site has clearly developed the editorial maturity to handle sensitive material with the appropriate temperature of writing throughout.

  9. Worth observing that the post landed without needing a flashy headline to hook attention, and a stop at trendydealstation did the same, content that earns engagement through substance rather than packaging is the kind I trust more deeply and this site has clearly chosen substance as the primary lever for reader engagement throughout.

  10. Appreciate the work that went into laying this out so clearly, every section earns its place without filler, and a look at vividtrendcenter confirmed the same care, definitely the kind of place that deserves a return visit when the topic comes up again later in the future or for any related question.

  11. Closed my email tab so I could read this without interruption, and a stop at digitalcartcenter earned the same protected attention, when content is good enough to defend against the usual digital distractions you know it deserves better than the half attention most online reading gets in a typical busy day.

  12. Held my interest from the opening line through to the closing thought, and a stop at glowforgeessentials did the same, content that earns sustained attention in an environment full of distractions is doing something right and this site is clearly doing several things right rather than just one or two which I really appreciate.

  13. A well calibrated piece that knew its scope and stayed inside it, and a look at fastpickzone maintained the same scope discipline, scope creep is one of the failure modes of long blog posts and this site has clearly invested in the editorial discipline to prevent it which shows up in tightly contained pieces.

  14. Bookmark folder reorganised slightly to make this site easier to find, and a look at frostlaneemporium earned the same accessibility upgrade, the small organisational moves I make for sites I expect to return to often are themselves a signal of how much I trust them and this site triggered those moves naturally.

  15. Comfortable reading experience throughout, no jarring tone shifts and no awkward formatting, and a look at mysticmeadowgoods kept that smooth feel going, the kind of editorial polish that goes unnoticed when present but glaring when absent is something this site has clearly invested in across the broader content as well which deserves recognition.

  16. Felt the writer was speaking my language without trying to imitate it, and a look at quickcartworld continued that natural fit, when a writers default voice happens to match what you find easy to read the experience feels frictionless and that is something I notice and remember about specific sites going forward.

  17. Reading this on a phone at a coffee shop and finding it perfectly suited to that context, and a stop at premiumpickzone continued the comfortable mobile experience, content that works across reading conditions without compromising on substance is increasingly important and this site has clearly thought about the whole reader experience here.

  18. My usual response to new bookmarks is to forget them but this one I have already returned to twice, and a look at dreamwovenbazaar pulled me back a third time, the actual return rate to bookmarked sites is the real measure of value and this one is clearing that measure at a notable rate already.

  19. Saving the link for sure, this one is a keeper, and a look at epiccartcenter confirmed I should bookmark the entire site rather than just this page, the consistency across what I have seen so far suggests there is a lot more here worth coming back for soon when I have more time.

  20. Reading this gave me a quiet moment of intellectual pleasure that I had not been expecting, and a stop at copperwindessentials extended that pleasure across more pages, the unexpected reward of stumbling into careful writing is one of the small ongoing pleasures of reading the open web and this site is delivering it reliably.

  21. A modest masterpiece in its own quiet way, and a look at silversproutstore confirmed the same quiet quality across the rest of the site, calling something a masterpiece is usually overstating but for content this carefully crafted the word feels appropriate even if the writers themselves would probably resist the label honestly.

コメントを残す

メールアドレスが公開されることはありません。 ※ が付いている欄は必須項目です