character-sheet-app
character-sheet-app copied to clipboard
Spell Data
We could draw on an existing repo of spell data to offer some kind of spell picker and info pop up.
Might be tough for anything beyond the basic rule stuff as the rest may not be available to use.
Maybe just spell name autocomplete based on class/level.
This looks like it might be viable for some spell info:
http://www.dnd5eapi.co/docs/#
https://www.dnd5eapi.co/api/spells (spell list) https://www.dnd5eapi.co/api/spells?name=Sacred%20Flame (search) https://www.dnd5eapi.co/api/spells/sacred-flame (specific spell data)
Ideas:
- Modal that does spell lookups. Type, autocomplate. Select a spell to add it to the appropriate spell list (?).
- To avoid hitting the api everytime, we should store the data for spells added to a character.
- Would need to store the api's string for the spells... Or overwrite what the user types in.
- Add an icon that opens a modal with the spell info, so you can lookup spells.
- What about spells not in the srd?
You guys should take a look at https://github.com/morepurplemorebetter/MPMBs-Character-Record-Sheet Which has a lot of info, Class, Spells, Weapons, Items, Companions, and more!
@NeptuneRjo Gave you code a test (it's now merged to develop) and it seems fine to me. I've made two changes:
- Made the "Add spell" button smaller (add .btn-sm)
- Added the button to Cantrips list (seems to work if you pass level=0 to the api.
I'll release that soon. Maybe a future addition could be to add some kind of modal that would show info about the specific spells.
@derikb Didn't even think to try level=0 so good shout on that.
I'll take a look into the spell info stuff; shouldn't be too complicated and I'm enjoying working on this project so far.
@NeptuneRjo Sorry, somehow I thought I released this and then never did. Just made the release and will get it online shortly. Thanks for contributing.