
EDIT By Riley D. (Admin): In case anyone comes across this, there is a new version of this that you need to use as of 1/17/2017: https://gist.github.com/rileydutton/f3d099af317734...
update 1.32: Mass import for summons
- Fixed: Mass import should now also work for player summons
update 1.31: Fix for 'BUSY' after a single generation
- Fixed: 'BUSY' state after a single generation, a silly mistake really.
update v1.3: Feature add
- Added: Auto-sizing. Now CGen will scan the size of the imported creature and store this in the 'Size' attribute, this will be used to automatically size the token during drag-drop auto-population. Note that if context such as 'Space 10ft.' exists, it'll use that size parameter as opposed to 'Medium','Small','Huge' etc.. Also note that sizes smaller than medium (which is considered 1 unit square) are not illustrated, but sizes larger than medium (2x2 Large,3x3 Huge,4x4 Gargantuan,6x6 Colossal) are illustrated. For tokens generated without the size attribute, or if it is invalid or missing, there is no auto-sizing. As an added bonus, it'll know the unit scale of the page on which the token resides and will size appropriately.
- Added: Mass-Import. Now you can transmogrify pages with numerous tokens, select all tokens on a page, and mass-import them. This is ideal for moving around your monster databases. Note that this will NOT work for 'summons' for players. There is also a very rare race condition that will sometimes occur which I haven't pinned my thumb on where CGen will get stuck in the 'Busy' state (a lock to prevent multiple CGen operations during a mass import). To resolve this, simply re-save the script, if you could describe in detail what you did in a post that would help too.
update v1.25: Minor updates
- Fixed an issue with attacks with names like 'orc double axe' where it would attempt to parse 'or' in orc. where 'or' only looked for a word boundary on the right. It was to accommodate minor PRD errors where it wouldn't properly place 'or' as it's own word due to poor formatting.
- Added Fast healing to defenses
- Added Aura to defenses
- Removed the name 'API' from sendChat in cgen_confirm.js as in the new update on dev server, it displays sender name for the /desc command for messages sent from the script.
update v1.21: Urgent bug fix
- Fixed an urgent bug for the added perception check that outright breaks 1.2
update v1.2 : Quality of life fixes:
- Fixed bug were CGen could parse 'Sp' 'Ex' 'Su' rather than '(Sp)' '(Ex)' '(Su)' .
- Fixed bug where it would not parse (EX) (SP) (SU) due to case sensitivity.
- Fixed bug due to improper parsing of HTML entities %3Cbr -> %3Cbr%3E so it properly parses <br> rather than just <br which it should have always done...
- Fixed bug where cgen_tmp and the default template within the script were out of sync where if you didn't choose an alternate template, the default would have an old align-right behavior for Attack: and Damage:
- Added parsing of 'Perception' if Perception was not a listed skill (often context bonuses such as '+4 when in forests' are only in the skill section.)
- Added formatting in the journal to make popping out the journal more viable to 'eagle view' on statblocks when needed.
- Added a warning if the created journal entry was unable to accept the token's image source.
update v1.01:
- Added regeneration as a defensive ability to be shown in 'defenses'
Running a game takes a lot of effort on the part of any GM. You prep the maps, the tokens, the story, the hand outs.. And finally you prep the baddies your players will fight.
Now we usually look at stat-blocks and wing it from there with some forethought as to the tactics and abilities employed, but to automate the process, many of us create a number of macros to speed up the game process. This works wonders during the session, but consumes a good chunk of time that at least I, would rather spend world building and developing interesting scenarios.
Peter W.'s script caught my eye in that it automatically imported many of the attacks that I commonly used, but it had some quirks with certain statblocks. In the end however, It saved a huge chunk of time as long as I could get the statblock to confirm with how the script expected it to be processed. I give him major props for the outline on how to parse the stat block.
I ended up writing up a script to do just that, and bit by bit I handled many of the cases where Peter's script choked up on. Towards the end, I asked for for some artistic help from Russ H. , Rhyannon, Alan H., and Gabriel P. for the templates this script uses.
The script works in a menu like system where it simplifies the statblock from general creature abilities down to more specific abilities. This was done to quickly access abilities in the middle of combat as opposed to say navigating an entire character sheet.
Attacks are usually divided into 3 categories: Melee, Ranged, and Special. Attacks also come in what I call 'volleys' which for the monster statblocks as PF GMs know, are sets of full attacks. Usually volleys are separated by the keyword 'or' as it usually represents that the creature can either say take a full natural attack, or a full attack with a manufactured weapon. Take for instance the hound archon:

Where the script processes the first volley (bite,slam) and the second volley (mwk great sword with 2 iterative, bite) all from the attack string:

In addition, to help in the 'special' situations, it also gives contextual bonuses as tool-tips .

It doesn't add these bonuses. In this instance, it'll inform that if grappling, it's actually a +11 as opposed to the creature's normal CMB. The CMB command itself will just roll it's normal CMB. It does this for skills, feats, and special abilities as well.

Each defensive trait and ability has a link to quickly search the term on d20pfsrd. Save time on your game look up.

Also, if any ability has some special riders, it has a tool tip (CMD, speed, DR, DR will highlight white to indicate there's something more)

Sorcerer -> 2nd(4/day)
Bloodline-SLA -> At Will
Save time on spell casting baddies. Auto linking of spells with easily accessible caster level (CL) and concentration (CON) checks

Even has little rider messages to help you in killing.. .er challenging your players.

Each spell name themselves linking to the exact spell, it will handle lesser/greater/mass semantics and link to the correct base spell (greater dispel -> dispel's spell page)
In short yes. Easier to see than to explain.


Overall, it will compress complex stat blocks, into easily digestible token actions.
Go from this:

To this:

With little more than a copy, paste, and a click of a button. It also pulls statistics and other things stored in the attributes section of the journal entry.
How does it work? It's simply a parser that relies heavily on the formatting of the PRD stat block. It also requires that the stat block be well aligned. This means each ability is on one line as it does not tolerate wrapped text well at all. Things to look out for before you copy and paste are that spells lists and attacks are aligned (all 2nd level or 3rd level spells for example are on one line, not word wrapped on the next line). Using a text editor with line numbers displayed will work on this. I run linux so the basic text editors have this. For windows I'd recommend notepad++. I'm sure there's some MAC equivalent out there.






Once you have the token set up, you can simply execute !CreatureGen to be along your way; putting it in a macro makes this merely a click.





Auto-Confirm Crits It also adds auto crit confirms if you choose to add the companion script cgen_confirm.js


Super cool templates to theme your game just the way you want it. You can easily add your own! (include cgen_tmp.js)

There are also several wonderfully crafted design templates made by fellow Roll20 artists!
Complete your dungeon buddy theme... I'm serious. Alan's template and various attack templates have you covered!
Alan's Marketplace
Check out Russ' templates for an authentic old world feel to match his map packs!
Russ' Marketplace
Rhyannon's template is very slick, and perfectly match her dungeon tile-sets!
Rhyannon's Marketplace
Here are some macros that you may want to add to your hot bar to easily use this script:
By default, all creatures generated have the default name of 'creature' which is used for attacks unless the (!CreatureGen -name) option is used. This is on purpose as my players haven't identified the creature they're fighting. Once they get a knowledge check down, you can easily change the name attribute in the attributes section to describe what they identified.. or misidentified!

The script in addition, is hardened against API failure as all the menus and abilities are stored within ability macros on the character sheet itself! If the API ever goes down, you're good to keep going as long as you don't need to generate a new creature. Your generated creatures will still behave the same irregardless if the API server has crashed or stopped ensuring a smooth experience. This also brings up the issue of editing the macros; since these macros store HTML information, if you try to edit them, you'll sanitize the contents, breaking that ability. I'd recommend to never edit the abilities on the journals generated by this script.
https://github.com/Roll20KenL/Roll20_API_Scripts/b...
cgen_tmp.js
https://github.com/Roll20KenL/Roll20_API_Scripts/b...
cgen_confirm.js
https://github.com/Roll20KenL/Roll20_API_Scripts/b...
Good hunting game master...
update 1.32: Mass import for summons
- Fixed: Mass import should now also work for player summons
update 1.31: Fix for 'BUSY' after a single generation
- Fixed: 'BUSY' state after a single generation, a silly mistake really.
update v1.3: Feature add
- Added: Auto-sizing. Now CGen will scan the size of the imported creature and store this in the 'Size' attribute, this will be used to automatically size the token during drag-drop auto-population. Note that if context such as 'Space 10ft.' exists, it'll use that size parameter as opposed to 'Medium','Small','Huge' etc.. Also note that sizes smaller than medium (which is considered 1 unit square) are not illustrated, but sizes larger than medium (2x2 Large,3x3 Huge,4x4 Gargantuan,6x6 Colossal) are illustrated. For tokens generated without the size attribute, or if it is invalid or missing, there is no auto-sizing. As an added bonus, it'll know the unit scale of the page on which the token resides and will size appropriately.
- Added: Mass-Import. Now you can transmogrify pages with numerous tokens, select all tokens on a page, and mass-import them. This is ideal for moving around your monster databases. Note that this will NOT work for 'summons' for players. There is also a very rare race condition that will sometimes occur which I haven't pinned my thumb on where CGen will get stuck in the 'Busy' state (a lock to prevent multiple CGen operations during a mass import). To resolve this, simply re-save the script, if you could describe in detail what you did in a post that would help too.
update v1.25: Minor updates
- Fixed an issue with attacks with names like 'orc double axe' where it would attempt to parse 'or' in orc. where 'or' only looked for a word boundary on the right. It was to accommodate minor PRD errors where it wouldn't properly place 'or' as it's own word due to poor formatting.
- Added Fast healing to defenses
- Added Aura to defenses
- Removed the name 'API' from sendChat in cgen_confirm.js as in the new update on dev server, it displays sender name for the /desc command for messages sent from the script.
update v1.21: Urgent bug fix
- Fixed an urgent bug for the added perception check that outright breaks 1.2
update v1.2 : Quality of life fixes:
- Fixed bug were CGen could parse 'Sp' 'Ex' 'Su' rather than '(Sp)' '(Ex)' '(Su)' .
- Fixed bug where it would not parse (EX) (SP) (SU) due to case sensitivity.
- Fixed bug due to improper parsing of HTML entities %3Cbr -> %3Cbr%3E so it properly parses <br> rather than just <br which it should have always done...
- Fixed bug where cgen_tmp and the default template within the script were out of sync where if you didn't choose an alternate template, the default would have an old align-right behavior for Attack: and Damage:
- Added parsing of 'Perception' if Perception was not a listed skill (often context bonuses such as '+4 when in forests' are only in the skill section.)
- Added formatting in the journal to make popping out the journal more viable to 'eagle view' on statblocks when needed.
- Added a warning if the created journal entry was unable to accept the token's image source.
update v1.01:
- Added regeneration as a defensive ability to be shown in 'defenses'
Running a game takes a lot of effort on the part of any GM. You prep the maps, the tokens, the story, the hand outs.. And finally you prep the baddies your players will fight.
Now we usually look at stat-blocks and wing it from there with some forethought as to the tactics and abilities employed, but to automate the process, many of us create a number of macros to speed up the game process. This works wonders during the session, but consumes a good chunk of time that at least I, would rather spend world building and developing interesting scenarios.
Peter W.'s script caught my eye in that it automatically imported many of the attacks that I commonly used, but it had some quirks with certain statblocks. In the end however, It saved a huge chunk of time as long as I could get the statblock to confirm with how the script expected it to be processed. I give him major props for the outline on how to parse the stat block.
I ended up writing up a script to do just that, and bit by bit I handled many of the cases where Peter's script choked up on. Towards the end, I asked for for some artistic help from Russ H. , Rhyannon, Alan H., and Gabriel P. for the templates this script uses.
The script works in a menu like system where it simplifies the statblock from general creature abilities down to more specific abilities. This was done to quickly access abilities in the middle of combat as opposed to say navigating an entire character sheet.
Attacking?
Attacks -> Melee -> Bastard SwordAttacks are usually divided into 3 categories: Melee, Ranged, and Special. Attacks also come in what I call 'volleys' which for the monster statblocks as PF GMs know, are sets of full attacks. Usually volleys are separated by the keyword 'or' as it usually represents that the creature can either say take a full natural attack, or a full attack with a manufactured weapon. Take for instance the hound archon:

Where the script processes the first volley (bite,slam) and the second volley (mwk great sword with 2 iterative, bite) all from the attack string:
Melee bite +8 (1d8+3), slam +8 (1d4+1) or mwk greatsword +9/+4 (2d6+3), bite +3 (1d8+2)Attacks also often come with riders. CGen will automatically append any riders it finds such that you don't need to reference the effects. Private messaged to keep the effects secret! It handles multiple riders and will append with 'rider' text if the ability is listed in the special attacks or special abilities section.

In addition, to help in the 'special' situations, it also gives contextual bonuses as tool-tips .

It doesn't add these bonuses. In this instance, it'll inform that if grappling, it's actually a +11 as opposed to the creature's normal CMB. The CMB command itself will just roll it's normal CMB. It does this for skills, feats, and special abilities as well.

Defenses DR/SR or creature speed ?
Abilities -> DefensesEach defensive trait and ability has a link to quickly search the term on d20pfsrd. Save time on your game look up.

Also, if any ability has some special riders, it has a tool tip (CMD, speed, DR, DR will highlight white to indicate there's something more)

Magic?
Cleric -> 3rdSorcerer -> 2nd(4/day)
Bloodline-SLA -> At Will
Save time on spell casting baddies. Auto linking of spells with easily accessible caster level (CL) and concentration (CON) checks

Even has little rider messages to help you in killing.. .er challenging your players.

Each spell name themselves linking to the exact spell, it will handle lesser/greater/mass semantics and link to the correct base spell (greater dispel -> dispel's spell page)
Feats, Skills, Gear, SQ, Tactics?
In short yes. Easier to see than to explain.


Overall, it will compress complex stat blocks, into easily digestible token actions.
Go from this:

To this:

With little more than a copy, paste, and a click of a button. It also pulls statistics and other things stored in the attributes section of the journal entry.
How does it work? It's simply a parser that relies heavily on the formatting of the PRD stat block. It also requires that the stat block be well aligned. This means each ability is on one line as it does not tolerate wrapped text well at all. Things to look out for before you copy and paste are that spells lists and attacks are aligned (all 2nd level or 3rd level spells for example are on one line, not word wrapped on the next line). Using a text editor with line numbers displayed will work on this. I run linux so the basic text editors have this. For windows I'd recommend notepad++. I'm sure there's some MAC equivalent out there.
For PRD stat-blocks:

For d20PFSRD stat-blocks:

For d20PFSRD stat-blocks, be sure to align!


For Paizo PDF stat-blocks: (Please buy legit paizo PDFs at paizo.com, they made a wonderful game for us, and put much of the reference material online for everyone)


Once you have the token set up, you can simply execute !CreatureGen to be along your way; putting it in a macro makes this merely a click.
CGen is verbose:
It will tell you if something wrong has happened, without crashing the sandbox. The script is fault tolerant and will alert you if there is a problem with the stat-block, or if there's missing stat-block information (the most common is a missing concentration bonus for demons/devils; they're CHA based btw).


Auto-populate
In addition, The script will auto-populate tokens if you drag drop them from the journal bar. Easily allowing you to use a monster you generated to make quick encounters. Even better, you can drag a generated journal to the tabletop, and after it populates the copied stat block. Edit the stat-block, place various templates, change the name and then re-generate it! Profit! Easily add the advanced template or other bits to add additional variants without altering the original. It essentially re-generates off that newly created token's notes since the auto-populated data is a legal copy of the stat-block. Be sure to change the name though, so if you edited this copy's statblock to have the advanced template, change the name to 'advanced wolf' or something on the lines else you'll have duplicate journal entries, which will confuse the script. If there are two journals named 'john' and the marco invokes %{john|attacks} .. it would do odd things clearly.
Summons
It can do summons by whispering directly to the player the various menus. Easily manage summons once you tell your players how it works. Be aware that this is tied to Display Name not player name, so if their Display Name changes, you'll need to regenerate. Once you work this out with your players, you can settle on a single chosen name for all their summons. Summoned creature's attack riders as well as special attacks will be displayed as public as opposed to a whisper which is normally done for normal CGen creatures.
Auto-Confirm Crits It also adds auto crit confirms if you choose to add the companion script cgen_confirm.js


Super cool templates to theme your game just the way you want it. You can easily add your own! (include cgen_tmp.js)

There are also several wonderfully crafted design templates made by fellow Roll20 artists!
Complete your dungeon buddy theme... I'm serious. Alan's template and various attack templates have you covered!
Alan's Marketplace
Check out Russ' templates for an authentic old world feel to match his map packs!
Russ' Marketplace
Rhyannon's template is very slick, and perfectly match her dungeon tile-sets!
Rhyannon's Marketplace
A very special thanks to the artists who helped make this possible! If you want to express thanks for this script, please buy their tiles and map sets!
Here are some macros that you may want to add to your hot bar to easily use this script:
CGen !CreatureGen CGen-Name !CreatureGen -name ?{name} CGen-Summon !CreatureGen -player ?{display-name} CGen-menu !CreatureGen -help
Special Notes:
By default, all creatures generated have the default name of 'creature' which is used for attacks unless the (!CreatureGen -name) option is used. This is on purpose as my players haven't identified the creature they're fighting. Once they get a knowledge check down, you can easily change the name attribute in the attributes section to describe what they identified.. or misidentified!

The script in addition, is hardened against API failure as all the menus and abilities are stored within ability macros on the character sheet itself! If the API ever goes down, you're good to keep going as long as you don't need to generate a new creature. Your generated creatures will still behave the same irregardless if the API server has crashed or stopped ensuring a smooth experience. This also brings up the issue of editing the macros; since these macros store HTML information, if you try to edit them, you'll sanitize the contents, breaking that ability. I'd recommend to never edit the abilities on the journals generated by this script.
SCRIPTS
cgen.jshttps://github.com/Roll20KenL/Roll20_API_Scripts/b...
cgen_tmp.js
https://github.com/Roll20KenL/Roll20_API_Scripts/b...
cgen_confirm.js
https://github.com/Roll20KenL/Roll20_API_Scripts/b...
Good hunting game master...