rpg-event-generator 2.0.1 โ†’ 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (711) hide show
  1. package/README.md +235 -1159
  2. package/demo.js +379 -57
  3. package/dist/RPGEventGenerator.d.ts +246 -0
  4. package/dist/RPGEventGenerator.d.ts.map +1 -0
  5. package/dist/RPGEventGenerator.js +824 -0
  6. package/dist/RPGEventGenerator.js.map +1 -0
  7. package/dist/ai/enhancer.d.ts +16 -0
  8. package/dist/ai/enhancer.d.ts.map +1 -0
  9. package/dist/ai/enhancer.js +76 -0
  10. package/dist/ai/enhancer.js.map +1 -0
  11. package/dist/ai/index.d.ts +4 -0
  12. package/dist/ai/index.d.ts.map +1 -0
  13. package/dist/ai/index.js +20 -0
  14. package/dist/ai/index.js.map +1 -0
  15. package/dist/ai/interfaces.d.ts +23 -0
  16. package/dist/ai/interfaces.d.ts.map +1 -0
  17. package/dist/ai/interfaces.js +3 -0
  18. package/dist/ai/interfaces.js.map +1 -0
  19. package/dist/ai/providers.d.ts +27 -0
  20. package/dist/ai/providers.d.ts.map +1 -0
  21. package/dist/ai/providers.js +142 -0
  22. package/dist/ai/providers.js.map +1 -0
  23. package/dist/chains/ChainSystem.d.ts +84 -0
  24. package/dist/chains/ChainSystem.d.ts.map +1 -0
  25. package/dist/chains/ChainSystem.js +250 -0
  26. package/dist/chains/ChainSystem.js.map +1 -0
  27. package/dist/chains/index.d.ts +2 -0
  28. package/dist/chains/index.d.ts.map +1 -0
  29. package/dist/chains/index.js +8 -0
  30. package/dist/chains/index.js.map +1 -0
  31. package/dist/core/ContextAnalyzer.d.ts +48 -0
  32. package/dist/core/ContextAnalyzer.d.ts.map +1 -0
  33. package/dist/core/ContextAnalyzer.js +204 -0
  34. package/dist/core/ContextAnalyzer.js.map +1 -0
  35. package/dist/core/DifficultyScaler.d.ts +86 -0
  36. package/dist/core/DifficultyScaler.d.ts.map +1 -0
  37. package/dist/core/DifficultyScaler.js +270 -0
  38. package/dist/core/DifficultyScaler.js.map +1 -0
  39. package/dist/core/GeneratorCore.d.ts +89 -0
  40. package/dist/core/GeneratorCore.d.ts.map +1 -0
  41. package/dist/core/GeneratorCore.js +248 -0
  42. package/dist/core/GeneratorCore.js.map +1 -0
  43. package/dist/core/MarkovEngine.d.ts +70 -0
  44. package/dist/core/MarkovEngine.d.ts.map +1 -0
  45. package/dist/core/MarkovEngine.js +213 -0
  46. package/dist/core/MarkovEngine.js.map +1 -0
  47. package/dist/core/index.d.ts +5 -0
  48. package/dist/core/index.d.ts.map +1 -0
  49. package/dist/core/index.js +14 -0
  50. package/dist/core/index.js.map +1 -0
  51. package/dist/database/MemoryDatabaseAdapter.d.ts +16 -0
  52. package/dist/database/MemoryDatabaseAdapter.d.ts.map +1 -0
  53. package/dist/database/MemoryDatabaseAdapter.js +75 -0
  54. package/dist/database/MemoryDatabaseAdapter.js.map +1 -0
  55. package/dist/database/TemplateDatabase.d.ts +25 -0
  56. package/dist/database/TemplateDatabase.d.ts.map +1 -0
  57. package/dist/database/TemplateDatabase.js +141 -0
  58. package/dist/database/TemplateDatabase.js.map +1 -0
  59. package/dist/database/index.d.ts +3 -0
  60. package/dist/database/index.d.ts.map +1 -0
  61. package/dist/database/index.js +8 -0
  62. package/dist/database/index.js.map +1 -0
  63. package/dist/environment/EnvironmentalSystem.d.ts +110 -0
  64. package/dist/environment/EnvironmentalSystem.d.ts.map +1 -0
  65. package/dist/environment/EnvironmentalSystem.js +302 -0
  66. package/dist/environment/EnvironmentalSystem.js.map +1 -0
  67. package/dist/environment/index.d.ts +2 -0
  68. package/dist/environment/index.d.ts.map +1 -0
  69. package/dist/environment/index.js +8 -0
  70. package/dist/environment/index.js.map +1 -0
  71. package/dist/index.d.ts +19 -0
  72. package/dist/index.d.ts.map +1 -0
  73. package/dist/index.js +38 -3601
  74. package/dist/index.js.map +1 -0
  75. package/dist/interfaces/core.d.ts +22 -0
  76. package/dist/interfaces/core.d.ts.map +1 -0
  77. package/dist/interfaces/core.js +5 -0
  78. package/dist/interfaces/core.js.map +1 -0
  79. package/dist/interfaces/index.d.ts +3 -0
  80. package/dist/interfaces/index.d.ts.map +1 -0
  81. package/dist/interfaces/index.js +21 -0
  82. package/dist/interfaces/index.js.map +1 -0
  83. package/dist/interfaces/systems.d.ts +103 -0
  84. package/dist/interfaces/systems.d.ts.map +1 -0
  85. package/dist/interfaces/systems.js +5 -0
  86. package/dist/interfaces/systems.js.map +1 -0
  87. package/dist/localization/LocalizationSystem.d.ts +101 -0
  88. package/dist/localization/LocalizationSystem.d.ts.map +1 -0
  89. package/dist/localization/LocalizationSystem.js +257 -0
  90. package/dist/localization/LocalizationSystem.js.map +1 -0
  91. package/dist/localization/index.d.ts +2 -0
  92. package/dist/localization/index.d.ts.map +1 -0
  93. package/dist/localization/index.js +8 -0
  94. package/dist/localization/index.js.map +1 -0
  95. package/dist/relationships/RelationshipSystem.d.ts +123 -0
  96. package/dist/relationships/RelationshipSystem.d.ts.map +1 -0
  97. package/dist/relationships/RelationshipSystem.js +349 -0
  98. package/dist/relationships/RelationshipSystem.js.map +1 -0
  99. package/dist/relationships/index.d.ts +2 -0
  100. package/dist/relationships/index.d.ts.map +1 -0
  101. package/dist/relationships/index.js +8 -0
  102. package/dist/relationships/index.js.map +1 -0
  103. package/dist/rules/RuleEngine.d.ts +137 -0
  104. package/dist/rules/RuleEngine.d.ts.map +1 -0
  105. package/dist/rules/RuleEngine.js +406 -0
  106. package/dist/rules/RuleEngine.js.map +1 -0
  107. package/dist/rules/index.d.ts +2 -0
  108. package/dist/rules/index.d.ts.map +1 -0
  109. package/dist/rules/index.js +8 -0
  110. package/dist/rules/index.js.map +1 -0
  111. package/dist/scripts/event-economy.d.ts +7 -0
  112. package/dist/scripts/event-economy.d.ts.map +1 -0
  113. package/dist/scripts/event-economy.js +353 -0
  114. package/dist/scripts/event-economy.js.map +1 -0
  115. package/dist/scripts/export-templates.d.ts +7 -0
  116. package/dist/scripts/export-templates.d.ts.map +1 -0
  117. package/dist/scripts/export-templates.js +352 -0
  118. package/dist/scripts/export-templates.js.map +1 -0
  119. package/dist/scripts/generate-templates.d.ts +7 -0
  120. package/dist/scripts/generate-templates.d.ts.map +1 -0
  121. package/dist/scripts/generate-templates.js +394 -0
  122. package/dist/scripts/generate-templates.js.map +1 -0
  123. package/dist/src/ai/enhancer.d.ts +16 -0
  124. package/dist/src/ai/enhancer.d.ts.map +1 -0
  125. package/dist/src/ai/enhancer.js +76 -0
  126. package/dist/src/ai/enhancer.js.map +1 -0
  127. package/dist/src/ai/index.d.ts +4 -0
  128. package/dist/src/ai/index.d.ts.map +1 -0
  129. package/dist/src/ai/index.js +20 -0
  130. package/dist/src/ai/index.js.map +1 -0
  131. package/dist/src/ai/interfaces.d.ts +23 -0
  132. package/dist/src/ai/interfaces.d.ts.map +1 -0
  133. package/dist/src/ai/interfaces.js +3 -0
  134. package/dist/src/ai/interfaces.js.map +1 -0
  135. package/dist/src/ai/providers.d.ts +27 -0
  136. package/dist/src/ai/providers.d.ts.map +1 -0
  137. package/dist/src/ai/providers.js +142 -0
  138. package/dist/src/ai/providers.js.map +1 -0
  139. package/dist/src/types/config.d.ts +107 -0
  140. package/dist/src/types/config.d.ts.map +1 -0
  141. package/dist/src/types/config.js +5 -0
  142. package/dist/src/types/config.js.map +1 -0
  143. package/dist/src/types/environment.d.ts +20 -0
  144. package/dist/src/types/environment.d.ts.map +1 -0
  145. package/dist/src/types/environment.js +5 -0
  146. package/dist/src/types/environment.js.map +1 -0
  147. package/dist/src/types/events.d.ts +98 -0
  148. package/dist/src/types/events.d.ts.map +1 -0
  149. package/dist/src/types/events.js +5 -0
  150. package/dist/src/types/events.js.map +1 -0
  151. package/dist/src/types/index.d.ts +9 -0
  152. package/dist/src/types/index.d.ts.map +1 -0
  153. package/dist/src/types/index.js +35 -0
  154. package/dist/src/types/index.js.map +1 -0
  155. package/dist/src/types/localization.d.ts +16 -0
  156. package/dist/src/types/localization.d.ts.map +1 -0
  157. package/dist/src/types/localization.js +5 -0
  158. package/dist/src/types/localization.js.map +1 -0
  159. package/dist/src/types/npcs.d.ts +21 -0
  160. package/dist/src/types/npcs.d.ts.map +1 -0
  161. package/dist/src/types/npcs.js +5 -0
  162. package/dist/src/types/npcs.js.map +1 -0
  163. package/dist/src/types/rules.d.ts +25 -0
  164. package/dist/src/types/rules.d.ts.map +1 -0
  165. package/dist/src/types/rules.js +5 -0
  166. package/dist/src/types/rules.js.map +1 -0
  167. package/dist/src/types/templates.d.ts +70 -0
  168. package/dist/src/types/templates.d.ts.map +1 -0
  169. package/dist/src/types/templates.js +5 -0
  170. package/dist/src/types/templates.js.map +1 -0
  171. package/dist/src/types/world.d.ts +62 -0
  172. package/dist/src/types/world.d.ts.map +1 -0
  173. package/dist/src/types/world.js +5 -0
  174. package/dist/src/types/world.js.map +1 -0
  175. package/dist/src/types.d.ts +2 -0
  176. package/dist/src/types.d.ts.map +1 -0
  177. package/dist/src/types.js +21 -0
  178. package/dist/src/types.js.map +1 -0
  179. package/dist/templates/TemplateSystem.d.ts +182 -0
  180. package/dist/templates/TemplateSystem.d.ts.map +1 -0
  181. package/dist/templates/TemplateSystem.js +779 -0
  182. package/dist/templates/TemplateSystem.js.map +1 -0
  183. package/dist/templates/index.d.ts +2 -0
  184. package/dist/templates/index.d.ts.map +1 -0
  185. package/dist/templates/index.js +8 -0
  186. package/dist/templates/index.js.map +1 -0
  187. package/dist/time/TimeSystem.d.ts +128 -0
  188. package/dist/time/TimeSystem.d.ts.map +1 -0
  189. package/dist/time/TimeSystem.js +286 -0
  190. package/dist/time/TimeSystem.js.map +1 -0
  191. package/dist/time/index.d.ts +2 -0
  192. package/dist/time/index.d.ts.map +1 -0
  193. package/dist/time/index.js +8 -0
  194. package/dist/time/index.js.map +1 -0
  195. package/dist/types/config.d.ts +107 -0
  196. package/dist/types/config.d.ts.map +1 -0
  197. package/dist/types/config.js +5 -0
  198. package/dist/types/config.js.map +1 -0
  199. package/dist/types/environment.d.ts +20 -0
  200. package/dist/types/environment.d.ts.map +1 -0
  201. package/dist/types/environment.js +5 -0
  202. package/dist/types/environment.js.map +1 -0
  203. package/dist/types/events.d.ts +98 -0
  204. package/dist/types/events.d.ts.map +1 -0
  205. package/dist/types/events.js +5 -0
  206. package/dist/types/events.js.map +1 -0
  207. package/dist/types/index.d.ts +9 -0
  208. package/dist/types/index.d.ts.map +1 -0
  209. package/dist/types/index.js +35 -0
  210. package/dist/types/index.js.map +1 -0
  211. package/dist/types/localization.d.ts +16 -0
  212. package/dist/types/localization.d.ts.map +1 -0
  213. package/dist/types/localization.js +5 -0
  214. package/dist/types/localization.js.map +1 -0
  215. package/dist/types/npcs.d.ts +21 -0
  216. package/dist/types/npcs.d.ts.map +1 -0
  217. package/dist/types/npcs.js +5 -0
  218. package/dist/types/npcs.js.map +1 -0
  219. package/dist/types/rules.d.ts +25 -0
  220. package/dist/types/rules.d.ts.map +1 -0
  221. package/dist/types/rules.js +5 -0
  222. package/dist/types/rules.js.map +1 -0
  223. package/dist/types/templates.d.ts +70 -0
  224. package/dist/types/templates.d.ts.map +1 -0
  225. package/dist/types/templates.js +5 -0
  226. package/dist/types/templates.js.map +1 -0
  227. package/dist/types/world.d.ts +62 -0
  228. package/dist/types/world.d.ts.map +1 -0
  229. package/dist/types/world.js +5 -0
  230. package/dist/types/world.js.map +1 -0
  231. package/dist/types.d.ts +2 -0
  232. package/dist/types.d.ts.map +1 -0
  233. package/dist/types.js +21 -0
  234. package/dist/types.js.map +1 -0
  235. package/dist/utils/array.d.ts +81 -0
  236. package/dist/utils/array.d.ts.map +1 -0
  237. package/dist/utils/array.js +208 -0
  238. package/dist/utils/array.js.map +1 -0
  239. package/dist/utils/constants.d.ts +113 -0
  240. package/dist/utils/constants.d.ts.map +1 -0
  241. package/dist/utils/constants.js +133 -0
  242. package/dist/utils/constants.js.map +1 -0
  243. package/dist/utils/file.d.ts +78 -0
  244. package/dist/utils/file.d.ts.map +1 -0
  245. package/dist/utils/file.js +273 -0
  246. package/dist/utils/file.js.map +1 -0
  247. package/dist/utils/index.d.ts +7 -0
  248. package/dist/utils/index.d.ts.map +1 -0
  249. package/dist/utils/index.js +25 -0
  250. package/dist/utils/index.js.map +1 -0
  251. package/dist/utils/random.d.ts +52 -0
  252. package/dist/utils/random.d.ts.map +1 -0
  253. package/dist/utils/random.js +125 -0
  254. package/dist/utils/random.js.map +1 -0
  255. package/dist/utils/text.d.ts +74 -0
  256. package/dist/utils/text.d.ts.map +1 -0
  257. package/dist/utils/text.js +186 -0
  258. package/dist/utils/text.js.map +1 -0
  259. package/dist/utils/validation.d.ts +41 -0
  260. package/dist/utils/validation.d.ts.map +1 -0
  261. package/dist/utils/validation.js +318 -0
  262. package/dist/utils/validation.js.map +1 -0
  263. package/dist/workers/event-generator-worker.d.ts +2 -0
  264. package/dist/workers/event-generator-worker.d.ts.map +1 -0
  265. package/dist/workers/event-generator-worker.js +19 -0
  266. package/dist/workers/event-generator-worker.js.map +1 -0
  267. package/dist/workers/index.d.ts +2 -0
  268. package/dist/workers/index.d.ts.map +1 -0
  269. package/dist/workers/index.js +18 -0
  270. package/dist/workers/index.js.map +1 -0
  271. package/dist/world/WorldBuildingSystem.d.ts +61 -0
  272. package/dist/world/WorldBuildingSystem.d.ts.map +1 -0
  273. package/dist/world/WorldBuildingSystem.js +517 -0
  274. package/dist/world/WorldBuildingSystem.js.map +1 -0
  275. package/dist/world/index.d.ts +2 -0
  276. package/dist/world/index.d.ts.map +1 -0
  277. package/dist/world/index.js +6 -0
  278. package/dist/world/index.js.map +1 -0
  279. package/package.json +73 -22
  280. package/scripts/{event-economy.js โ†’ event-economy.ts} +12 -6
  281. package/scripts/{export-templates.js โ†’ export-templates.ts} +105 -12
  282. package/scripts/{generate-templates.js โ†’ generate-templates.ts} +34 -16
  283. package/templates/cyberpunk/event_100.json +0 -43
  284. package/templates/cyberpunk/event_11.json +0 -42
  285. package/templates/cyberpunk/event_14.json +0 -42
  286. package/templates/cyberpunk/event_15.json +0 -43
  287. package/templates/cyberpunk/event_16.json +0 -43
  288. package/templates/cyberpunk/event_18.json +0 -44
  289. package/templates/cyberpunk/event_2.json +0 -42
  290. package/templates/cyberpunk/event_26.json +0 -42
  291. package/templates/cyberpunk/event_27.json +0 -43
  292. package/templates/cyberpunk/event_3.json +0 -43
  293. package/templates/cyberpunk/event_30.json +0 -42
  294. package/templates/cyberpunk/event_32.json +0 -42
  295. package/templates/cyberpunk/event_36.json +0 -43
  296. package/templates/cyberpunk/event_37.json +0 -42
  297. package/templates/cyberpunk/event_39.json +0 -42
  298. package/templates/cyberpunk/event_4.json +0 -42
  299. package/templates/cyberpunk/event_40.json +0 -42
  300. package/templates/cyberpunk/event_42.json +0 -43
  301. package/templates/cyberpunk/event_46.json +0 -43
  302. package/templates/cyberpunk/event_49.json +0 -44
  303. package/templates/cyberpunk/event_5.json +0 -44
  304. package/templates/cyberpunk/event_50.json +0 -42
  305. package/templates/cyberpunk/event_51.json +0 -42
  306. package/templates/cyberpunk/event_54.json +0 -43
  307. package/templates/cyberpunk/event_55.json +0 -44
  308. package/templates/cyberpunk/event_57.json +0 -42
  309. package/templates/cyberpunk/event_58.json +0 -42
  310. package/templates/cyberpunk/event_61.json +0 -43
  311. package/templates/cyberpunk/event_62.json +0 -43
  312. package/templates/cyberpunk/event_64.json +0 -42
  313. package/templates/cyberpunk/event_65.json +0 -42
  314. package/templates/cyberpunk/event_66.json +0 -42
  315. package/templates/cyberpunk/event_68.json +0 -43
  316. package/templates/cyberpunk/event_69.json +0 -43
  317. package/templates/cyberpunk/event_71.json +0 -42
  318. package/templates/cyberpunk/event_72.json +0 -42
  319. package/templates/cyberpunk/event_73.json +0 -42
  320. package/templates/cyberpunk/event_74.json +0 -42
  321. package/templates/cyberpunk/event_75.json +0 -44
  322. package/templates/cyberpunk/event_76.json +0 -43
  323. package/templates/cyberpunk/event_78.json +0 -43
  324. package/templates/cyberpunk/event_79.json +0 -42
  325. package/templates/cyberpunk/event_8.json +0 -42
  326. package/templates/cyberpunk/event_80.json +0 -43
  327. package/templates/cyberpunk/event_81.json +0 -43
  328. package/templates/cyberpunk/event_83.json +0 -44
  329. package/templates/cyberpunk/event_84.json +0 -43
  330. package/templates/cyberpunk/event_86.json +0 -44
  331. package/templates/cyberpunk/event_88.json +0 -43
  332. package/templates/cyberpunk/event_9.json +0 -42
  333. package/templates/cyberpunk/event_91.json +0 -42
  334. package/templates/cyberpunk/event_92.json +0 -43
  335. package/templates/cyberpunk/event_93.json +0 -42
  336. package/templates/cyberpunk/event_95.json +0 -42
  337. package/templates/cyberpunk/event_96.json +0 -43
  338. package/templates/cyberpunk/event_97.json +0 -43
  339. package/templates/cyberpunk/event_98.json +0 -42
  340. package/templates/cyberpunk/event_99.json +0 -42
  341. package/templates/fantasy/dragon_lair.json +0 -28
  342. package/templates/fantasy/event_1.json +0 -44
  343. package/templates/fantasy/event_10.json +0 -43
  344. package/templates/fantasy/event_11.json +0 -43
  345. package/templates/fantasy/event_12.json +0 -42
  346. package/templates/fantasy/event_13.json +0 -43
  347. package/templates/fantasy/event_16.json +0 -44
  348. package/templates/fantasy/event_20.json +0 -42
  349. package/templates/fantasy/event_21.json +0 -42
  350. package/templates/fantasy/event_22.json +0 -42
  351. package/templates/fantasy/event_23.json +0 -42
  352. package/templates/fantasy/event_24.json +0 -43
  353. package/templates/fantasy/event_27.json +0 -43
  354. package/templates/fantasy/event_29.json +0 -43
  355. package/templates/fantasy/event_3.json +0 -42
  356. package/templates/fantasy/event_30.json +0 -43
  357. package/templates/fantasy/event_31.json +0 -42
  358. package/templates/fantasy/event_33.json +0 -42
  359. package/templates/fantasy/event_34.json +0 -43
  360. package/templates/fantasy/event_36.json +0 -43
  361. package/templates/fantasy/event_38.json +0 -43
  362. package/templates/fantasy/event_39.json +0 -42
  363. package/templates/fantasy/event_4.json +0 -44
  364. package/templates/fantasy/event_41.json +0 -43
  365. package/templates/fantasy/event_44.json +0 -42
  366. package/templates/fantasy/event_45.json +0 -42
  367. package/templates/fantasy/event_46.json +0 -42
  368. package/templates/fantasy/event_47.json +0 -42
  369. package/templates/fantasy/event_48.json +0 -42
  370. package/templates/fantasy/event_5.json +0 -42
  371. package/templates/fantasy/event_50.json +0 -44
  372. package/templates/fantasy/event_51.json +0 -43
  373. package/templates/fantasy/event_54.json +0 -43
  374. package/templates/fantasy/event_55.json +0 -43
  375. package/templates/fantasy/event_57.json +0 -44
  376. package/templates/fantasy/event_58.json +0 -44
  377. package/templates/fantasy/event_6.json +0 -42
  378. package/templates/fantasy/event_64.json +0 -42
  379. package/templates/fantasy/event_68.json +0 -42
  380. package/templates/fantasy/event_69.json +0 -43
  381. package/templates/fantasy/event_70.json +0 -42
  382. package/templates/fantasy/event_71.json +0 -42
  383. package/templates/fantasy/event_72.json +0 -43
  384. package/templates/fantasy/event_73.json +0 -42
  385. package/templates/fantasy/event_76.json +0 -43
  386. package/templates/fantasy/event_77.json +0 -43
  387. package/templates/fantasy/event_79.json +0 -42
  388. package/templates/fantasy/event_88.json +0 -42
  389. package/templates/fantasy/event_9.json +0 -44
  390. package/templates/fantasy/event_90.json +0 -43
  391. package/templates/fantasy/event_91.json +0 -42
  392. package/templates/fantasy/event_92.json +0 -42
  393. package/templates/fantasy/event_94.json +0 -43
  394. package/templates/fantasy/event_96.json +0 -42
  395. package/templates/fantasy/event_97.json +0 -42
  396. package/templates/fantasy/event_98.json +0 -42
  397. package/templates/fantasy/event_99.json +0 -42
  398. package/templates/fantasy/magic_shop.json +0 -28
  399. package/templates/historical/court_intrigue.json +0 -28
  400. package/templates/historical/event_1.json +0 -44
  401. package/templates/historical/event_10.json +0 -42
  402. package/templates/historical/event_11.json +0 -44
  403. package/templates/historical/event_14.json +0 -44
  404. package/templates/historical/event_17.json +0 -44
  405. package/templates/historical/event_2.json +0 -43
  406. package/templates/historical/event_20.json +0 -43
  407. package/templates/historical/event_21.json +0 -44
  408. package/templates/historical/event_22.json +0 -43
  409. package/templates/historical/event_25.json +0 -43
  410. package/templates/historical/event_26.json +0 -42
  411. package/templates/historical/event_3.json +0 -43
  412. package/templates/historical/event_30.json +0 -42
  413. package/templates/historical/event_33.json +0 -44
  414. package/templates/historical/event_34.json +0 -42
  415. package/templates/historical/event_39.json +0 -42
  416. package/templates/historical/event_4.json +0 -44
  417. package/templates/historical/event_40.json +0 -42
  418. package/templates/historical/event_42.json +0 -42
  419. package/templates/historical/event_44.json +0 -43
  420. package/templates/historical/event_45.json +0 -43
  421. package/templates/historical/event_48.json +0 -42
  422. package/templates/historical/event_50.json +0 -42
  423. package/templates/historical/event_52.json +0 -42
  424. package/templates/historical/event_53.json +0 -44
  425. package/templates/historical/event_54.json +0 -44
  426. package/templates/historical/event_56.json +0 -42
  427. package/templates/historical/event_57.json +0 -42
  428. package/templates/historical/event_59.json +0 -42
  429. package/templates/historical/event_60.json +0 -43
  430. package/templates/historical/event_61.json +0 -42
  431. package/templates/historical/event_62.json +0 -44
  432. package/templates/historical/event_63.json +0 -42
  433. package/templates/historical/event_64.json +0 -43
  434. package/templates/historical/event_65.json +0 -44
  435. package/templates/historical/event_66.json +0 -42
  436. package/templates/historical/event_67.json +0 -43
  437. package/templates/historical/event_69.json +0 -43
  438. package/templates/historical/event_7.json +0 -42
  439. package/templates/historical/event_70.json +0 -42
  440. package/templates/historical/event_71.json +0 -43
  441. package/templates/historical/event_74.json +0 -42
  442. package/templates/historical/event_75.json +0 -43
  443. package/templates/historical/event_79.json +0 -42
  444. package/templates/historical/event_8.json +0 -44
  445. package/templates/historical/event_80.json +0 -43
  446. package/templates/historical/event_82.json +0 -42
  447. package/templates/historical/event_87.json +0 -43
  448. package/templates/historical/event_89.json +0 -43
  449. package/templates/historical/event_9.json +0 -43
  450. package/templates/historical/event_90.json +0 -44
  451. package/templates/historical/event_91.json +0 -42
  452. package/templates/historical/event_92.json +0 -43
  453. package/templates/historical/event_94.json +0 -42
  454. package/templates/historical/event_97.json +0 -42
  455. package/templates/horror/event_1.json +0 -42
  456. package/templates/horror/event_100.json +0 -42
  457. package/templates/horror/event_12.json +0 -42
  458. package/templates/horror/event_13.json +0 -43
  459. package/templates/horror/event_14.json +0 -44
  460. package/templates/horror/event_15.json +0 -42
  461. package/templates/horror/event_16.json +0 -43
  462. package/templates/horror/event_17.json +0 -43
  463. package/templates/horror/event_18.json +0 -42
  464. package/templates/horror/event_2.json +0 -44
  465. package/templates/horror/event_20.json +0 -43
  466. package/templates/horror/event_23.json +0 -42
  467. package/templates/horror/event_27.json +0 -43
  468. package/templates/horror/event_28.json +0 -42
  469. package/templates/horror/event_29.json +0 -42
  470. package/templates/horror/event_3.json +0 -42
  471. package/templates/horror/event_30.json +0 -42
  472. package/templates/horror/event_32.json +0 -42
  473. package/templates/horror/event_34.json +0 -42
  474. package/templates/horror/event_35.json +0 -43
  475. package/templates/horror/event_36.json +0 -43
  476. package/templates/horror/event_37.json +0 -43
  477. package/templates/horror/event_38.json +0 -44
  478. package/templates/horror/event_39.json +0 -42
  479. package/templates/horror/event_40.json +0 -42
  480. package/templates/horror/event_41.json +0 -42
  481. package/templates/horror/event_42.json +0 -43
  482. package/templates/horror/event_43.json +0 -43
  483. package/templates/horror/event_45.json +0 -42
  484. package/templates/horror/event_46.json +0 -44
  485. package/templates/horror/event_47.json +0 -42
  486. package/templates/horror/event_50.json +0 -43
  487. package/templates/horror/event_52.json +0 -44
  488. package/templates/horror/event_53.json +0 -43
  489. package/templates/horror/event_55.json +0 -43
  490. package/templates/horror/event_56.json +0 -44
  491. package/templates/horror/event_58.json +0 -42
  492. package/templates/horror/event_59.json +0 -42
  493. package/templates/horror/event_60.json +0 -43
  494. package/templates/horror/event_61.json +0 -44
  495. package/templates/horror/event_62.json +0 -42
  496. package/templates/horror/event_63.json +0 -43
  497. package/templates/horror/event_65.json +0 -42
  498. package/templates/horror/event_67.json +0 -43
  499. package/templates/horror/event_68.json +0 -44
  500. package/templates/horror/event_72.json +0 -42
  501. package/templates/horror/event_73.json +0 -44
  502. package/templates/horror/event_74.json +0 -43
  503. package/templates/horror/event_77.json +0 -42
  504. package/templates/horror/event_79.json +0 -43
  505. package/templates/horror/event_8.json +0 -42
  506. package/templates/horror/event_82.json +0 -43
  507. package/templates/horror/event_83.json +0 -42
  508. package/templates/horror/event_84.json +0 -42
  509. package/templates/horror/event_86.json +0 -43
  510. package/templates/horror/event_88.json +0 -42
  511. package/templates/horror/event_89.json +0 -43
  512. package/templates/horror/event_9.json +0 -43
  513. package/templates/horror/event_90.json +0 -44
  514. package/templates/horror/event_91.json +0 -43
  515. package/templates/horror/event_93.json +0 -42
  516. package/templates/horror/event_95.json +0 -42
  517. package/templates/horror/event_96.json +0 -43
  518. package/templates/horror/event_99.json +0 -42
  519. package/templates/horror/haunted_mansion.json +0 -28
  520. package/templates/index.json +0 -475
  521. package/templates/modern/event_10.json +0 -42
  522. package/templates/modern/event_100.json +0 -43
  523. package/templates/modern/event_11.json +0 -44
  524. package/templates/modern/event_13.json +0 -42
  525. package/templates/modern/event_15.json +0 -43
  526. package/templates/modern/event_16.json +0 -42
  527. package/templates/modern/event_17.json +0 -42
  528. package/templates/modern/event_19.json +0 -43
  529. package/templates/modern/event_2.json +0 -42
  530. package/templates/modern/event_20.json +0 -42
  531. package/templates/modern/event_21.json +0 -43
  532. package/templates/modern/event_22.json +0 -43
  533. package/templates/modern/event_23.json +0 -43
  534. package/templates/modern/event_25.json +0 -43
  535. package/templates/modern/event_27.json +0 -42
  536. package/templates/modern/event_28.json +0 -42
  537. package/templates/modern/event_31.json +0 -42
  538. package/templates/modern/event_32.json +0 -43
  539. package/templates/modern/event_34.json +0 -44
  540. package/templates/modern/event_35.json +0 -42
  541. package/templates/modern/event_36.json +0 -44
  542. package/templates/modern/event_37.json +0 -42
  543. package/templates/modern/event_39.json +0 -42
  544. package/templates/modern/event_4.json +0 -42
  545. package/templates/modern/event_41.json +0 -42
  546. package/templates/modern/event_42.json +0 -44
  547. package/templates/modern/event_43.json +0 -42
  548. package/templates/modern/event_44.json +0 -44
  549. package/templates/modern/event_45.json +0 -44
  550. package/templates/modern/event_46.json +0 -44
  551. package/templates/modern/event_47.json +0 -43
  552. package/templates/modern/event_48.json +0 -42
  553. package/templates/modern/event_49.json +0 -43
  554. package/templates/modern/event_5.json +0 -43
  555. package/templates/modern/event_51.json +0 -42
  556. package/templates/modern/event_52.json +0 -42
  557. package/templates/modern/event_55.json +0 -43
  558. package/templates/modern/event_56.json +0 -42
  559. package/templates/modern/event_57.json +0 -42
  560. package/templates/modern/event_59.json +0 -42
  561. package/templates/modern/event_6.json +0 -43
  562. package/templates/modern/event_60.json +0 -43
  563. package/templates/modern/event_61.json +0 -42
  564. package/templates/modern/event_63.json +0 -42
  565. package/templates/modern/event_64.json +0 -42
  566. package/templates/modern/event_66.json +0 -42
  567. package/templates/modern/event_67.json +0 -42
  568. package/templates/modern/event_69.json +0 -42
  569. package/templates/modern/event_7.json +0 -43
  570. package/templates/modern/event_70.json +0 -42
  571. package/templates/modern/event_72.json +0 -43
  572. package/templates/modern/event_74.json +0 -43
  573. package/templates/modern/event_78.json +0 -42
  574. package/templates/modern/event_8.json +0 -42
  575. package/templates/modern/event_80.json +0 -44
  576. package/templates/modern/event_81.json +0 -43
  577. package/templates/modern/event_82.json +0 -42
  578. package/templates/modern/event_83.json +0 -42
  579. package/templates/modern/event_84.json +0 -44
  580. package/templates/modern/event_85.json +0 -42
  581. package/templates/modern/event_86.json +0 -42
  582. package/templates/modern/event_87.json +0 -44
  583. package/templates/modern/event_89.json +0 -42
  584. package/templates/modern/event_94.json +0 -42
  585. package/templates/modern/event_97.json +0 -43
  586. package/templates/modern/event_98.json +0 -42
  587. package/templates/modern/event_99.json +0 -44
  588. package/templates/schema.json +0 -87
  589. package/templates/sci-fi/alien_encounter.json +0 -28
  590. package/templates/sci-fi/event_1.json +0 -42
  591. package/templates/sci-fi/event_11.json +0 -43
  592. package/templates/sci-fi/event_13.json +0 -43
  593. package/templates/sci-fi/event_15.json +0 -43
  594. package/templates/sci-fi/event_18.json +0 -42
  595. package/templates/sci-fi/event_19.json +0 -43
  596. package/templates/sci-fi/event_2.json +0 -44
  597. package/templates/sci-fi/event_22.json +0 -42
  598. package/templates/sci-fi/event_23.json +0 -42
  599. package/templates/sci-fi/event_24.json +0 -43
  600. package/templates/sci-fi/event_25.json +0 -42
  601. package/templates/sci-fi/event_27.json +0 -43
  602. package/templates/sci-fi/event_28.json +0 -43
  603. package/templates/sci-fi/event_30.json +0 -43
  604. package/templates/sci-fi/event_31.json +0 -42
  605. package/templates/sci-fi/event_32.json +0 -42
  606. package/templates/sci-fi/event_33.json +0 -44
  607. package/templates/sci-fi/event_34.json +0 -42
  608. package/templates/sci-fi/event_35.json +0 -42
  609. package/templates/sci-fi/event_36.json +0 -42
  610. package/templates/sci-fi/event_37.json +0 -44
  611. package/templates/sci-fi/event_39.json +0 -43
  612. package/templates/sci-fi/event_4.json +0 -43
  613. package/templates/sci-fi/event_41.json +0 -42
  614. package/templates/sci-fi/event_45.json +0 -42
  615. package/templates/sci-fi/event_47.json +0 -43
  616. package/templates/sci-fi/event_48.json +0 -42
  617. package/templates/sci-fi/event_50.json +0 -43
  618. package/templates/sci-fi/event_51.json +0 -42
  619. package/templates/sci-fi/event_53.json +0 -42
  620. package/templates/sci-fi/event_54.json +0 -43
  621. package/templates/sci-fi/event_55.json +0 -42
  622. package/templates/sci-fi/event_56.json +0 -43
  623. package/templates/sci-fi/event_59.json +0 -42
  624. package/templates/sci-fi/event_6.json +0 -42
  625. package/templates/sci-fi/event_60.json +0 -43
  626. package/templates/sci-fi/event_64.json +0 -44
  627. package/templates/sci-fi/event_65.json +0 -43
  628. package/templates/sci-fi/event_67.json +0 -42
  629. package/templates/sci-fi/event_7.json +0 -42
  630. package/templates/sci-fi/event_72.json +0 -42
  631. package/templates/sci-fi/event_73.json +0 -43
  632. package/templates/sci-fi/event_74.json +0 -44
  633. package/templates/sci-fi/event_75.json +0 -43
  634. package/templates/sci-fi/event_78.json +0 -42
  635. package/templates/sci-fi/event_80.json +0 -42
  636. package/templates/sci-fi/event_82.json +0 -43
  637. package/templates/sci-fi/event_83.json +0 -44
  638. package/templates/sci-fi/event_85.json +0 -42
  639. package/templates/sci-fi/event_87.json +0 -42
  640. package/templates/sci-fi/event_89.json +0 -42
  641. package/templates/sci-fi/event_9.json +0 -42
  642. package/templates/sci-fi/event_90.json +0 -43
  643. package/templates/sci-fi/event_92.json +0 -44
  644. package/templates/sci-fi/event_93.json +0 -42
  645. package/templates/sci-fi/event_94.json +0 -42
  646. package/templates/sci-fi/event_95.json +0 -43
  647. package/templates/sci-fi/event_96.json +0 -43
  648. package/templates/sci-fi/event_97.json +0 -42
  649. package/templates/space-opera/event_1.json +0 -44
  650. package/templates/space-opera/event_10.json +0 -42
  651. package/templates/space-opera/event_100.json +0 -42
  652. package/templates/space-opera/event_12.json +0 -42
  653. package/templates/space-opera/event_13.json +0 -44
  654. package/templates/space-opera/event_14.json +0 -43
  655. package/templates/space-opera/event_15.json +0 -43
  656. package/templates/space-opera/event_17.json +0 -42
  657. package/templates/space-opera/event_18.json +0 -43
  658. package/templates/space-opera/event_19.json +0 -42
  659. package/templates/space-opera/event_20.json +0 -43
  660. package/templates/space-opera/event_21.json +0 -42
  661. package/templates/space-opera/event_24.json +0 -44
  662. package/templates/space-opera/event_25.json +0 -42
  663. package/templates/space-opera/event_26.json +0 -43
  664. package/templates/space-opera/event_27.json +0 -43
  665. package/templates/space-opera/event_28.json +0 -43
  666. package/templates/space-opera/event_29.json +0 -44
  667. package/templates/space-opera/event_31.json +0 -42
  668. package/templates/space-opera/event_32.json +0 -42
  669. package/templates/space-opera/event_33.json +0 -42
  670. package/templates/space-opera/event_35.json +0 -42
  671. package/templates/space-opera/event_36.json +0 -44
  672. package/templates/space-opera/event_38.json +0 -43
  673. package/templates/space-opera/event_40.json +0 -42
  674. package/templates/space-opera/event_41.json +0 -42
  675. package/templates/space-opera/event_43.json +0 -43
  676. package/templates/space-opera/event_44.json +0 -42
  677. package/templates/space-opera/event_47.json +0 -42
  678. package/templates/space-opera/event_48.json +0 -43
  679. package/templates/space-opera/event_49.json +0 -44
  680. package/templates/space-opera/event_5.json +0 -44
  681. package/templates/space-opera/event_50.json +0 -42
  682. package/templates/space-opera/event_51.json +0 -42
  683. package/templates/space-opera/event_52.json +0 -42
  684. package/templates/space-opera/event_53.json +0 -43
  685. package/templates/space-opera/event_55.json +0 -42
  686. package/templates/space-opera/event_58.json +0 -43
  687. package/templates/space-opera/event_6.json +0 -43
  688. package/templates/space-opera/event_60.json +0 -44
  689. package/templates/space-opera/event_61.json +0 -42
  690. package/templates/space-opera/event_62.json +0 -43
  691. package/templates/space-opera/event_65.json +0 -42
  692. package/templates/space-opera/event_67.json +0 -42
  693. package/templates/space-opera/event_68.json +0 -43
  694. package/templates/space-opera/event_69.json +0 -42
  695. package/templates/space-opera/event_7.json +0 -44
  696. package/templates/space-opera/event_71.json +0 -44
  697. package/templates/space-opera/event_73.json +0 -42
  698. package/templates/space-opera/event_74.json +0 -42
  699. package/templates/space-opera/event_77.json +0 -43
  700. package/templates/space-opera/event_78.json +0 -43
  701. package/templates/space-opera/event_8.json +0 -43
  702. package/templates/space-opera/event_81.json +0 -42
  703. package/templates/space-opera/event_82.json +0 -42
  704. package/templates/space-opera/event_83.json +0 -43
  705. package/templates/space-opera/event_85.json +0 -42
  706. package/templates/space-opera/event_87.json +0 -42
  707. package/templates/space-opera/event_88.json +0 -42
  708. package/templates/space-opera/event_90.json +0 -42
  709. package/templates/space-opera/event_93.json +0 -43
  710. package/templates/space-opera/event_97.json +0 -42
  711. package/templates/space-opera/event_98.json +0 -43
package/README.md CHANGED
@@ -1,1297 +1,373 @@
1
- # RPG Event Generator v2.0.1
1
+ # RPG Event Generator
2
2
 
3
- A powerful procedural event generation system for RPG games, capable of creating virtually infinite contextual events based on player state and game world.
3
+ [![npm version](https://badge.fury.io/js/rpg-event-generator.svg)](https://badge.fury.io/js/rpg-event-generator)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
5
 
5
- ## โœจ What's New in v2.0.1
6
+ A powerful procedural content generation system for dynamic, context aware narratives and interactive experiences. Perfect for games, simulations, and creative applications.
6
7
 
7
- - ๐ŸŽจ **Theme Creator**: Build custom themes with your own training data
8
- - ๐Ÿง  **Rule Engine**: Create conditional rules that modify event generation
9
- - ๐ŸŽฒ **Pure Markov Mode**: Generate events purely from custom text (no templates)
10
- - ๐ŸŒ **Cross-Platform Export**: Unity C#, Godot GDScript, TypeScript support
11
- - ๐Ÿ“š **Template Library**: 429 professionally crafted event templates included across 7 genres (fantasy, sci-fi, horror, historical, modern, cyberpunk, space-opera)
12
- - ๐Ÿ—๏ธ **Creative Tools**: Visual tools for event customization
8
+ ## โ˜• Support
13
9
 
14
- > **Note:** This package was originally created for a personal RPG project and shared publicly because it might be useful for other game developers. The repository is private, so bug reports and maintenance issues cannot be submitted directly. Check npm regularly for updates, new features, or breaking changes.
10
+ If RPG Event Generator has been helpful to your project, consider buying me a coffee!
15
11
 
16
- ## Installation
17
-
18
- ```bash
19
- npm install rpg-event-generator
20
- ```
21
-
22
- ## Quick Start
23
-
24
- ```javascript
25
- import { RPGEventGenerator, generateRPGEvent } from 'rpg-event-generator';
26
-
27
- // Simple event generation
28
- const event = generateRPGEvent({
29
- age: 25,
30
- gold: 500,
31
- influence: 15,
32
- career: 'merchant'
33
- });
34
-
35
- console.log(event.title); // "Golden Opportunity"
36
- console.log(event.description); // Procedurally generated narrative
37
- console.log(event.choices); // Array of meaningful choices
38
- ```
39
-
40
- ## Demo
41
-
42
- Run the included demo to see the RPG Event Generator in action:
43
-
44
- ```bash
45
- # Using npm script (recommended)
46
- npm run demo
47
-
48
- # Direct script call
49
- node demo.js
50
- ```
51
-
52
- This will demonstrate various features including event generation, chains, time progression, and customization options.
53
-
54
- ## Maintenance & Updates
55
-
56
- Since this is a personal project with a private repository:
57
- - **Check npm regularly** for new versions and features
58
- - **Monitor the changelog** in package updates for breaking changes
59
- - **Run the demo** to explore new functionality
60
- - **No direct bug reports** or feature requests can be accepted
61
-
62
- ## Features
63
-
64
- - **Infinite Event Generation**: Custom Markov chains create unique, contextual events
65
- - **Player-Aware**: Events adapt to stats, career, relationships, reputation, and social standing
66
- - **14+ Event Types**: Court scandals, noble duels, ancient curses, bandit kings, and more
67
- - **Immersive Storytelling**: Rich narratives with atmospheric descriptions and meaningful consequences
68
- - **Dynamic Difficulty Scaling**: Events automatically scale based on player power level
69
- - **Thematic Training Sets**: Fantasy, sci-fi, and historical themes with cultural variants
70
- - **Event Chains**: Multi-part story sequences with escalating consequences
71
- - **Time-Based Events**: Seasonal changes and evolving long-term storylines
72
- - **Modular Event System**: Create and manage custom templates, training data, and chains
73
- - **Game Integration**: Proper save/load state management for real games
74
- - **Comprehensive Testing**: 45+ automated tests ensuring reliability
75
-
76
- ### Enhanced Features (v1.2.0+)
12
+ <a href="https://www.buymeacoffee.com/Decept1kon" target="_blank">
13
+ <img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;">
14
+ </a>
77
15
 
78
- - **Multi-Language Support**: Generate events in different languages with cultural adaptation
79
- - **Event Dependencies**: Complex prerequisite systems for event triggering
80
- - **Environmental Modifiers**: Weather, season, and location-based event modifications
81
- - **NPC Relationships**: Dynamic character relationship networks and social consequences
82
- - **Event Templates Library** (v1.3.0): Pre-built genre-specific event collections for fantasy, sci-fi, horror, and historical themes, with support for custom template creation
16
+ ## โœจ Features
83
17
 
84
- ### Revolutionary Features (v2.0.1) ๐ŸŽ‰
18
+ - **๐Ÿง  Intelligent Generation** - Context aware events that adapt to user state
19
+ - **๐ŸŽฏ Advanced Templates** - Conditional templates, composition, inheritance, mixins
20
+ - **๐ŸŒ World Building** - Automated world generation with factions and history
21
+ - **โšก Performance** - Template caching, parallel generation, batched processing
22
+ - **๐Ÿ”Œ Pluggable AI** - Optional AI/ML integration with multiple providers
23
+ - **๐Ÿ’พ Database Support** - Scalable storage with pluggable adapters
24
+ - **๐ŸŽฎ Game Engine Export** - Unity C#, Godot GDScript, Unreal Engine C++
25
+ - **๐ŸŒ Multi Language** - Generate content in different languages
26
+ - **โฐ Time Systems** - Seasonal changes and temporal progression
27
+ - **๐Ÿค Relationship Networks** - Dynamic character relationships
28
+ - **๐ŸŽฒ Markov Chains** - Natural sounding narratives
85
29
 
86
- - **๐ŸŽจ Theme Creator**: Design custom game worlds with your own training data and atmospheric text
87
- - **๐Ÿง  Rule Engine**: Create sophisticated conditional rules that dynamically modify events based on player state, location, stats, and more
88
- - **๐ŸŽฒ Pure Markov Mode**: Generate completely custom events using only your provided text - no templates required
89
- - **๐Ÿ’ฐ Event Economy**: User-generated content marketplace with theme sharing, rule packs, and quality metrics
90
- - **๐Ÿ“š Template Library**: Generate hundreds of events across 7 genres using included CLI export tools
91
- - **๐ŸŒ Cross-Platform Export**: Export events in JSON and TypeScript formats (Unity/Godot integration guides available)
92
- - **โš™๏ธ Creative Tools**: Visual interfaces for theme building, rule creation, and advanced customization
30
+ ## ๐Ÿ“ฆ Installation
93
31
 
94
- ### Planned Engine Integrations (Future Release)
95
-
96
- - **๐ŸŽฎ Unity Plugin**: Package Manager compatible integration (planned)
97
- - **๐ŸŽฏ Godot Addon**: Asset Library compatible addon (planned)
98
- - **๐Ÿ”— Game Engine Guides**: Integration patterns and API examples available now
99
-
100
- ## Event Economy System ๐Ÿ’ฐ
101
-
102
- The Event Economy enables **user-generated content sharing** and marketplace functionality for custom themes, rules, and content packs.
103
-
104
- ### Key Features
105
-
106
- - **๐ŸŽจ Theme Marketplace**: Save, share, and import custom themes with training data
107
- - **๐Ÿง  Rule Pack Sharing**: Exchange collections of custom rules between users
108
- - **๐Ÿ“ฆ Content Packs**: Bundle themes and rules into complete game configurations
109
- - **โญ Quality Metrics**: Automatic quality scoring for shared content
110
- - **๐Ÿ“ค Export/Import**: Easy sharing via JSON files
111
-
112
- ### Basic Usage
113
-
114
- ```javascript
115
- const EventEconomy = require('./scripts/event-economy');
116
-
117
- // Initialize the system
118
- const economy = new EventEconomy('./my-user-content');
119
-
120
- // Save a custom theme
121
- const themeData = {
122
- author: 'YourName',
123
- description: 'Cyberpunk western theme',
124
- tags: ['cyberpunk', 'western', 'scifi'],
125
- theme: 'cyberpunk',
126
- culture: 'western',
127
- trainingData: [
128
- 'neon signs flicker in the dusty saloon',
129
- 'robotic sheriffs patrol the asteroid streets',
130
- 'cyborg outlaws ride mechanical horses'
131
- ],
132
- enableRuleEngine: true,
133
- customRules: [] // your custom rules here
134
- };
135
-
136
- const filepath = economy.saveTheme('CyberWestern', themeData);
137
- console.log(`Theme saved to: ${filepath}); // ./my-user-content/themes/cyberwestern.json
138
-
139
- // List available themes
140
- const themes = economy.listThemes();
141
- console.log('Available themes:', themes);
142
-
143
- // Load and use a theme
144
- const loadedTheme = economy.loadTheme('CyberWestern');
145
- // Use with generator...
146
- ```
147
-
148
- ### CLI Tools
149
-
150
- The Event Economy includes command-line tools for content management:
151
-
152
- ```bash
153
- # Using npm scripts (recommended)
154
- npm run economy:list
155
- npm run economy:stats
156
-
157
- # Using direct script calls
158
- node scripts/event-economy.js list-themes
159
- node scripts/event-economy.js stats
160
-
161
- # Save a theme (API integration needed)
162
- node scripts/event-economy.js save-theme "MyTheme"
163
- ```
164
-
165
- For global installation, you can also use:
166
32
  ```bash
167
- npx rpg-events list-themes
168
- npx rpg-export unity fantasy
33
+ npm install rpg-event-generator
169
34
  ```
170
35
 
171
- ### Content Pack Creation
36
+ ## ๐Ÿš€ Quick Start
172
37
 
173
38
  ```javascript
174
- // Create a complete content pack
175
- const packData = {
176
- author: 'ContentCreator',
177
- description: 'Complete cyberpunk western adventure pack',
178
- theme: themeData, // include your theme
179
- rulePacks: ['combat-rules', 'dialogue-rules'] // reference rule packs
180
- };
181
-
182
- const packPath = economy.createContentPack('CyberWesternAdventure', packData);
183
- ```
184
-
185
- ### File Formats
186
-
187
- #### Theme Files (`themes/*.json`)
188
- ```json
189
- {
190
- "name": "CyberWestern",
191
- "version": "1.0.0",
192
- "author": "YourName",
193
- "description": "Cyberpunk western theme",
194
- "tags": ["cyberpunk", "western"],
195
- "settings": {
196
- "theme": "cyberpunk",
197
- "culture": "western",
198
- "enableRuleEngine": true,
199
- "pureMarkovMode": false
200
- },
201
- "trainingData": ["sentence 1", "sentence 2"],
202
- "customRules": [],
203
- "statistics": {
204
- "trainingSentences": 2,
205
- "estimatedQuality": 85
206
- }
207
- }
208
- ```
39
+ const { RPGEventGenerator } = require('rpg-event-generator');
209
40
 
210
- #### Rule Pack Files (`rules/*.json`)
211
- ```json
212
- {
213
- "name": "CombatRules",
214
- "rules": [
215
- {
216
- "name": "weak_enemy_bonus",
217
- "conditions": [
218
- {"type": "stat_less_than", "stat": "level", "value": 5}
219
- ],
220
- "effects": [
221
- {"type": "modify_difficulty", "value": -1}
222
- ]
223
- }
224
- ]
225
- }
226
- ```
227
-
228
- ### Quality Metrics
229
-
230
- Themes are automatically scored on:
231
- - **Training Data Quality**: Sentence variety and length
232
- - **Rule Complexity**: Advanced rule usage
233
- - **Completeness**: All required fields present
234
- - **Metadata**: Author info, tags, descriptions
235
-
236
- ### Integration with Generator
237
-
238
- ```javascript
239
- // Load theme and apply to generator
240
- const theme = economy.loadTheme('CyberWestern');
41
+ // Create generator
241
42
  const generator = new RPGEventGenerator({
242
- theme: theme.settings.theme,
243
- culture: theme.settings.culture,
244
- trainingData: theme.trainingData,
245
- customRules: theme.customRules,
246
- enableRuleEngine: theme.settings.enableRuleEngine
43
+ theme: 'fantasy'
247
44
  });
248
45
 
249
- // Generate events with custom theme
250
- const event = generator.generateEvent();
251
- ```
252
-
253
- ## Usage Guide
254
-
255
- ### Basic Event Generation
256
-
257
- ```javascript
258
- const generator = new RPGEventGenerator();
259
- const event = generator.generateEvent();
46
+ // Generate context aware event
47
+ const event = generator.generateEvent({
48
+ level: 15,
49
+ gold: 2500,
50
+ class: 'wizard'
51
+ });
260
52
 
261
- console.log(event);
262
- // {
263
- // id: "event_1704567890123_xyz789",
264
- // title: "Perilous Bandit King's Challenge",
265
- // description: "Generated narrative based on Markov chains...",
266
- // choices: [
267
- // { text: "Fight back", effect: { health: -20, reputation: 25 } },
268
- // { text: "Pay tribute", effect: { gold: -200, safe_passage: true } }
269
- // ],
270
- // type: "BANDIT_KING",
271
- // difficulty: "normal"
272
- // }
53
+ console.log(event.title);
54
+ console.log(event.description);
55
+ console.log(event.choices);
273
56
  ```
274
57
 
275
- ### Context-Aware Events
58
+ ## ๐ŸŽจ Advanced Usage
276
59
 
60
+ ### World Building
277
61
  ```javascript
278
- const playerContext = {
279
- age: 35,
280
- gold: 2500,
281
- influence: 40,
282
- reputation: 25,
283
- career: 'noble',
284
- skills: { diplomacy: 70, combat: 45, intrigue: 30 },
285
- relationships: [
286
- { name: 'Lord Harrington', type: 'ally', relationship: 60 }
287
- ],
288
- location: 'capital',
289
- season: 'winter'
290
- };
62
+ // Generate complete game world
63
+ const world = await generator.generateWorld();
64
+ console.log(`World: ${world.regions.length} regions, ${world.factions.length} factions`);
291
65
 
292
- const event = generator.generateEvent(playerContext);
293
- // Generates events appropriate to noble career, high influence, winter season
66
+ // Simulate history
67
+ await generator.simulateWorldYears(50);
68
+ const history = generator.getHistoricalEvents();
294
69
  ```
295
70
 
296
- ### Custom Training Data
297
-
298
- Enhance text generation with your own story fragments:
299
-
71
+ ### Custom Templates
300
72
  ```javascript
301
- const customTrainingData = [
302
- 'In the shadowed alleys of the ancient city',
303
- 'The dragon\'s roar echoes through the misty mountains',
304
- 'Elven merchants display their enchanted crystal wares',
305
- 'A dwarven smith forges weapons of legendary power',
306
- 'The tavern overflows with adventurers and mysterious strangers',
307
- 'Ancient runes glow with ethereal magical energy',
308
- 'The enchanted forest whispers secrets to those who listen carefully'
309
- ];
310
-
311
- const generator = new RPGEventGenerator({
312
- trainingData: customTrainingData
73
+ // Register conditional template
74
+ generator.registerTemplate('merchant', {
75
+ title: "Merchant Encounter",
76
+ conditional_choices: [{
77
+ condition: { player_gold: { gt: 1000 } },
78
+ choice: { text: "Buy rare artifact", effect: { gold: -500 } }
79
+ }]
313
80
  });
314
-
315
- // Events will now incorporate your custom story elements
316
- const event = generator.generateEvent();
317
- // May generate: "In the shadowed alleys of the ancient city, a mysterious stranger approaches..."
318
81
  ```
319
82
 
320
- ### Thematic Training Sets
321
-
83
+ ### AI Enhancement
322
84
  ```javascript
323
- // Fantasy (default) - knights, magic, dragons
324
- const fantasyGen = new RPGEventGenerator({ theme: 'fantasy' });
325
-
326
- // Fantasy with Norse culture - vikings, runes, fjords
327
- const norseGen = new RPGEventGenerator({
328
- theme: 'fantasy',
329
- culture: 'norse'
330
- });
331
- const norseEvent = norseGen.generateEvent();
332
- // Generates: "The longships sail into the fjord under the northern lights..."
333
-
334
- // Sci-fi - corporations, AI, space exploration
335
- const sciFiGen = new RPGEventGenerator({ theme: 'sci-fi' });
336
-
337
- // Cyberpunk sci-fi - neon cities, megacorps, hackers
338
- const cyberpunkGen = new RPGEventGenerator({
339
- theme: 'sci-fi',
340
- culture: 'cyberpunk'
341
- });
342
- const cyberEvent = cyberpunkGen.generateEvent();
343
- // Generates: "Neon lights reflect off rain-slicked streets in the megacity sprawl..."
344
-
345
- // Historical - medieval politics, exploration, warfare
346
- const historicalGen = new RPGEventGenerator({ theme: 'historical' });
347
-
348
- // Victorian historical - industrial revolution, social reform
349
- const victorianGen = new RPGEventGenerator({
350
- theme: 'historical',
351
- culture: 'victorian'
85
+ const aiGenerator = new RPGEventGenerator({
86
+ aiEnhancement: {
87
+ provider: 'openai',
88
+ apiKey: process.env.OPENAI_API_KEY
89
+ }
352
90
  });
353
- const victorianEvent = victorianGen.generateEvent();
354
- // Generates: "Steam engines power the industrial revolution across soot-stained cities..."
355
91
  ```
356
92
 
357
- ### Event Chains
93
+ ## ๐Ÿ”ง Configuration
358
94
 
359
95
  ```javascript
360
- // Start a multi-part storyline
361
- const generator = new RPGEventGenerator();
362
- const firstEvent = generator.startChain('BANDIT_RISING');
363
-
364
- console.log(firstEvent.title); // "Treacherous Bandit Ambush"
365
- console.log(firstEvent.chainId); // "chain_1704567890123_xyz789"
366
-
367
- // Advance chain based on player choice
368
- const nextEvent = generator.advanceChain(firstEvent.chainId, 'hero');
369
- console.log(nextEvent.title); // "Perilous Bandit King's Challenge"
370
-
371
- // Check active chains
372
- const activeChains = generator.getActiveChains();
373
- console.log(`Active chains: ${activeChains.length}`);
374
-
375
- // Available built-in chains:
376
- // - BANDIT_RISING: Highway robbery escalating to kingdom threat
377
- // - COURT_SCANDAL_CHAIN: Royal intrigue with multiple betrayals
378
- // - CURSE_OF_THE_ARTIFACT: Ancient curse with escalating effects
379
- // - MERCHANT_EMPIRE: Trade empire building with setbacks
96
+ const config = {
97
+ theme: 'fantasy',
98
+ enableAI: false,
99
+ enableDatabase: false,
100
+ enableCaching: true,
101
+ maxParallelGeneration: 4,
102
+
103
+ aiEnhancement: {
104
+ provider: 'openai',
105
+ apiKey: 'your-key'
106
+ }
107
+ };
380
108
  ```
381
109
 
382
- ### Time-Based Events
110
+ ## ๐Ÿ“š API
383
111
 
384
- ```javascript
385
- // Advance game time and handle due events
386
- const dueEvents = generator.advanceGameDay();
387
-
388
- dueEvents.forEach(event => {
389
- if (event.type === 'time_based_chain') {
390
- const chainData = generator.timeSystem.timeBasedEvents.get(event.chainId);
391
- const gameEvent = generator.generateChainEvent(chainData);
392
- // Add to your game's event system
393
- }
394
- });
112
+ - `generateEvent(context)` - Generate single event
113
+ - `generateEvents(context, count)` - Generate multiple events
114
+ - `generateWorld()` - Create game world
115
+ - `registerTemplate(id, template)` - Add custom template
116
+ - `exportTemplates(format, path)` - Export to game engines
395
117
 
396
- // Start evolving storylines
397
- generator.startTimeBasedChain('POLITICAL_UPRISING');
398
- // - Day 1: Whispers of dissent appear
399
- // - Day 7: Public protests erupt
400
- // - Day 14: Open rebellion begins
401
- // - Day 21: Revolutionary climax
118
+ Full API docs: [Documentation](https://decept1kon.github.io/rpg-event-generator/)
402
119
 
403
- // Check current game time
404
- const currentTime = generator.getCurrentTime();
405
- console.log(`Day ${currentTime.day}, Season: ${currentTime.season}`);
406
- ```
120
+ ## ๐Ÿ“„ License
407
121
 
408
- ### Multi-Language Support
122
+ MIT License - see [LICENSE](LICENSE) file.
409
123
 
410
- Generate events in different languages with cultural adaptation:
124
+ ## ๐ŸŽฏ Use Cases & Examples
411
125
 
126
+ ### Gaming Applications
412
127
  ```javascript
413
- const generator = new RPGEventGenerator({
414
- language: 'es', // Spanish events
415
- theme: 'fantasy'
416
- });
417
-
418
- // Load additional language packs
419
- generator.loadLanguagePack('fr', frenchTranslations);
420
- generator.setLanguage('fr');
128
+ // RPG Character Interactions
129
+ const generator = new RPGEventGenerator({ theme: 'fantasy' });
130
+ const playerState = {
131
+ level: 15,
132
+ class: 'wizard',
133
+ gold: 2500,
134
+ reputation: 75
135
+ };
421
136
 
422
- // Events now generate in French
423
- const event = generator.generateEvent();
424
- console.log(event.title); // "Embuscade de Brigands"
137
+ const event = generator.generateEvent(playerState);
138
+ // Result: "The ancient tome pulses with magical energy..."
425
139
  ```
426
140
 
427
- ### Environmental Modifiers
428
-
429
- Weather, season, and location affect event generation:
430
-
141
+ ### Business Simulations
431
142
  ```javascript
432
- const generator = new RPGEventGenerator({ enableModifiers: true });
433
-
434
- // Set environmental context
435
- generator.setEnvironmentalContext({
436
- weather: 'storm',
437
- season: 'winter',
438
- timeOfDay: 'night'
143
+ // Customer Service Scenarios
144
+ const businessGenerator = new RPGEventGenerator({
145
+ trainingData: [
146
+ 'Customer reports billing discrepancy',
147
+ 'Technical support ticket resolved',
148
+ 'Product feedback received and processed'
149
+ ]
439
150
  });
440
151
 
441
- // Events adapt to harsh winter storm conditions
442
- const event = generator.generateEnhancedEvent({
443
- environment: { weather: 'storm', season: 'winter' }
152
+ const scenario = businessGenerator.generateEvent({
153
+ department: 'support',
154
+ priority: 'high',
155
+ customerValue: 85
444
156
  });
445
157
  ```
446
158
 
447
- ### Event Dependencies
448
-
449
- Complex prerequisite systems control when events can occur:
450
-
159
+ ### Educational Tools
451
160
  ```javascript
452
- // Register event dependencies
453
- generator.registerEventDependency('ROYAL_WEDDING', {
454
- type: 'event_completed',
455
- eventId: 'COURT_INTRODUCTION'
161
+ // Interactive Learning Scenarios
162
+ const educationGenerator = new RPGEventGenerator({
163
+ theme: 'historical',
164
+ culture: 'educational'
456
165
  });
457
166
 
458
- generator.registerEventDependency('ADVANCED_QUEST', {
459
- operator: 'AND',
460
- conditions: [
461
- { type: 'stat_requirement', stat: 'level', min: 5 },
462
- { type: 'event_completed', eventId: 'BASIC_QUEST' }
463
- ]
167
+ const lesson = educationGenerator.generateEvent({
168
+ subject: 'history',
169
+ difficulty: 'intermediate',
170
+ learningObjectives: ['critical_thinking', 'decision_making']
464
171
  });
465
-
466
- // Only generate events whose dependencies are met
467
- const gameState = { completedEvents: new Set(['COURT_INTRODUCTION']) };
468
- const event = generator.generateEnhancedEvent({ gameState });
469
172
  ```
470
173
 
471
- ### NPC Relationship Networks
472
-
473
- Dynamic character relationships that evolve based on player actions:
474
-
174
+ ### Research & Data Simulation
475
175
  ```javascript
476
- const generator = new RPGEventGenerator({ enableRelationships: true });
477
-
478
- // Add NPCs to the relationship network
479
- generator.addNPC({
480
- id: 'king_arthur',
481
- name: 'King Arthur',
482
- type: 'noble'
176
+ // User Behavior Modeling
177
+ const researchGenerator = new RPGEventGenerator({
178
+ enableRelationships: true,
179
+ enableModifiers: true
483
180
  });
484
181
 
485
- // Update relationships based on player actions
486
- generator.applyRelationshipRule('king_arthur', 'player', 'save_life');
487
- // Relationship with king improves significantly
488
-
489
- generator.updateRelationship('merchant_john', 'player', -10, 'stole goods');
490
- // Relationship with merchant deteriorates
491
-
492
- // Generate events that consider relationship context
493
- const event = generator.generateEnhancedEvent({
494
- player: { id: 'player' }
182
+ const simulation = researchGenerator.generateEvent({
183
+ userType: 'research_subject',
184
+ conditions: ['experimental', 'controlled'],
185
+ variables: ['time_pressure', 'cognitive_load']
495
186
  });
496
187
  ```
497
188
 
498
- ### Event Templates Library (v1.3.0)
189
+ ## ๐Ÿ†• Latest Features (v2.0.0)
499
190
 
500
- Use the included library of 429 professionally crafted event templates across 7 genres:
191
+ ### Database Integration
192
+ Store and retrieve templates from databases for large-scale applications:
501
193
 
502
194
  ```javascript
503
- const generator = new RPGEventGenerator({
504
- enableTemplates: true,
505
- templateLibrary: 'fantasy' // Load fantasy templates
506
- });
195
+ const generator = new RPGEventGenerator({ enableDatabase: true });
507
196
 
508
- // Generate from specific template
509
- const dragonEvent = generator.generateFromTemplate('dragon_lair');
510
- console.log(dragonEvent.title); // "Ancient Dragon's Lair"
511
-
512
- // Generate random event from genre
513
- const fantasyEvent = generator.generateFromGenre('fantasy');
514
-
515
- // Discover available templates
516
- const availableTemplates = generator.getAvailableTemplates();
517
- console.log(Object.keys(availableTemplates)); // ['fantasy', 'sci-fi', etc.]
197
+ await generator.storeTemplateInDatabase(customTemplate);
198
+ const retrieved = await generator.getTemplateFromDatabase('template_id');
199
+ const searchResults = await generator.searchTemplatesInDatabase({ type: 'combat' });
518
200
  ```
519
201
 
520
- You can also export templates to other formats using CLI tools:
521
-
522
- ```bash
523
- # Export templates for different engines
524
- npm run export:unity fantasy # Unity C# ScriptableObjects
525
- npm run export:godot cyberpunk # Godot GDScript Resources
526
- npm run export:typescript space-opera # TypeScript interfaces
527
- ```
528
-
529
- Each template includes:
530
- - **Rich narratives** with atmospheric descriptions
531
- - **Multiple meaningful choices** with consequences
532
- - **Difficulty scaling** and context requirements
533
- - **Professional quality** event design
534
-
535
- **Available genres**: 'fantasy', 'sci-fi', 'horror', 'historical', 'modern', 'cyberpunk', 'space-opera'
536
-
537
- #### Custom Template Creation
538
- Add your own templates to the library system:
202
+ ### World Building System
203
+ Generate entire game worlds with factions, regions, and historical events:
539
204
 
540
205
  ```javascript
541
- // Create a custom template
542
- const myTemplate = {
543
- title: 'Space Station Malfunction',
544
- narrative: 'Critical system failure detected. Alarms blare throughout the station.',
545
- choices: [
546
- {
547
- text: 'Attempt emergency repair',
548
- effect: { risk: 30, engineering: 20 },
549
- consequence: 'repair_attempt'
550
- },
551
- {
552
- text: 'Abandon the station',
553
- effect: { survival: 10, resources: -50 },
554
- consequence: 'abandon_station'
555
- }
556
- ],
557
- type: 'TECHNICAL_CRISIS',
558
- difficulty: 'hard',
559
- tags: ['space', 'technology', 'emergency']
560
- };
561
-
562
- // Add to your game's template collection
563
- // Templates can be saved as JSON files in custom directories
206
+ const world = await generator.generateWorld();
207
+ await generator.simulateWorldYears(50); // Advance world history
208
+ const factionPower = generator.getFactionPowerRanking();
564
209
  ```
565
210
 
566
- ### Modular Event System
211
+ ### Advanced Template Features
212
+ Create complex, conditional templates with inheritance and composition:
567
213
 
568
214
  ```javascript
569
- // Register custom event templates
570
- const customTemplate = {
571
- title: 'Mystic Vision',
572
- narrative: 'You experience a vivid prophetic dream showing future events.',
573
- choices: [
574
- {
575
- text: 'Seek out the prophecy',
576
- effect: { wisdom: 15, risk: 20 },
577
- consequence: 'visionary'
578
- },
579
- {
580
- text: 'Dismiss it as a dream',
581
- effect: { stress: -10 },
582
- consequence: 'skeptical'
583
- }
584
- ]
585
- };
586
-
587
- generator.registerEventTemplate('MYSTIC_VISION', customTemplate);
588
-
589
- // Add custom training data for better text generation
590
- generator.addCustomTrainingData([
591
- 'The ancient prophecy foretells of great change',
592
- 'Mystic visions reveal hidden truths to the worthy',
593
- 'Dreams of the future guide the destinies of heroes'
594
- ], 'mystical');
595
-
596
- // Create custom event chains
597
- const visionChain = {
598
- name: 'Prophetic Journey',
599
- description: 'A chain of events triggered by mystic visions',
600
- stages: [
601
- { day: 1, template: 'MYSTIC_VISION' },
602
- { day: 5, template: 'ANCIENT_RUINS' },
603
- { day: 10, template: 'FINAL_PROPHECY' }
604
- ]
215
+ // Conditional templates
216
+ const conditionalTemplate = {
217
+ id: 'level_based_event',
218
+ conditions: [{ type: 'stat_requirement', field: 'level', operator: 'gte', value: 10 }],
219
+ conditional_choices: [{
220
+ condition: { type: 'has_item', item: 'magic_sword' },
221
+ choice: { text: 'Use magic sword', effect: { damage: 50 } }
222
+ }]
605
223
  };
606
224
 
607
- generator.registerEventChain('PROPHECY_CHAIN', visionChain);
608
-
609
- // Export/import custom content for sharing
610
- const customContent = generator.exportCustomContent();
611
- console.log('Exported:', Object.keys(customContent.templates).length, 'templates');
612
-
613
- const newGenerator = new RPGEventGenerator();
614
- const importResult = newGenerator.importCustomContent(customContent);
615
- console.log('Imported:', importResult.templates.success, 'templates');
616
- ```
617
-
618
- ### Dynamic Difficulty Scaling
619
-
620
- Events automatically scale based on player power level:
621
-
622
- ```javascript
623
- // Weak character (easy difficulty)
624
- const weakling = {
625
- gold: 50,
626
- influence: 10,
627
- skills: { combat: 20 }
628
- };
629
- const easyEvent = generator.generateEvent(weakling);
630
- console.log(`Difficulty: ${easyEvent.difficulty}`); // "easy"
631
- // Effects scaled for beginners: higher rewards, lower penalties
632
-
633
- // Powerful character (hard difficulty)
634
- const hero = {
635
- gold: 50000,
636
- influence: 500,
637
- skills: { combat: 100, diplomacy: 80 },
638
- relationships: [{ name: 'King', type: 'ally', relationship: 80 }]
225
+ // Template composition
226
+ const composedTemplate = {
227
+ id: 'weather_merchant',
228
+ composition: [{
229
+ template_id: 'merchant_base',
230
+ merge_strategy: 'append_narrative'
231
+ }, {
232
+ template_id: 'weather_effects',
233
+ conditions: [{ type: 'random_chance', probability: 0.6 }]
234
+ }]
639
235
  };
640
- const hardEvent = generator.generateEvent(hero);
641
- console.log(`Difficulty: ${hardEvent.difficulty}`); // "hard"
642
- // Effects scaled for challenge: lower rewards, higher penalties
643
-
644
- // Legendary character (legendary difficulty)
645
- const godlike = {
646
- gold: 200000,
647
- influence: 1000,
648
- skills: { combat: 200, diplomacy: 150 },
649
- age: 120,
650
- reputation: 95
651
- };
652
- const epicEvent = generator.generateEvent(godlike);
653
- console.log(`Difficulty: ${epicEvent.difficulty}`); // "legendary"
654
- // Effects scaled for epic gameplay: minimal rewards, maximum penalties
655
- ```
656
-
657
- **Difficulty Tiers:**
658
- - **Easy** (Power 0-50): Generous rewards, forgiving penalties
659
- - **Normal** (Power 25-150): Standard scaling, balanced challenges
660
- - **Hard** (Power 100-300): Reduced rewards, harsher penalties
661
- - **Legendary** (Power 250+): Minimal rewards, extreme challenges
662
-
663
- ## ๐Ÿ”ง API Reference
664
-
665
- ### Constructor Options
666
-
667
- ```javascript
668
- const generator = new RPGEventGenerator({
669
- // Core options
670
- stateSize: 2, // Markov chain state size (default: 2)
671
- trainingData: [...], // Custom training data array
672
- theme: 'fantasy', // 'fantasy', 'sci-fi', 'historical'
673
- culture: 'norse', // Cultural variant within theme
674
-
675
- // Enhanced features (all enabled by default)
676
- enableDependencies: true, // Complex event prerequisites
677
- enableModifiers: true, // Weather/season/location modifiers
678
- enableRelationships: true, // NPC relationship networks
679
- language: 'en' // Default language for events
680
- });
681
- ```
682
-
683
- ### Core Methods
684
-
685
- - `generateEvent(playerContext)` - Generate single event
686
- - `generateEvents(playerContext, count)` - Generate multiple events
687
- - `generateTimeAwareEvent(playerContext)` - Generate season-aware event
688
-
689
- ### Event Chain Methods
690
-
691
- - `startChain(chainId)` - Start choice-based event chain
692
- - `advanceChain(chainId, choice)` - Advance chain based on choice
693
- - `getActiveChains()` - Get all active chains
694
-
695
- ### Time-Based Methods
696
-
697
- - `advanceGameDay()` - Advance time and return due events
698
- - `startTimeBasedChain(chainId)` - Start time-evolving chain
699
- - `getCurrentTime()` - Get current game time/season
700
- - `getActiveTimeChains()` - Get active time-based chains
701
-
702
- ### Game State Methods
703
-
704
- - `getGameState()` - Export complete game state
705
- - `loadGameState(state)` - Import saved game state
706
-
707
- ### Modular Methods
708
-
709
- - `registerEventTemplate(id, template)` - Add custom event template
710
- - `addCustomTrainingData(data, category)` - Add custom training data
711
- - `registerEventChain(id, chainConfig)` - Add custom event chain
712
- - `exportCustomContent()` - Export custom templates/chains/data
713
- - `importCustomContent(content)` - Import custom content
714
-
715
- ### Player Context Object
716
-
717
- ```javascript
718
- {
719
- age: number, // Player age
720
- gold: number, // Player wealth
721
- influence: number, // Political/social influence
722
- reputation: number, // Social reputation
723
- career: string, // Player's career/job ('noble', 'merchant', 'warrior', etc.)
724
- skills: { // Skill levels object
725
- combat: number, // 0-100 scale
726
- diplomacy: number,
727
- intrigue: number,
728
- magic: number,
729
- survival: number
730
- },
731
- relationships: [{ // Array of NPC relationships
732
- name: string, // NPC name
733
- type: string, // 'friend', 'lover', 'ally', 'enemy', 'rival'
734
- relationship: number // Relationship strength (0-100)
735
- }],
736
- location: string, // Current location ('capital', 'village', 'forest', etc.)
737
- season: string // Current season ('spring', 'summer', 'autumn', 'winter')
738
- }
739
- ```
740
-
741
- ### Complete Event Object Structure
742
-
743
- ```javascript
744
- {
745
- id: "event_1704567890123_xyz789", // Unique event identifier
746
- title: "Perilous Bandit King's Challenge", // Dynamic, context-aware title
747
- description: "The infamous bandit king blocks your path, offering you a choice...", // Rich procedural description
748
- narrative: "The infamous bandit king blocks your path, offering you a choice: join his band or face certain death.",
749
- choices: [
750
- {
751
- text: "Join the bandits",
752
- effect: { gold: 375, reputation: -23, combat_skill: 12 },
753
- consequence: "bandit"
754
- },
755
- {
756
- text: "Challenge him to single combat",
757
- effect: { reputation: 32, health: -18 },
758
- requirements: { combat_skill: 60 },
759
- consequence: "hero"
760
- },
761
- {
762
- text: "Bribe your way past",
763
- effect: { gold: -320, safe_passage: true },
764
- consequence: "diplomat"
765
- }
766
- ],
767
- type: "BANDIT_KING",
768
- consequence: null,
769
- context: { /* Full context used for generation */ },
770
- urgency: "normal",
771
- theme: "adventure",
772
- difficulty: "normal"
773
-
774
- }
775
236
  ```
776
237
 
777
- ## ๐ŸŽจ v2.0.0 Theme Creator
778
-
779
- Create completely custom game worlds with your own atmospheric text and storytelling style.
780
-
781
- ### Custom Theme Creation
238
+ ### Performance Optimizations
239
+ Handle large-scale generation with advanced caching and parallel processing:
782
240
 
783
241
  ```javascript
784
242
  const generator = new RPGEventGenerator({
785
- trainingData: [
786
- 'Space cowboys patrol asteroid fields on mechanical horses',
787
- 'Neon-lit cantinas echo with the hum of quantum pianos',
788
- 'Laser revolvers fire streams of pure starlight',
789
- 'Alien saloons serve drinks that change your memories',
790
- 'Robotic sheriffs maintain order in floating colonies'
791
- ],
792
- theme: 'sci-fi',
793
- culture: 'western'
243
+ enableTemplateCaching: true,
244
+ enableEventCaching: true
794
245
  });
795
246
 
796
- // Events will incorporate your custom atmosphere
797
- const event = generator.generateEvent({
798
- career: 'gunslinger',
799
- location: 'asteroid-town'
800
- });
247
+ // Generate events in parallel
248
+ const events = await generator.generateEventsParallel(100, context, 4); // 4 threads
249
+ // Generate in batches for memory efficiency
250
+ const batchedEvents = generator.generateEventsBatched(1000, context, 50); // 50 events per batch
801
251
  ```
802
252
 
803
- ### Pure Markov Mode
804
-
805
- Generate events using only your custom training data - completely bypassing templates.
806
-
807
- ```javascript
808
- const pureGenerator = new RPGEventGenerator({
809
- trainingData: [
810
- 'Crystal caves echo with ancient magic',
811
- 'Shadowy figures move through fog-shrouded forests',
812
- 'Forgotten ruins hide treasures and traps',
813
- 'Mysterious merchants offer enchanted artifacts',
814
- 'Wandering bards sing tales of lost kingdoms'
815
- ],
816
- pureMarkovMode: true, // No templates used
817
- enableTemplates: false
818
- });
253
+ ## Installation
819
254
 
820
- // Generates events purely from your text
821
- const event = pureGenerator.generateEvent();
822
- // Type: "MARKOV_GENERATED"
823
- // Title: "Crystal caves echo with ancient magic."
824
- // Description: Generated purely from your atmospheric training sentences
255
+ ```bash
256
+ npm install rpg-event-generator
825
257
  ```
826
258
 
827
- ## ๐Ÿง  v2.0.0 Rule Engine
259
+ ### Requirements
260
+ - Node.js 16+
261
+ - TypeScript 4.5+ (for development)
828
262
 
829
- Create intelligent, conditional rules that modify events based on player state and game context.
830
-
831
- ### Basic Rule Creation
263
+ ## Quick Start
832
264
 
833
265
  ```javascript
834
- const generator = new RPGEventGenerator({
835
- enableRuleEngine: true
836
- });
837
-
838
- // Add a wealthy player bonus
839
- generator.addCustomRule('wealthy_bonus', {
840
- conditions: [
841
- { type: 'stat_greater_than', params: { stat: 'gold', value: 1000 } }
842
- ],
843
- effects: {
844
- addTags: ['wealthy_player'],
845
- modifyChoices: {
846
- multiply: { gold: 1.3 }, // 30% more gold rewards
847
- add: { reputation: 5 } // Bonus reputation
848
- }
849
- }
850
- });
851
-
852
- // Events for wealthy players get enhanced
853
- const wealthyEvent = generator.generateEvent({ gold: 2000 });
854
- console.log(wealthyEvent.tags); // Includes 'wealthy_player'
855
- ```
856
-
857
- ### Advanced Rule Conditions
266
+ import { RPGEventGenerator, generateRPGEvent } from 'rpg-event-generator';
858
267
 
859
- ```javascript
860
- // Complex conditional logic
861
- generator.addCustomRule('noble_intrigue', {
862
- conditions: [
863
- { type: 'and', params: {
864
- conditions: [
865
- { type: 'career_is', params: { career: 'noble' } },
866
- { type: 'location_is', params: { location: 'castle' } },
867
- { type: 'stat_greater_than', params: { stat: 'influence', value: 50 } }
868
- ]
869
- }}
870
- ],
871
- effects: {
872
- modifyTitle: { append: ' (Royal Privilege)' },
873
- setDifficulty: 'hard',
874
- addTags: ['noble_bonus', 'court_influence']
875
- }
268
+ // Simple event generation
269
+ const event = generateRPGEvent({
270
+ age: 25,
271
+ gold: 500,
272
+ influence: 15,
273
+ career: 'merchant'
876
274
  });
877
275
 
878
- // Available condition types:
879
- // - stat_greater_than, stat_less_than, stat_between
880
- // - location_is, season_is, career_is, time_greater_than
881
- // - has_item, relationship_status
882
- // - random_chance
883
- // - and, or, not (for combining conditions)
884
- ```
885
-
886
- ### Rule Management
887
-
888
- ```javascript
889
- // Validate rules before adding
890
- const rule = { /* your rule */ };
891
- const validation = generator.validateCustomRule(rule);
892
- if (validation.valid) {
893
- generator.addCustomRule('my_rule', rule);
894
- } else {
895
- console.log('Rule errors:', validation.errors);
896
- }
897
-
898
- // Manage rules
899
- console.log(generator.getCustomRules()); // View all rules
900
- generator.removeCustomRule('my_rule'); // Remove specific rule
901
- generator.clearCustomRules(); // Remove all rules
902
- ```
903
-
904
- ## ๐ŸŒ v2.0.0 Cross-Platform Export
905
-
906
- Export your events directly to game engines.
907
-
908
- ### Unity Integration
909
-
910
- ```javascript
911
- // Programmatic export
912
- const exporter = require('./scripts/export-templates.js');
913
- exporter.exportTemplates('unity', 'fantasy');
914
-
915
- // Creates: templates/unity/fantasy/event_1.cs
916
- // Result: Event1.cs - Unity ScriptableObject
917
- ```
918
-
919
- ```bash
920
- # Using npm scripts
921
- npm run export:unity fantasy
922
-
923
- # Direct script call
924
- node scripts/export-templates.js unity fantasy
925
- ```
926
-
927
- ### Godot Integration
928
-
929
- ```javascript
930
- // Export for Godot
931
- const exporter = require('./scripts/export-templates.js');
932
- exporter.exportTemplates('godot', 'cyberpunk');
933
-
934
- // Creates: templates/godot/cyberpunk/event_1.gd
935
- // Result: Event1.gd - Godot Resource script
936
- ```
937
-
938
- ```bash
939
- # Using npm scripts
940
- npm run export:godot cyberpunk
941
-
942
- # Direct script call
943
- node scripts/export-templates.js godot cyberpunk
276
+ console.log(event.title); // "Golden Opportunity"
277
+ console.log(event.description); // Procedurally generated narrative
278
+ console.log(event.choices); // Array of meaningful choices
944
279
  ```
945
280
 
946
- ### TypeScript Support
947
-
948
- ```javascript
949
- // Export as TypeScript interfaces
950
- const exporter = require('./scripts/export-templates.js');
951
- exporter.exportTemplates('typescript', 'space-opera');
281
+ ## Demo
952
282
 
953
- // Creates: templates/typescript/space-opera/event_1.ts
954
- // Result: Strongly-typed event definitions
955
- ```
283
+ Run the included demo to explore all features:
956
284
 
957
285
  ```bash
958
- # Using npm scripts
959
- npm run export:typescript space-opera
286
+ # Using npm script (recommended)
287
+ npm run demo
960
288
 
961
289
  # Direct script call
962
- node scripts/export-templates.js typescript space-opera
963
- ```
964
-
965
- ## ๐Ÿ“Š v2.0.0 Enhanced Template Library
966
-
967
- Generate 400+ professionally crafted events across 7 genres:
968
-
969
- - **Fantasy**: Knights, dragons, magic, medieval politics
970
- - **Sci-Fi**: Space exploration, technology, alien encounters
971
- - **Horror**: Supernatural terror, psychological horror
972
- - **Historical**: Medieval courts, exploration, diplomacy
973
- - **Modern**: Contemporary settings, urban adventures
974
- - **Cyberpunk**: Neon cities, hackers, megacorporations
975
- - **Space Opera**: Galactic empires, starships, cosmic conflicts
976
-
977
- ### Template Integration
978
-
979
- ```javascript
980
- // Load genre-specific templates
981
- const fantasyGen = new RPGEventGenerator({
982
- enableTemplates: true,
983
- templateLibrary: 'fantasy'
984
- });
985
-
986
- // Generate from specific genre
987
- const fantasyEvent = fantasyGen.generateFromGenre('fantasy');
988
- const horrorEvent = fantasyGen.generateFromTemplate('haunted_mansion');
989
-
990
- // Available templates
991
- console.log(fantasyGen.getAvailableTemplates());
992
- // { fantasy: [...], sci-fi: [...], horror: [...], etc. }
993
- ```
994
-
995
- ## ๐ŸŽฏ v2.0.0 API Reference
996
-
997
- ### Constructor Options (v2.0.0 additions)
998
-
999
- ```javascript
1000
- const generator = new RPGEventGenerator({
1001
- // v1.x options still supported
1002
- theme: 'fantasy',
1003
- culture: 'norse',
1004
- trainingData: [...],
1005
- enableModifiers: true,
1006
-
1007
- // v2.0.0 new options
1008
- enableRuleEngine: true, // Enable custom rules system
1009
- customRules: {}, // Pre-load custom rules
1010
- pureMarkovMode: false, // Generate purely from training data
1011
- templateLibrary: null, // Load specific template genre
1012
- chance: new Chance() // Custom Chance.js instance (optional)
1013
- });
1014
- ```
1015
-
1016
- ### New Methods (v2.0.0)
1017
-
1018
- ```javascript
1019
- // Rule Engine
1020
- generator.addCustomRule(name, ruleDefinition);
1021
- generator.removeCustomRule(name);
1022
- generator.getCustomRules();
1023
- generator.clearCustomRules();
1024
- generator.validateCustomRule(rule);
1025
-
1026
- // Template System
1027
- generator.generateFromTemplate(templateId);
1028
- generator.generateFromGenre(genre);
1029
- generator.getAvailableTemplates();
1030
-
1031
- // Export System (via export-templates.js)
1032
- exporter.exportTemplates('unity', 'fantasy');
1033
- exporter.exportTemplates('godot', 'cyberpunk');
1034
- exporter.exportTemplates('typescript', 'space-opera');
290
+ node demo.js
1035
291
  ```
1036
292
 
1037
- ## ๐Ÿ”„ v2.0.0 Migration Guide
293
+ This will demonstrate event generation, chains, time progression, customization, and more.
1038
294
 
1039
- ### From v1.x to v2.0.0
295
+ ## ๐Ÿ”ง Getting Started
1040
296
 
1041
- **โœ… Fully Backward Compatible**
1042
- - All existing code continues to work unchanged
1043
- - v1.x features remain fully functional
1044
- - No breaking changes to existing API
297
+ ### Basic Usage
1045
298
 
1046
- **๐Ÿš€ New Features are Opt-in**
1047
299
  ```javascript
1048
- // v1.x code - still works perfectly
1049
300
  const generator = new RPGEventGenerator();
1050
301
 
1051
- // v2.0.0 enhancements - opt-in only
1052
- const enhancedGenerator = new RPGEventGenerator({
1053
- enableRuleEngine: true, // New feature
1054
- pureMarkovMode: false, // New feature
1055
- templateLibrary: 'fantasy' // Enhanced feature
1056
- });
1057
- ```
1058
-
1059
- **๐Ÿ“ˆ Performance Improvements**
1060
- - Optimized rule evaluation
1061
- - Efficient template loading
1062
- - Better memory management for large template libraries
1063
-
1064
- **๐ŸŽฒ Custom Randomness Control**
1065
- ```javascript
1066
- // For games that need deterministic randomness or custom seeding
1067
- const customChance = new Chance('your-seed-here');
1068
- const generator = new RPGEventGenerator({
1069
- chance: customChance // Optional: pass your own Chance instance
1070
- });
302
+ // Generate a random event
303
+ const event = generator.generateEvent();
1071
304
 
1072
- // For testing with predictable results
1073
- const testChance = new Chance(12345); // Always same results
1074
- const testGenerator = new RPGEventGenerator({
1075
- chance: testChance
305
+ // Generate with context
306
+ const contextualEvent = generator.generateEvent({
307
+ age: 30,
308
+ career: 'merchant',
309
+ location: 'market'
1076
310
  });
1077
311
  ```
1078
312
 
1079
- ## ๐ŸŽฎ Game Integration
313
+ ## ๐Ÿ“š Documentation & Resources
1080
314
 
1081
- ### Real-Time Strategy Integration
315
+ ### ๐Ÿ“– Comprehensive Guides
316
+ - [Getting Started Guide](./docs/getting-started.md) - Quick start and basic concepts
317
+ - [Basic Usage](./docs/basic-usage.md) - Core functionality and examples
318
+ - [Customization Guide](./docs/customization.md) - Training data and configuration
319
+ - [Advanced Features](./docs/advanced-features.md) - Event chains, time systems, relationships
320
+ - [Template Creation Guide](./docs/template-creation-guide.md) - Creating custom event templates
321
+ - [Game Engine Integration](./docs/game-engine-integration.md) - Unity, Godot, Unreal Engine guides
322
+ - [Troubleshooting](./docs/troubleshooting.md) - Common issues and solutions
1082
323
 
1083
- ```javascript
1084
- function onNewGameDay() {
1085
- const dueEvents = generator.advanceGameDay();
1086
-
1087
- dueEvents.forEach(event => {
1088
- if (event.type === 'time_based_chain') {
1089
- const chainData = generator.timeSystem.timeBasedEvents.get(event.chainId);
1090
- const gameEvent = generator.generateChainEvent(chainData);
1091
- triggerInGameEvent(gameEvent);
1092
- } else if (event.type === 'seasonal_random') {
1093
- const seasonalEvent = generator.generateTimeAwareEvent(playerContext);
1094
- triggerInGameEvent(seasonalEvent);
1095
- }
1096
- });
1097
- }
1098
- ```
324
+ ### ๐Ÿ”ง API Documentation
325
+ - [TypeDoc API Reference](./docs/api/) - Complete API documentation with examples
326
+ - [Quick Reference](./docs/quick-reference.md) - Fast lookup for common operations
1099
327
 
1100
- ### React Game Integration
328
+ ### ๐Ÿ› ๏ธ Development & Testing
329
+ - Run `npm run demo` to see all 30+ features in action
330
+ - Run `npm run docs` to regenerate API documentation
331
+ - Run `npm test` to execute the comprehensive test suite
332
+ - Check the `demo.js` file for interactive examples
333
+ - Check the `test/` directory for usage examples
1101
334
 
1102
- ```javascript
1103
- import React, { useState, useEffect } from 'react';
1104
- import { RPGEventGenerator } from 'rpg-event-generator';
1105
-
1106
- function GameEventSystem({ playerStats }) {
1107
- const [currentEvent, setCurrentEvent] = useState(null);
1108
- const [generator] = useState(() => new RPGEventGenerator());
1109
-
1110
- useEffect(() => {
1111
- // Generate event when time advances
1112
- const event = generator.generateEvent(playerStats);
1113
- setCurrentEvent(event);
1114
- }, [playerStats, generator]);
1115
-
1116
- const handleChoice = (choiceIndex) => {
1117
- const choice = currentEvent.choices[choiceIndex];
1118
- // Apply effects to player stats
1119
- applyEffects(choice.effect);
1120
- setCurrentEvent(null); // Clear event
1121
- };
1122
-
1123
- if (!currentEvent) return <div>No active events</div>;
1124
-
1125
- return (
1126
- <div className="event-dialog">
1127
- <h2>{currentEvent.title}</h2>
1128
- <p>{currentEvent.description}</p>
1129
- <div className="choices">
1130
- {currentEvent.choices.map((choice, index) => (
1131
- <button
1132
- key={index}
1133
- onClick={() => handleChoice(index)}
1134
- className="choice-button"
1135
- >
1136
- {choice.text}
1137
- </button>
1138
- ))}
1139
- </div>
1140
- </div>
1141
- );
1142
- }
1143
- ```
335
+ ### ๐Ÿ“‚ Key Directories
336
+ - `src/` - Modular TypeScript source code
337
+ - `docs/` - Complete documentation and guides
338
+ - `templates/` - Built-in event templates
339
+ - `test/` - Comprehensive test suite
340
+ - `exports/` - Game engine export formats
341
+ - `test/` - Comprehensive test suite
1144
342
 
1145
- ### Redux Integration
343
+ ## ๐Ÿค Contributing
1146
344
 
1147
- ```javascript
1148
- // Action Types
1149
- export const GENERATE_EVENT = 'GENERATE_EVENT';
1150
- export const RESOLVE_EVENT = 'RESOLVE_EVENT';
1151
- export const ADVANCE_GAME_DAY = 'ADVANCE_GAME_DAY';
1152
-
1153
- // Action Creators
1154
- export const generateEvent = (playerContext) => ({
1155
- type: GENERATE_EVENT,
1156
- payload: { playerContext }
1157
- });
345
+ We welcome contributions! Please feel free to submit issues, feature requests, and pull requests.
1158
346
 
1159
- export const resolveEvent = (eventId, choiceIndex) => ({
1160
- type: RESOLVE_EVENT,
1161
- payload: { eventId, choiceIndex }
1162
- });
1163
-
1164
- export const advanceGameDay = () => ({
1165
- type: ADVANCE_GAME_DAY
1166
- });
1167
-
1168
- // Reducer
1169
- const initialState = {
1170
- generator: new RPGEventGenerator(),
1171
- currentEvent: null,
1172
- gameTime: { day: 1, season: 'spring' }
1173
- };
347
+ ### Development Setup
1174
348
 
1175
- const eventReducer = (state = initialState, action) => {
1176
- switch (action.type) {
1177
- case GENERATE_EVENT:
1178
- const event = state.generator.generateEvent(action.payload.playerContext);
1179
- return { ...state, currentEvent: event };
1180
-
1181
- case RESOLVE_EVENT:
1182
- // Apply choice effects to player state
1183
- const choice = state.currentEvent.choices[action.payload.choiceIndex];
1184
- const newPlayerState = applyChoiceEffects(choice.effect);
1185
- return {
1186
- ...state,
1187
- currentEvent: null,
1188
- playerState: newPlayerState
1189
- };
1190
-
1191
- case ADVANCE_GAME_DAY:
1192
- const dueEvents = state.generator.advanceGameDay();
1193
- return {
1194
- ...state,
1195
- gameTime: state.generator.getCurrentTime(),
1196
- dueEvents: dueEvents
1197
- };
1198
-
1199
- default:
1200
- return state;
1201
- }
1202
- };
1203
- ```
349
+ ```bash
350
+ # Clone the repository
351
+ git clone https://github.com/ContextWeaver/context-weaver.git
352
+ cd context-weaver
1204
353
 
1205
- ### Save/Load System
354
+ # Install dependencies
355
+ npm install
1206
356
 
1207
- ```javascript
1208
- // Save complete game state
1209
- function saveGame(playerState) {
1210
- const gameState = {
1211
- player: playerState,
1212
- events: generator.getGameState(),
1213
- timestamp: Date.now()
1214
- };
1215
-
1216
- localStorage.setItem('rpgGameSave', JSON.stringify(gameState));
1217
- console.log('Game saved successfully');
1218
- }
1219
-
1220
- // Load complete game state
1221
- function loadGame() {
1222
- try {
1223
- const savedGame = JSON.parse(localStorage.getItem('rpgGameSave'));
1224
- if (!savedGame) return false;
1225
-
1226
- // Restore generator state
1227
- generator.loadGameState(savedGame.events);
1228
-
1229
- // Restore player state
1230
- return savedGame.player;
1231
-
1232
- } catch (error) {
1233
- console.error('Failed to load game:', error);
1234
- return false;
1235
- }
1236
- }
1237
- ```
357
+ # Run tests
358
+ npm test
1238
359
 
1239
- ## ๐Ÿงช Testing
360
+ # Run demo
361
+ npm run demo
1240
362
 
1241
- ```bash
1242
- npm test
363
+ # Build for distribution
364
+ npm run build
1243
365
  ```
1244
366
 
1245
- **Comprehensive test coverage (70+ tests):**
1246
- - โœ… Core event generation and validation
1247
- - โœ… Context adaptation and player responsiveness
1248
- - โœ… Thematic systems and cultural variants
1249
- - โœ… Event chains and multi-stage progression
1250
- - โœ… Dynamic difficulty scaling
1251
- - โœ… Time systems and seasonal mechanics
1252
- - โœ… Modular features and custom content
1253
- - โœ… Edge cases and error handling
1254
- - โœ… Game state persistence and integration
1255
- - โœ… **Event Economy system (25+ tests)**
1256
- - Theme saving/loading/export/import
1257
- - Rule pack management
1258
- - Content pack creation
1259
- - Quality metrics and statistics
1260
- - File I/O operations and validation
1261
-
1262
- ## ๐ŸŽฏ Event Types
1263
-
1264
- ### Court & Political
1265
- - **Court Scandal**: Royal intrigue with betrayal and scandal
1266
- - **Noble Duel**: Honour challenges and duels of reputation
1267
- - **Market Crash**: Economic disasters affecting trade
1268
- - **Trade War**: Merchant rivalries and economic warfare
1269
-
1270
- ### Criminal Underworld
1271
- - **Thieves' Guild**: Criminal organisation recruitment
1272
- - **Blackmail Opportunity**: Leverage compromising information
1273
- - **Bandit King Challenge**: Highway robbery confrontations
1274
-
1275
- ### Supernatural & Mysterious
1276
- - **Ancient Curse**: Cursed artefacts and afflictions
1277
- - **Ghostly Visitation**: Spirits seeking justice
1278
- - **Lost Civilisation**: Archaeological discoveries
1279
-
1280
- ### Personal & Dramatic
1281
- - **Forbidden Love**: Romance across social boundaries
1282
- - **Family Secret**: Hidden lineage revelations
1283
- - **Desertion Temptation**: Military loyalty crises
1284
- - **Mercenary Contract**: Dangerous employment opportunities
1285
-
1286
367
  ## ๐Ÿ“„ License
1287
368
 
1288
369
  MIT License - see [LICENSE](LICENSE) file for details.
1289
370
 
1290
- ## ๐Ÿ™ Acknowledgments
1291
-
1292
- - [Chance.js](https://chancejs.com/) for random number generation
1293
- - Custom Markov chain implementation for procedural text generation
1294
-
1295
371
  ---
1296
372
 
1297
- **Generate infinite adventures with RPG Event Generator!** โš”๏ธ๐Ÿ“šโœจ
373
+ **Generate infinite possibilities with RPG Event Generator!** ๐ŸŽฒโœจ