Faq.svelte 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <script>
  2. // Self-contained FAQ state and logic
  3. let openFaq = $state(null);
  4. const faqs = [
  5. {
  6. q: "How does the LLM actually run the game?",
  7. a: "You describe your character, the setting, genre, tone, and any special rules in plain English. The LLM then generates the opening scene and continues the story based on everything said so far. It maintains consistency, tracks important details, and reacts to your every input naturally."
  8. },
  9. {
  10. q: "Is there a limit to what I can do or say?",
  11. a: "The only real limits are the creativity of the model and basic content guidelines. You can try anything — fight, seduce, build, explore, betray, invent magic systems on the fly. Outcomes depend on context, your skills, luck, and the world's rules as established."
  12. },
  13. {
  14. q: "How much does it cost in practice?",
  15. a: "At $1 per million tokens, a rich hour of play typically uses 15,000–40,000 tokens depending on length and model. That’s usually 3–8 cents per hour. Long epic campaigns cost only a few dollars total. You are charged only for actual usage — no subscriptions or hidden fees."
  16. },
  17. {
  18. q: "Can I play the same character/world across multiple sessions?",
  19. a: "Yes. Your adventures are saved with full history and context. Resume anytime and the LLM will remember every decision, character, location, and plot thread. You can also branch into alternate timelines if you want."
  20. },
  21. {
  22. q: "When will ChatRPG be available?",
  23. a: "We are currently in active development and polishing the core experience. A full launch is coming soon."
  24. }
  25. ];
  26. function toggleFaq(index) {
  27. openFaq = openFaq === index ? null : index;
  28. }
  29. </script>
  30. <section id="faq" class="section section-alt">
  31. <div class="container">
  32. <div class="section-header">
  33. <div class="eyebrow">QUESTIONS</div>
  34. <h2>Frequently Asked Questions</h2>
  35. </div>
  36. <div class="faq-list">
  37. {#each faqs as faq, i}
  38. <div class="faq-item" class:open={openFaq === i}>
  39. <button class="faq-question" onclick={() => toggleFaq(i)}>
  40. <span>{faq.q}</span>
  41. <span class="faq-arrow">{openFaq === i ? '−' : '+'}</span>
  42. </button>
  43. {#if openFaq === i}
  44. <div class="faq-answer">{faq.a}</div>
  45. {/if}
  46. </div>
  47. {/each}
  48. </div>
  49. </div>
  50. </section>
  51. <style>
  52. /* FAQ specific */
  53. .faq-list {
  54. max-width: 780px;
  55. margin: 0 auto;
  56. }
  57. .faq-item {
  58. border-bottom: 1px solid #2a2a35;
  59. }
  60. .faq-item:last-child {
  61. border-bottom: none;
  62. }
  63. .faq-question {
  64. width: 100%;
  65. background: none;
  66. border: none;
  67. color: #e5e5ea;
  68. font-size: 1.05rem;
  69. text-align: left;
  70. padding: 20px 0;
  71. display: flex;
  72. justify-content: space-between;
  73. align-items: center;
  74. cursor: pointer;
  75. font-weight: 500;
  76. }
  77. .faq-arrow {
  78. font-size: 1.4rem;
  79. line-height: 1;
  80. color: #777;
  81. width: 24px;
  82. text-align: center;
  83. }
  84. .faq-answer {
  85. color: #a1a1aa;
  86. padding-bottom: 22px;
  87. padding-right: 30px;
  88. font-size: 1rem;
  89. line-height: 1.65;
  90. }
  91. </style>