So today I did something rather rash, but I'm pretty happy with the result. I'm not certain I can share the data, but I can definitely share the methodology.
If there's a way to get permission to publish the data, I'm happy to - someone let me know.
Basically I pulled all the monsters from the DM's 5e Basic book into a table. Next step is to get it into Roll20, somehow, probably. But I'm getting ahead of myself.
Step 1 - Get the text out of the PDF. Foxit Reader took care of this step pretty handily.
Step 2 - Prune. I only wanted the monster and NPC pages. Text editor here.
Step 3 - Split. The page layout is in two columns, so I pulled it into Excel with a positional delimiter at 73 characters or so. Then I saved Column A as one text file and Column B as another.
Step 4 - Clean up and consolidate. Everything needs to be on one line - or rather one line per item of interest. So a given attack with poison gets all truncated down. Clean the left hand file, then the right. Move right's data into the left.
Step 5 - Unify the data. These columns should be on ever monster entry:
Name
Type, Alignment
Armor Class
Hit Points (Hit Dice)
Speed, fly, etc
STR DEX CON INT WIS CHA
# (+) # (+) # (+) # (+) # (+) # (+)
Saving Throws
Skills
Damage Vulnerabilities
Damage Resistances
Damage Immunities
Condition Immunities
Senses, passive Perception
Languages
Challenge (XP)
Qualities
Actions
Description
If there's no data, and I'm looking at you Saving Throws, use a filler, like (None Listed).
Step 6 - Parse. I used Powershell, because it's what I had. Might be a million ways to do it. My script is attached.
End result looks like this (using one they've already published openly):
Name : Ogre
Type : Large giant
Alignment : chaotic evil
AC : 11
ACText : hide armor
HP : 59
HD : 7d10 + 21
Speed : 40
Climb :
Fly :
Burrow :
Swim :
STR : 19
STRMod : +4
DEX : 8
DEXMod : -1
CON : 16
CONMod : +3
INT : 5
INTMod : -3
WIS : 7
WISMod : -2
CHA : 7
CHAMod : -2
STRSave :
DEXSave :
CONSave :
INTSave :
WISSave :
CHASave :
Arcana :
Athletics :
Deception :
Insight :
Intimidation :
Perception :
Stealth :
Survival :
DamageVulnerabilities :
DamageResistances :
DamageImmunities :
ConditionImmunities :
Senses : darkvision 60 ft.
PassivePerception : 8
Languages : Common, Giant
CR : 2
XP : 450
TheRest :
Actions
Greatclub. Melee Weapon Attack: +6 to hit, reach 5 ft., one target. Hit: 13 (2d8 + 4)
bludgeoning damage.
Javelin. Melee or Ranged Weapon Attack: +6 to hit, reach 5 ft. or range 30/120 ft., one
target. Hit: 11 (2d6 + 4) piercing damage.
Description
Ogres are hulking giants notorious for their quick tempers. When its rage is incited, an ogre
lashes out in a frustrated tantrum until it runs out of objects or creatures to smash.
Anyway, there it is. Script is attached. Let me know if you have questions.
Enjoy, Bob
If there's a way to get permission to publish the data, I'm happy to - someone let me know.
Basically I pulled all the monsters from the DM's 5e Basic book into a table. Next step is to get it into Roll20, somehow, probably. But I'm getting ahead of myself.
Step 1 - Get the text out of the PDF. Foxit Reader took care of this step pretty handily.
Step 2 - Prune. I only wanted the monster and NPC pages. Text editor here.
Step 3 - Split. The page layout is in two columns, so I pulled it into Excel with a positional delimiter at 73 characters or so. Then I saved Column A as one text file and Column B as another.
Step 4 - Clean up and consolidate. Everything needs to be on one line - or rather one line per item of interest. So a given attack with poison gets all truncated down. Clean the left hand file, then the right. Move right's data into the left.
Step 5 - Unify the data. These columns should be on ever monster entry:
Name
Type, Alignment
Armor Class
Hit Points (Hit Dice)
Speed, fly, etc
STR DEX CON INT WIS CHA
# (+) # (+) # (+) # (+) # (+) # (+)
Saving Throws
Skills
Damage Vulnerabilities
Damage Resistances
Damage Immunities
Condition Immunities
Senses, passive Perception
Languages
Challenge (XP)
Qualities
Actions
Description
If there's no data, and I'm looking at you Saving Throws, use a filler, like (None Listed).
Step 6 - Parse. I used Powershell, because it's what I had. Might be a million ways to do it. My script is attached.
End result looks like this (using one they've already published openly):
Name : Ogre
Type : Large giant
Alignment : chaotic evil
AC : 11
ACText : hide armor
HP : 59
HD : 7d10 + 21
Speed : 40
Climb :
Fly :
Burrow :
Swim :
STR : 19
STRMod : +4
DEX : 8
DEXMod : -1
CON : 16
CONMod : +3
INT : 5
INTMod : -3
WIS : 7
WISMod : -2
CHA : 7
CHAMod : -2
STRSave :
DEXSave :
CONSave :
INTSave :
WISSave :
CHASave :
Arcana :
Athletics :
Deception :
Insight :
Intimidation :
Perception :
Stealth :
Survival :
DamageVulnerabilities :
DamageResistances :
DamageImmunities :
ConditionImmunities :
Senses : darkvision 60 ft.
PassivePerception : 8
Languages : Common, Giant
CR : 2
XP : 450
TheRest :
Actions
Greatclub. Melee Weapon Attack: +6 to hit, reach 5 ft., one target. Hit: 13 (2d8 + 4)
bludgeoning damage.
Javelin. Melee or Ranged Weapon Attack: +6 to hit, reach 5 ft. or range 30/120 ft., one
target. Hit: 11 (2d6 + 4) piercing damage.
Description
Ogres are hulking giants notorious for their quick tempers. When its rage is incited, an ogre
lashes out in a frustrated tantrum until it runs out of objects or creatures to smash.
Anyway, there it is. Script is attached. Let me know if you have questions.
Enjoy, Bob
5e - Because, Data? - Nerd Alert!
Aucun commentaire:
Enregistrer un commentaire