Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Dnd 4e Noob

So one of my players has gifted me, and I'll be upgrading to PRO for a few months, I've never used API before, but want to incorporate it into my game. I run a DnD 4e game weekly, what kinds of things can I do or add in? Also what other benefits does PRO give me?
1482730583
Lithl
Pro
Sheet Author
API Scripter
Powercards is a great  API script to use; it was originally designed for 4e, although it's more generalized now. Here's a very short script for automatically setting statusmarkers based on the bar values of the token. I think it's on the wiki somewhere, but it's not a one-click install script. This version was slightly modified by me to add the "exact" option: /**  * Set various token markers based on bar cur/max ratios  *   * The CONFIG array can have any number of configuration objects. These objects  * are processed in order.  *   * barId - The ID of the bar to look at the values for; [1, 2, 3]  * barRatio - The ratio of bar value to max value that triggers setting the  *            status marker; [0 - 1] if exact=false, any number when exact=true  * status - Name of the status marker to toggle; [red, blue, green, brown,  *          purple, dead, etc.]  * whenLow - The state of the marker when the bar value is <= the ratio; [true,  *           false] * exact - whether to treat barRatio as a percentage or exact value; [true, * false]  */ var statusManager = statusManager || {}; statusManager.CONFIG = [     {barId: 3, barRatio: .75, status: 'red', whenLow: true},     {barId: 3, barRatio: .25, status: 'purple', whenLow: true},     {barId: 3, barRatio: 5, status: 'black-flag', whenLow: true, exact: true},     {barId: 3, barRatio: 0, status: 'skull', whenLow: true}]; on('change:token', function(obj) {     statusManager.CONFIG.forEach(function(opts) {         var maxValue = parseInt(obj.get('bar' + opts.barId + '_max'));         var curValue = parseInt(obj.get('bar' + opts.barId + '_value'));         var markerName = 'status_' + opts.status;                  if(curValue != NaN)         {             if(opts.exact)             {                 obj.set(markerName, opts.whenLow && (curValue <= opts.barRatio));             }             else if (maxValue != NaN)             {                 obj.set(markerName, opts.whenLow && (curValue <= (maxValue * opts.barRatio)));             }         }     }); }); The above value for CONFIG is designed for an Unknown Armies campaign, where characters get penalties to attribute rolls at 75% health and 25% health (red an purple dots in this implementation, respectively), go unconscious at 5 health or below (black flag) regardless of what percentage that is (which is why I had to add the "exact" option), and die at 0 health. Here, health is being tracked on bar3 A CONFIG value suitable for 4e could be: statusManager.CONFIG = [     {barId: 1, barRatio: .5, status: 'red', whenLow: true},     {barId: 1, barRatio: 0, status: 'dead', whenLow: true}]; This would mark a token bloody at 50% and dead at 0% health, using bar1 to track health. This script will automatically remove a status when it no longer applies (eg, removes the bloodied marker when the character is healed above 50%). If you create a status with whenLow: false , you'll be able to have a marker appear only when the bar is above  a certain value, instead of below a value.
1482733731

Edited 1482766316
That will be super useful, also added easy exp (kinda works), status marker fx. Can't get area effects script to work though. Okay got the script to work, thanks again brian!