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

Ack! Questions about one-click process

1603043279

Edited 1603046392
David M.
Pro
API Scripter
So, it was just brought to my attention that I have inadvertently put three of my scripts into the one-click menu, when this was not my intention. I was under the impression that there was some type of additional submission process, when it looks like it just needs to exist in the Roll20 api repository. All of my documentation is only in the relevant forum threads, so there is currently nothing available on the script library page, which is obviously a potential source of frustration for folks.  Do I just need to add a readme to the repository or something? It seems some existing scripts have a readme.md and others do not, yet still have documentation in the script library. What is the recommended process for this? Also, is there something I need to do to allow for auto-updating new versions of my scripts that are on there? So if someone has it installed through one-click and I send an update to the Roll20 repo, will that person's copy update accordingly? None of the scripts currently use the State object, so I'm not worried about conflicting state definitions at the moment. Anyway, any help would really be appreciated!  EDIT - For documentation on the script library page, looks like I just add to the description field in the script.json file. 
1603047246

Edited 1603047399
David M.
Pro
API Scripter
Are there any problems with adding certain characters to the description field in the script.json file? From looking at other scripts, it looks like I can add \r for carriage return and ** ** notation for bold, as in formatting text chat. I'd want to output double brackets {{ }}, square brackets [[ ]], greater/less than < >, single quotes ', and forward slashes //, to replicate something like the following: ! Spawn {{ -- name | < charName > //(REQUIRED) name of the character whose target we want to spawn -- targets | < # > //Destination override. Instead of using selected token(s) as origin, use target token(s) -- qty | < # > // DEFAULT = 1 . How many tokens to spawn at each origin point. MAX = 20                                         //supports hardcoded and rollable table inline rolls such as [[ 1d6 ]] and [[ 1t[tableName] ]] -- offset | < #,# >         //X,Y pos or neg shift in position of the spawn origin point(s) relative to the origin token(s), in number of SQUARES                                         //DEFAULT = 0,0 // (NOTE: a POSITIVE Y offset means LOWER on the map) -- placement | < option > //How to arrange the tokens relative to the origin point (+ offset). Options are: //' stack ' : (DEFAULT) All tokens will be stacked on top of each other //' row ' : A horizontal row of tokens //' column , col ' : A vertical column of tokens //' surround ' : A clockwise spiral placement around origin token, starting at top (NOTE: any supplied offset will be ignored) //' grid #' : A square grid with "#" tokens per row. Raster left to right //' burst #' : An expanding diagonal distribution of tokens starting "#" squares from the 4 origin token corners. Large qty will form an "X" pattern // 'cross #' = "evenly" distributed vert/horiz cross pattern, starting directly above origin by # squares. Large qty will form a "+" pattern -- size | < #,# >                // DEFAULT = 1,1 (X,Y) - How many SQUARES wide and tall are the spawned tokens? -- side | < # or rand >           // DEFAULT = 1 . Sets the side of a rollable table token.             // # : Sets the side of all spawned tokens to "#"                                                 // 'rand,random' : Each spawned token will be set to a random side -- order | < option >             //The z-order of the token. (NOTE: a recent Roll20 "feature" will always put character tokens with sight above those without, so YMMV.)                                                 // toFront,front,top,above   : Spawn token moved to front                                                 // toBack,back,bottom,below : Spawn token moved to back -- light | < #,# >                //Set light radius that all players can see. // For Legacy Dynamic Lighting (LDL):                                                  //First # is the total radius of the light (light_radius)                             //Second # is the start of dim light (light_dimradius) (so: 10,5 will be 10 ft of total light, with dim radius starting at 5ft) // For Updated Dynamic Lighting (UDL): //First # is the radius of bright light (bright_light_distance) //Second # is the additional radius of dim light (so: 10,5 will be 10ft of bright light + 5ft of dim light) -- mook | < yes/no >             // DEFAULT = false (the "represents" characteristic of the token is removed so changes to one linked attribute, e.g. hp, will not propagate to other associated tokens.                                                //If set to true, linked attributes will affect all tokens associated with that sheet -- force | < yes/no >             // DEFAULT = false . The origin point is by default relative to the geometric center of the origin token                                                 //Origin tokens of larger than 1x1 may spawn tokens in between squares, which may be strange depending on the specific case                                                 //Set to true in order to force the token to spawn in a full square -- sheet | < charName2 >         // DEFAULT = selected character . The character sheet in which to look for the supplied ability                                                 //useful if the ability exists on a "macro mule", etc. -- ability | < abilityName >        //The ability to trigger after spawning occurs. With caveats as described below --fx| < type-color > //Trigger FX at each origin point. //Supported types are: bomb,bubbling,burn,burst,explode,glow,missile,nova,splatter //Supported colors are: acid,blood,charm,death,fire,frost,holy,magic,slime,smoke,water --bar1| < currentVal/optionalMax > //overrides the token's bar1 current and max values. Max is optional. If overridden, bar1_link will be removed --bar2| < currentVal/optionalMax > //overrides the token's bar2 current and max values. Max is optional. If overridden, bar2_link will be removed --bar3| < currentVal/optionalMax > //overrides the token's bar3 current and max values. Max is optional. If overridden, bar3_link will be removed -- expand| < #frames, delay > //Animates the token during spawn. Expands from size = 0 to max size //#frames: how many frames the expansion animation will use. Start with something like 20 //delay: how many milliseconds between triggering each frame? Start with something like 50. Any less than 30 may appear instant }}
1603052175
Kurt J.
Pro
API Scripter
David M. said: Are there any problems with adding certain characters to the description field in the script.json file? From looking at other scripts, it looks like I can add \r for carriage return and ** ** notation for bold, as in formatting text chat. I'd want to output double brackets {{ }}, square brackets [[ ]], greater/less than < >, single quotes ', and forward slashes //, to replicate something like the following: ! Spawn {{ -- name | < charName > //(REQUIRED) name of the character whose target we want to spawn -- targets | < # > //Destination override. Instead of using selected token(s) as origin, use target token(s) -- qty | < # > // DEFAULT = 1 . How many tokens to spawn at each origin point. MAX = 20                                         //supports hardcoded and rollable table inline rolls such as [[ 1d6 ]] and [[ 1t[tableName] ]] -- offset | < #,# >         //X,Y pos or neg shift in position of the spawn origin point(s) relative to the origin token(s), in number of SQUARES                                         //DEFAULT = 0,0 // (NOTE: a POSITIVE Y offset means LOWER on the map) -- placement | < option > //How to arrange the tokens relative to the origin point (+ offset). Options are: //' stack ' : (DEFAULT) All tokens will be stacked on top of each other //' row ' : A horizontal row of tokens //' column , col ' : A vertical column of tokens //' surround ' : A clockwise spiral placement around origin token, starting at top (NOTE: any supplied offset will be ignored) //' grid #' : A square grid with "#" tokens per row. Raster left to right //' burst #' : An expanding diagonal distribution of tokens starting "#" squares from the 4 origin token corners. Large qty will form an "X" pattern // 'cross #' = "evenly" distributed vert/horiz cross pattern, starting directly above origin by # squares. Large qty will form a "+" pattern -- size | < #,# >                // DEFAULT = 1,1 (X,Y) - How many SQUARES wide and tall are the spawned tokens? -- side | < # or rand >           // DEFAULT = 1 . Sets the side of a rollable table token.             // # : Sets the side of all spawned tokens to "#"                                                 // 'rand,random' : Each spawned token will be set to a random side -- order | < option >             //The z-order of the token. (NOTE: a recent Roll20 "feature" will always put character tokens with sight above those without, so YMMV.)                                                 // toFront,front,top,above   : Spawn token moved to front                                                 // toBack,back,bottom,below : Spawn token moved to back -- light | < #,# >                //Set light radius that all players can see. // For Legacy Dynamic Lighting (LDL):                                                  //First # is the total radius of the light (light_radius)                             //Second # is the start of dim light (light_dimradius) (so: 10,5 will be 10 ft of total light, with dim radius starting at 5ft) // For Updated Dynamic Lighting (UDL): //First # is the radius of bright light (bright_light_distance) //Second # is the additional radius of dim light (so: 10,5 will be 10ft of bright light + 5ft of dim light) -- mook | < yes/no >             // DEFAULT = false (the "represents" characteristic of the token is removed so changes to one linked attribute, e.g. hp, will not propagate to other associated tokens.                                                //If set to true, linked attributes will affect all tokens associated with that sheet -- force | < yes/no >             // DEFAULT = false . The origin point is by default relative to the geometric center of the origin token                                                 //Origin tokens of larger than 1x1 may spawn tokens in between squares, which may be strange depending on the specific case                                                 //Set to true in order to force the token to spawn in a full square -- sheet | < charName2 >         // DEFAULT = selected character . The character sheet in which to look for the supplied ability                                                 //useful if the ability exists on a "macro mule", etc. -- ability | < abilityName >        //The ability to trigger after spawning occurs. With caveats as described below --fx| < type-color > //Trigger FX at each origin point. //Supported types are: bomb,bubbling,burn,burst,explode,glow,missile,nova,splatter //Supported colors are: acid,blood,charm,death,fire,frost,holy,magic,slime,smoke,water --bar1| < currentVal/optionalMax > //overrides the token's bar1 current and max values. Max is optional. If overridden, bar1_link will be removed --bar2| < currentVal/optionalMax > //overrides the token's bar2 current and max values. Max is optional. If overridden, bar2_link will be removed --bar3| < currentVal/optionalMax > //overrides the token's bar3 current and max values. Max is optional. If overridden, bar3_link will be removed -- expand| < #frames, delay > //Animates the token during spawn. Expands from size = 0 to max size //#frames: how many frames the expansion animation will use. Start with something like 20 //delay: how many milliseconds between triggering each frame? Start with something like 50. Any less than 30 may appear instant }} The description field appears to use Markdown notation, so you should be able to find a site where you can enter your text and get the markdown to paste into it.
1603122345
The Aaron
Roll20 Production Team
API Scripter
It is precisely as Kurt says. I believe it uses Github's flavor of markdown, so take a look for a cheat sheet of that variety. You'll need to escape any double quotes with a backslash, I believe, as well as making sure it is in a single line by joining all the text with \r instead of a raw carriage return. 
1603127561
David M.
Pro
API Scripter
Thanks, guys. I gave it a shot using the Token-mod and TokenActionMaker script.jsons to glean the markdown syntax, and made the pull request in time to get it merged this morning (got the confirmation email). However, when I look at the script library page and select the script from the dropdown, it does not seem to have any of my changes that are in the script.json description field. It's been a few hours. Is there some expected delay after the merge before this should be visible? One of the scripts I'm referring to is SpawnDefaultToken. Current script.json on Roll20 repo found here . I'm also a bit concerned because I put some < > characters in there, but just now read that > is used by Github markdown for "quoting a text". In hindsight, looks like I should have escaped them with a backslash. Also had double brackets. Should I have escaped those characters, as well? Might this be why my description doesn't seem to be updated on the script library page?
1603130502
The Aaron
Roll20 Production Team
API Scripter
The merge happens Monday, the deploy happens Tuesday. I'd look for your changes to show up tomorrow afternoon. You can copy yourself markdown out and put it (less any escapes) into a preview page. I usually use an extension, but I'm sure there are web based viewers. 
1603136330
David M.
Pro
API Scripter
Facepalm. Oh yeah, it's only Monday today, lol! It was a long weekend. Thanks! 
1603281252

Edited 1603281283
David M.
Pro
API Scripter
For anyone else following this, Andreas gave me the tip to test the output of the description markdown using the Custom Sheet Sandbox. It works great! Put the following in the Sheet.json editor, with the markdown text to be tested in the "instructions" field: { "html": "", "css": "", "authors": "", "roll20userid": "", "preview": "", "compendium": "", "instructions": " Here is where you paste your markdown text to be ", "patreon": "" } Example partial screenshots: Here is the output: