Skip to content

Build a world, story, and characters for a RPG or fantasy story

License

Notifications You must be signed in to change notification settings

4161726f6e/RPG-World-Builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

RPG-World-Builder

Build a world, story, and characters for a RPG or fantasy story

Usage:

world_builder.py -h -o -m

-h : Display this message

-o : Include optional story elements

-m : Create a new map

Generate a story for a role-playing game. Only a basic story will be generated by default. Include the -o argument to include detailed elements.

A pre-rendered map and list of place names will be used unless you include -m for a new map (takes a little time)

##############

This combines two of my projects (DD-2E-Character-Generator and RPG-Random-Adventure-Generator) along with an implementation of Beaglemage's Fantasy Map Generator (https://github.com/beaglemage/Fantasy_map_generator).

The output of generated characters will be in the folder 2E_Caharacter_Sheets. The output of optionally generated story elements as a JSON file will be in the folder generated_adventures. The generated fantasy map is called map.png in the root folder of this project.

##############

Several options for usage exist.

To only output a simple story outline with randomized names and plot elements, run the script with no options (python world_builder.py).

To perform the above along with a newly generated map with new, randomized names for locales: python world_builder.py -m NOTE: The map takes a few minutes to generate. Go grab a cup of coffee and come back.

For a more robust story and character sheet generation, include the optional elements: python world_builder.py -o NOTE: This option asks several questions:

  • How many player characters (PCs) do you want generated (default is 1)
  • The level of the PCs (1-20, default is 1)
  • The class for each PC (default is a random choice)
    • Classes are:
      • Fighter, Ranger, Wizard, Mage, Priest, Cleric, Druid, Thief, Bard, Paladin, Fighter/Thief, Fighter/Cleric, Fighter/Druid, Fighter/Mage, Fighter/Illusionist, Fighter/Mage/Cleric, Fighter/Mage/Druid, Fighter/Mage/Thief, Cleric/Illusionist, Cleric/Thief, Cleric/Ranger, Cleric/Mage, Illusionist/Thief, Mage/Thief, or Druid/Mage
  • The level of the master villain (default is 1 level higher than the level of the PCs)
  • Story generation: A simple story outline where the names match the PCs and villain or a full randomized plot outline
    • If the full plot is chosen, an additional question will ask for a standard plot or all optional plot elements
    • If the full plot is chosen, an additional question will ask if you want the story printed to the screen or to a JSON file

Performing python world_builder.py -om will create a new map and create character sheets as described above.

###############

Customization options:

The simple story generator option picks story elements from simple text files within the story_options folder. These text files can easily be modified to include whatever you like.

EXAMPLE: The default list of journey elements for the hero located in world_generator/story_options/plot/journey.txt include:

  • rescue the princess
  • prove their worth
  • stop an imminent catastrophe
  • avenge the death of a loved one
  • bring order to chaos

When generating a simple story, one of these will be picked at random. To add another option "discover the meaning of life", simply add a new line with that option, as follows:

  • rescue the princess
  • prove their worth
  • stop an imminent catastrophe
  • avenge the death of a loved one
  • bring order to chaos
  • discover the meaning of life

Customization options exist under the following file locations:

  • world_generator/story_options/culture/
    • politics.txt
    • resources.txt
    • war.txt
  • world_generator/story_options/plot/
    • conflict.txt
    • journey.txt
    • resolution.txt
  • world_generator/story_options/random_elements/
    • encounters.txt
    • hinderances.txt
    • treasures.txt