Downloads
<< Back To Downloads

Enchanted Realms API for Roll20

Download API File (Zip)

All input lines or macros must begin with “!enchantR” to notify the API, followed by the command and parameters. Below are a series of available commands.

Characters and Tokens
Command:--avatar!enchantR --avatar @{selected|token_id}
  Parameter 1:tokenID
  This allows details of the object to be displayed. The tokenID parameter is the “token id” of the object to be inspected.
 
Command:--clearTokenMarkers!enchantR --clearTokenMarkers @{selected|token_id}
  Parameter 1:tokenID
  This locates the token by the “token id” and removes all status markers, custom and legacy
 
Command:--changeStatus!enchantR --changeStatus @{selected|token_id} {status_yellow,true}
  Parameter 1:tokenID
  Parameter 2:Status_marker code
  This locates the token by the “token id” passed by parameter one and applies the status change defined in the second parameter. This is for legacy (original) status markers only.
 
Command:--changeTokenMarkers!enchantR --changeTokenMarkers @{selected|token_id} charmed true
  Parameter 1:tokenID
  Parameter 2:Custom Marker name
  Parameter 3:Boolean to turn on or off
  This locates the token by the “token id” passed by parameter one and applies the marker from second parameter. This is for custom markers only.
 
Command:--character!enchantR --character @{selected|token_id}
  Parameter 1:tokenID
  This allows details of the character of the token object to be displayed. The tokenID parameter is the “token id” of the object to be inspected.
 
Command:--deathSave!enchantR --deathSave @{target|token_id}
  Parameter 1:tokenID
  When the targeted token is below 0 body points, this macro rolls a death save for stability or continued decline
 
Command:--listTokenMarkers!enchantR --listTokenMarkers @{selected|token_id}
  Parameter 1:tokenID
  Displays all the token markers for the object, custom and legacy
 
Command:--perception!enchantR --perception @{selected|token_id} 11
  Parameter 1:tokenID (multiple selected tokens permitted)
  Parameter 2:DC
  Makes perception checks for all selected tokens
 
Command:--preservationsave!enchantR --preservationSave @{target|token_id} body<8+d4 SONIC-BLAST deaf
  Parameter 1:tokenID
  Parameter 2:Dice Formula
  Parameter 3:Name of Effect
  Parameter 4:Custom Marker name
  Parameter 5:Optional Number Marker
  This performs a preservation save for the target token, then applies the token marker if failed.
 
Command:--setBar!enchantR --setBar @{selected|token_id} body -3
  Parameter 1:tokenID
  Parameter 2:Stat [body|mind|spirit]
  Parameter 3:Adjustment
  Parameter 4:Optional Boolean to set limit not to exceed maximum
  This alters the value linked to the body, mind or spirit bar by the adjustment amount. If the fourth parameter is true, then positive numbers will not allow the current value to exceed the maximum.
 
Command:--selectSide!enchantR --selectSide @{selected|token_id} 0
  Parameter 1:tokenID
  Parameter 2:index
  This changes the side of a multi-image token, as selected by its “token id” in the first parameter. It will be set to the index of the images based on the value of the second parameter. The index is zero-based.
 
Command:--tokenModifier!enchantR --tokenModifier @{selected|token_id} attackBonus 2
  Parameter 1:tokenID
  Parameter 2:Custom Marker name
  Parameter 3:Number to add as a modifier
  This is similar to --changeTokenMarkers except it applies a number. This is for custom markers only.
 
Combat
Command:--normalAttack!enchantR --normalAttack @{selected|token_id} @{target|token_id} 1 normal
  Parameter 1:tokenID (attacker)
  Parameter 2:tokenID (victim)
  Parameter 3:Number weapon attack from character sheet
  Parameter 4:Optional Advantage flag with default being normal. Values: [normal|adv|dis]  (This may be overridden by the conditions of token Markers)
  The reads the information from the attacking token to determine the type of attack set on the combat tab and uses those values, weapons, styles and number of attacks against the appropriate defenses of the victim’s character sheet. Both tokens must be related to a character sheet, even if the token is a mook. It then evaluates the rolls and applies the proper damage and special status changes as needed.
 
Command:--alternAttack!enchantR --alternAttack @{selected|token_id} @{target|token_id} normal melee 2 d20 blunt silver anyRaw>=18%20Heavy
  Parameter 1:tokenID (attacker)
  Parameter 2:tokenID (victim)
  Parameter 3:Advantage flag
  Parameter 4:Range or Melee
  Parameter 5:Number of Dice to Roll
  Parameter 6:Dice Formula
  Parameter 7:Damage Type
  Parameter 8:Weapon Type
  Parameter 9:Optional Special Formula
  The takes the input to evaluate the information from the input and uses it against the appropriate defenses of the victim’s character sheet. Both tokens must be related to a character sheet, even if the token is a mook. It then evaluates the rolls and applies the proper damage and special status changes as needed. It is best to use this with a queryable macro to ensure the splitting of parameters is set correctly.
 
Command:--boost!enchantR --boost @{selected|token_id} d1+1 body
  Parameter 1:tokenID
  Parameter 2:Dice Formula
  Parameter 3:Quality To Boost
  This adds the dice formula back to the stat of the token lined by the first parameter’s “token id”
 
Command:--grab!enchantR --grab @{selected|token_id} @{target | token_id} +3 normal normal
  Parameter 1:tokenID (attacker)
  Parameter 2:tokenID (victim)
  Parameter 3:Environmental modifier
  Parameter 4:Optional Advantage flag for attacker
  Parameter 5:Optional Advantage flag for victim
  Resolves a grappling competition.
 
Command:--heal!enchantR --heal @{selected|token_id} 2d4 body
  Parameter 1:tokenID
  Parameter 2:Dice Formula
  Parameter 3:Quality To Heal
  This add temporary points from the dice formula to the stat of the token lined by the first parameter’s “token id” and can exceed the maximum value
 
Game Date and Time
Command:--adjustGameTime!enchantR --adjustGameTime +h 2
  Parameter 1:datePart operation [+][h|d|m|y][=]
  Parameter 2:Value
   This increases or sets a datePart (hour, day, month or year) the value of the second parameter. The example increases the game time by two hours. Another example would be “d= 3” to set the day precisely to the 3rd day of the month.
 
Command:--defineGameTime!enchantR --defineGameTime 223 4 25 15
  Parameter 1:Year
  Parameter 2:Month
  Parameter 3:Day
  Parameter 4:Hour
  This is a four-parameter method for setting the exact game time. The example sets the current Game Time to 3PM on April 25 for the year 223.
 
Command:--showGameTime!enchantR --showGameTime
  This outputs the values of the game world date and current hour as stored in the Campaign object.
 
Initiative
Command:--groupInit!enchantR --groupInit
  This finds all the currently selected tokens and adds them to the Turn Order. It reads the token represents to find the character sheet and uses the adjustments set on the sheet for any variances from the standard 2d10.
 
Command:--nextInit!enchantR --nextInit
  This increments the second counter of the combat round. When reaching past 20, it automatically calls the resetInit command. This is very handy to set as a macro button.
 
Command:--tokenInit!enchantR --tokenInit @{target | token_id}
  Parameter 1:tokenID
  This allows a token not in the combat to enter, using modified values based ont he current initiative value. It also permits a re-roll of an existing token if there was a mistake.
 
Other
Command:--moonBlink!enchanted --moonBlink @{selected|token_id}
  Parameter 1:tokenID
  This moves the token associated with the “token id” of the parameter in a random direction by 20 feet.
 
Command:--playSxList!enchanted --playSxList CombatMx
  Parameter 1:PLaylist Name
  Starts playlist
 
Command:--playTrack!enchanted --playTrack Blessing04
  Parameter 1:Name of Track
  Plays sound for a track of the passed name
 
Command:--setTrackVolume!enchanted --setTrackVolume 50 Blessing04
  Parameter 1:Volume Level (1 - 100)
  Parameter 2:Name of Track
  Sets the volume for a specific track
 
Command:--stopSound!enchanted --stopSound
  Stops all sound/music
 
<< Back To Downloads