rpg-event-generator 1.2.5 → 1.3.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.
package/README.md CHANGED
@@ -60,12 +60,13 @@ Since this is a personal project with a private repository:
60
60
  - **Game Integration**: Proper save/load state management for real games
61
61
  - **Comprehensive Testing**: 45+ automated tests ensuring reliability
62
62
 
63
- ### Enhanced Features (v1.2.0)
63
+ ### Enhanced Features (v1.2.0+)
64
64
 
65
65
  - **Multi-Language Support**: Generate events in different languages with cultural adaptation
66
66
  - **Event Dependencies**: Complex prerequisite systems for event triggering
67
67
  - **Environmental Modifiers**: Weather, season, and location-based event modifications
68
68
  - **NPC Relationships**: Dynamic character relationship networks and social consequences
69
+ - **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
69
70
 
70
71
  ## Usage Guide
71
72
 
@@ -312,6 +313,65 @@ const event = generator.generateEnhancedEvent({
312
313
  });
313
314
  ```
314
315
 
316
+ ### Event Templates Library (v1.3.0)
317
+
318
+ Load pre-built event collections for different game genres:
319
+
320
+ ```javascript
321
+ const generator = new RPGEventGenerator({
322
+ enableTemplates: true,
323
+ templateLibrary: 'fantasy' // Auto-load fantasy templates
324
+ });
325
+
326
+ // Generate from specific template
327
+ const dragonEvent = generator.generateFromTemplate('dragon_lair');
328
+ console.log(dragonEvent.title); // "Ancient Dragon's Lair"
329
+
330
+ // Generate random event from genre
331
+ const fantasyEvent = generator.generateFromGenre('fantasy');
332
+
333
+ // Discover available templates
334
+ const availableTemplates = generator.getAvailableTemplates();
335
+ console.log(Object.keys(availableTemplates)); // ['fantasy']
336
+
337
+ // Available genres: 'fantasy', 'sci-fi', 'horror', 'historical'
338
+ ```
339
+
340
+ Each template includes:
341
+ - **Rich narratives** with atmospheric descriptions
342
+ - **Multiple meaningful choices** with consequences
343
+ - **Difficulty scaling** and context requirements
344
+ - **Professional quality** event design
345
+
346
+ #### Custom Template Creation
347
+ Add your own templates to the library system:
348
+
349
+ ```javascript
350
+ // Create a custom template
351
+ const myTemplate = {
352
+ title: 'Space Station Malfunction',
353
+ narrative: 'Critical system failure detected. Alarms blare throughout the station.',
354
+ choices: [
355
+ {
356
+ text: 'Attempt emergency repair',
357
+ effect: { risk: 30, engineering: 20 },
358
+ consequence: 'repair_attempt'
359
+ },
360
+ {
361
+ text: 'Abandon the station',
362
+ effect: { survival: 10, resources: -50 },
363
+ consequence: 'abandon_station'
364
+ }
365
+ ],
366
+ type: 'TECHNICAL_CRISIS',
367
+ difficulty: 'hard',
368
+ tags: ['space', 'technology', 'emergency']
369
+ };
370
+
371
+ // Add to your game's template collection
372
+ // Templates can be saved as JSON files in custom directories
373
+ ```
374
+
315
375
  ### Modular Event System
316
376
 
317
377
  ```javascript