The Dungeons and Dragons 5th Edition SRD converted to markdown and json
btmorton / dnd-5e-srd Goto Github PK
View Code? Open in Web Editor NEWThe Dungeons and Dragons 5th Edition SRD converted to markdown, json and yaml
License: Other
The Dungeons and Dragons 5th Edition SRD converted to markdown, json and yaml
License: Other
"Adult Brass Dragon": {
"content": [
"*Huge dragon, chaotic good*",
"**Armor Class** 18 (natural armor)",
"**Hit Points** 172 (15d12 + 75)",
"**Speed** 40 ft., burrow 30 ft., fly 80 ft.",
"***Breath Weapons (Recharge 5–6).*** The dragon uses one of the following breath weapons:",
"**Fire Breath.** The dragon exhales fire in an 90-foot line that is 10 feet wide. Each creature in that line must make a DC 21 Dexterity saving throw, taking 56 (16d6) fire damage on a failed save, or half as much damage on a successful one.",
"**Sleep Breath.** The dragon exhales sleep gas in a 90-foot cone. Each creature in that area must succeed on a DC 21 Constitution saving throw or fall unconscious for 10 minutes. This effect ends for a creature if the creature takes damage or someone uses an action to wake it.",
"***Change Shape.*** The dragon magically polymorphs into a humanoid or beast that has a challenge rating no higher than its own, or back into its true form. It reverts to its true form if it dies. Any equipment it is wearing or carrying is absorbed or borne by the new form (the dragon’s choice).",
"In a new form, the dragon retains its alignment, hit points, Hit Dice, ability to speak, proficiencies, Legendary Resistance, lair actions, and Intelligence, Wisdom, and Charisma scores, as well as this action. Its statistics and capabilities are otherwise replaced by those of the new form, except any class features or legendary actions of that form.",
{
"table": {
"STR": [
"23 (+6)"
],
"DEX": [
"10 (+0)"
],
"CON": [
"21 (+5)"
],
"INT": [
"14 (+2)"
],
"WIS": [
"13 (+1)"
],
"CHA": [
"17 (+3)"
]
}
},
"**Saving Throws** Dex +5, Con +10, Wis +6, Cha +8",
"**Skills** History +7, Perception +11, Persuasion +8, Stealth +5",
"**Damage Immunities** fire",
"**Senses** blindsight 60 ft., darkvision 120 ft., passive Perception 21",
"**Languages** Common, Draconic",
"**Challenge** 13 (10,000 XP)",
"***Legendary Resistance (3/Day).*** If the dragon fails a saving throw, it can choose to succeed instead.",
"**Actions**",
"***Multiattack.*** The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws.",
"***Bite.** Melee Weapon Attack:* +11 to hit, reach 10 ft., one target. *Hit:* 17 (2d10 + 6) piercing damage.",
"***Claw.** Melee Weapon Attack:* +11 to hit, reach 5 ft., one target. *Hit:* 13 (2d6 + 6) slashing damage.",
"***Tail.** Melee Weapon Attack:* +11 to hit, reach 15 ft., one target. *Hit:* 15 (2d8 + 6) bludgeoning damage.",
"***Frightful Presence.*** Each creature of the dragon’s choice that is within 120 feet of the dragon and aware of it must succeed on a DC 16 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature’s saving throw is successful or the effect ends for it, the creature is immune to the dragon’s Frightful Presence for the next 24 hours.",
"***Breath Weapons (Recharge 5–6).*** The dragon uses one of the following breath weapons.",
"**Fire Breath.** The dragon exhales fire in an 60-foot line that is 5 feet wide. Each creature in that line must make a DC 18 Dexterity saving throw, taking 45 (13d6) fire damage on a failed save, or half as much damage on a successful one.",
"**Sleep Breath.** The dragon exhales sleep gas in a 60-foot cone. Each creature in that area must succeed on a DC 18 Constitution saving throw or fall unconscious for 10 minutes. This effect ends for a creature if the creature takes damage or someone uses an action to wake it.",
"**Legendary Actions**",
"The dragon can take 3 legendary actions, choosing from the options below. Only one legendary action option can be used at a time and only at the end of another creature’s turn. The dragon regains spent legendary actions at the start of its turn.",
"**Detect.** The dragon makes a Wisdom (Perception) check.",
"**Tail Attack.** The dragon makes a tail attack.",
"**Wing Attack (Costs 2 Actions).** The dragon beats its wings. Each creature within 10 feet of the dragon must succeed on a DC 19 Dexterity saving throw or take 13 (2d6 + 6) bludgeoning damage and be knocked prone. The dragon can then fly up to half its flying speed."
]
},
It should be possible to process the weapons, armor, equipment, tools, magic items, traps and poisons lists (possible also others) to create more usable JSON objects from them. Possibly following this interface?
interface Item {
name: string;
type: string;
magic: string;
weight: number;
text: Array<string>;
roll?: string;
ac?: string; // Armor Class
stealth?: boolean; // Stealth for armor
dmg: string?; // for weapons
dmg2: string?; // for weapons
dmgType: string?; // for weapons
property: string;
value?: string; // for priced items
range?: string; // for weapons
strength?: string; // for weapons
modifier?: string; // for magic items
}
The two sections mentioned seem to be pretty mixed up. I might try fixing it myself later, but thought I'd bring it up in the event someone else can get to it first.
It should be possible to process the classes to create more usable JSON objects from them. Possibly following this interface?
interface Class {
name: string;
hd: number; // Hit Dice Value
proficiency: string; // Saving Throw Proficiency
spellAbility?: string; // Spellcasting Ability
spellSlots?: { [level: number]: { [spellLevel: number]: number } }; // Object representing spell slot levels at each level, with cantrips at 0
levelFeatures: { [level: number]: Array<string> }; // Class features separated by level
}
This regex flags the bad entries: \*\*Armor Class\*\*.+\*\*Speed\*\*.+
They include the awakened shrub, the giant rat, and at least 5 others
Under the "content" section of each monster, their senses can be found in lines with the prefix **Senses**
, however there are two that differ:
Both of these have **Sense**s
rather than **Senses**
[edit] edited to escape markdown when showing different formatting.
Curious to know the origins of the data, for legal reasons, how to verify its only SRD. Thx!
Dragon Turtle, Drider, Dryad & Duargar are not Metallic Dragons, yet they are categorised as such. See https://github.com/BTMorton/dnd-5e-srd/blob/master/json/11%20monsters.json#L4067
One of the rows of text in the Water Elemental entry comes out as an array for some reason:
[
"4) bludgeoning damage. If it is Large or smaller, it is also grappled (escape DC 14). Until this grapple ends, the target is restrained and unable to breathe unless it can breathe water. If the saving throw is successful, the target is pushed out of the elemental’s space."
],
It should be possible to process the spells list to create more usable JSON objects from them. Possibly following this interface?
interface Spell {
name: string;
level: number;
components: string;
duration: string;
classes: Array<string>;
text: Array<string>;
school: string;
ritual: boolean;
time: string; // Casting time
roll?: string; // Dice roll for this spell
range: string;
}
"Quipper": {
"content": [
"*Tiny beast, unaligned*",
"**Armor Class** 13",
"**Hit Points** 1 (1d4 − 1)",
"**Speed** 0 ft., swim 40 ft.",
"**STR DEX CON**",
"2 (−4) 16 (+3) 9 (−1)",
"**Senses** darkvision 60 ft., passive Perception 8",
"**Languages** —",
"**Challenge** 0 (10 XP)",
"***Blood Frenzy.*** The quipper has advantage on melee attack rolls against any creature that doesn’t have all its hit points.",
"***Water Breathing.*** The quipper can breathe only underwater.",
"**Actions**",
"***Bite.** Melee Weapon Attack:* +5 to hit, reach 5 ft., one target. *Hit:* 1 piercing damage.",
"A **quipper** is a carnivorous fish with sharp teeth. Quippers can adapt to any aquatic environment, including cold subterranean lakes. They frequently gather in swarms; the statistics for a swarm of quippers appear later in this appendix."
]
},
Ankheg & Azer are not Animated Objects, yet they are categorised as such. See
https://github.com/BTMorton/dnd-5e-srd/blob/master/json/11%20monsters.json#L696
For blocks like this:
"Half-Orc": {
"Half-Orc Traits": {
"content": [
"Your half-orc character has certain traits deriving from your orc ancestry.",
"***Ability Score Increase.*** Your Strength score increases by 2, and your Constitution score increases by 1.",
"***Age.*** Half-orcs mature a little faster than humans, reaching adulthood around age 14. They age noticeably faster and rarely live longer than 75 years.",
"***Alignment.*** Half-orcs inherit a tendency toward chaos from their orc parents and are not strongly inclined toward good. Half-orcs raised among orcs and willing to live out their lives among them are usually evil.",
"***Size.*** Half-orcs are somewhat larger and bulkier than humans, and they range from 5 to well over 6 feet tall. Your size is Medium.",
"***Speed.*** Your base walking speed is 30 feet.",
"***Darkvision.*** Thanks to your orc blood, you have superior vision in dark and dim conditions. You can see in dim light within 60 feet of you as if it were bright light, and in darkness as if it were dim light. You can’t discern color in darkness, only shades of gray.",
"***Menacing.*** You gain proficiency in the Intimidation skill.",
"***Relentless Endurance.*** When you are reduced to 0 hit points but not killed outright, you can drop to 1 hit point instead. You can’t use this feature again until you finish a long rest.",
"***Savage Attacks.*** When you score a critical hit with a melee weapon attack, you can roll one of the weapon’s damage dice one additional time and add it to the extra damage of the critical hit.",
"***Languages.*** You can speak, read, and write Common and Orc. Orc is a harsh, grating language with hard consonants. It has no script of its own but is written in the Dwarvish script."
]
}
},
It would be helpful if the headings were processed out of the text strings. The ***
could also be removed to provide a more usable data structure.
The Doppelganger is not a Dinosaur, yet it's categorised as such. See https://github.com/BTMorton/dnd-5e-srd/blob/master/json/11%20monsters.json#L2142
Delayed Blast Fireball should be a 7th level Wiz/Sorc spell, per the SRD.
https://media.wizards.com/2016/downloads/DND/SRD-OGL_V5.1.pdf
do you have a tool for parsing the data from the PDF?
Per the SRD, Resilient sphere is a 4th level wizard spell.
It should be possible to process the monsters, creatures and NPCs list to create more usable JSON objects from them. Possibly following this interface?
interface Monster {
name: string;
size: string; // one of "S", "M", "L", "H", "G"
type: string;
alignment: string;
ac: number; // Armour class
hp: string; // Number with dice rolls
speed: string;
str: number;
dex: number;
con: number;
int: number;
wis: number;
cha: number
save: string;
skill?: string;
resist?: string;
vulnerable?: string;
immune?: string;
conditionImmune?: string
senses?: string;
passive: number; // Passive Perception
languages?: string;
cr: number; // Challenge Rating
trait?: Array<string>; // list of monster features
action?: Array<Action>; // list of actions
legendary?: Array<Action>; // list of legendary actions
spells?: string
}
interface Action {
name: string;
text: string;
attack?: string;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.