This is a site for discussing roleplaying games. Have fun doing so, but there is one major rule: do not discuss political issues that aren't directly and uniquely related to the subject of the thread and about gaming. While this site is dedicated to free speech, the following will not be tolerated: devolving a thread into unrelated political discussion, sockpuppeting (using multiple and/or bogus accounts), disrupting topics without contributing to them, and posting images that could get someone fired in the workplace (an external link is OK, but clearly mark it as Not Safe For Work, or NSFW). If you receive a warning, please take it seriously and either move on to another topic or steer the discussion back to its original RPG-related theme.

5e - Because, Data? - Nerd Alert!

Started by mcbobbo, August 28, 2014, 08:56:19 PM

Previous topic - Next topic

mcbobbo

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
"It is the mark of an [intelligent] mind to be able to entertain a thought without accepting it."

Scott Anderson

With no fanfare, the stone giant turned to his son and said, "That\'s why you never build a castle in a swamp."

TheShadow

You can shake your fists at the sky. You can do a rain dance. You can ignore the clouds completely. But none of them move the clouds.

- Dave "The Inexorable" Noonan solicits community feedback before 4e\'s release

mcbobbo

Thanks guys.

I'm super disappointed to discover that not only do I have to subscribe as a Mentor to get Roll20 to import the data, but I'm going to have to hack up the  API code myself.

But I'm close.  I can create attributes free-form, I just need to add setting existing ones and some handling for names and stuff...

When I get that I'll post the Powershell for formatting the command and the API script.
"It is the mark of an [intelligent] mind to be able to entertain a thought without accepting it."

mcbobbo

"It is the mark of an [intelligent] mind to be able to entertain a thought without accepting it."

mcbobbo

Newest version of the parse script.  This one generates one file per entry, formatted for use in the Roll20 API work I've been doing.
"It is the mark of an [intelligent] mind to be able to entertain a thought without accepting it."

mcbobbo

Looks like the attachment got lost, so I scrounged up a copy and reposted here...
"It is the mark of an [intelligent] mind to be able to entertain a thought without accepting it."

estar

Quote from: mcbobbo;783551Anyway, there it is.  Script is attached.  Let me know if you have questions.


Enjoy,  Bob

Actually you can release it, just go the SRD and use it list of monsters and axe anything that not on it. I believe that you will be mostly adding monster.

mcbobbo

Quote from: estar;899858Actually you can release it, just go the SRD and use it list of monsters and axe anything that not on it. I believe that you will be mostly adding monster.

Excellent point, I could
"It is the mark of an [intelligent] mind to be able to entertain a thought without accepting it."