Skip to content

reidashwill/random-encounter-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

D&D 5e Random Encounter Generator

Team Week Project at Epicodus, 04.30.2020

By Daniel Merys, Mark Gridley, Reid Ashwill, Tyler Bates, Tyler Bowerman

Description

This application is designed to create random encounters using DnD monsters. All monster stats and information were pulled from the Open5e API.

Specs

Spec Input Output
Accept user inputs from dropdown menus Average party level = 5 partyLevel = 5
Determine xpThreshold based on user inputs Average party level = 5, Number of members = 3, Difficulty = medium XP Threshold = 1500
Place API call based on user inputs Click "Create Encounter" call https://api.open5e.com/monsters/ ${monsterPlaceholder}
API call limited in scope by user environment selection Environment = Desert eg. Bandit Captain, Lion, Giant Toad
Assign monsterObject xp property for calculations monster with challenge rating of "5" monsterObject.xp = 1800
Monsters selected based on xpThreshold calculation & environment selection Environment = Desert, Average party level = 5, Number of members = 3, Difficulty = medium XP Threshold = 1500, desertMonsterArray
EncounterGen selects random monster from environment array.
Monsters with xp lower than XP threshold are added to encounter monster.xp = 1600, current xpThreshold = 1800 monsterObject added to Encounter
Process repeats until xpThreshold is reached monster.xp = 300, current xpThreshold = 200 monsterObject not added to Encounter
Encounter is displayed to user click "Create Encounter" Array of monsters displayed
Monster stats displayed to user on click click Bandit Captain strength: 15, hit points: 65, etc.
"Try Again" button clears encounter and refreshes page click "Try Again" the user will be taken back to the home page

Setup/Installation Requirements

  • Navigate to where you want this application to be saved, i.e.: cd desktop
  • Clone the file from GitHub with HTTPS git clone https://github.com/reidashwill/random-encounter-generator
  • On Mac: open -a {your text editor} random-encounter-generator
  • On Windows: random-encounter-generator
  • Or navigate to cloned repository in the terminal
  • Run the command npm install and then the command npm run start

To Download Manually:

  • Navigate to https://github.com/reidashwill/random-encounter-generator
  • Click green "Clone or Download" button.
  • Click "Download ZIP".
  • Click downloaded file to unzip.
  • Open folder called "random-encounter-generator".
  • Right click "index.html" and select your preferred browser or text editor.

To view live:

Known Bugs

Due to unknown cause, sometimes the encounter array is not populated Scaling the browser window is not ideal at this point Viewing on a mobile device is not ideal at this point

Support and contact details

Have a bug or an issue with this application? Open a new issue here on GitHub.

Technologies Used

HTML, CSS, JavaScript, Bootstrap, Open5e API NodeJs Webpack Jquery

License

Licensed under the MIT license Copyright (c) 2020 Daniel Merys, Mark Gridley, Reid Ashwill, Tyler Bates, Tyler Bowerman

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •