You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

154 lines
5.2 KiB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Yokoka’s Quest Fan Character Profile Generator</title>
  5. </head>
  6. <body>
  7. <h1>Yokoka’s Quest-style Profile generator</h1>
  8. <h1>THIS IS WORK IN PROGRESS, THIS IS NON FUNCTIONAL, PLEASE DO NOT USE YET</h1>
  9. <% if args then %>
  10. <h2>Information Gathered</h2>
  11. <h3>General Information</h3>
  12. <dl>
  13. <dt>Name</dt>
  14. <dd>
  15. <% if args.name then %>
  16. <%= args.name.v %>
  17. <% end %>
  18. </dd>
  19. <dt>Avatar</dt>
  20. <dd>
  21. <% if args.avatar then %>
  22. <img src="data:<%= args.avatar.t -%>;base64,<%= encoder(args.avatar.v) %>" />
  23. <% end %>
  24. </dd>
  25. <dt>Is Leader</dt>
  26. <dd>
  27. <% if args.is_leader and args.is_leader.v == "on" then %>
  28. <img src="data:image/png;base64,<%= encoder(readfile('yqtemplate/basic_blank.png')) %>" />
  29. <% else %>
  30. <img src="data:image/png;base64,<%= encoder(readfile('yqtemplate/basic_blank.png')) %>" />
  31. <% end %>
  32. </dd>
  33. </dl>
  34. <h3>Classes and Levels</h3>
  35. <dl>
  36. <dt>Class 1</dt>
  37. <dd>
  38. <% if args.class1 then %>
  39. <img src="data:image/png;base64,<%= encoder(readfile('yqtemplate/'..classes[args.class1].f)) %>" />
  40. <% if args.class1_lvl then %>
  41. Lvl <%= args.class1_lvl %>
  42. <% end %>
  43. <% end %>
  44. </dd>
  45. <dt>Class 2</dt>
  46. <dd>
  47. <% if args.class2 then %>
  48. <img src="data:image/png;base64,<%= encoder(readfile('yqtemplate/'..classes[args.class2].f)) %>" />
  49. <% if args.class2_lvl then %>
  50. Lvl <%= args.class2_lvl %>
  51. <% end %>
  52. <% end %>
  53. </dd>
  54. <dt>Class leaning</dt><dd>
  55. <% if args.class_leaning then %>
  56. <%= args.class_leaning %>
  57. <% end %>
  58. </dd>
  59. </dl>
  60. <% end %>
  61. <form method="POST" action="/cgi/yqtemplate" enctype="multipart/form-data">
  62. <h2>General Information</h2>
  63. <label for="name">Name:</label>
  64. <input type="test" name="name"/><br />
  65. <label for="avatar">Portrait:</label>
  66. <input type="file" name="avatar"/><br />
  67. <label for="is_leader">Party Leader:</label>
  68. <input type="checkbox" name="is_leader"/><br />
  69. <h2>Classes and Levels</h2>
  70. <label for="class1">Class 1:</label>
  71. <select name="class1">
  72. <% for k, v in ipairs(classes) do -%>
  73. <option value="<%= k %>"><%= v.n %></option>
  74. <% end %>
  75. </select>
  76. <label for="class1_lvl">Level:</label>
  77. <input type="number" name="class1_lvl" min="1"/><br/>
  78. <label for="class2">Class2:</label>
  79. <select name="class2">
  80. <% for k, v in ipairs(classes) do -%>
  81. <option value="<%= k %>"><%= v.n %></option>
  82. <% end %>
  83. </select>
  84. <label for="class2_lvl">Level:</label>
  85. <input type="number" name="class2_lvl" min="1"/><br/>
  86. <label for="class_leaning">
  87. Class leaning (0 for completely class 1, 100 for completely class 2):
  88. </label>
  89. <input type="number" name="class_leaning" min="0" max="100"></br>
  90. <h2>Stats</h2>
  91. <label for="stat_luc">Luck</label>
  92. <input type="number" name="stat_luc" min="0" max="100" />
  93. <label for="stat_str">Strength</label>
  94. <input type="number" name="stat_str" min="0" max="100" />
  95. <label for="stat_sta">Stamina</label>
  96. <input type="number" name="stat_sta" min="0" max="100"/>
  97. <label for="stat_agi">Agility</label>
  98. <input type="number" name="stat_agi" min="0" max="100"/>
  99. <label for="stat_int">Intelligence</label>
  100. <input type="number" name="stat_int" min="0" max="100"/>
  101. <label for="stat_res">Resistance</label>
  102. <input type="number" name="stat_res" min="0" max="100"/><br/>
  103. <h2>Skills</h2>
  104. <label for="allegiance">Allegiance:</label>
  105. <input type="text" name="allegiance"/><br />
  106. <label for="affinity">Affinity:</label>
  107. <input type="text" name="affinity"/><br />
  108. <label for="ability">Ability:</label>
  109. <input type="text" name="ability"/><br />
  110. <label for="advantage">Advantage:</label>
  111. <select name="advantage">
  112. <% for _, v in ipairs(elements) do %>
  113. <option value="<%= v %>"><%= v %></option>
  114. <% end %>
  115. </select><br/>
  116. <label for="weakness">Weakness</label>
  117. <select name="weakness">
  118. <% for _, v in ipairs(elements) do %>
  119. <option value="<%= v %>"><%= v %></option>
  120. <% end %>
  121. </select><br />
  122. <h2>Equipment</h2>
  123. <label for="weapon_name">Weapon</label>
  124. <input type="file" name="weapon_ico" />
  125. <input type="text" name="weapon_name" /><br />
  126. <label for="outfit_name">Outfit</label>
  127. <input type="file" name="outfit_ico" />
  128. <input type="text" name="outfit_name" /><br />
  129. <label for="accessory1_name">Accessory 1</label>
  130. <input type="file" name="accessory1_ico" />
  131. <input type="text" name="accessory1_name" /><br />
  132. <label for="accessory2_name">Accessory 2</label>
  133. <input type="file" name="accessory2_ico" />
  134. <input type="text" name="accessory2_name" /><br />
  135. <h2>Generate</h2>
  136. <input type="submit" value="Generate">
  137. </form>
  138. <hr />
  139. <p>
  140. Based on the character profiles in the webcomic
  141. <a href=https://yokokasquest.com>Yokoka’s Quest</a>
  142. by Chris Hyacinth R.
  143. </p>
  144. <p>
  145. Assets shared by the author on the
  146. <a href="https://forums.cisumchronicles.com/" >webcomic’s forums</a>
  147. .
  148. </p>
  149. </body>
  150. </html>