https://wiki.roll20.net/api.php?action=feedcontributions&user=1223200&feedformat=atomRoll20 Wiki - User contributions [en]2024-03-28T22:56:01ZUser contributionsMediaWiki 1.20.3https://wiki.roll20.net/Useful_links_for_mappingUseful links for mapping2024-03-23T11:52:59Z<p>1223200: add Dungeon Scrawl, alphabetize some lists</p>
<hr />
<div>{{revdate}}Regardless of your photo-editing software of choice, here are some links to resources useful for map creation.<br />
{{#evp:youtube|TLJUVBHLV38?si&#61;dlOi6zEyJI2uIe9y|Real-time mapmaking with '''[https://www.dungeonscrawl.com/ Dungeon Scrawl]''' + Roll20(Sept. 2023)|right|500}}<br />
==Dungeon Scrawl==<br />
'''[https://www.dungeonscrawl.com/ Dungeon Scrawl]''' is a map tool that became a part of the Roll20 Family in 2023. There are plans of deeper integration between Roll20 and Dungeon Scrawl. <br />
<br />
* [https://app.roll20.net/forum/permalink/11620443/ Announcement + AMA: Dungeon Scrawl is now part of the Roll20 Family!]<br />
<br />
== Online Mapmaking Tools ==<br />
Here are some online map making tools that you can use to make maps for Roll20. <br /><br />
* '''[https://dungen.app/dungen/ DunGen]''' - free and high resolution Dungeon Generator, creates maps at 70px per tile and under 5mb to import directly into Roll20. Can now automatically generate Dynamic Lighting!<br />
* '''[https://www.dungeonfog.com DungeonFog]''' - Vector-based online mapmaker (free & premium) shareable maps & export for Roll20<br />
* '''[http://davesmapper.com/ Dave's Mapper]''' - fantasy and sci-fi map creator<br />
* '''[http://donjon.bin.sh Donjon]''' - both Dungeon map and general stuff generator (encounters, towns, calendars, NPC, traps, treasures...)<br />
* '''[http://pyromancers.com/dungeon-painter-online/ Dungeon Painter Online]''' -by Pyromancer<br />
* '''[http://rhysmakesthings.com/gm_friend GM Friend]''' - Hex Map Making Tool with subhexes and random generation<br />
* '''[http://hextml.playest.net/ HexTML]''' - hex map maker with submaps<br />
* '''[https://inkarnate.com/maps/ INKARNATE]''' - Online map making tool<br />
* '''[https://www.maper-rpg.com/ Mapper RPG]''' - Battle map editor with large sprites collection<br />
* '''[https://watabou.itch.io/medieval-fantasy-city-generator itch.io Medieval Fantasy City Generator]''' dynamic city map generator by [https://watabou.itch.io watabou]<br />
* '''[https://www.mipui.net/app Mipui]''' - simple and fast grid-based mapper<br />
* '''[http://deepnight.net/tools/tabletop-rpg-map-editor/ RPG MAP EDITOR II]''' by deepnight<br />
* [http://www.rpgobjects.com/index.php?c=tiamat Tiamat The Tile Mapper] ''(2023:The site is going away, download your stuff)''<br />
<br />
* [https://www.thespruce.com/free-online-room-design-applications-1357750 5 Free Online Room Design Software] - useful for modern games<br />
<br />
== Mapmaking Software ==<br />
* '''[https://worldographer.com Worldographer]''' Generate or create from scratch world/kingdom maps, city/village maps, and dungeon/battlemat maps.<br />
* '''[https://secure.profantasy.com/default.asp Campaign Cartographer 3]''' Windows mapmaking software<br />
* '''[https://www.wonderdraft.net WonderDraft]''' Beautiful map-making software for any x64 operating system (Windows 10, linux, MacOSX)<br />
* '''[https://store.steampowered.com/app/598180 Arcane Mapper]''' Steam<br />
* '''[https://store.steampowered.com/app/1588530/Dungeon_Alchemist Dungeon Alchemist]''' Create beautiful top-down maps with 3d feel - Steam, <br />
* '''[http://store.steampowered.com/app/592260 Dungeon Painter Studio]''' Steam<br />
* '''[https://store.steampowered.com/app/630900 Illwinter's Floorplan Generator]''' Steam<br />
* '''[https://www.mapforge-software.com/ MapForge]''' - Windows/MacOS mapmaking software<br />
* '''[https://www.gimp.org/ GIMP - GNU Image Manipulation Program]''' - free alternative to PhotoShop<br />
** [[Mapping with Gimp]] - Guide for making maps with GIMP<br />
* [http://rpgvirtualtabletop.wikidot.com/mapping-software misc list of other mapping software] <br />
== Paint Brushes ==<br />
* http://www.obsidiandawn.com/category/brushes <br /><br />
* http://www.redmondpie.com/download-adobe-photoshop-cs2-for-free-legally-while-you-still-can/<br />
<br />
== Pre-Made maps ==<br />
List of pages with free world/dungeon/historical/other maps that could be used in your games <br />
* [http://rpgmapshare.com/index.php?q=gallery&g2_itemId=19 RPG Map Share]<br />
* [http://dungeonchannel.com/maps/ Dungeon Channel]<br />
* [http://historic-cities.huji.ac.il/historic_cities.html Historic City Maps]<br />
* '''Mapsharing on Reddit:'''<br />
** [https://www.reddit.com/r/papertowns /r/papertowns]<br />
** [https://www.reddit.com/r/FantasyMaps /r/FantasyMaps]<br />
** [https://www.reddit.com/r/battlemaps/ /r/battlemaps]<br />
** [https://www.reddit.com/r/dndmaps/ /r/dndmaps]<br />
** [https://www.reddit.com/r/mapmaking/ /r/mapmaking]<br />
<br />
== Textures ==<br />
* http://www.opengameart.org - Graphics, Sound Effects, etc.<br />
* https://www.textures.com<br />
<br />
== Tokens & such ==<br />
* http://www.rpgmapshare.com/index.php?q=gallery&g2_itemId=564&g2_page=24<br />
* http://rpgvirtualtabletop.wikidot.com/tokens<br />
<br />
== Tutorials ==<br />
* [https://www.reddit.com/r/battlemaps/comments/4020zy/creating_your_own_battlemaps_a_simple_tutorial_v2/ Creating your own battlemaps – a simple tutorial]<br />
* [http://www.fantasticmaps.com/2015/02/how-to-draw-a-map/ How to draw a map] - excellent site for Painterly maps<br />
* [https://rpgcharacters.wordpress.com/ Dyson Logos] - amazing sketched maps and [https://rpgcharacters.wordpress.com/maps/tutorials-help/ tutorials]<br />
* [https://www.youtube.com/channel/UCRowqkTJFQBxGbe_rn7DqSw/videos?shelf_id=0&view=0&sort=dd Plexsoup on Youtube] - Blender, Gimp, Inkscape, Roll20<br />
* [https://www.reddit.com/r/mapmaking Mapmaking on Reddit]<br />
* [http://www.cartographersguild.com/forumdisplay.php?f=48 Cartographer's Guild]<br />
<br />
== See Also ==<br />
* [[Game Resources]]<br />
* [[Geomorphic Map Tiles]]<br />
* [[Isometric Maps in Roll20]]<br />
* [[Mapping with Gimp]]<br />
<br />
[[Category:Tips]]<br />
[[Category:Maps]]<br />
[[Category:External Tools]]</div>1223200https://wiki.roll20.net/About:Community_WikiAbout:Community Wiki2024-03-23T10:36:24Z<p>1223200: /* Help Center vs. Community Wiki, which has better info? */</p>
<hr />
<div>[[File:Wiki-Logo large.png|right|400px]]{{Revdate}}<br />
The '''Roll20 Community Wiki'''(<code><nowiki>wiki.roll20.net</nowiki></code>) is intended to serve as a community resource for help and documentation of the platform, as well as tips and tricks for best using Roll20 with your tabletop games. We welcome community contributions and would love for you to help us create the best resource we can for your fellow Roll20 users!<br />
<br />
<br />
'''See the {{hc| Roll20 Help Center}} for Official Documentation.'''(that may or may not have more/better info than the Community Wiki) If the Official documentation have errors/mistakes, remember to {{bug}}.<br />
{| class="wikitable" style="float:right;"<br />
|+ Wiki Statistics<br />
|-<br />
| Total # of Articles || '''{{NUMBEROFARTICLES}}''' <br />
|-<br />
| Total # of Files || '''{{NUMBEROFFILES}}''' <br />
|-<br />
| Total # of Edits || '''{{NUMBEROFEDITS}}'''<br />
|-<br />
| Total # of Pageviews || '''{{NUMBEROFVIEWS}}'''<br />
|}<br />
__TOC__<br />
==Contribute==<br />
If you want to contribute to the wiki, see '''[[Help:Contents]]''' for more info.<br />
<br />
* Check '''[[:Category:Stubs]]''' and '''[[:Category:Tagged for Cleanup]]''' for pages that can really need help with updating.<br />
* [[Anduh|Andreas J.]] is also maintaining a list of wiki update suggestions & ideas.<br />
* [[Special:RecentChanges|Special:Recent Changes]] - pages recently updated<br />
<br />
{| role="presentation" class="wikitable mw-collapsible mw-collapsed"<br />
| old wiki notes<br />
|-<br />
| <pre>As of January 16, 2015, there are:<br />
* 484 wanted pages, the vast majority of which are from links in default wikimedia content, or automatically generated from templates (eg, /sandbox and /testcases subpages of a template with {{tl|documentation}})<br />
* 179 long pages<br />
* 179 short pages<br />
* 83 uncategorized files<br />
* 80 dead-end pages<br />
* 28 unused files (several caused by the deletion of [[Script:Custom Power Cards]])<br />
* 27 orphaned pages<br />
* 9 unused templates, one of which is marked as a candidate for deletion, 5 are used in the article deletion process, and 2 are caused by errors<br />
* 7 wanted categories<br />
* 4 uncategorized pages, three of which I do not have permissions to edit and therefore cannot categorize<br />
* 3 unused categories, although two ought to be empty, and the third is the target of a soft redirect which contains pages I can't edit<br />
* 1 uncategorized category ([[:Category:Docs]]), which I do not have permissions to edit and therefore cannot categorize<br />
* 1 broken redirects, although the target should be re-created eventually<br />
* 0 wanted templates<br />
* 0 uncategorized templates<br />
* 0 wanted files (plus 39 links to a redirected file name)<br />
* 0 double redirects </pre><br />
|}<br />
<br />
==Help Center vs. Community Wiki, which has better info?==<br />
{{Ambox<br />
| small = {{{small|}}}<br />
| type = content<br />
| class = ambox-POV<br />
| image = [[File:Unbalanced scales.png|50x40px|link=]]<br />
| text = This section is largely based on personal opinion of [[User:1223200|1223200]], a Roll20 user & wiki contributor who active updated the wiki until 2022, after which he became less active.<br />
| date = {{{date|}}}<br />
}}<br />
<br />
The [[Help Center]] has the official documentation, and is generally the better source for learning about how the newer Roll20 features works or for a more surface-level understand of most features.<br />
<br />
The Community Wiki is updated by the community, so for features Roll20 haven't changed in a long time the Wiki is likely to have:<br />
* more detailed info on how longstanding features like [[Macro Guide|macros]] can be used.<br />
* addressing quirks of the system<br />
* suggesting workarounds for commonly requested things(e.g. things like [[Map Pins]] or [[Library Campaign]])<br />
* providing internal & external links to Roll20 resources & tips elsewhere<br />
* and linking to the [[Help Center]]-equivalent page for convenience<br />
<br />
Still, in many cases it's a good idea to check both the [[Help Center]] and the Community Wiki pages for information, as it's not clean-cut which one has better info.<br />
<br />
* The '''[[About:Community Wiki|Community Wiki]]''' have greater variance on content, but due to community user updating & creating various pages & articles<br />
** All pages related to [[Building Character Sheets]] are vastly more complete and numerous than on the Help Center, and the community keeps adding more example and expand on it as times go by.<br />
** [[Complete Macro Guide]] & the related pages has better info on making macros the the Help Center pages<br />
** [[Mod:Script Index]] & subpages gives a better overview on some popular mods than trying to check from 1-click install, and lots of mods have [[:Category:API_User_Documentation|documentation & example uses]] on wiki. <br />
** Community Wiki versions of some pages that also exists on the Help Center might contain more practical info or pointers, or be more up to date than the Help Center version.<br />
*** Some core pages, like [[Token]], lists some relevant [[Mods]] on the page<br />
*** Wiki articles might more often addresses smaller possible bugs, pain-points, & useful workarounds of the platform; while HC likely glosses over anything except the most longstanding/large issues.<br />
** [[Legacy Dynamic Lighting]] has more collected info on the topic than the Help Center, and some history of {{udl}}<br />
** There are many aspects of Roll20 that only have pages on the Community Wiki, such as for [[GM]] and [[players]], lists for {{pro}} and {{plus}} subscriptions,<br />
** community wiki pages often contains info on known issues with specific features that might not be covered on the Help Center. Such as the [[D&D 5E by Roll20]]-page having a '''Known Issues''' and a '''Recent Updates'''-section.<br />
** Mentions [[:Category:External_Tools|External Tools]] useful for Roll20, like [[Stylus]] for minor visual fixes<br />
** [[Character Sheet Development]] has a lot more info<br />
<br />
* The '''[[Help Center]]''' usually have fairly comprehensive & up-to-date pages for newer features like latest Dynamic Lighting features or the [[UI Redesign]], while pages for older existing Roll20 features might not always have been updated with info on features.<br />
** '''{{hc|sections/360008414313-General Marketplace Creators}}''' docs is better on the HC<br />
** For any Policy & legal info, see Help Center's '''{{hc|categories/360003756453-Policy-Information Roll20 Policy}}'''<br />
** Help Center has the '''{{hc|articles/360037772613-Change-Log Official Roll20 Changelog}}'''<br />
<br />
==History==<br />
The Roll20 Wiki was unveiled in [[Changelog#April_30.2C_2013|April , 2013]], and had a section dedicated to Official documentation(Docs), and user submitted content (Tips, Games, & Guides-categories)<br />
<br />
In early 2020, the Roll20 Wiki was changed into being the '''Community Wiki''' for the users, as Roll20 migrated their official documentation to the [[Help Center]]. Many Core pages on the Community Wiki links to the corresponding Help Center page.<br />
<br />
Sometime Late 2020/Early 2021, all of the links to the Community Wiki on the main site, where updated to say "Community Wiki". Until then, any links had still called it just "Wiki", creating some confusion between the distinction between [[Help Center]] and the [[About:Community Wiki|Community Wiki]].<br />
<br />
In Sept.-Oct. 2021, [[Andreas J.]] restructured & updated the looks of the wiki.<br />
<br />
Since around mid-2022, the Help Center documentation have started to outpace the Community Wiki on articles regarding Roll20 features & updates created since. The wiki is still invaluable for it's many comprehensive articles like [[Macro Guide]], [[:Category:Character_Sheet_Documentation|Sheet documentation]], [[:Category:Tips|Community Tricks]], as well as [[Sheet Development|Character Sheet Development]] and [[Mod Development|Mod:Development]]. <br />
<br />
In late 2023, with the updated icons for the [[sidebar]], The [[Toolbar Redesign]], [[Page Folders]] release, the Community Wiki's articles & images related to the main UI is getting outdated, and is requiring a lot of work to getting up to speed to Roll20's current state. It's to the point that some articles should just be replaced with link to the HC article and maybe just keep the extra tips that are still relevant. <br />
<br />
== Wiki Experience tricks == <br />
<br />
'''Dark Mode'''<br />
<br />
While the main site has [[Dark Mode]], the community wiki didn't get one. If you install the [[Stylus]] browser plugin, you can install the Roll20 Wiki Dark Mode.<br />
* [https://userstyles.world/api/style/3108.user.css Install] | [https://userstyles.world/style/3108/roll20-dark-mode Roll20 Wiki Dark Mode] by [[Andreas J.]]<br />
<br />
<br />
'''Wiki Editor'''<br />
<br />
The wiki is running on an older version of the wiki editor, so is lacking many features you may seen in other wikis' text editors. <br />
<br />
[https://code.visualstudio.com/ Visual Studio Code] with the [https://marketplace.visualstudio.com/items?itemName=RoweWilsonFrederiskHolme.wikitext Wikitext] is a solid text editor option for wikitext.<br />
<br />
When editing longer articles, it's a good idea to use an external text editor:<br />
<br />
:1. '''Syntax highlight for wikitext helps with readability & spotting mistakes'''<br />
:2. '''Updating article directly in browser has a small chance of losing your progress if the session times out.''' Sometimes when submitting a change from an article you been editing for a long time might reply "something went wrong, progress wasn't saved", but sometimes if you use the back-button to go back to the editor your changes are still there and you can resubmit it. Saving & writing in an external program & then copy-pasting to the wiki editor when you're finished avoid the risk of losing progress.<br />
:3. '''Leveraging text editor features speeds up writing process.''' Keyboard Shortcuts, find&replace, plugins, etc<br />
<br />
[[Category:Miscellaneous]]<br />
[[Category:Community]]</div>1223200https://wiki.roll20.net/Help:ContentsHelp:Contents2024-03-18T07:05:35Z<p>1223200: /* Displaying Macros and Code */</p>
<hr />
<div>{{revdate}}<br />
[[File:Roll20-community-wiki.png|right|220px|link=https://wiki.roll20.net/Community_Wiki]]The '''[[Wiki|Roll20 Community Wiki]]''' is intended to serve as a community resource for help and documentation of the platform, as well as tips and tricks for best using Roll20 with your tabletop games. We welcome community contributions and would love for you to help us create the best resource we can for your fellow Roll20 users!<br />
<br />
<br />
'''See the {{hc| Roll20 Help Center}} for Official Documentation.''' The [[Help Center]] info is sometimes worse, sometimes better than the Community Wiki. If the Help Center have mistakes, {{bug}}. <br />
<br />
Pages that need help:<br />
* [[:Category:Stubs]]<br />
* [[:Category:Tagged for Cleanup]]<br />
* [[Special:WantedPages]]<br />
* '''[[Community Wiki:Contribute]]'''<br />
<div style="width:70%;clear: right;float: right;">[[File:Roll20Wiki-editor.png|thumb|600px|The wiki editor|class=resize]]</div><br />
<br />
==Contributing to the Wiki==<br />
{{:Help:Get Started}}<br />
<br />
==Page formatting ==<br />
A few tips and tricks can help make pages look better and more readable; here are a few main pointers.<br />
<br />
You can check the [[sandbox]] page for some often useful code snippets, and you can create your own sandbox to test/play around in, by going to your own wiki page(link in the sidebar), and then adding <code>/sandbox</code> to the end of the url. Then you'll have a personal test page under your own profile without having to worry about testing if you want to do some large/wild edits.<br />
<br />
===General===<br />
'''Bold text''': <pre>'''Bold text'''</pre><br />
<br />
''Italic text'': <pre>''Italic text''</pre><br />
<br />
<strike>Strikeout text</strike>: <pre><strike>Strikeout text</strike></pre><br />
<br />
<code>code element</code> <pre><code>code element</code></pre><br />
<br />
<u>Underscored text</u>: <pre><u>Underscored text</u></pre><br />
<br />
<pre>text block without formatting</pre><br />
<br />
Use <code><nowiki><pre></nowiki></code> element to wrap your text to get text block without formatting. '''Ex.''' <code><nowiki><pre>text block without formatting</pre></nowiki></code><br />
<br />
<nowiki>no wiki formatting</nowiki>:<br />
<br />
Use <code><nowiki><nowiki></nowiki></code> element to wrap your text.<br />
<br />
extra linebreak: <pre><br></pre><br />
<br />
More about the [[wikipedia:Help:Wikitext|Wikitext markup language]]<br />
<br />
====clear====<br />
<br />
using <code><nowiki><br clear=all></nowiki></code>, <code><nowiki><br clear=left></nowiki></code>, or <code><nowiki><br clear=right></nowiki></code> will create a linebreak which will force the later content to a new row, if there are images or other floating element on that would otherwise messes up the formatting and readability of the page. More about [https://developer.mozilla.org/en-US/docs/Web/CSS/clear clear]<br />
<br />
{{ex}}<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
[[File:Deftemplate-roll-hover-result.gif|left|thumbnail|300px|hovering over the result will show the breakdown of what went into the roll, and it's formula. See Ex.3 for the macro.]]<br />
The result of "Normal" dice rolls is shown as individual dice images displaying the result on each dice separately, along with the total result, while inline roll results are displayed in as a single numerical result, where you can see the roll breakdown by hovering your mouse over the result.<br clear=left><br />
Inline rolls are just like regular rolls, with the following exceptions:<br />
</pre><br />
<br />
The above will result in the last line to start after the image, and not to adjust to the right of it, thanks to the <code><nowiki><br clear=left></nowiki></code> forcing linebreaks until the left side of the article is clear, in this case of the image floated to the left.<br />
<br />
===Headings===<br />
Use headings to structure a page if it contains multiple sections. If a page have enough sections, it will automatically generate a Table of Content. <br />
<br />
See '''[[Style_Guide_Update|Heading Showcase]]''' for more info.<br />
<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
=Top Header=<br />
The above creates the largest possible section heading, making the text blue<br />
<br />
==Second Tier==<br />
The above creates the second-largest possible section heading, with a black text. Subsequent headings are smaller and black.<br />
<br />
Somewhere around Headings 5, the title tarts to become so small that it's hard to notice from the general text of an article, and normal, bold text pops out more.<br />
<br />
Depending on how things look, the following can be a good idea:<br />
<br />
====='''manually bolded headings'''=====<br />
</pre><br />
<br />
===Table===<br />
{{main|Help:Table}}<br />
{{:Help:Table}}<br />
<br />
===Columns===<br />
<br />
Example of how you can have two columns side-by-side. the "clear: both;" div or br is needed to make things after the columns work normal again.<br />
<br />
<div style="float: left; width: 45%; margin-right: 5%; margin-top: 0px;"><br />
'''Content in left column'''<br />
* stuff<br />
* other stuff<br />
</div><br />
<div style="float: left; width: 45%; margin-top: 0px;"><br />
'''Right column'''<br />
<br />
lorem ipsum ibidem ipsum lorem ipsum ibidem ipsum<br />
* content<br />
</div><br />
<div style='clear: both;'></div><br />
<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
<div style="float: left; width: 45%; margin-right: 5%; margin-top: 0px;"><br />
'''Content in left column'''<br />
* stuff<br />
* other stuff<br />
</div><br />
<div style="float: left; width: 45%; margin-top: 0px;"><br />
'''Right column'''<br />
<br />
lorem ipsum ibidem ipsum lorem ipsum ibidem ipsum<br />
* content<br />
</div><br />
<div style='clear: both;'></div></pre><br />
<br />
===Message Boxes===<br />
There are a number of different message boxes that can be used on the wiki, and here are shown the most useful ones.<br />
====Standard====<br />
<br /><br />
Occasionally, you may want a piece of text take precedence and draw the eye to something very important in the document you're writing. For this instance, use a message box.<br />
{{notebox|notebox template is the simpler alternative, but less flexible}}<br />
<pre>{{notebox|notebox template is the simpler alternative, but less flexible}}</pre><br />
<br />
{{mbox | text = Insert Whatever You Want to Say Here}}<br />
<br /><br />
To add a message box to a wikipage, use this insert:<br /><br />
<pre>{{mbox | text = Insert Whatever You Want to Say Here}}</pre><br />
<br />
====Orange====<br />
{{orange| This section have sever issues and is likely out of date}}<br />
<pre><br />
{{orange| This section have sever issues and is likely out of date}}<br />
</pre><br />
<br />
The [[Template:Orange]] can be used to highlight some semi-important thing, if you don't want to use the much stronger/dire [[Template:Warning]] with it's sign, or if the blue [[Template:Notebox]] infobox doesn't convey enough urgency.<br />
<br />
====Warning====<br />
{{warning|This action is irrecoverable, so proceed with caution }}<br />
<br />
<pre><br />
{{warning|This action is irrecoverable, so proceed with caution }}<br />
</pre><br />
<br />
====Cleanup====<br />
{{tlx|cleanup}}, {{tlx|cleanup-msg}}<br />
<br />
{{cleanup}}<br />
{{cleanup-msg|This page haven't been updated since '''2019.'''|February 2021}}<br />
<br />
<pre><br />
{{cleanup}}<br />
{{cleanup-msg|This page haven't been updated since '''2019.'''|February 2021}}<br />
</pre><br />
<br />
It can be a good idea to quickly sign off your name & the date by using <code><nowiki>~~~~</nowiki></code>, which will add your name & the date quickly. That will help other to know how long the section have been in need of cleanup.<br />
<br />
====Other====<br />
{{POV}}<br />
<br />
{{tlx|POV}}<br />
<br />
===Templates===<br />
[https://www.mediawiki.org/wiki/Help:Templates Wiki Templates] can be used to make a wide range of things, such as creating info boxes & custom links, and can make wiki editing much easier. Below are a few of this wiki's templates. Most other templates are showcased on relevant sections of this page, such as image-related under [[#Images]]. <br />
<br />
* {{tlx|User profile}} - link to roll20.net profile page(not wiki)<br />
* {{tlx|Multiple issues}}<br />
* {{tlx|repo}} - links to github page, displays the logo. <br />
* {{tlx|Changelog version}} - usedful for creating API script or Character Sheet Changelogs<br />
* [[#Roll20 links|Roll20 links]] - templates to create various Roll20 links outside the wiki, showing where they are leading(Blog/Forum/Marketplace)<br />
* message/info boxes<br />
** {{tlx|notebox}} and {{tlx|orange}} are commonly used info-boxes on the page<br />
** {{tlx|Ambox}}} - the core template used for making the several info & notice boxes<br />
** {{tlx|Mbox}} - meta-template is used to build [[#Message Boxes|message boxes]]<br />
** {{tlx|HCbox}} – info box for linking to the [[Help Center]]-version of the page, mentioning community wiki isn't the official documentation<br />
* {{tlx|tlx}} - meta-template used for linking to the template's page, and the template page could show how to use it. E.g. {{tlx|repo}}<br />
* see '''[[:Category:Templates]]''' and '''[[:Category:Template Documentation]]''' for more <br />
<br />
<br />
For pages describing content limited to Pro users, add the following at the start of the page:<br />
<br />
<pre>{{pro only|page}}</pre><br />
<br />
{{tlx|pro only}}<br />
<br />
Display "{{rarr}}" arrow symbol<br />
<br />
<pre>{{rarr}}</pre><br />
<br />
====Creating Templates====<br />
* [https://www.mediawiki.org/wiki/Help:Templates Help:Templates]<br />
* {{wiki|Help:Switch_parser_function|Switch_parser_function}}<br />
<br />
Tips: use existing ones as templates.<br />
* Image use: {{tlx|LDL_sunset}} and {{tlx|revdate}} for how to make infoboxes with images.<br />
* Conditionals: {{tlx|pro only}} & {{tlx|cleanup}}<br />
* Topic Navigation sidebar: {{tlx|NavboxN}} & {{tlx|NavSheetDoc}}<br />
<br />
===Collapsible Section===<br />
<br />
{| role="presentation" class="wikitable mw-collapsible mw-collapsed"<br />
| Collapsable section(Example)<br />
|-<br />
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse eget nunc id felis maximus ullamcorper. Quisque felis odio, commodo vitae lorem et, sagittis dictum mauris. Ut eu nibh et dolor vehicula gravida sit amet et sapien.<br />
<br />
Sed vel ullamcorper arcu, non ultrices tortor. Vestibulum massa risus, varius eget molestie in, posuere quis massa. Mauris sit amet ligula lorem. Sed pulvinar dapibus urna, et pellentesque quam commodo et.<br />
|}<br />
<br />
Code for the collapsible section, where having <code>mw-collapsed</code> will make it collapsed by default:<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
{| role="presentation" class="wikitable mw-collapsible mw-collapsed"<br />
| Collapsable section(Example)<br />
|-<br />
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse eget nunc id felis maximus ullamcorper. Quisque felis odio, commodo vitae lorem et, sagittis dictum mauris. Ut eu nibh et dolor vehicula gravida sit amet et sapien.<br />
<br />
Sed vel ullamcorper arcu, non ultrices tortor. Vestibulum massa risus, varius eget molestie in, posuere quis massa. Mauris sit amet ligula lorem. Sed pulvinar dapibus urna, et pellentesque quam commodo et.<br />
|}<br />
</pre><br />
<br />
See '''[https://www.mediawiki.org/wiki/Manual:Collapsible_elements MediaWiki Manual:Collapsible Elements]''' for more tips<br />
<br />
<br />
<br />
===Table of Content===<br />
If you have 4 or more Headings, the page will automatically show a Table of Content(TOC) at the top of the page. You can force to have display it if you have fewer heading with adding this to the sheet:<br />
<pre>__FORCETOC__</pre><br />
<br />
If you want to move the placement of the TOC on a page, you can place this in the appropriate place:<br />
<pre>__TOC__</pre><br />
<br />
If youdon't want a TOC on the page, place this anywhere on the page:<br />
<pre>__NOTOC__</pre><br />
<br />
There is an option for a sideways TOC, useful for A B C sections.<br />
<br />
<pre>{{compact toc}}</pre><br />
<br />
* [[Template:Compact_toc/doc]]<br />
<br />
You can also make the TOC appear on the right side of the page with:<br />
<br />
<pre>{{tocright}}</pre><br />
<br />
=== Displaying Macros and Code===<br />
<br />
Documentation for [[Macros]], [[Mods]], Mod development and {{BCS}} can be more clear if code, variables, parameters and functions names in flowing text are highlighted with the [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code &#60;code&#62;]-element, and larger blocks of codes with the [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre &#60;pre&#62;]-element.<br />
<br />
{{tlx|c}} and {{tlx|code}} templates are shorthands for the <code><nowiki>&#60;code&#62;</nowiki></code>-element, making it quicker & more compact to write for short thing. If your snippet contains any {{c|<nowiki>}</nowiki>}}, {{c|<nowiki>|</nowiki>}}, {{c|<nowiki>=</nowiki>}} or {{c|<nowiki>[[</nowiki>}}, wrap the content in <code><nowiki>&#60;nowiki&#62;</nowiki></code> to avoid the template from breaking. Sometimes it's still better to use <code><nowiki>&#60;code&#62;</nowiki></code>.<br />
<br />
{{ex}}<br />
In ScriptCards, String Variables are assigned with the {{c|ab]]cd}} {{c|--&}} statement and are referenced using <code>[&variableName]</code> notation.<br><br />
In roll20 macros, {{c|<nowiki>|</nowiki>}} and <code><nowiki>}</nowiki></code> are two character that often needs to be [[HTML Entities|escaped]].<br />
<br />
<pre>In ScriptCards, String Variables are assigned with the {{c|--&}} statement and are referenced using <code>[&variableName]</code> notation.<br><br />
In roll20 macros, {{c|<nowiki>|</nowiki>}} and <code><nowiki>}</nowiki></code> are two character that often needs to be [[HTML Entities|escaped]].</pre><br />
<br />
====Avoiding issues with special characters====<br />
If you add HTML or other code/macros to a wiki page without precautions, the wiki will misunderstand is as MediaWiki code, and change how the page/text looks, instead of showing the raw code.<br />
<br />
For showing short code snippets in flowing text, using the <code>&#60;code&#62;</code>-element or the {{tlx|c}}-template is a good idea(and sometimes adding <code>&#60;nowiki&#62;</code> inside it), but if you want to show a block of code with several rows, use the <code>&#60;pre&#62;</code>-element instead. [[Roll Template]] code is always tricky to show, so it should always be either inside a <code>&#60;pre&#62;</code>-element, or shown using <code>&#60;code&#62;</code> + <code>&#60;nowiki&#62;</code>.<br />
<br />
<u>For really tricky sections</u>, you might want to try using [[Complete_Guide_to_Macros_%26_Rolls#HTML_replacement|HTML entities]](replacement code) to replace some character, so the wiki doesn't think it should process as wiki code. This section contains a few examples of this(press ''Edit'' to see the code). <br />
<br />
'''Examples to copy:'''<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
<code>&#60;nowiki&#62;/r 2d5+@{attribute|max}+[[4d4]]&#60;/nowiki&#62;</code><br />
&#60;pre data-language="html"&#62; &#60;/pre&#62;<br />
</pre><br />
<br />
'''Macro without formatting'''<br />
<br /><br />
''/r 2d5+@{attribute|max}+[[4d4]] damage''<br />
<br /><br /><br />
<br />
The macro code above is just highlighted in italics using the [[#General|Wiki formatting]], and doesn't look good. The <code>4d4</code> here is supposed to be surrounded by square brackets, but they disappear if they're left naked to [[wikipedia:Help:Wikitext|WikiMedia's markup conventions]]. Worse still, in this case, markup attempts to link it to non-existent page called "4d4".<br />
<br />
'''Macro using <code>&#60;code&#62;</code> & <code>&#60;nowiki&#62;</code>'''<br />
<br />
<code><nowiki>/r 2d5+@{attribute|max}+[[4d4]]</nowiki></code><br />
<br />
If you use the code element, you sometime need to wrap the code additionally in a <code><nowiki><nowiki></nowiki></code>-element before using <code><nowiki><code></nowiki></code> will look like this:<br /><br />
<code><nowiki>/r 2d5+@{attribute|max}+[[4d4]]</nowiki></code><br /><br />
<br />
For inline notes and asides you can use <code>&#60;code&#62;</code> elements to embellish things like <code>/roll 3d10</code> or <code>#macroname</code>.<br />
<br />
To avoid creating links to non-existing pages when writing [[Inline Rolls]], use <code><nowiki><pre></nowiki></code> or <code><nowiki><nowiki></nowiki></code> elements.<br />
<code><nowiki><nowiki></nowiki></code> element ignores all wiki formatting/templates/link-creation as can at time be needed together with <code><nowiki><code></nowiki></code> element to show some code without problem.<br />
<br />
====pre====<br />
'''Macro using <code>&#60;pre&#62;</code>'''<br />
<br />
When surrounded by <code>&#60;pre&#62;</code> element, the macro is displayed in a separate code block, which compresses sideways and wraps text to newline if needed.<br />
<br />
Styling pre element:<br />
* by default, pre-elements have {{c|white-space:pre-wrap}} so that longer lines wraps back to be visible instead of adding a sideway scrollbar. This is so macro oneliners end up more readable, but you might want to display it differently <br />
* '''style="overflow:auto;white-space:pre-wrap;"''' - this is the css for a pre by default<br />
* '''style="overflow:scroll;white-space:nowrap;"''' - if the code is too wide for the page, and you want a sideway scrollbar instead of having code wrap to new line<br />
<br />
<pre style="overflow:scroll;white-space:nowrap;">/em attacks for 2d5+@{attribute|max}+[[4d4]], lorem ipsum ibidem ipsum long text example or something -lorem ipsum ibidem ipsum long text example or something -lorem ipsum ibidem ipsum long text example or something lorem ipsum ibidem ipsum long text example or something-</pre><br />
<br />
The above code shows a scrollbar instead of wrapping. <br />
<br />
Here is the wiki code for making a pre element with sideway scrollbar & nowrap:<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
&#60;pre style="overflow:scroll;white-space:nowrap;" data-language="html"&#62; &#60;/pre&#62;<br />
</pre><br />
<br />
'''Displaying HTML/CSS/Javascript code with syntax highlights'''<br />
<br />
For displaying blocks of code like HTML/CSS/JavaScript on the wiki(like in the context of Character Sheet or API code), it's best to use the <code>&#60;pre&#62;</code> element, and additionally style the section with <code>style="overflow:scroll;"</code>, and to add syntax highlight to make the code more readable with <code>data-language="html"</code>, like in the below examples:<br />
<br />
'''HTML'''<br />
<pre data-language="html"><br />
&#60;pre style="overflow:auto;white-space:pre-wrap;margin-bottom: 5px;" data-language="html"&#62;<br />
<span>Here you have HTML syntax highlight in the code, maing it more readable</span><br />
<input type="number" name="attr_hp" step="any" value="10" min="0" max="20" /> <input type="text" name="attr_hp_misc" value="" placeholder="Other info about hp" /><br />
<label>Robust? <input type="checkbox" name="attr_hp_robust" value="1" title="Check the box if your character is Robust" /></label>&#60;/pre&#62;<br />
</pre><br />
'''CSS'''<br />
<pre data-language="css"><br />
div.sheet-d4 {<br />
width: 35px;<br />
height: 35px;<br />
background-image: url("https://i.imgur.com/zkgyBOi.png");<br />
background-repeat: no-repeat;<br />
color: transparent;<br />
display: none;<br />
}<br />
</pre><br />
'''JavaScript'''<br />
<pre data-language="javascript"><br />
on("change:siz change:con sheet:opened", function() { <br />
getAttrs(["SIZ","CON"], function(values) {<br />
let siz = parseInt(values.SIZ)||0;<br />
let con = parseInt(values.CON)||0;<br />
let hp = siz + con;<br />
setAttrs({ <br />
"hitpoints": hp<br />
});<br />
});<br />
});<br />
</pre><br />
<br />
'''Click "Edit" for this section to see how the above examples work and the wiki code.'''<br />
<br />
===Leaving Name/Timestamp===<br />
<br />
If you want to sign your name & date to a message or section, you can quickly do so with writing four tilde characters.<br />
<br />
'''Example:'''<br />
<br />
I just remembered this is a feature on many wikis. [[User:1223200|1223200]] ([[User talk:1223200|talk]]) 12:35, 11 September 2020 (UTC)<br />
<br />
<pre>I just remembered this is a feature on many wikis. ~~~~</pre><br />
<br />
===Dice Roller===<br />
{{notebox|stopped working as of Summer 2021}}<br />
You can integrate a copy of Roll20's dice roller on a wiki page, to enable people to try things out on the page, instead of forcing them to open a Roll20 game to test a roll or syntax. You can leave it empty, or include a default "roll" that people can use straight away instead of having to type it out.<br />
The user can edit what's in the dice roller as they want, but will show the original one if the page is reloaded. <br />
<br />
The following [[Text Chat|command types]] work in the dice roller: <code>/r</code>, <code>/roll</code>, <code>/gr</code>, <code>/gmroll</code><br />
<br />
These doesn't work: <code>/em</code>, <code>/w</code><br />
<br />
[[Inline#Inline_Labels|Inline Roll Labels]] works in the Dice Roller.<br />
<br />
'''Example:'''<br />
<div class='diceroller'><br />
/r 3d6+2<br />
</div><br />
<br />
'''Wiki code:'''<br />
<pre><br />
<div class='diceroller'><br />
/r 3d6+2<br />
</div><br />
</pre><br />
<br />
The {{Text Chat}} page displays a dice roller under the [[Text Chat#Rolling|Rolling]]-section, and the [[Dice Reference]] page have multiple examples.<br />
<br />
===Transclusion===<br />
{{:Help:Transclusion}}<br />
<br />
===Advanced===<br />
* '''Use [[HTML]] & [[CSS]] on the wiki to create custom layout and looks''', or to make minor adjustments if something doesn't quite line up well.<br />
** Example: The [[Front Page]] uses several tricks, so it's source code is worth checking out for ideas.<br />
<br />
==Images & Videos==<br />
How to handle Images, Gifs & videos embedded to a page<br />
<br />
===Images===<br />
[[File:Roll20 video sm.jpg|thumbnail|250px|right|The image from the wiki frontpage]]<br />
<br />
'''If you are a new user adding content to the wiki, the option to upload images is disabled by default.'''<br />
<br />
If you want to be able to upload images, either message {{user profile|1223200|Andreas J.}}, or {{bug}} and ask for upgraded Community wiki permissions(to upload images).<br />
<br /><br />
<br />
To upload an image to the wiki, go to the '''[[Special:Upload|Upload file]]''' (page found in the wiki sidebar, accessible only if you have updated wiki permissions)-page, and then select the '''Browse'''-button to upload. You can upload images & gifs, but they can't be larger than 2mb.<br />
<br />
[https://www.mediawiki.org/wiki/Help:Images Help:Images - mediawiki] <br />
<br />
Image inclusion follows this format:<br />
<pre><br />
[[File:Roll20 video sm.jpg|thumbnail|250px|right|The image from the wiki [[Main_Page|frontpage]].]]<br />
</pre><br />
<br />
Some tags that can be used:<br />
<pre>thumb, framed, frameless</pre><br />
<br />
The <code>thumb</code>-tag is the easiest to use, as you can decide the position of the image, resize it, and have caption under it.<br />
<br />
For some of the other tags you can't change the size of the image with some tags.<br />
<br />
{{notebox| '''Possible Bug:''' It seems '''trying to upload an updated version on a image doesn't work''', so one needs to upload the image with a new name, and delete the old image if it i serves no purpose. Please only delete images you uploaded yourself. }}<br />
<br />
'''Image as a link:'''<br />
<br />
You can link to another wiki page or an external site. [[File:Twitch.png|20px|link=https://www.twitch.tv/roll20app]] links to Roll20's Twitch page, and<br />
<pre><br />
[[File:Twitch.png|20px|link=https://www.twitch.tv/roll20app]]<br />
</pre><br />
[[File:DragDiceFrom Chat.gif|thumbnail|right|350px| Dragging a rolled dice from the chat to the map, and using it as a [[token]]. ]]<br />
<br><br><br />
<br />
<br />
'''Make Image Resize'''<br />
<br />
If you add the "resize" class to images, it will shrink the image if the page is resized. Doesn't seem to work with "thumb", so can't have description/default size on image that is resized.<br />
<pre><br />
[[File:Roll20con-2021.jpg|530px|right|link=https://blog.roll20.net/posts/save-the-date-roll20con-2021-is-november-12th-14th/|Go to Roll20Con 2021 Blog Post(Oct. 8th)|class=resize]]</pre><br />
<br />
===Gif===<br />
Works identically to [[#Images|Images]], with the difference that the gif continuously animate. You're limited to uploading 2mb files, just like images.<br />
<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
[[File:DragDiceFrom Chat.gif|thumb|left|350px| Dragging a rolled dice from the chat to the map, and using it as a [[token]]. ]]<br />
</pre><br />
<br clear=all><br />
<br />
<br />
===Common Symbols===<br />
Common Roll20 icons with templates to show them: {{Lock}} {{Unlock}} {{Gear}} {{Hammer}}<br />
<pre style="overflow:auto;white-space:pre-wrap;">{{Lock}} {{Unlock}} {{Gear}} {{Hammer}} </pre><br />
<br />
Other useful symbols: {{dot}}<br />
<pre style="overflow:auto;white-space:pre-wrap;">{{dot}} </pre><br />
<br />
===Roll20 UI Icons===<br />
{{main|Roll20 UI Icons}}<br />
If you want to display the actual icons used on the Roll20 interface (such as <span style="font-family:Pictos;">y</span>, <span style="font-family:Pictos;">l</span>, <span style="font-family:Pictos;">F</span>, etc.) for clearer instructions in your wiki, you can add a <code><nowiki><span></nowiki></code> element that briefly changes the needed font-family that is used for them.<br />
<br />
The font families used for the Roll20 icons are [http://pictos.cc/classic/font Pictos], Pictos Custom, and dicefontd20. They're available for use within the Roll20 wiki, and with [[Character Sheet Development|designing character sheets]]. Going to the font's storefront will give you the character key for the font. Use this key to identify which character displays which icon. Check the [[CSS#Icon Fonts|Icon Fonts]] section on the [[CSS Wizardry]] page for a full list of symbols from the fonts.<br />
<br />
When you want to add an icon in your wiki, include these HTML snippets, substituting the letter you need for the "Pictos" or "Pictos Custom" font family.<br />
{{:Roll20 UI Icons}}<br />
<br />
===Youtube===<br />
{{#evp:youtube|MH78AOhNyuA|Tutorial for the [[Drawing Tools]]|right|400}}<br />
You can have an embedded youtube video on a page.<br />
<br />
This can be achieved with the following format. You need to copy the end of the url for your video and replace <code>MH78AOhNyuA</code> in the below example. Otherwise it seems to take the <code>right|center|left</code>-parameters, along with a numerical value which represent pixel-width of the video.<br />
<br />
<code><nowiki>{{#evp:youtube|MH78AOhNyuA|Tutorial for the [[Drawing Tools]]|right|400}}</nowiki></code><br />
<br />
It doesn't seem possible to make the video start with specific time using the normal <code>t?=120</code> end to the url.<br />
<br />
==Links==<br />
{{:Help:Links}}<br />
<br />
==Categories==<br />
A categorized page is easier to find, so please add at least one relevant category to any new page you create. There are few of the main wiki categories:<br />
<br />
To add a category to a page, simply add this line of text at the very bottom:<br />
<pre>[[Category:Category Name]]</pre><br />
<br />
Some categories can be added with templates, like {{tlx|cleanup}}, {{tlx|stub}}, {{tlx|dmbox}}<br />
<br />
If the page falls under multiple categories, add another category tag underneath first and so forth (don't combine them in one tag).<br />
<br />
<br />
===Content===<br />
Some main categories used on the wiki:<br />
<br />
* '''[[:Category:Games]]''': For articles of how to play a particular TTRPG system using Roll20. If a system have several pages like this, it can be a good idea to only categorize the "main" one with "Games" and link the other page to the main one.<br />
** '''[[:Category:Character Sheet Documentation]]''' For guides dedicated to specific character sheets, e.g. [[Pathfinder by Roll20]] vs. [[Pathfinder Community Sheet ]]<br />
** '''Popular Systems''' If a Game System or other franchise starts to have lots of pages, it can be a good idea to have a category for them, so they are easier to connect and find, and only give the "main" article the '''[[:Category:Games]]'''-category<br />
*** '''[[:Category:DnD5E]]''' for [[5E|Dungeons & Dragons 5E]] pages<br />
*** '''[[:Category:DnD]]''' for any other [[DnD|Dungeons & Dragons]] pages<br />
*** '''[[:Category:Star Wars]]''' for the systems or homebrew based on Star Wars franchise<br />
*** '''[[:Category:Pathfinder]]''' for both 1E and 2E pages, Starfinder could be bundled in, or given own category if it gets many pages <br />
*** '''[[:Category:Fate]]''' For [[Fate]] Core, Fate Accelerated, Fate Condensed pages<br />
*** '''[[:Category:World of Darkness]]''' For all [[World of Darkness]]-related pages<br />
* '''[[:Category:Guides]]''': Many pages under the Games category fall in here too; anything extensively explained should use this category<br />
* '''[[:Category:Tips]]''': For smaller pages that cover a portion of the Roll20 platform (I.e. tips and tricks), or a collection of less organized Tips that isn't a complete guide<br />
* '''[[:Category:Macros]]''' For pages largely dedicated to Roll20 macros<br />
* '''[[:Category:Character Sheet Creation]]''' Pages that help with [[Building Character Sheets]]<br />
** '''[[:Category:Sheetworker]]''' Pages on creating [[Sheetworkers]] for character sheets.<br />
* '''[[:Category:Marketplace]]''': any pages related to Roll20 [[Marketplace]] products.<br />
* [[:Category:Roll20]] - top lvl category for content, used for core aspects that doesnt fall under other categories<br />
* [[Special:Categories|Full list of existing categories]]<br />
<br />
===Wiki Administration===<br />
* '''[[:Category:Tagged for Cleanup]]''' for pages that are outdated or in need of cleanup. Add {{tlx|cleanup}} to start of page<br />
* '''[[:Category:Stubs]]''' for short articles that could use more content. Add {{tlx|stub}} to start of page<br />
* [[:Category:Disambiguation]] Add {{tlx|dmbox}} to start of page<br />
* [[:Category:Wiki Administration]] - meta pages for the wiki<br />
* [[:Category:Non-English Pages]] - [[:Category:Language-FR]] & [[:Category:Language-DE]] for french and german pages<br />
* [[:Category:Articles for deletion]] - page that should clearly be deleted<br />
<br /><br />
<br />
=='See Also' or 'Related Pages' section==<br />
Sometimes it's useful to have a section at the end of a page dedicated to a list of relevant other pages or links elsewhere. A character sheet guide could have a GitHub link to the sheet's source code, or [[Geomorphic Map Tiles#See Also|pages on making maps]] could link to other map-related wiki pages. [[Toolbox Overview]] is a good example of a page listing higly related pages<br />
<br />
<br />
==Related Pages==<br />
* [[Sandbox]] - wiki page that contains lots of often useful wiki code snippets for editing the Roll20 Community Wiki. by [[Anduh|Andreas J.]]<br />
* [[Sheet Guide Template]] - template page for creating a char sheet info page<br />
==See Also==<br />
* [[Help:Magic Words]]<br />
* [https://www.mediawiki.org/wiki/Help:Templates MediaWiki: Templates]<br />
* [https://www.mediawiki.org/wiki/Help:Transclusion MediaWiki: Transclusion] - include parts of one page into another<br />
** [[Player]] & [[Player API]] are example of pages using it<br />
* [[metawikimedia:Help:HTML_in_wikitext#Tags_with_special_effect|WikiMedia: Formatting Tags]]<br />
* [https://www.mediawiki.org/wiki/Help:Links Mediawiki: Links]<br />
<br />
[[Category:Wiki Administration]]<br />
[[Category:Wiki Editing]]</div>1223200https://wiki.roll20.net/Complete_Guide_to_Macros_%26_RollsComplete Guide to Macros & Rolls2024-03-18T06:43:34Z<p>1223200: /* External Tools */</p>
<hr />
<div>{{revdate}}{{clear}}<br />
{{NavMacroDocs}}<br />
This is meant to serve as a comprehensive guide & starting point for figuring out how the {{Text Chat}}, [[Dice Reference|Dice Rolling]], [[Macros]] and related things work and interact with each-other, to find the documentation for each, and to list everything you can write/make appear in the {{Text Chat}}.<br />
<br />
This is both for [[Players]] and [[GM|Gamemasters]] who are just writing their own custom rolls or macros to be used in their game, as well as those who [[BCS|build Character Sheets]] and are creating/editing [[Button#Roll Button|Roll Buttons]] for their sheets.<br />
<br />
{{#evp:youtube|SlwAXIDFveo|Creating [[Macros]] in Roll20 (Nick Olivo)|right|600}}<br />
==[[Text Chat]]==<br />
[[File:Basic-roll-example.png|left|thumbnail|400px|]]<br />
The {{Text Chat}}-page shows the basic commands that can be used in the chat, such as <code>/roll</code>(<code>/r</code>) for making simple rolls, <code>/em</code> for emoting actions, <code>/w</code> for whispering to someone, and <code>/gmroll</code>( <code>/gr</code>) for sending simple rolls to the GM.<br />
<br />
You can write in the {{Text Chat}} normal text without using any commands like <code>/r</code>.<br />
<br />
See [[#Chat Commands|Chat Commands]]-sections for examples, or the <br />
<br />
'''Normal macros can't edit stats, only read them.''' To edit stats with a command, you need to use [[#API|API]] in some form. <br />
{{clear}}<br />
===Formatting===<br />
{{main|Macros/Formatting}}<br />
{{:Macros/Formatting}}<br />
<br />
==Chat Commands==<br />
''Main Page:'' '''{{Text Chat}}'''<br />
<br />
* <code>/r</code>, <code>/roll</code> - for making simple rolls. '''Ex.''' <code>/r 1d20+5</code><br />
* <code>/w</code> - for whispering a message to a person so only they see it. '''Ex.''' <code>/w Alice Does the goblin know the paladin?</code>, <code>/w "Bob Smith" Where's the money pouch?!</code><br />
* <code>/gr</code>, <code>/gmroll</code> - to make rolls only to the GM. '''Ex.''' <code>/gr 2d6+3</code><br />
* <code>/em</code> to emote as the character selected. '''Ex.''' <code>/em takes out one of his throwing daggers and brandishes it threateningly.</code><br />
* <code>/ooc</code> - to message something that is Out-of-character '''Ex.''' <code>/ooc I could really use another coffee right now.</code><br />
* <code>/talktomyself</code> - To turn off your chat display for all others, including the GM and the chat archive recording. Use it again to turn it back on<br />
* <code>/fx</code> - used for creating visual effects '''Ex.''' <code>/fx beam-acid @{target|Caster|token_id} @{target|Foe|token_id}</code><br />
* [[GM]]-exclusive:<br />
** <code>/desc</code> to describe the situation '''Ex.''' <code>The old house begins to creak and moan...</code><br />
** <code>/as</code> to send a regular chat message as any character, but with no avatar '''Ex.''' <code>/as "Sir Bearington" I'm going to eat you for breakfast.</code><br />
** <code>/emas</code> emote as any character, similar to <code>/em</code> but with no avatar '''Ex.''' <code>/emas Sir Bearington decides to have porridge instead.</code><br />
<br><br />
Beyond using the various Roll Commands shown on the {{Text Chat}}-page, here are some other examples of what you can write in the {{Text Chat}}:<br />
* [[Macros]] - Start with <code>#</code>, and start typing the macro name, and a list of your macros will be displayed.<br />
** '''Example:''' writing <code>#testmacro</code> in the chat will roll the macro with that name<br />
* [[Roll Templates]] - <code><nowiki>&{template:name-of-roll-template} {{sectionname(optional)=content of roll template}}</nowiki></code>.<br />
** The Default Roll Template is available in any games, other templates are tied to specific Character Sheet Templates. (E.g. you can only access the specific <code>&{template:simple}</code> when you have [[D&D 5E by Roll20]]-sheet in the game). <br />
** '''Example:''' <code><nowiki>&{template:default} {{name=Test Attack}} {{attack=[[1d20]]}} {{damage=[[2d6]]}}</nowiki></code><br />
** This will generate a roll template using the default template, displaying "Test Attack" in the purple title, then on a new row the result of <code>1d20</code> roll, and on the third row the <code>2d6</code> roll<br />
* [[Character#Attributes|Character Abilities]]/Character Sheet Button - <code>%{character name|ability or roll button name}</code><br />
** '''Example 1;''' writing <code>%{Sam Bobbins|initiative}</code> in the chat, will work if there exists a Character with that name, who have a Character Ability/[[Character Sheet]] Roll Button by that name<br />
** '''Example 2:''' selecting a [[Token]] on the map, and then writing <code>%{selected|initiative}</code> in the chat, will work if the token is linked to a character sheet that has an Ability or Roll button with that name.<br />
* [[API|API commands]]''(available in games hosted by a pro user)'', - Start with <code>!</code> to call the API command, and then write and parameters it can take<br />
** '''Example:''' writing <code>!setattr</code> in the chat will trigger an API that uses <code>setattrd</code> as a keyword. Often these commands may have additional parameters, e.g. <code>!setattr --name John --hp|15</code><br />
<br />
===[[Dice Reference|Dice Syntax]]===<br />
The [[Dice Reference]] page shows how the syntax for the Roll20 dice rolling works, and all the advanced alternatives you can use, such as rolling [[Dice_Reference#FATE_Dice|Fate Dice]], or [[Dice_Reference#Target_Number_.28Successes.29|counting successes]] rather than the sum of the rolls. It also details when the green & red "[[Dice_Reference#Critical_Success_and_Fumble_Points|Critical Success/Failure]]"-highlights are shown. <br />
<br />
''Tricks:''<br />
* {{fpl|9171656/ Comparing numbers, greater than or equal to}} - Mike deBoston<br />
* {{fpl|7510681/ Bypass Blank Ability Call Math}} - Blue64<br />
* {{fpl|6113861/ Summing "Success" Rolls}} - Usually you can't both coun't the success and sum up rolls, but this is a close workaround by Bryan P. <br />
* {{fpl|8068345/ Fake Crits Using Math Instead of Dice}} - Noon<br />
* {{fpl|8717558/ Auto calculating level specific buffs. (Basic IF/THEN statement, no API)}} - Greg S.<br />
* {{fpl|6003370/ Keep Crits/Fumbles from Display on Attack Rolls}} - [[Scott|Scott C.]]<br />
<br />
====Inline Rolls====<br />
{{main|Inline Rolls}}<br />
[[File:Roll template default example2.JPG|right|thumb|350px|The output of a '''default template''' that shows an '''inline roll'''(yellow box) ]]<br />
If you use simple roll commands/macros like <code>/roll 2d10+5</code>, the whole command is a dice roll. But when you use [[#Roll Templates|Roll Template]], or have embedded dice rolls with other commands like <code>/em</code>, you use '''inline rolls''', where you wrap <code><nowiki>[[ ]]</nowiki></code> around the calculation for it to be processed. The result of "Normal" dice rolls is shown as individual dice images displaying the result on each dice separately, along with the total result.<br />
<br />
Inline rolls are just like regular rolls, with the following exceptions:<br />
<br />
* You can use them in any chat message, not just a roll. For example, you can do a regular chat message, an emote(<code>/em</code>), or a whisper(<code>/w</code>), with an inline roll included.<br />
* They are evaluated completely before any (<code>/roll</code>) commands, so you can use them as "random variables" in your rolls.<br />
* You will only see the result of the total roll, and you can hover over the result to see the individual dice rolls.<br />
* Highlights<br />
** If an inline roll contains a '''critical success''', it will be highlighted with a green box.<br />
** If there's a '''critical failure''', it's highlighted in red.<br />
** If it has '''both''' (because there was more than one roll), it's in blue.<br />
<br />
Also when you mouse-over the inline roll to see the details of the roll, it'll show red and green highlights for the rolls themselves for crits/fumbles.<br />
<br />
With inline rolls, the numerical end result is shown in a (yellow) box, and if you hover you mouse over the result, you see the full equation of the roll, along with the result of each.<br />
<br />
{{ex}}<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
/em swings their sword and does [[2d6+2]] damage.<br />
</pre><br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
&{template:default} {{name=Test Attack}} {{attack=[[1d20+5]]}}<br />
</pre><br />
<br />
====[[Inline Rolls#Inline Labels|Inline Labels]]====<br />
If you want to include additional comments before the end of the roll (we call them &quot;inline labels&quot;), use square brackets. For example, <code>/roll 2d10+5[Fire Damage] + 3d6[Ice Damage]</code>. Inline labels works both with "normal" rolls and '''inline rolls'''. <br />
<br />
When these comments are applied directly after a die roll they show up as tool-tips on the dice:<br />
<div class="diceroller"><br />
/roll 2d10+5[Fire Damage] + 3d6[Ice Damage]<br />
</div><br />
<br />
This is especially useful if a roll contains multiple variables and you want to look up what number comes from what attribute.<br />
<br />
'''You can even use sheet attributes in labels.''' Especially useful if the name of the stat can be customized by the user, so the corresponding label should change to reflect the name.<br />
{{ex}}<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
/r @{selected|customskill1}d6[@{selected|customskill1name}] + @{selected|str}[str]<br />
</pre><br />
<br />
===[[Order of Operations]]===<br />
{{:Order of Operations}}<br />
<br />
===[[Macros]]===<br />
The [[Macros]] page lists all the the other kind of options for modifying rolls that isn't covered by the '''[[Dice Reference]]'''-page. Also check the [https://app.roll20.net/forum/permalink/5899495/ Stupid Roll20 Tricks (and some clever ones)]-thread for Advanced and clever tricks that might not be linked on this page yet.<br />
<br />
Features include:<br />
* Adding options to user when roll is made('''Roll Queries''')<br />
* Using [[Macros#Using_a_Targeted_Token_with_a_Macro|@{target}]] and [[Macros#Using_a_Selected_Token_with_a_Macro|@{selected}]] to target tokens and their stats. See [[#Token|Token]]-section for interaction with them<br />
** {{forum|permalink/8048203/ Variable numbers of targets in an AoE attack}} - GenKitty<br />
* Automatically add a roll to the [[Turn Tracker]]<br />
* [[Reusing Rolls]]<br />
<br />
====[[Roll Query|Roll Queries]]====<br />
Sometimes you may have a roll (or a macro) which you want to change every time it is rolled. For example, you may want to roll a variable number of dice, or add a different modifier onto the roll each time you perform the action.<br />
<br />
Roll Queries allow you to prompt whoever is performing the roll to fill in a value when the roll is made. The syntax for a roll query is:<br />
<br />
<pre style="overflow:auto;white-space:pre-wrap;" data-language="javascript"><br />
?{Prompt Message}<br />
//Example:<br />
/roll ?{Number of Dice}d20<br />
//You can also include a default value:<br />
/roll ?{Number of Dice|1}d20<br />
// 1 would be the default<br />
</pre><br />
<br />
=====Drop-down Queries=====<br />
<br />
You can specify a list of options which can be presented to the [[player]], rather than only a free-form text field. Be mindful about if/when you add spaces inside a Roll Query, as having/not having them changes how things work. If the content of the dropdown query includes characters like <code>|</code>,<code>{</code>,<code>}</code>, and<code>,</code>, you will likely need to use [[#HTML replacement|HTML replacement]] for them to make it work.<br />
<br />
Syntax:<br />
<pre style="overflow:auto;white-space:pre-wrap;">?{Name of Query|Option1|Option2|Option3|Option4|Option5}</pre><br />
<br />
Example:<br />
<pre style="overflow:auto;white-space:pre-wrap;">/em attempts ?{Difficulty level|an Easy|a Moderate|a Hard} task.</pre><br />
<br />
You can also specify a separate label for each option, instead of displaying the Option itself in the dropdown.<br />
<pre style="overflow:auto;white-space:pre-wrap;">?{Name of Query|Label 1,Option1|Label 2,Option2}</pre><br />
This can be useful if the Option itself is long, or if it's better to describe what the options represent, rather than show exactly what they are.<br />
<br />
'''Example:'''<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
/r d20+?{Stat:|Strength,2|Dexterity,1}<br />
</pre><br />
<br />
If you place the drop-down query at the start of a macro, make sure there is no space after the <code>,</code>, as this will break any macro or command inside it.<br />
<br />
<pre style="overflow:auto;white-space:pre-wrap;">?{Attack|Just roll,/r d20+5|Description,/em swings the sword with a result of [[d20+5]]}</pre><br />
{| role="presentation" class="wikitable mw-collapsible mw-collapsed"<br />
| non-functional version<br />
|-<br />
| <pre style="overflow:auto;white-space:pre-wrap;">?{Attack|Just roll, /r d20+5|Description, /em swings the sword with a result of [[d20+5]]}</pre><br />
|}<br />
<br />
Repeating the same-named Roll Query within a macro will prompt the [[player]] only once, however the result will be evaluated wherever it is included.<br />
<pre style="overflow:auto;white-space:pre-wrap;">&{template:default} {{name=Test Attack}} {{attack=[[1d20]]}} {{damage=[[2d6+?{Extra Damage?|0}]]}} {{Crit damage=[[12+?{Extra Damage?|0}]]}}</pre><br />
<br />
You may also split up Roll Queries on multiple rows to make the code more readable. ''Extra line breaks in code isn't generally a good idea, and could be good to avoid to not create errors.''<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
/roll 1d20 + ?{Choose an Attack|<br />
Melee,3[STR] |<br />
Ranged,2[DEX] |<br />
Magic,1[INT] }<br />
</pre><br />
<br />
If you're listing macros in your roll query, you '''must''' have a space after the macro name, so Roll20 knows the name ends inside the query.In the below example, the three rolls have been saved into macros on the {{Collections}}-tab which then can be referenced in the macro.<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
?{Choose an Attack|<br />
Melee,#str |<br />
Ranged,#dex |<br />
Magic,#int }<br />
</pre><br />
<br />
* {{forum|permalink/6053873/ Query Ordering Without Affecting Functionality}} how to borrow API command syntax(works for free users) - [[Ziechael]]<br />
* [[Chat Menus]],by Keith – In some cases, creating a '''chat menu''' for your macros is easier or better than making a complicated Query with several options.<br />
<br />
====[[Nesting]]====<br />
To some degree, you can nest abilities, macros and queries. <br />
<br />
* [[Nesting#Nesting Queries|Nesting Queries]]<br />
* [[Nesting#Nesting Macros|Nesting Macros]]<br />
* [[Nesting#Nesting Abilities|Nesting Abilities]]<br />
* [[#HTML replacement|HTML replacement]]<br />
<br />
If you start nesting queries too much, you need to start using HTML replacement characters to keep the macros working. Once saved, these macros shouldn't be opened(if saved in the {{Collections}}-tab's Macro section, as opening a macro that have HTML replacement will result in those being converted into regular things, breaking your macro.<br />
<br />
* [https://app.roll20.net/forum/permalink/6582632/ Drop down Nester] google sheet that generates the HTML replacement code needed. by [[Scott C.]]<br />
* [https://www.freeformatter.com/html-entities.html HTML entities] contains a longer list of all the existing HTML replacement code, of which only few are used/needed in Roll20 context.<br />
<br />
====Initiative====<br />
<small>{{main|Macros/Initiative}}</small><br />
<!-- TODO translcusion Macros/Initiative --><br />
To send a roll result directly to the {{Turn Tracker}}, first, select the [[Token]] you wish to roll initiative for, and then make a roll that includes the <br />
<code>&{tracker}</code>-flag. You can also increase/decrease initiative by using <code>&{tracker:+}</code>/<code>&{tracker:-}</code>.<br />
{{ex}}<br />
* <code>/roll 1d20 + 5 &{tracker}</code><br />
* <code><nowiki>&{template:default} {{name=Initiative}} {{Roll=[[1d20+4 &{tracker}]]}} </nowiki></code><br />
* <code>/roll 1d4 + 1 '''&{tracker:+}'''</code> (increases the initiative by <code>1d4+1</code>)<br />
* <code>/roll 2 '''&{tracker:-}'''</code> (decreases the initiative by a flat <code>2</code>)<br />
* <code>[[5 &{tracker:-}]]</code> (inline roll that decreases the initiative by a flat <code>2</code>)<br />
<br />
See also: [[Cards#Using_Cards_for_Initiative_Order|Using Cards for Initiative Order]]<br />
<br />
'''Referencing values on the turn tracker:''' by calling <code>@{Tracker|character_id}</code> <code>@{Tracker|character_name}</code>, you can check what values are on the turn tracker. ex. <code>Bobs initiative is @{tracker|Bob}.</code><br />
<br />
Tricks using the {{Turn Tracker}}:<br />
{{:Turn Tracker/Tricks}}<br />
<br />
====Chat Buttons====<br />
There are two types of buttons you can create in the Text Chat to be included in a macro/dicerolling result.<br />
<br />
'''[[Macros#Ability_Command_Buttons|Ability Command Buttons]]'''<br />
<br />
Ability Command Buttons can be used to call [[Journal#Abilities|Abilities]] (or [[Character_Sheets#Sheet_Rolls|sheet button rolls]]) from a clickable button in the Text Chat. They are very closely related to [[API:Chat#API_Command_Buttons|API Command Buttons]].<br />
<br><br><br />
Their syntax is as follows:<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
[Label](~<keyword>|<ability name>)<br />
[Dex Check](~Bob|dexterity)<br />
[Dex Check](~selected|dexterity_save)<br />
[Dex Check](~selected|repeating_attack_$0_attack)<br />
</pre><br />
As with [[Journal#Attributes|Attribute]] and [[Journal#Abilities|Ability]] calls, the '''keyword''' is your choice of <code>selected</code>, <code>target</code> or a character_name. You can also use a character_id as a keyword.<br />
<br><br><br />
If you have an Ability Command Button saved somewhere within one of the tabs of the [[Journal#Character_Window|Character Window]], you can choose to omit a keyword:<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
[Label](~<ability name>)<br />
[Dex Check](~dexterity)<br />
</pre><br />
<br />
'''[[#API_Command_Buttons|API Command buttons]]'''<br />
<br />
API Command buttons do not actually use the API—anyone can make and use them. The '''[[Chat Menus]]''' trick by Keith, uses utilizes them to great length.<br />
<br />
====Errors====<br />
If there is a mistake in the macro, or an attribute is missing, the roll might not work at all and only send and error message in the chat.<br />
<br />
In some cases you can suppress error message and the roll will try to do what it can while removing the error message.<br />
: <code>/roll 1d20 + @{selected|nonexistent_attribute} '''&{noerror}'''</code><br />
<br />
* Advanced Trick: [https://app.roll20.net/forum/permalink/9102789/ Catering for 'missing attributes' when summing values] by Ziechael shows how you can account for unknown number of stats in a repeating section, beyond just using <code>&{noerror}</code><br />
<br />
===[[Roll Table]]===<br />
If you have [[Roll Tables]] on your {{Collections}}-tab, they can be used in rolls & macros.<br />
<br />
'''Example1:'''<br />
<br />
Let's assume there exist a roll table with the name <code>fumble</code>.<br />
<br />
You can roll a table directly in the chat input, or in a macro, simply as <code>1t[fumble]</code>.<br />
<br />
'''Example 2:'''<br />
To roll your &quot;crit-failure&quot; table two time, you would enter <code>/roll 2t[crit-failure]</code>. You can change <code>2</code> to whatever number you would like. However, this currently does not work with inline rolls.<br />
<br />
You can also roll a table inline in chat or a macro by wrapping it in double square brackets like this <code>[[1t[table-name]]]</code>. Currently, any number beyond 1 does not display for the inline roll, the results are show on mouseover though.<br />
<br />
* [https://app.roll20.net/forum/post/5899495/stupid-roll20-tricks-and-some-clever-ones/?pageforid=6948596#post-6948596 Nestable Rollable Tables (Free User Version)] - Blue64<br />
* [https://app.roll20.net/forum/permalink/8724512/ Using Rollable Tables and Custom Handouts for Character Cards Using Rollable Tables and Custom Handouts for Character Cards] - Drew<br />
* [https://app.roll20.net/forum/permalink/8851426/ Inline Rolls in Rollable Tables] - Eric B (plus followup posts)<br />
* [https://app.roll20.net/forum/permalink/8788506/ Conditional Text] - Mike deBoston<br />
* [https://app.roll20.net/forum/permalink/6852555/ Rollable Encounter Images] - Blue64<br />
* {{forum|permalink/9898031/ Nesting Roll Tables}}<br />
<br />
<br />
===[[Roll Templates]]===<br />
''Main Page:'' '''[[Roll Templates]]'''<br />
<br />
You can access the Default Roll template in any game, to structure your results in the Text Chat. You simply write the template in the chat/macro( and don't use the <code>/roll</code>).<br />
[[File:Roll template default example.JPG||right]]<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
&{template:default} {{name=Test Attack}} {{attack=[[1d20]]}} {{damage=[[2d6]]}}<br />
</pre><br />
<br />
You can use a Roll Template in general messages (without a command like <code>/desc</code> or <code>/emote</code>) and whispers. You can't use roll templates with the <code>/roll</code> command; instead, Roll Templates are meant to be used with inline rolls. As long as they use inline rolls, you can use Roll Templates with macros, Character Abilities, and sheet authors can use them inside of their Roll Buttons on sheets.<br />
<br />
{{orange| Macros for roll templates are sensitive to leading spaces, so '''<code><nowiki>{{name=Dexterity}}</nowiki></code>''' will work, but '''<code><nowiki>{{ name=Dexterity}}</nowiki></code>''' won't. }}<br />
<br />
Many character sheets have built in Roll Templates that can only be used with those specific character sheets.<br />
<br />
''Tricks:''<br />
<br />
* '''Use images with Default Roll Template:''' If you want to dress up your default template, you can stuff an image in the name portion instead of just text<br />
** Example: <code><nowiki>&{template:default}{{name=[x](YOUR_IMAGE_URL#.png)}}{{test=foo}}</nowiki></code><br />
* '''[https://app.roll20.net/forum/permalink/9112320/ Overwriting Template Fields in Macros]''' - Oosh<br />
<br />
<br />
===Advanced===<br />
<br />
{{forum|permalink/5899495/ Roll20 Tips and Tricks (Innovative Solutions to Common Problems)}} contains a large amount of tricks and examples of clever uses for macros etc. that is a must to check out. <br />
<br />
* [[Hidden Rolls]] - have the player make blind rolls, and only the GM see the result.<br />
* [[Macro Character Sheet]] - [[keithcurtis]]<br />
* [[Reusing Rolls]] - clever trick to reuse rolls withing the same command. Was discovered in mid-2020.<br />
<br />
Here under are mentioned a limited number of the list's tricks(more could be listed or copied entirely to the wiki):<br />
* [[Toggleable template fields]]<br />
* [https://app.roll20.net/forum/permalink/10693202/ Macro curiosities, or how to overcomplicate everything] by RainbowEncoder <br />
* {{forum|permalink/9663315/ Tooltips for links, roll buttons etc.}} - RainbowEncoder |{{forum|permalink/6397574/ Tooltip Hack (older)}} - Aranador<br />
* {{forum|permalink/6356266/ DM whispers without breaks}}<br />
* {{forum|permalink/8080373/ Dynamic Multitarget Roll without API}} - Barakka<br />
* {{forum|permalink/6137639/ Prefix Trick to Variably Call Attributes}} - Kyle G.<br />
* {{forum|permalink/8511142/ Hypertext Macro to Open a Linked Character Sheet}} - [[Vince]]<br />
* {{forum|permalink/7406810/ Use a Macro to Report on Obscure Character Abilities and Rules}} - macro template for calculating/showing derivative stats that aren't listed on the sheet but can be known, such as how long a character can hold breath. by PapaWhiskey11<br />
* [https://app.roll20.net/forum/permalink/9840963/ Skill check with text result]<br />
* [https://app.roll20.net/forum/permalink/10557595/ Keep Nth; Select from sequence] - RainbowEncoder<br />
====Images====<br />
Various ways to use or show images in macros or the chat.<br />
<br />
* {{forum|permalink/6814834/ Pictures and GIFs in Chat and Abilities}} - Blue64<br />
* {{forum|permalink/6827714/ Monster Images in Chat}} - Kirsty<br />
* {{forum|permalink/9031455/ Using Images as Links}} - [[Oosh]]<br />
* {{forum|post/9209645/inserting-images-into-macros Inserting Images into Macros}}<br />
* [https://app.roll20.net/forum/permalink/10377160/ Make gif loop infinitely] - [[Oosh]]<br />
* [https://app.roll20.net/forum/permalink/10376893/ Displaying Images Based On Roll Results] - Fnux<br />
====Chat Menus====<br />
''Idea by Keith Curtis''<br />
<br />
Creating a '''[[Chat Menus]]''' for your macros is a great shortcut to have access to many buttons by only calling the chat menu macro.<br />
<br />
==[[Token]]==<br />
Main Section: [[Macros#Token]]<br />
<br />
You can target the stats of tokens(and the stats of a linked character sheet) by two methods, using either '''[[Macros#Using_a_Selected_Token_with_a_Macro|@{selected}]]''', or '''[[Macros#Using_a_Targeted_Token_with_a_Macro|@{target}]]'''.<br />
<br />
<br />
===Variables===<br />
List of token-specific stats you can target with the usual <code>@{}</code> commands, that doesn't need to rely on having a [[Link Token|character sheet linked to the token]]:<br />
<br />
* <code>bar1</code>,<code>bar2</code>,<code>bar3</code> ''(max values called with <code>@{bar1|max}</code>, <code>@{bar2|max}</code>, <code>@{bar3|max}</code>)''<br />
* <code>token_name</code><br />
* <code>token_id</code><br />
<br />
If a character sheet is linked, and you have linked a sheet attribute to one of the bars, you can reference that stat either by targeting the token's bar, or the actual name of the attribute on the sheet.<br />
<br />
{{ex}}<br />
* <code>Token **"@{selected|token_name}"** has [[@{selected|bar1}]] out of [[@{selected|bar1|max}]] HP left.</code> - displays the token name and the current/max value of bar1<br />
** token bar max values need to be referenced with <code>@{attrname|max}</code>, using <code>@{attrname_max}</code> doesn't work.<br />
* <code><nowiki>&{template:default} {{name=**Character & Token ID**}} {{Character Name=@{selected|character_name} }} {{**Character ID**= @{selected|character_id} }} {{**Token Name**= @{selected|token_name} }} {{**Token ID**= @{selected|token_id} }} {{**Bar 1**= @{selected|bar1} / @{selected|bar1|max} }} {{**Bar 2**= @{selected|bar2} / @{selected|bar2|max} }} {{**Bar 3**= @{selected|bar3} / @{selected|bar3|max} }}</nowiki></code><br />
** a macro that displays the <code>token_id</code>, <code>token_name</code> and token bar values, as well as the <code>character_id</code> & <code>character_name</code> if token is linked to a sheet.<br />
<br />
===selected===<br />
Main page: '''[[Macros#Selected_Token_with_a_Macro|@{selected}]]'''<br />
<br />
When using '''[[Macros#Selected_Token_with_a_Macro|@{selected}]]''', you need to first select the token you want to use, before making the roll, and you can only have one token using this method.<br />
<br />
The <code>selected</code>-keyword will allow you to pull information from the element that is currently selected on the screen when the roll/macro is executed. So for example, if you want to pull the value of Bar 1 from the selected [[Token]] during a roll, you can do:<br />
<br />
<pre data-language="javascript">/roll 1d20 + @{selected|bar1}</pre><br />
<br />
You can use "bar1", "bar2", or "bar3". In addition, you can also pull an attribute from the Character linked to that token, if there is one:<br />
<br />
<pre data-language="javascript">/roll 1d20 + @{selected|Intelligence}</pre><br />
<br />
You can pull the Name of the currently selected tokens by using the &quot;token_name&quot; variable.<br />
<br />
<pre data-language="javascript">/em @{selected|token_name} fires his gun!</pre><br />
<br />
If the selected token has a character journal linked to it, you can pull the Name from the character journal instead, using the &quot;character_name&quot; variable.<br />
<br />
<pre data-language="javascript">/em @{selected|character_name} blocks with his shield!</pre><br />
<br />
You can also trigger abilities from the linked character journal by using the ability name as a variable.<br />
<br />
<pre data-language="javascript">%{selected|Attack}</pre><br />
<br />
Finally, we've introduced a third argument for variables, allowing you to pull the "max" of a bar or attribute:<br />
<br />
<pre data-language="javascript"><br />
/roll 1d20 + @{Guard|Intelligence|max}<br />
/roll 1d20 + @{selected|bar2|max}<br />
</pre><br />
<br />
On token bars, you must reference max values with the <code>@{selected|bar1|max}</code> syntax, while for character attributes, both <code>@{selected|attrname|max}</code> and <code>@{selected|attrname_max}</code> works.<br />
<br />
===target===<br />
Main page: '''[[Macros#Targeted_Token_with_a_Macro|@{target}]]''',<br />
<br />
When using [[Macros#Targeted_Token_with_a_Macro|@{target}]], you make the roll first, and then get prompted to select the target token(s), before the roll is then executed. You can target several tokens/characters in a single roll.<br />
<br />
<pre data-language="javascript"><br />
/roll @{target|bar2}d6<br />
/roll 1d20 - @{target|strength}<br />
</pre><br />
This will bring up a prompt screen for the player to select which token target they are rolling against:<br />
<br />
[[File:Choosetarget.png]]<br />
<br />
The full syntax for the target variable is:<br />
<br />
<pre data-language="javascript">@{target|<target_name>|<attribute_name>|<optional_flags>}</pre><br />
(Note that <code>target_name</code> is optional if you only have one target. Name can be anything you like, and can include spaces.)<br />
<br />
So if you want to have multiple targets in your macro you can do:<br />
<br />
<pre data-language="javascript">@{target|Target1|HP} vs @{target|Target2|AC}</pre><br />
<br />
And if you want to use the max of an attribute:<br />
<br />
<pre data-language="javascript"><br />
@{target|bar1|max} - token max values can only be referenced with "|max"<br />
@{target|HP_max} - max value of HP, from the linked character sheet<br />
@{target|Target1|HP|max} - alternative method for the above<br />
@{target|target 1|HP_max} @{target|target 2|HP_max} - check max HP of two tokens<br />
@{target|target 1|HP|max} @{target|target 2|HP|max} - alternative method for the above<br />
</pre><br />
<br />
Note that if you want to use the "max" flag you must specify the name of the target yourself, even if you just put "target1" as above.<br />
<br />
Additionally, if you use the same target_name in multiple attribute queries, you will only get prompted for it once and the same token will be used to fulfill all of the attribute queries. This also applies when you have multi-line macros or commands:<br />
<br />
<pre data-language="javascript">/me strikes out at @{target|foe|character_name}!<br />
**To Hit**: [[1d20+3]] vs. @{target|foe|npc_AC} AC<br />
</pre><br />
<br />
===[[Token Actions]]===<br />
Token Actions are specially-designated [[Macros|macros]] and [[Character#Abilities|character abilities]] (with tokens [[Linking_Tokens_to_Journals|representing a character]]) which appear whenever a token is selected on the screen. They appear in a bar along the top of your screen, and the contents of the bar are context-sensitive. When you select a token, all macro token actions will be shown, as well as ability token actions for the token's linked character (if applicable).<br />
<br />
==Journal==<br />
main page: [[Journal#Journal_Command_Buttons|Journal Command Buttons]]<br />
<br />
<br />
===Character Attributes===<br />
How to reference character/Character sheet Attributes: [[Journal#Attributes]]<br />
<br />
Each character also have a few [[BCS/Pseudo-attributes|pseudo-attributes]] that always exists, even if there is no sheet or Attributes statted for them<br />
<br />
From a custom command, anywhere:<br />
<pre><br />
/r 1d20+@{Bob|str}<br />
</pre><br />
<br />
If macro is saved to a character's [[Journal#Attributes_.26_Abilities_Tab|A&A]]-tab, to a [[Link Token|token linked]] to a sheet, or is embedded in the character sheet's button (code): <br />
<pre><br />
/me makes a Strength roll of [[1d20+@{str}]]<br />
</pre><br />
<br />
====Repeating Section====<br />
[[Macros#Referencing_Repeating_Attributes|Referencing Repeating Attributes]]<br />
<br />
===Character Abilities/Roll Buttons===<br />
<br />
'''Button'''<br />
Most char sheets have roll buttons, which can be called directly with a <code>%</code>-command.<br />
<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
%{Bob|dexterity} // call the dex roll for a character named bob<br />
%{selected|dexterity} // call the dex roll for the character linked to the selected token<br />
</pre><br />
<br />
'''[[Character#Abilities|Abilities]]'''<br />
<br />
If you have saved custom Abilities to a character's [[A&A#Attributes_.26_Abilities_Tab|Attributes & Abilities]]-tab, you can call the ability with the same <code>%</code>-syntax as buttons. These are character-specific, so unless other characters have an ability with the same name, it wont work.<br />
<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
%{Bob|customability}<br />
%{selected|customability}<br />
</pre><br />
<br />
When writing an ability macro, you dont have to specify the characters name, and can call attributes directly(<code>/r 1d20+@{dex}</code>)<br />
<br />
===Handout===<br />
You can add roll buttons with macros to [[Journal#Handouts|Handouts]], with the help of hyperlinks.<br />
<br />
* {{yt.be|pkDC-nP3vCE Running Commands from Handouts in Roll20}} 8min, Nick O.<br />
<br />
* {{fpl|9283622/ handout link in macro}} - opens the handout in the [[Journal#External_Journal_Access|External Journal]]<br />
<br />
==[[API]]==<br />
{{pro only|section}}{{apiboxRec}}<br />
<br />
'''[[API|API commands]]'''(AKA '''API calls'''), start with <code>!</code> and then the name of the API command, and then write any other parameters for the API. Some API macros can be embedded into regular macros, such as [[ChatSetAttr]]. To use any API in macros, the specific APIs[[API#Install_API| need to be installed in the game]] for them to work. Here are some examples of API commands/macros.<br />
<br />
'''Example 1:'''<br />
writing <code><nowiki>!wd [[4d6+2]]</nowiki></code> in the chat will trigger the '''[[Script:Wild Dice]]''' script to make a custom roll output, rolling 3 normal d6 dice, and one Wild Die, presenting it in a table. If the Wild Die comes up as a "1", it, and the value of the highest dice is removed form the roll total. This is not something that can be done with macros alone, which is why this API was created.<br />
<br />
[[File:Wild-Dice-result-v3-4.png]]<br />
<br />
'''Example 2:'''<br />
<br />
writing <code>!group-init</code> in the chat will trigger the '''GroupInitiative'''(must be installed) API that uses <code>group-init</code> as a keyword. This particular API command would roll initiative order for all selected tokens, if the API is configured to know what stats to roll.<br />
<br />
'''Example 3:'''<br />
<br />
writing <code><nowiki>&{template:default} {{name=Cthulhu}} !modattr --silent --charid @{target|character\_id} --sanity|-{{Sanity damage=[[2d10+2]]}} --corruption|{{Corruption=Corruption increases by [[1]]}}!!! {{description=Text}}</nowiki></code> in the chat, and selecting a [[Token]] on the map, will decrease sanity by 2d10+2 and increase corruption by 1 for the character selected.<br />
<br />
This is the '''[[Script:ChatSetAttr|ChatSetAttr]]''' API, which can be used standalone with the <code>!modattr</code> command, but more notably, can be incorporated into regular macros, resulting in you being able to both make rolls and have the result change the stats.<br />
<br />
===[[API:Chat#API_Command_Buttons|API Command Buttons]]===<br />
{{main|API:Chat#API_Command_Buttons}}<br />
{{notebox| '''You don't need Pro or API access to use API Command Buttons!''' They are heavily featured in [[Chat Menus]], which everyone can create.}}<br />
<br />
They have simple Markdown formatting:<br />
<br />
<code>[Attack Roll](!attackroll)</code><br />
<br />
You can also send them into the chat for others to use, but them needs to use HTML Replacement like with [[#Nesting|Nesting]]:<br />
<br />
<code>[Attack Roll](!attackroll &amp;#64;{target|token_id} &amp;#91;[1d6+&amp;#63;{Bonus|0}]&amp;#93;)</code> <br />
<br />
API Command buttons do not actually use the API — anyone can make and use them. The '''[[Chat Menus]]''' trick by [[Keith]], uses utilizes them to great length.<br />
<br />
''Tricks:''<br />
* {{forum|permalink/6009949/ 2 column API buttons in Default Roll Template}} - Bryan P<br />
===Macros===<br />
{{:Macros/API}}<br />
===Relevant API===<br />
APIs that have lots of commands or have lot to do with dice rolling.<br />
<br />
* '''[[Script:ChatSetAttr|ChatSetAttr]]''' - can be used [[inline]] & mixed in with other macros, and can edit stats, which normal macros can't<br />
* [[ScriptCards]] - API made to display stats in variety of way in the chat, essentially a sophisticated, API-based version of the Default Roll Template with massive amount of features. It can be used to call other API like ChatSetAttr or TokenMod<br />
* [[APILogic]] -- Gives If/ElseIf/Else Processing, [[Inline]] Math operations, and Variable Muling to Other Scripts | {{forum|permalink/9771314/ APILogic}}<br />
* {{fpl|9817678/ SelectManager}} - help other API with properly sharing token selection between other APIs. Often API that can call other APIs doesn't share what tokens are currently selected.<br />
* {{forum|permalink/9770117/ libInline}} - provides an easy interface for inlinerolls<br />
* {{forum|permalink/9097236/ InsertArg & XRay}} script that gives you a way to interact with information in the game and feed it to the chat and/or other scripts, or to build your own output on the fly.<br />
* [[TokenMod]] – API that can edit any info on tokens. If token's are linked to a character, the changes to token bars extends to the character sheet.<br />
* {{forum|permalink/9441420/ CombatMaster}} Manages many facets of combat. It allows for API and Macro calls at various timing points (beginning of each round, beginning of each turn, when a condition is assigned, when a condition is removed). <br />
* {{forum|permalink/8458497/ Token Action Maker}}<br />
* [[Script:Rollable_Table_Macros|Rollable Table Macros]] -- a simple script that gets an item from a [[Roll Table|rollable tables]] and enters its name as a chat message rather than showing it as a rollable table result<br />
* [[Script:Star Wars: Fantasy Flight Games - Dice Roller]] - API for rolling the custom dice system used in the game<br />
* [[Script:It's a Trap|It's a Trap!]] Can be used to create a Trap that can automate rolls related to the trap, both for the trap and for the character(such as saves). There exists a generic one, as well as a number of system-specific version designed with popular sheets in mind(D&D5e, Pathfinder 1E)<br />
* '''[[API:Script Index]]''' curated list of Roll20 APIs available<br />
<br />
==Character Sheet Creation==<br />
Info and links to things that are only relevant or usable for when you're [[BCS|Building/Editing Character Sheets]]. Consult the rest of the guide for general details.<br />
<br />
* [[Select Attributes for Sheet Roll]] - An advanced technique for creating a dynamic roll button on your sheet <br />
<br />
===[[Button#Roll_Button|Roll Button]]===<br />
The rest of this guide will help in creating more complicated macros, but the main [[Button#Roll_Button]]-page have some concrete examples of how macros are implemented in character sheets.<br />
<br />
===[[Sheetworkers]]===<br />
With the info from [[Macros]], fairly complex outputs to the {{Text Chat}} can be made, but to be able to construct complex and dynamic results based on various factors on your character sheet, you will need to use JavaScript to write [[Sheet Worker Scripts]] that modify & construct your roll output dynamically.<br />
<br />
* [[Select Attributes for Sheet Roll]]<br />
<br />
===Roll Template===<br />
When you create/edit a character sheet, you can make your own Roll Templates to make your roll output look like you want, and to do some conditional things such as only showing some sections in case of a critical roll in another sections.<br />
<br />
See '''[[Building_Character_Sheets/Roll_Templates|Creating Roll Templates]]''' for how to make your own.<br />
<br />
[[Building_Character_Sheets/Roll_Templates#Helper_Functions|Helper Functions]] describes what functions you can build into your sheets.<br />
<br />
==External Tools==<br />
* '''[[VS_Code#Roll20_Syntax_Highlight|Roll20 Macros - a Visual Studio Code Extension]]''' by [[Andreas J.]]<br />
** syntax highlight and autocomplete help for roll20 macro writing. Makes reading, writing, & identifying mistakes in macros easier with color-coding matching brackets and more. <br />
* [[Stylus]]<br />
** Can be used for some advanced macro tricks, like [[Hidden Rolls]]<br />
* [[Browser Developer Tools#Macros]] - can be used to figure out attribute & Repeating section names from character sheets<br />
<br />
==Related Pages==<br />
* '''[[Complete Guide to Macros & Rolls]]'''<br />
** {{Text Chat}} - where the roll results appear, & info on the common chat commands<br />
** [[Dice Reference]] - Comprehensive list of how the Roll20 dice-rolling syntax works, and list the features available<br />
** [[Macros]] - How to create macros, and other info on how the Roll20 <span style="font-family:Pictos;">q</span>Text Chat works, like referencing stats on character sheets, roll queries, nesting macros & initiative<br />
*** [[Reusing Rolls]]<br />
*** [[Chat Menus]]<br />
** [[Roll Templates]] - a method of formatting roll results in the chat, with some extra functions<br />
** [[Tokens]]<br />
** [[API]]''(Pro Only)'' - API commands can be used in the <span style="font-family:Pictos;">q</span>Text Chat<br />
* [[Forum Tricks]]<br />
** [[Macro Sheet]]<br />
<br />
==Other Guides==<br />
<br />
==TODO==<br />
* add image examples of every macros used, input + output<br />
* at least one example for each mentioned concept<br />
* Roll Template examples<br />
* List rest of the examples from "Stupid Tricks" thread<br />
* new sections<br />
** Chat Tooltip<br />
** [[Stylus|Stylus]], for tricks like the hidden rolls<br />
* Split page:<br />
** macro formatting<br />
** HTML styling<br />
* copy tips from [[Macros/Pathfinder Examples]]<br />
<br />
=See Also=<br />
* {{forum|permalink/5899495/ Roll20 Tips and Tricks (Innovative Solutions to Common Problems)}} - Well maintained List of good Roll20 Tricks.<br />
* [https://cybersphere.me/roll20-dice/ Everything About Rolling Dice] - A comprehensive guide to rolling dice in Roll20.<br />
* [[Macro Character Sheet]] - how to easily move all your macros between games<br />
* {{Text Chat}}<br />
* {{Collections}}<br />
** [[Macros]]<br />
** [[Roll Tables]]<br />
** [[Cards]]<br />
* [[Building Character Sheets]] - {{Pro}}<br />
* [[API]] - {{Pro}}<br />
* [[Campaign Management]]<br />
** [[Link Token|Link Token to Sheet]]<br />
** [[Add Character Sheet]]<br />
** [[GM]] & [[Player]] tools & limits<br />
* [[Browser#Stylus|Stylus Plugin]] - customize the looks of Roll20 for yourself<br />
<br><br />
<br><br />
[[Category:Macros]]<br />
[[Category:Character Sheet Creation]]<br />
[[Category:Guides]]<br />
[[Category:Featured articles]]</div>1223200https://wiki.roll20.net/Complete_Guide_to_Macros_%26_RollsComplete Guide to Macros & Rolls2024-03-18T06:43:13Z<p>1223200: /* External Tools */</p>
<hr />
<div>{{revdate}}{{clear}}<br />
{{NavMacroDocs}}<br />
This is meant to serve as a comprehensive guide & starting point for figuring out how the {{Text Chat}}, [[Dice Reference|Dice Rolling]], [[Macros]] and related things work and interact with each-other, to find the documentation for each, and to list everything you can write/make appear in the {{Text Chat}}.<br />
<br />
This is both for [[Players]] and [[GM|Gamemasters]] who are just writing their own custom rolls or macros to be used in their game, as well as those who [[BCS|build Character Sheets]] and are creating/editing [[Button#Roll Button|Roll Buttons]] for their sheets.<br />
<br />
{{#evp:youtube|SlwAXIDFveo|Creating [[Macros]] in Roll20 (Nick Olivo)|right|600}}<br />
==[[Text Chat]]==<br />
[[File:Basic-roll-example.png|left|thumbnail|400px|]]<br />
The {{Text Chat}}-page shows the basic commands that can be used in the chat, such as <code>/roll</code>(<code>/r</code>) for making simple rolls, <code>/em</code> for emoting actions, <code>/w</code> for whispering to someone, and <code>/gmroll</code>( <code>/gr</code>) for sending simple rolls to the GM.<br />
<br />
You can write in the {{Text Chat}} normal text without using any commands like <code>/r</code>.<br />
<br />
See [[#Chat Commands|Chat Commands]]-sections for examples, or the <br />
<br />
'''Normal macros can't edit stats, only read them.''' To edit stats with a command, you need to use [[#API|API]] in some form. <br />
{{clear}}<br />
===Formatting===<br />
{{main|Macros/Formatting}}<br />
{{:Macros/Formatting}}<br />
<br />
==Chat Commands==<br />
''Main Page:'' '''{{Text Chat}}'''<br />
<br />
* <code>/r</code>, <code>/roll</code> - for making simple rolls. '''Ex.''' <code>/r 1d20+5</code><br />
* <code>/w</code> - for whispering a message to a person so only they see it. '''Ex.''' <code>/w Alice Does the goblin know the paladin?</code>, <code>/w "Bob Smith" Where's the money pouch?!</code><br />
* <code>/gr</code>, <code>/gmroll</code> - to make rolls only to the GM. '''Ex.''' <code>/gr 2d6+3</code><br />
* <code>/em</code> to emote as the character selected. '''Ex.''' <code>/em takes out one of his throwing daggers and brandishes it threateningly.</code><br />
* <code>/ooc</code> - to message something that is Out-of-character '''Ex.''' <code>/ooc I could really use another coffee right now.</code><br />
* <code>/talktomyself</code> - To turn off your chat display for all others, including the GM and the chat archive recording. Use it again to turn it back on<br />
* <code>/fx</code> - used for creating visual effects '''Ex.''' <code>/fx beam-acid @{target|Caster|token_id} @{target|Foe|token_id}</code><br />
* [[GM]]-exclusive:<br />
** <code>/desc</code> to describe the situation '''Ex.''' <code>The old house begins to creak and moan...</code><br />
** <code>/as</code> to send a regular chat message as any character, but with no avatar '''Ex.''' <code>/as "Sir Bearington" I'm going to eat you for breakfast.</code><br />
** <code>/emas</code> emote as any character, similar to <code>/em</code> but with no avatar '''Ex.''' <code>/emas Sir Bearington decides to have porridge instead.</code><br />
<br><br />
Beyond using the various Roll Commands shown on the {{Text Chat}}-page, here are some other examples of what you can write in the {{Text Chat}}:<br />
* [[Macros]] - Start with <code>#</code>, and start typing the macro name, and a list of your macros will be displayed.<br />
** '''Example:''' writing <code>#testmacro</code> in the chat will roll the macro with that name<br />
* [[Roll Templates]] - <code><nowiki>&{template:name-of-roll-template} {{sectionname(optional)=content of roll template}}</nowiki></code>.<br />
** The Default Roll Template is available in any games, other templates are tied to specific Character Sheet Templates. (E.g. you can only access the specific <code>&{template:simple}</code> when you have [[D&D 5E by Roll20]]-sheet in the game). <br />
** '''Example:''' <code><nowiki>&{template:default} {{name=Test Attack}} {{attack=[[1d20]]}} {{damage=[[2d6]]}}</nowiki></code><br />
** This will generate a roll template using the default template, displaying "Test Attack" in the purple title, then on a new row the result of <code>1d20</code> roll, and on the third row the <code>2d6</code> roll<br />
* [[Character#Attributes|Character Abilities]]/Character Sheet Button - <code>%{character name|ability or roll button name}</code><br />
** '''Example 1;''' writing <code>%{Sam Bobbins|initiative}</code> in the chat, will work if there exists a Character with that name, who have a Character Ability/[[Character Sheet]] Roll Button by that name<br />
** '''Example 2:''' selecting a [[Token]] on the map, and then writing <code>%{selected|initiative}</code> in the chat, will work if the token is linked to a character sheet that has an Ability or Roll button with that name.<br />
* [[API|API commands]]''(available in games hosted by a pro user)'', - Start with <code>!</code> to call the API command, and then write and parameters it can take<br />
** '''Example:''' writing <code>!setattr</code> in the chat will trigger an API that uses <code>setattrd</code> as a keyword. Often these commands may have additional parameters, e.g. <code>!setattr --name John --hp|15</code><br />
<br />
===[[Dice Reference|Dice Syntax]]===<br />
The [[Dice Reference]] page shows how the syntax for the Roll20 dice rolling works, and all the advanced alternatives you can use, such as rolling [[Dice_Reference#FATE_Dice|Fate Dice]], or [[Dice_Reference#Target_Number_.28Successes.29|counting successes]] rather than the sum of the rolls. It also details when the green & red "[[Dice_Reference#Critical_Success_and_Fumble_Points|Critical Success/Failure]]"-highlights are shown. <br />
<br />
''Tricks:''<br />
* {{fpl|9171656/ Comparing numbers, greater than or equal to}} - Mike deBoston<br />
* {{fpl|7510681/ Bypass Blank Ability Call Math}} - Blue64<br />
* {{fpl|6113861/ Summing "Success" Rolls}} - Usually you can't both coun't the success and sum up rolls, but this is a close workaround by Bryan P. <br />
* {{fpl|8068345/ Fake Crits Using Math Instead of Dice}} - Noon<br />
* {{fpl|8717558/ Auto calculating level specific buffs. (Basic IF/THEN statement, no API)}} - Greg S.<br />
* {{fpl|6003370/ Keep Crits/Fumbles from Display on Attack Rolls}} - [[Scott|Scott C.]]<br />
<br />
====Inline Rolls====<br />
{{main|Inline Rolls}}<br />
[[File:Roll template default example2.JPG|right|thumb|350px|The output of a '''default template''' that shows an '''inline roll'''(yellow box) ]]<br />
If you use simple roll commands/macros like <code>/roll 2d10+5</code>, the whole command is a dice roll. But when you use [[#Roll Templates|Roll Template]], or have embedded dice rolls with other commands like <code>/em</code>, you use '''inline rolls''', where you wrap <code><nowiki>[[ ]]</nowiki></code> around the calculation for it to be processed. The result of "Normal" dice rolls is shown as individual dice images displaying the result on each dice separately, along with the total result.<br />
<br />
Inline rolls are just like regular rolls, with the following exceptions:<br />
<br />
* You can use them in any chat message, not just a roll. For example, you can do a regular chat message, an emote(<code>/em</code>), or a whisper(<code>/w</code>), with an inline roll included.<br />
* They are evaluated completely before any (<code>/roll</code>) commands, so you can use them as "random variables" in your rolls.<br />
* You will only see the result of the total roll, and you can hover over the result to see the individual dice rolls.<br />
* Highlights<br />
** If an inline roll contains a '''critical success''', it will be highlighted with a green box.<br />
** If there's a '''critical failure''', it's highlighted in red.<br />
** If it has '''both''' (because there was more than one roll), it's in blue.<br />
<br />
Also when you mouse-over the inline roll to see the details of the roll, it'll show red and green highlights for the rolls themselves for crits/fumbles.<br />
<br />
With inline rolls, the numerical end result is shown in a (yellow) box, and if you hover you mouse over the result, you see the full equation of the roll, along with the result of each.<br />
<br />
{{ex}}<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
/em swings their sword and does [[2d6+2]] damage.<br />
</pre><br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
&{template:default} {{name=Test Attack}} {{attack=[[1d20+5]]}}<br />
</pre><br />
<br />
====[[Inline Rolls#Inline Labels|Inline Labels]]====<br />
If you want to include additional comments before the end of the roll (we call them &quot;inline labels&quot;), use square brackets. For example, <code>/roll 2d10+5[Fire Damage] + 3d6[Ice Damage]</code>. Inline labels works both with "normal" rolls and '''inline rolls'''. <br />
<br />
When these comments are applied directly after a die roll they show up as tool-tips on the dice:<br />
<div class="diceroller"><br />
/roll 2d10+5[Fire Damage] + 3d6[Ice Damage]<br />
</div><br />
<br />
This is especially useful if a roll contains multiple variables and you want to look up what number comes from what attribute.<br />
<br />
'''You can even use sheet attributes in labels.''' Especially useful if the name of the stat can be customized by the user, so the corresponding label should change to reflect the name.<br />
{{ex}}<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
/r @{selected|customskill1}d6[@{selected|customskill1name}] + @{selected|str}[str]<br />
</pre><br />
<br />
===[[Order of Operations]]===<br />
{{:Order of Operations}}<br />
<br />
===[[Macros]]===<br />
The [[Macros]] page lists all the the other kind of options for modifying rolls that isn't covered by the '''[[Dice Reference]]'''-page. Also check the [https://app.roll20.net/forum/permalink/5899495/ Stupid Roll20 Tricks (and some clever ones)]-thread for Advanced and clever tricks that might not be linked on this page yet.<br />
<br />
Features include:<br />
* Adding options to user when roll is made('''Roll Queries''')<br />
* Using [[Macros#Using_a_Targeted_Token_with_a_Macro|@{target}]] and [[Macros#Using_a_Selected_Token_with_a_Macro|@{selected}]] to target tokens and their stats. See [[#Token|Token]]-section for interaction with them<br />
** {{forum|permalink/8048203/ Variable numbers of targets in an AoE attack}} - GenKitty<br />
* Automatically add a roll to the [[Turn Tracker]]<br />
* [[Reusing Rolls]]<br />
<br />
====[[Roll Query|Roll Queries]]====<br />
Sometimes you may have a roll (or a macro) which you want to change every time it is rolled. For example, you may want to roll a variable number of dice, or add a different modifier onto the roll each time you perform the action.<br />
<br />
Roll Queries allow you to prompt whoever is performing the roll to fill in a value when the roll is made. The syntax for a roll query is:<br />
<br />
<pre style="overflow:auto;white-space:pre-wrap;" data-language="javascript"><br />
?{Prompt Message}<br />
//Example:<br />
/roll ?{Number of Dice}d20<br />
//You can also include a default value:<br />
/roll ?{Number of Dice|1}d20<br />
// 1 would be the default<br />
</pre><br />
<br />
=====Drop-down Queries=====<br />
<br />
You can specify a list of options which can be presented to the [[player]], rather than only a free-form text field. Be mindful about if/when you add spaces inside a Roll Query, as having/not having them changes how things work. If the content of the dropdown query includes characters like <code>|</code>,<code>{</code>,<code>}</code>, and<code>,</code>, you will likely need to use [[#HTML replacement|HTML replacement]] for them to make it work.<br />
<br />
Syntax:<br />
<pre style="overflow:auto;white-space:pre-wrap;">?{Name of Query|Option1|Option2|Option3|Option4|Option5}</pre><br />
<br />
Example:<br />
<pre style="overflow:auto;white-space:pre-wrap;">/em attempts ?{Difficulty level|an Easy|a Moderate|a Hard} task.</pre><br />
<br />
You can also specify a separate label for each option, instead of displaying the Option itself in the dropdown.<br />
<pre style="overflow:auto;white-space:pre-wrap;">?{Name of Query|Label 1,Option1|Label 2,Option2}</pre><br />
This can be useful if the Option itself is long, or if it's better to describe what the options represent, rather than show exactly what they are.<br />
<br />
'''Example:'''<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
/r d20+?{Stat:|Strength,2|Dexterity,1}<br />
</pre><br />
<br />
If you place the drop-down query at the start of a macro, make sure there is no space after the <code>,</code>, as this will break any macro or command inside it.<br />
<br />
<pre style="overflow:auto;white-space:pre-wrap;">?{Attack|Just roll,/r d20+5|Description,/em swings the sword with a result of [[d20+5]]}</pre><br />
{| role="presentation" class="wikitable mw-collapsible mw-collapsed"<br />
| non-functional version<br />
|-<br />
| <pre style="overflow:auto;white-space:pre-wrap;">?{Attack|Just roll, /r d20+5|Description, /em swings the sword with a result of [[d20+5]]}</pre><br />
|}<br />
<br />
Repeating the same-named Roll Query within a macro will prompt the [[player]] only once, however the result will be evaluated wherever it is included.<br />
<pre style="overflow:auto;white-space:pre-wrap;">&{template:default} {{name=Test Attack}} {{attack=[[1d20]]}} {{damage=[[2d6+?{Extra Damage?|0}]]}} {{Crit damage=[[12+?{Extra Damage?|0}]]}}</pre><br />
<br />
You may also split up Roll Queries on multiple rows to make the code more readable. ''Extra line breaks in code isn't generally a good idea, and could be good to avoid to not create errors.''<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
/roll 1d20 + ?{Choose an Attack|<br />
Melee,3[STR] |<br />
Ranged,2[DEX] |<br />
Magic,1[INT] }<br />
</pre><br />
<br />
If you're listing macros in your roll query, you '''must''' have a space after the macro name, so Roll20 knows the name ends inside the query.In the below example, the three rolls have been saved into macros on the {{Collections}}-tab which then can be referenced in the macro.<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
?{Choose an Attack|<br />
Melee,#str |<br />
Ranged,#dex |<br />
Magic,#int }<br />
</pre><br />
<br />
* {{forum|permalink/6053873/ Query Ordering Without Affecting Functionality}} how to borrow API command syntax(works for free users) - [[Ziechael]]<br />
* [[Chat Menus]],by Keith – In some cases, creating a '''chat menu''' for your macros is easier or better than making a complicated Query with several options.<br />
<br />
====[[Nesting]]====<br />
To some degree, you can nest abilities, macros and queries. <br />
<br />
* [[Nesting#Nesting Queries|Nesting Queries]]<br />
* [[Nesting#Nesting Macros|Nesting Macros]]<br />
* [[Nesting#Nesting Abilities|Nesting Abilities]]<br />
* [[#HTML replacement|HTML replacement]]<br />
<br />
If you start nesting queries too much, you need to start using HTML replacement characters to keep the macros working. Once saved, these macros shouldn't be opened(if saved in the {{Collections}}-tab's Macro section, as opening a macro that have HTML replacement will result in those being converted into regular things, breaking your macro.<br />
<br />
* [https://app.roll20.net/forum/permalink/6582632/ Drop down Nester] google sheet that generates the HTML replacement code needed. by [[Scott C.]]<br />
* [https://www.freeformatter.com/html-entities.html HTML entities] contains a longer list of all the existing HTML replacement code, of which only few are used/needed in Roll20 context.<br />
<br />
====Initiative====<br />
<small>{{main|Macros/Initiative}}</small><br />
<!-- TODO translcusion Macros/Initiative --><br />
To send a roll result directly to the {{Turn Tracker}}, first, select the [[Token]] you wish to roll initiative for, and then make a roll that includes the <br />
<code>&{tracker}</code>-flag. You can also increase/decrease initiative by using <code>&{tracker:+}</code>/<code>&{tracker:-}</code>.<br />
{{ex}}<br />
* <code>/roll 1d20 + 5 &{tracker}</code><br />
* <code><nowiki>&{template:default} {{name=Initiative}} {{Roll=[[1d20+4 &{tracker}]]}} </nowiki></code><br />
* <code>/roll 1d4 + 1 '''&{tracker:+}'''</code> (increases the initiative by <code>1d4+1</code>)<br />
* <code>/roll 2 '''&{tracker:-}'''</code> (decreases the initiative by a flat <code>2</code>)<br />
* <code>[[5 &{tracker:-}]]</code> (inline roll that decreases the initiative by a flat <code>2</code>)<br />
<br />
See also: [[Cards#Using_Cards_for_Initiative_Order|Using Cards for Initiative Order]]<br />
<br />
'''Referencing values on the turn tracker:''' by calling <code>@{Tracker|character_id}</code> <code>@{Tracker|character_name}</code>, you can check what values are on the turn tracker. ex. <code>Bobs initiative is @{tracker|Bob}.</code><br />
<br />
Tricks using the {{Turn Tracker}}:<br />
{{:Turn Tracker/Tricks}}<br />
<br />
====Chat Buttons====<br />
There are two types of buttons you can create in the Text Chat to be included in a macro/dicerolling result.<br />
<br />
'''[[Macros#Ability_Command_Buttons|Ability Command Buttons]]'''<br />
<br />
Ability Command Buttons can be used to call [[Journal#Abilities|Abilities]] (or [[Character_Sheets#Sheet_Rolls|sheet button rolls]]) from a clickable button in the Text Chat. They are very closely related to [[API:Chat#API_Command_Buttons|API Command Buttons]].<br />
<br><br><br />
Their syntax is as follows:<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
[Label](~<keyword>|<ability name>)<br />
[Dex Check](~Bob|dexterity)<br />
[Dex Check](~selected|dexterity_save)<br />
[Dex Check](~selected|repeating_attack_$0_attack)<br />
</pre><br />
As with [[Journal#Attributes|Attribute]] and [[Journal#Abilities|Ability]] calls, the '''keyword''' is your choice of <code>selected</code>, <code>target</code> or a character_name. You can also use a character_id as a keyword.<br />
<br><br><br />
If you have an Ability Command Button saved somewhere within one of the tabs of the [[Journal#Character_Window|Character Window]], you can choose to omit a keyword:<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
[Label](~<ability name>)<br />
[Dex Check](~dexterity)<br />
</pre><br />
<br />
'''[[#API_Command_Buttons|API Command buttons]]'''<br />
<br />
API Command buttons do not actually use the API—anyone can make and use them. The '''[[Chat Menus]]''' trick by Keith, uses utilizes them to great length.<br />
<br />
====Errors====<br />
If there is a mistake in the macro, or an attribute is missing, the roll might not work at all and only send and error message in the chat.<br />
<br />
In some cases you can suppress error message and the roll will try to do what it can while removing the error message.<br />
: <code>/roll 1d20 + @{selected|nonexistent_attribute} '''&{noerror}'''</code><br />
<br />
* Advanced Trick: [https://app.roll20.net/forum/permalink/9102789/ Catering for 'missing attributes' when summing values] by Ziechael shows how you can account for unknown number of stats in a repeating section, beyond just using <code>&{noerror}</code><br />
<br />
===[[Roll Table]]===<br />
If you have [[Roll Tables]] on your {{Collections}}-tab, they can be used in rolls & macros.<br />
<br />
'''Example1:'''<br />
<br />
Let's assume there exist a roll table with the name <code>fumble</code>.<br />
<br />
You can roll a table directly in the chat input, or in a macro, simply as <code>1t[fumble]</code>.<br />
<br />
'''Example 2:'''<br />
To roll your &quot;crit-failure&quot; table two time, you would enter <code>/roll 2t[crit-failure]</code>. You can change <code>2</code> to whatever number you would like. However, this currently does not work with inline rolls.<br />
<br />
You can also roll a table inline in chat or a macro by wrapping it in double square brackets like this <code>[[1t[table-name]]]</code>. Currently, any number beyond 1 does not display for the inline roll, the results are show on mouseover though.<br />
<br />
* [https://app.roll20.net/forum/post/5899495/stupid-roll20-tricks-and-some-clever-ones/?pageforid=6948596#post-6948596 Nestable Rollable Tables (Free User Version)] - Blue64<br />
* [https://app.roll20.net/forum/permalink/8724512/ Using Rollable Tables and Custom Handouts for Character Cards Using Rollable Tables and Custom Handouts for Character Cards] - Drew<br />
* [https://app.roll20.net/forum/permalink/8851426/ Inline Rolls in Rollable Tables] - Eric B (plus followup posts)<br />
* [https://app.roll20.net/forum/permalink/8788506/ Conditional Text] - Mike deBoston<br />
* [https://app.roll20.net/forum/permalink/6852555/ Rollable Encounter Images] - Blue64<br />
* {{forum|permalink/9898031/ Nesting Roll Tables}}<br />
<br />
<br />
===[[Roll Templates]]===<br />
''Main Page:'' '''[[Roll Templates]]'''<br />
<br />
You can access the Default Roll template in any game, to structure your results in the Text Chat. You simply write the template in the chat/macro( and don't use the <code>/roll</code>).<br />
[[File:Roll template default example.JPG||right]]<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
&{template:default} {{name=Test Attack}} {{attack=[[1d20]]}} {{damage=[[2d6]]}}<br />
</pre><br />
<br />
You can use a Roll Template in general messages (without a command like <code>/desc</code> or <code>/emote</code>) and whispers. You can't use roll templates with the <code>/roll</code> command; instead, Roll Templates are meant to be used with inline rolls. As long as they use inline rolls, you can use Roll Templates with macros, Character Abilities, and sheet authors can use them inside of their Roll Buttons on sheets.<br />
<br />
{{orange| Macros for roll templates are sensitive to leading spaces, so '''<code><nowiki>{{name=Dexterity}}</nowiki></code>''' will work, but '''<code><nowiki>{{ name=Dexterity}}</nowiki></code>''' won't. }}<br />
<br />
Many character sheets have built in Roll Templates that can only be used with those specific character sheets.<br />
<br />
''Tricks:''<br />
<br />
* '''Use images with Default Roll Template:''' If you want to dress up your default template, you can stuff an image in the name portion instead of just text<br />
** Example: <code><nowiki>&{template:default}{{name=[x](YOUR_IMAGE_URL#.png)}}{{test=foo}}</nowiki></code><br />
* '''[https://app.roll20.net/forum/permalink/9112320/ Overwriting Template Fields in Macros]''' - Oosh<br />
<br />
<br />
===Advanced===<br />
<br />
{{forum|permalink/5899495/ Roll20 Tips and Tricks (Innovative Solutions to Common Problems)}} contains a large amount of tricks and examples of clever uses for macros etc. that is a must to check out. <br />
<br />
* [[Hidden Rolls]] - have the player make blind rolls, and only the GM see the result.<br />
* [[Macro Character Sheet]] - [[keithcurtis]]<br />
* [[Reusing Rolls]] - clever trick to reuse rolls withing the same command. Was discovered in mid-2020.<br />
<br />
Here under are mentioned a limited number of the list's tricks(more could be listed or copied entirely to the wiki):<br />
* [[Toggleable template fields]]<br />
* [https://app.roll20.net/forum/permalink/10693202/ Macro curiosities, or how to overcomplicate everything] by RainbowEncoder <br />
* {{forum|permalink/9663315/ Tooltips for links, roll buttons etc.}} - RainbowEncoder |{{forum|permalink/6397574/ Tooltip Hack (older)}} - Aranador<br />
* {{forum|permalink/6356266/ DM whispers without breaks}}<br />
* {{forum|permalink/8080373/ Dynamic Multitarget Roll without API}} - Barakka<br />
* {{forum|permalink/6137639/ Prefix Trick to Variably Call Attributes}} - Kyle G.<br />
* {{forum|permalink/8511142/ Hypertext Macro to Open a Linked Character Sheet}} - [[Vince]]<br />
* {{forum|permalink/7406810/ Use a Macro to Report on Obscure Character Abilities and Rules}} - macro template for calculating/showing derivative stats that aren't listed on the sheet but can be known, such as how long a character can hold breath. by PapaWhiskey11<br />
* [https://app.roll20.net/forum/permalink/9840963/ Skill check with text result]<br />
* [https://app.roll20.net/forum/permalink/10557595/ Keep Nth; Select from sequence] - RainbowEncoder<br />
====Images====<br />
Various ways to use or show images in macros or the chat.<br />
<br />
* {{forum|permalink/6814834/ Pictures and GIFs in Chat and Abilities}} - Blue64<br />
* {{forum|permalink/6827714/ Monster Images in Chat}} - Kirsty<br />
* {{forum|permalink/9031455/ Using Images as Links}} - [[Oosh]]<br />
* {{forum|post/9209645/inserting-images-into-macros Inserting Images into Macros}}<br />
* [https://app.roll20.net/forum/permalink/10377160/ Make gif loop infinitely] - [[Oosh]]<br />
* [https://app.roll20.net/forum/permalink/10376893/ Displaying Images Based On Roll Results] - Fnux<br />
====Chat Menus====<br />
''Idea by Keith Curtis''<br />
<br />
Creating a '''[[Chat Menus]]''' for your macros is a great shortcut to have access to many buttons by only calling the chat menu macro.<br />
<br />
==[[Token]]==<br />
Main Section: [[Macros#Token]]<br />
<br />
You can target the stats of tokens(and the stats of a linked character sheet) by two methods, using either '''[[Macros#Using_a_Selected_Token_with_a_Macro|@{selected}]]''', or '''[[Macros#Using_a_Targeted_Token_with_a_Macro|@{target}]]'''.<br />
<br />
<br />
===Variables===<br />
List of token-specific stats you can target with the usual <code>@{}</code> commands, that doesn't need to rely on having a [[Link Token|character sheet linked to the token]]:<br />
<br />
* <code>bar1</code>,<code>bar2</code>,<code>bar3</code> ''(max values called with <code>@{bar1|max}</code>, <code>@{bar2|max}</code>, <code>@{bar3|max}</code>)''<br />
* <code>token_name</code><br />
* <code>token_id</code><br />
<br />
If a character sheet is linked, and you have linked a sheet attribute to one of the bars, you can reference that stat either by targeting the token's bar, or the actual name of the attribute on the sheet.<br />
<br />
{{ex}}<br />
* <code>Token **"@{selected|token_name}"** has [[@{selected|bar1}]] out of [[@{selected|bar1|max}]] HP left.</code> - displays the token name and the current/max value of bar1<br />
** token bar max values need to be referenced with <code>@{attrname|max}</code>, using <code>@{attrname_max}</code> doesn't work.<br />
* <code><nowiki>&{template:default} {{name=**Character & Token ID**}} {{Character Name=@{selected|character_name} }} {{**Character ID**= @{selected|character_id} }} {{**Token Name**= @{selected|token_name} }} {{**Token ID**= @{selected|token_id} }} {{**Bar 1**= @{selected|bar1} / @{selected|bar1|max} }} {{**Bar 2**= @{selected|bar2} / @{selected|bar2|max} }} {{**Bar 3**= @{selected|bar3} / @{selected|bar3|max} }}</nowiki></code><br />
** a macro that displays the <code>token_id</code>, <code>token_name</code> and token bar values, as well as the <code>character_id</code> & <code>character_name</code> if token is linked to a sheet.<br />
<br />
===selected===<br />
Main page: '''[[Macros#Selected_Token_with_a_Macro|@{selected}]]'''<br />
<br />
When using '''[[Macros#Selected_Token_with_a_Macro|@{selected}]]''', you need to first select the token you want to use, before making the roll, and you can only have one token using this method.<br />
<br />
The <code>selected</code>-keyword will allow you to pull information from the element that is currently selected on the screen when the roll/macro is executed. So for example, if you want to pull the value of Bar 1 from the selected [[Token]] during a roll, you can do:<br />
<br />
<pre data-language="javascript">/roll 1d20 + @{selected|bar1}</pre><br />
<br />
You can use "bar1", "bar2", or "bar3". In addition, you can also pull an attribute from the Character linked to that token, if there is one:<br />
<br />
<pre data-language="javascript">/roll 1d20 + @{selected|Intelligence}</pre><br />
<br />
You can pull the Name of the currently selected tokens by using the &quot;token_name&quot; variable.<br />
<br />
<pre data-language="javascript">/em @{selected|token_name} fires his gun!</pre><br />
<br />
If the selected token has a character journal linked to it, you can pull the Name from the character journal instead, using the &quot;character_name&quot; variable.<br />
<br />
<pre data-language="javascript">/em @{selected|character_name} blocks with his shield!</pre><br />
<br />
You can also trigger abilities from the linked character journal by using the ability name as a variable.<br />
<br />
<pre data-language="javascript">%{selected|Attack}</pre><br />
<br />
Finally, we've introduced a third argument for variables, allowing you to pull the "max" of a bar or attribute:<br />
<br />
<pre data-language="javascript"><br />
/roll 1d20 + @{Guard|Intelligence|max}<br />
/roll 1d20 + @{selected|bar2|max}<br />
</pre><br />
<br />
On token bars, you must reference max values with the <code>@{selected|bar1|max}</code> syntax, while for character attributes, both <code>@{selected|attrname|max}</code> and <code>@{selected|attrname_max}</code> works.<br />
<br />
===target===<br />
Main page: '''[[Macros#Targeted_Token_with_a_Macro|@{target}]]''',<br />
<br />
When using [[Macros#Targeted_Token_with_a_Macro|@{target}]], you make the roll first, and then get prompted to select the target token(s), before the roll is then executed. You can target several tokens/characters in a single roll.<br />
<br />
<pre data-language="javascript"><br />
/roll @{target|bar2}d6<br />
/roll 1d20 - @{target|strength}<br />
</pre><br />
This will bring up a prompt screen for the player to select which token target they are rolling against:<br />
<br />
[[File:Choosetarget.png]]<br />
<br />
The full syntax for the target variable is:<br />
<br />
<pre data-language="javascript">@{target|<target_name>|<attribute_name>|<optional_flags>}</pre><br />
(Note that <code>target_name</code> is optional if you only have one target. Name can be anything you like, and can include spaces.)<br />
<br />
So if you want to have multiple targets in your macro you can do:<br />
<br />
<pre data-language="javascript">@{target|Target1|HP} vs @{target|Target2|AC}</pre><br />
<br />
And if you want to use the max of an attribute:<br />
<br />
<pre data-language="javascript"><br />
@{target|bar1|max} - token max values can only be referenced with "|max"<br />
@{target|HP_max} - max value of HP, from the linked character sheet<br />
@{target|Target1|HP|max} - alternative method for the above<br />
@{target|target 1|HP_max} @{target|target 2|HP_max} - check max HP of two tokens<br />
@{target|target 1|HP|max} @{target|target 2|HP|max} - alternative method for the above<br />
</pre><br />
<br />
Note that if you want to use the "max" flag you must specify the name of the target yourself, even if you just put "target1" as above.<br />
<br />
Additionally, if you use the same target_name in multiple attribute queries, you will only get prompted for it once and the same token will be used to fulfill all of the attribute queries. This also applies when you have multi-line macros or commands:<br />
<br />
<pre data-language="javascript">/me strikes out at @{target|foe|character_name}!<br />
**To Hit**: [[1d20+3]] vs. @{target|foe|npc_AC} AC<br />
</pre><br />
<br />
===[[Token Actions]]===<br />
Token Actions are specially-designated [[Macros|macros]] and [[Character#Abilities|character abilities]] (with tokens [[Linking_Tokens_to_Journals|representing a character]]) which appear whenever a token is selected on the screen. They appear in a bar along the top of your screen, and the contents of the bar are context-sensitive. When you select a token, all macro token actions will be shown, as well as ability token actions for the token's linked character (if applicable).<br />
<br />
==Journal==<br />
main page: [[Journal#Journal_Command_Buttons|Journal Command Buttons]]<br />
<br />
<br />
===Character Attributes===<br />
How to reference character/Character sheet Attributes: [[Journal#Attributes]]<br />
<br />
Each character also have a few [[BCS/Pseudo-attributes|pseudo-attributes]] that always exists, even if there is no sheet or Attributes statted for them<br />
<br />
From a custom command, anywhere:<br />
<pre><br />
/r 1d20+@{Bob|str}<br />
</pre><br />
<br />
If macro is saved to a character's [[Journal#Attributes_.26_Abilities_Tab|A&A]]-tab, to a [[Link Token|token linked]] to a sheet, or is embedded in the character sheet's button (code): <br />
<pre><br />
/me makes a Strength roll of [[1d20+@{str}]]<br />
</pre><br />
<br />
====Repeating Section====<br />
[[Macros#Referencing_Repeating_Attributes|Referencing Repeating Attributes]]<br />
<br />
===Character Abilities/Roll Buttons===<br />
<br />
'''Button'''<br />
Most char sheets have roll buttons, which can be called directly with a <code>%</code>-command.<br />
<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
%{Bob|dexterity} // call the dex roll for a character named bob<br />
%{selected|dexterity} // call the dex roll for the character linked to the selected token<br />
</pre><br />
<br />
'''[[Character#Abilities|Abilities]]'''<br />
<br />
If you have saved custom Abilities to a character's [[A&A#Attributes_.26_Abilities_Tab|Attributes & Abilities]]-tab, you can call the ability with the same <code>%</code>-syntax as buttons. These are character-specific, so unless other characters have an ability with the same name, it wont work.<br />
<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
%{Bob|customability}<br />
%{selected|customability}<br />
</pre><br />
<br />
When writing an ability macro, you dont have to specify the characters name, and can call attributes directly(<code>/r 1d20+@{dex}</code>)<br />
<br />
===Handout===<br />
You can add roll buttons with macros to [[Journal#Handouts|Handouts]], with the help of hyperlinks.<br />
<br />
* {{yt.be|pkDC-nP3vCE Running Commands from Handouts in Roll20}} 8min, Nick O.<br />
<br />
* {{fpl|9283622/ handout link in macro}} - opens the handout in the [[Journal#External_Journal_Access|External Journal]]<br />
<br />
==[[API]]==<br />
{{pro only|section}}{{apiboxRec}}<br />
<br />
'''[[API|API commands]]'''(AKA '''API calls'''), start with <code>!</code> and then the name of the API command, and then write any other parameters for the API. Some API macros can be embedded into regular macros, such as [[ChatSetAttr]]. To use any API in macros, the specific APIs[[API#Install_API| need to be installed in the game]] for them to work. Here are some examples of API commands/macros.<br />
<br />
'''Example 1:'''<br />
writing <code><nowiki>!wd [[4d6+2]]</nowiki></code> in the chat will trigger the '''[[Script:Wild Dice]]''' script to make a custom roll output, rolling 3 normal d6 dice, and one Wild Die, presenting it in a table. If the Wild Die comes up as a "1", it, and the value of the highest dice is removed form the roll total. This is not something that can be done with macros alone, which is why this API was created.<br />
<br />
[[File:Wild-Dice-result-v3-4.png]]<br />
<br />
'''Example 2:'''<br />
<br />
writing <code>!group-init</code> in the chat will trigger the '''GroupInitiative'''(must be installed) API that uses <code>group-init</code> as a keyword. This particular API command would roll initiative order for all selected tokens, if the API is configured to know what stats to roll.<br />
<br />
'''Example 3:'''<br />
<br />
writing <code><nowiki>&{template:default} {{name=Cthulhu}} !modattr --silent --charid @{target|character\_id} --sanity|-{{Sanity damage=[[2d10+2]]}} --corruption|{{Corruption=Corruption increases by [[1]]}}!!! {{description=Text}}</nowiki></code> in the chat, and selecting a [[Token]] on the map, will decrease sanity by 2d10+2 and increase corruption by 1 for the character selected.<br />
<br />
This is the '''[[Script:ChatSetAttr|ChatSetAttr]]''' API, which can be used standalone with the <code>!modattr</code> command, but more notably, can be incorporated into regular macros, resulting in you being able to both make rolls and have the result change the stats.<br />
<br />
===[[API:Chat#API_Command_Buttons|API Command Buttons]]===<br />
{{main|API:Chat#API_Command_Buttons}}<br />
{{notebox| '''You don't need Pro or API access to use API Command Buttons!''' They are heavily featured in [[Chat Menus]], which everyone can create.}}<br />
<br />
They have simple Markdown formatting:<br />
<br />
<code>[Attack Roll](!attackroll)</code><br />
<br />
You can also send them into the chat for others to use, but them needs to use HTML Replacement like with [[#Nesting|Nesting]]:<br />
<br />
<code>[Attack Roll](!attackroll &amp;#64;{target|token_id} &amp;#91;[1d6+&amp;#63;{Bonus|0}]&amp;#93;)</code> <br />
<br />
API Command buttons do not actually use the API — anyone can make and use them. The '''[[Chat Menus]]''' trick by [[Keith]], uses utilizes them to great length.<br />
<br />
''Tricks:''<br />
* {{forum|permalink/6009949/ 2 column API buttons in Default Roll Template}} - Bryan P<br />
===Macros===<br />
{{:Macros/API}}<br />
===Relevant API===<br />
APIs that have lots of commands or have lot to do with dice rolling.<br />
<br />
* '''[[Script:ChatSetAttr|ChatSetAttr]]''' - can be used [[inline]] & mixed in with other macros, and can edit stats, which normal macros can't<br />
* [[ScriptCards]] - API made to display stats in variety of way in the chat, essentially a sophisticated, API-based version of the Default Roll Template with massive amount of features. It can be used to call other API like ChatSetAttr or TokenMod<br />
* [[APILogic]] -- Gives If/ElseIf/Else Processing, [[Inline]] Math operations, and Variable Muling to Other Scripts | {{forum|permalink/9771314/ APILogic}}<br />
* {{fpl|9817678/ SelectManager}} - help other API with properly sharing token selection between other APIs. Often API that can call other APIs doesn't share what tokens are currently selected.<br />
* {{forum|permalink/9770117/ libInline}} - provides an easy interface for inlinerolls<br />
* {{forum|permalink/9097236/ InsertArg & XRay}} script that gives you a way to interact with information in the game and feed it to the chat and/or other scripts, or to build your own output on the fly.<br />
* [[TokenMod]] – API that can edit any info on tokens. If token's are linked to a character, the changes to token bars extends to the character sheet.<br />
* {{forum|permalink/9441420/ CombatMaster}} Manages many facets of combat. It allows for API and Macro calls at various timing points (beginning of each round, beginning of each turn, when a condition is assigned, when a condition is removed). <br />
* {{forum|permalink/8458497/ Token Action Maker}}<br />
* [[Script:Rollable_Table_Macros|Rollable Table Macros]] -- a simple script that gets an item from a [[Roll Table|rollable tables]] and enters its name as a chat message rather than showing it as a rollable table result<br />
* [[Script:Star Wars: Fantasy Flight Games - Dice Roller]] - API for rolling the custom dice system used in the game<br />
* [[Script:It's a Trap|It's a Trap!]] Can be used to create a Trap that can automate rolls related to the trap, both for the trap and for the character(such as saves). There exists a generic one, as well as a number of system-specific version designed with popular sheets in mind(D&D5e, Pathfinder 1E)<br />
* '''[[API:Script Index]]''' curated list of Roll20 APIs available<br />
<br />
==Character Sheet Creation==<br />
Info and links to things that are only relevant or usable for when you're [[BCS|Building/Editing Character Sheets]]. Consult the rest of the guide for general details.<br />
<br />
* [[Select Attributes for Sheet Roll]] - An advanced technique for creating a dynamic roll button on your sheet <br />
<br />
===[[Button#Roll_Button|Roll Button]]===<br />
The rest of this guide will help in creating more complicated macros, but the main [[Button#Roll_Button]]-page have some concrete examples of how macros are implemented in character sheets.<br />
<br />
===[[Sheetworkers]]===<br />
With the info from [[Macros]], fairly complex outputs to the {{Text Chat}} can be made, but to be able to construct complex and dynamic results based on various factors on your character sheet, you will need to use JavaScript to write [[Sheet Worker Scripts]] that modify & construct your roll output dynamically.<br />
<br />
* [[Select Attributes for Sheet Roll]]<br />
<br />
===Roll Template===<br />
When you create/edit a character sheet, you can make your own Roll Templates to make your roll output look like you want, and to do some conditional things such as only showing some sections in case of a critical roll in another sections.<br />
<br />
See '''[[Building_Character_Sheets/Roll_Templates|Creating Roll Templates]]''' for how to make your own.<br />
<br />
[[Building_Character_Sheets/Roll_Templates#Helper_Functions|Helper Functions]] describes what functions you can build into your sheets.<br />
<br />
==External Tools==<br />
* '''[VS_Code#Roll20_Syntax_Highlight|Roll20 Macros - a Visual Studio Code Extension]''' by [[Andreas J.]]<br />
** syntax highlight and autocomplete help for roll20 macro writing. Makes reading, writing, & identifying mistakes in macros easier with color-coding matching brackets and more. <br />
* [[Stylus]]<br />
** Can be used for some advanced macro tricks, like [[Hidden Rolls]]<br />
* [[Browser Developer Tools#Macros]] - can be used to figure out attribute & Repeating section names from character sheets<br />
<br />
==Related Pages==<br />
* '''[[Complete Guide to Macros & Rolls]]'''<br />
** {{Text Chat}} - where the roll results appear, & info on the common chat commands<br />
** [[Dice Reference]] - Comprehensive list of how the Roll20 dice-rolling syntax works, and list the features available<br />
** [[Macros]] - How to create macros, and other info on how the Roll20 <span style="font-family:Pictos;">q</span>Text Chat works, like referencing stats on character sheets, roll queries, nesting macros & initiative<br />
*** [[Reusing Rolls]]<br />
*** [[Chat Menus]]<br />
** [[Roll Templates]] - a method of formatting roll results in the chat, with some extra functions<br />
** [[Tokens]]<br />
** [[API]]''(Pro Only)'' - API commands can be used in the <span style="font-family:Pictos;">q</span>Text Chat<br />
* [[Forum Tricks]]<br />
** [[Macro Sheet]]<br />
<br />
==Other Guides==<br />
<br />
==TODO==<br />
* add image examples of every macros used, input + output<br />
* at least one example for each mentioned concept<br />
* Roll Template examples<br />
* List rest of the examples from "Stupid Tricks" thread<br />
* new sections<br />
** Chat Tooltip<br />
** [[Stylus|Stylus]], for tricks like the hidden rolls<br />
* Split page:<br />
** macro formatting<br />
** HTML styling<br />
* copy tips from [[Macros/Pathfinder Examples]]<br />
<br />
=See Also=<br />
* {{forum|permalink/5899495/ Roll20 Tips and Tricks (Innovative Solutions to Common Problems)}} - Well maintained List of good Roll20 Tricks.<br />
* [https://cybersphere.me/roll20-dice/ Everything About Rolling Dice] - A comprehensive guide to rolling dice in Roll20.<br />
* [[Macro Character Sheet]] - how to easily move all your macros between games<br />
* {{Text Chat}}<br />
* {{Collections}}<br />
** [[Macros]]<br />
** [[Roll Tables]]<br />
** [[Cards]]<br />
* [[Building Character Sheets]] - {{Pro}}<br />
* [[API]] - {{Pro}}<br />
* [[Campaign Management]]<br />
** [[Link Token|Link Token to Sheet]]<br />
** [[Add Character Sheet]]<br />
** [[GM]] & [[Player]] tools & limits<br />
* [[Browser#Stylus|Stylus Plugin]] - customize the looks of Roll20 for yourself<br />
<br><br />
<br><br />
[[Category:Macros]]<br />
[[Category:Character Sheet Creation]]<br />
[[Category:Guides]]<br />
[[Category:Featured articles]]</div>1223200https://wiki.roll20.net/Toggleable_template_fieldsToggleable template fields2024-03-18T06:31:27Z<p>1223200: formatting</p>
<hr />
<div>{{revdate}}{{NavMacroDocs}}<br />
If [[Roll Template]] fields are inside of an [[Inline Roll|inline roll]] they will be turned into a roll comment at which point they won't appear as part of the final template. So by controlling whether they are inside a roll or not you can show or hide multiple template fields at once. However the final roll must still be a valid roll, so starting a roll with <code><nowiki>[[0</nowiki></code>(without the closing <code><nowiki>]]</nowiki></code>) ensures that.<br />
==Query controlled toggles==<br />
===Simple single section===<br />
The simplest way to achieve this is by using a query that will open an inline roll when the fields are to be hidden.<br />
The query would be of the form <code>?{Section|Show,|Hide,[[0}</code> and the end of the macro must include <code>]]</code> to actually hide those fields in between.<br />
A full example being<br />
<pre>&{template:default} {{Always Show=[[d20]]}} ?{Section|Show,|Hide,[[0} {{Sometimes Show=[[1d8]]}} {{More Optional Fields}} ]]</pre><br />
There are a couple of caveats. Firstly any rolls made after the toggle-able section can behave oddly, so it only works once and should be at the end of your macro. Secondly you cannot [[Reusing Rolls|reuse rolls]] since trying to reuse a roll inside another tends to break the roll which prevents it from hiding the template fields.<br />
===Multiple sections===<br />
A more advanced variant that can be used multiple times exists that makes extensive use of [[Reusing Rolls]].<br />
In this variant rolls are specified up front and then referenced within the template fields. The control comes from a query being used to determine if a reference is an actual reference or a roll. A reference will force the template field to display whereas a roll gets hidden.<br/><br />
The query takes the form <code>?{Section|Show,$|Hide,+}</code> the opening <code>[[0</code> and closing <code>]]</code> of the inline roll go around the template fields you want to toggle.<br />
A toggleable roll reference would then look like <code><nowiki>?{Section|Show,$|Hide,+}[[1]]</nowiki></code>.<br />
A full example being<br />
<pre>[[1d20 Always Shown]] [[1d8 Section 1]] [[1d6 Section 2]] &{template:default} {{Always Show=$[[0]]}} [[0 {{Using Section 1}} {{Section 1=?{Section 1|Show,$|Hide,+}[[1]]}} ]] [[0 {{Using Section 2}} {{Section 2=?{Section 2|Show,$|Hide,+}[[2]]}} ]]</pre><br />
<br />
If you want to have a toggleable section that doesn't include any rolls you can use a reference of <code>-1</code> outside of the template fields but still inside the encompassing roll. Such as<br />
<pre>[[0 ?{Text only section|Show,$|Hide,+}[[-1]] {{Text Only Section}} ]]</pre><br />
<br />
You can also split sections to give finer control over the ordering of the template fields. For example:<br />
<pre>[[d20 Always Shown]] [[d4 Sometimes Shown]] &{template:default} [[0 ?{Optional Section|Show,$|Hide,+}[[-1]] {{Using Optional Section}} ]] {{Always Show=$[[0]]}} [[0 {{Sometimes Show=?{Optional Section}[[1]]}} ]]</pre><br />
<br />
==Related Pages==<br />
* [[Roll Templates]]<br />
* [[Reusing Rolls]]<br />
* [[Complete_Guide_to_Macros_%26_Rolls#Advanced|Complete Guide to Macros: Advanced Tricks]]<br />
[[Category:Macros]]<br />
[[Category:Roll Templates]]</div>1223200https://wiki.roll20.net/Reusing_RollsReusing Rolls2024-03-18T06:24:44Z<p>1223200: link to related article</p>
<hr />
<div>{{revdate}}In early 2020, it was noticed that you could re-use roll in [[macros]] without using [[API]]. This page lists some of the top posts and comments that figures out uses for it.<br />
<br />
* {{forum|permalink/9091992/ Reusing Rolls - Megathread}}<br />
* {{forum|post/9161706/re-use-die-rolls-in-macros-treated-as-numbers-rather-than-just-text Re-use die rolls in macros, treated as numbers rather than just text}} - Suggestion Forums<br />
{{NavMacroDocs}}<br />
* {{forum|permalink/8716289/ Original discovery}} by Syneran<br />
<br><br />
==Collected Tricks==<br />
===Scott C's Original Trick===<br />
{{forum|permalink/8747581/ Stupid Roll20 Tricks (and some clever ones)}} - Initial Trick writeup - [[Scott|Scott C]]<br />
<br />
'''Disclaimer: This trick takes advantage of emergent behavior that may not be intended and may be patched'''<br />
<br />
I can't take credit for this trick. Syneran discovered the capability. But, long story short, it is actually possible to reuse rolls with some small caveats. Here's a summary of the info discovered in the linked forum thread:<br />
<br />
The chat accepts the [[Inline Rolls|inline roll]] indexing used in the [[API]] (and apparently the roll parser itself), so you can do:<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
[[ [[1d20]] + [[1d6]] + [[6]] ]] = $[[0]] + $[[1]] + $[[2]]<br />
</pre><br />
And get an output that would read like this:<br />
<br />
[[File:Reuse-rolls-ex1.png]]<br />
<br />
The limited part is you can't use those indexed rolls inside other rolls. So for instance, you '''cannot''' reverse the above output in the following way:<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
[[1d20]] + [[1d6]] + [[6]] = [[$[[0]] + $[[1]] + $[[2]] ]]<br />
</pre><br />
Using the indexes appears to break any containing [[Inline Rolls|inline rolls]], like so:<br />
<br />
[[File:Reuse-rolls-ex2-bad.png]]<br />
<br />
Additionally, the indexing is line specific, so this also doesn't work:<br />
<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
[[1d20]] + [[1d6]] + [[6]]<br />
[[$[[0]] + $[[1]] + $[[2]] ]]<br />
</pre><br />
[[File:Reuse-rolls-ex3-bad.png]]<br />
<br />
However, a new line can be achieved by using <code>%NEWLINE%</code>:<br />
<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
[[1d20]] + [[1d6]] + [[6]] %NEWLINE% [[$[[0]] + $[[1]] + $[[2]] ]]<br />
</pre><br />
<br />
These are pretty big limitations if you're just typing rolls into {{Text Chat}}, but we can circumvent it through good use of [[Roll Templates|roll templates]]. For instance, we could hide the actual roll in between roll template fields, and then present them in whatever order we wanted:<br />
<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
&{template:default} [[ [[1d20]] + [[1d6]] + [[6]] ]] {{name=My Attack}} {{$[[0]] + $[[1]] + $[[2]]==$[[3]]}}<br />
</pre><br />
<br />
which would give us this output:<br />
<br />
[[File:Reuse-rolls-ex4-template.png|Reuse Rolls example using roll template]]<br />
<br />
For those with API access, the API sees this message with the proper indexes showing, so any API that handles rolls should react to these indexed rolls just like they were regular rolls.<br />
<br />
While you can't nest indexed rolls, you '''can''' nest the roll it's referencing, e.g:<br />
<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
[[ [[ [[1d20]] + @{str_mod} ]] - @{str_mod} + 6 ]]<br />
</pre><br />
<br />
In this case, <code>index 0</code> will find the result of <code>1d20</code>, <code>index 1</code> will include the <code>str_mod</code>, and <code>index 2</code> will subtract the <code>str_mod</code> from the previous value and add the 6.<br />
<br />
'''What's it allow us to do though?'''<br />
<br />
There's several new things this allows the community to do that were previously locked behind access to the Mods(API).<br />
<br />
'''Character Sheets'''<br />
<br />
When making [[BCS|custom character sheets]] (or sheets for the repo), one of the big hurdles has been accommodating systems that require you to know multiple things about a complex roll. Something like say the success of a roll in relation to a target number, as well as the value of the roll itself. Or if a given number on a die counts as 0 (or some other number).<br />
<br />
'''General Macro Creation'''<br />
<br />
Now we can create macros that do our math for us. Total the damage from a complicated attack (or one that hit several times), display the parts of a roll so that what went into that roll is visible without needing to hover over it. And I'm sure folks will come up with quite a few other ideas that I haven't even thought of.<br />
<br />
===Reordering Rows===<br />
* {{fpl|8761813/ post}} by [[GiGs]]<br />
<br />
Develops further some ideas based on Scott's original '''Reuse Rolls''' trick.<br />
<br />
one feature lots of people have asked for over the years, is to be able to roll a set of ability scores, and show the total at the same time. With this new trick, you can do that. For example:<br />
<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
&{template:default} {{name=Stats}} {{total=[[ [[4d6kh3]] + [[4d6kh3]] + [[4d6kh3]] + [[4d6kh3]] + [[4d6kh3]] +[[4d6kh3]] ]] }} {{STR=$[[0]]}} {{DEX=$[[1]]}} {{CON=$[[2]]}} {{INT=$[[3]]}} {{WIS=$[[4]]}} {{CHA=$[[5]]}}<br />
</pre><br />
This will result in:<br />
<br />
[[File:Reuse-rolls-rows-ex1.png]]<br />
<br />
The problem here is it shows the Total first. I haven't found a way to use the <code>$[[ ]]</code> syntax to access a roll that others are nested inside, like Total here? Has anyone else figured out how to do that?<br />
<br />
<br />
My trick is: there is way to reorder the rows within the template, if you don't mind using numbers as the row titles:<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
&{template:default} {{name=Stats}} {{total=[[ [[4d6kh3]] + [[4d6kh3]] + [[4d6kh3]] + [[4d6kh3]] + [[4d6kh3]] +[[4d6kh3]] ]] }} {{1=$[[0]]}} {{2=$[[1]]}} {{3=$[[2]]}} {{4=$[[3]]}} {{5=$[[4]]}} {{6=$[[5]]}}<br />
</pre><br />
This will result in:<br />
<br />
[[File:Reuse-rolls-rows-ex2.png]]<br />
<br />
It turns out that if your default template row name (the part before the <code>=</code>) is just a number, it gets sorted before any text entries, and in numerical ascending order. <br />
<br />
If you want text labels, you put them after the <code>=</code>, like so:<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
&{template:default} {{name=Stats}} {{total=[[ [[4d6kh3]] + [[4d6kh3]] + [[4d6kh3]] + [[4d6kh3]] + [[4d6kh3]] +[[4d6kh3]] ]] }} {{1=STR: $[[0]]}} {{2=DEX: $[[1]]}} {{3=CON: $[[2]]}} {{4=INT: $[[3]]}} {{5=WIS: $[[4]]}} {{6=CHA: $[[5]]}}<br />
</pre><br />
<br />
[[File:Reuse-rolls-rows-ex3.png]]<br />
<br />
So there you go, another implementation of the new 'feature' (or is it a bug), and another undocumentated feature (or is it a bug?) of [[Roll Templates]]. <br />
<br />
'''Note:''' negative numbers are sorted just like text, they don't change position. '''This trick works only for numbers 0 and higher.''' They don't have to be consecutive. It also doesnt work for [[Inline Rolls|inline rolls]].<br />
<br />
[[File:Reuse-rolls-rows-ex3.png]]<br />
<br />
===Rolltemplate Helper functions===<br />
by '''[[GiGs]]'''<br />
<br />
* {{fpl|9028352/ link}}<br />
<br />
'''Note:''' This is specifically for [[BCS|character sheet designers]], but it's an implementation of an earlier trick from this thread that is only documented here.<br />
<br />
Here's another nifty and counter-intuitive thing about Reusing rolls:<br />
<br />
When using them in a rolltemplate, you can use them with logic functions, like <code>rollGreater()</code>.<br />
<br />
For instance:<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
&{template:custom} [[ [[1d100]] - ?{Target Number?|50}]] {{target=[[?{Target Number?}]]}} {{raw_roll=$[[0]]}} {{difference=$[[1]]}}<br />
</pre><br />
<br />
and a rolltemplate<br />
<pre data-language="html" style="overflow:hidden;white-space:pre-wrap"><br />
<rolltemplate class="sheet-rolltemplate-custom"><br />
<div class="sheet-content"><br />
<div class="sheet-key">Target</div><br />
<div class="sheet-value">{{target}}</div><br />
<div class="sheet-key">Raw Roll</div><br />
<div class="sheet-value">{{raw_roll}} {{#rollGreater() raw_roll target}} (above Target) {{/rollGreater() raw_roll target}}</div><br />
<div class="sheet-key">Difference</div><br />
<div class="sheet-value">{{difference}}</div><br />
</div><br />
</rolltemplate><br />
</pre><br />
<br />
This will show the text '''(above Target)''' for <code>raw_rolls</code> that roll above the target - even though <code>row_roll</code> is one of these weird pseudo-inline rolls.<br />
<br />
This makes these quantities even more useful for character sheet design.<br />
<br />
===Two Unique Roll Results===<br />
by '''Persephone'''<br />
* {{fpl|9029428/ link}}<br />
<br />
I was trying to find a way to roll 2d8, getting both results separately without getting the same result twice, when I remembered this trick. Turns out it works for inline rolls that are nested inside each other.<br />
<br />
<pre><br />
[[1d8r[[1d8]]]], $[[0]]<br />
</pre><br />
<br />
The outer nesting is treated as the last one in the line, so <code><nowiki>$[[0]]</nowiki></code> gives you the result of the first inline roll in the deepest layer of the roll while <code><nowiki>$[[1]]</nowiki></code> gives you the same result as the complete roll. If the nested <code>1d8</code> results in a <code>4</code>, the outer roll becomes <code>1d8r4</code> so it rerolls any results of <code>4</code>. The <code><nowiki>$[[0]]</nowiki></code> will show an output of <code>4</code> and the inline roll will have a result of any number between <code>1</code> and <code>8</code>, except for <code>4</code>.<br />
<br />
I haven't yet tested multiple nested layers or multiple inline rolls within the main roll, but I suspect preventing more than 2 rolls from matching would get quite complex, if at all possible.<br />
<br />
('''Comment''': [[GiGs]] would rather call this something like ''Multiple Rolls - Each Unique'')<br />
<br />
===Reusing Rolls (advanced)===<br />
{{fpl|9091003/ example}} by '''Gibli'''<br />
<br />
<br />
I always wanted to be able to re-use a Roll in a subsidiary Roll, but as stated by Scott C. {{fpl|8747581/ here}}, it breaks the [[Inline Roll]].<br />
<br />
<br />
So, here I thought of a workaround : why not call an Ability depending of the result of my Roll through a button, like making a [[Chat Menu]] ?<br />
It might ask a lot of work most of the time, but in some cases it's pretty simple and quick to put in place.<br />
<br />
{| role="presentation" class="wikitable mw-collapsible mw-collapsed"<br />
| '''What didn't work'''<br />
|-<br />
| Initial attempt: <br />
<br />
I have a trap which when you fall in it make you hit by 1d4 spikes, each spike doing 1d4+2 damages.<br />
<br />
Then, I wanna have something like this(Of course, it doesn't work as is.):<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
[[1d4]] [[ $[[0]]d4 + 2*$[[0]] ]]<br />
</pre><br />
<br />
<br />
* Naming the abilities <code>PikesDamages1</code> to <code>PikesDamages4</code> didn't work, as pressing the roll button on <code>Trap</code> will not process <code><nowiki>PikesDamages$[[0]]</nowiki></code>, but instead interpret the ability name as <code>PikesDamages Rolling 1d4 = (1)'>1</code><br />
<br />
* When you put the caller to the previous roll <code><nowiki>$[[0]]</nowiki></code> in the parenthesis for the name of the ability, it is replaced by a text such like this :<br />
<br />
<br />
<code><nowiki>[Throw](~PikesDamages Rolling 1d4 = (1)'>1)</nowiki></code><br />
<br />
This text is specifically for a call to a Roll of 1d4 which resulted in a 1.<br />
<br />
For you to have spaces in the name of an Ability, you can simply write the name you want anywhere and then simply copy/past it.<br />
Spaces are replaced by dashes only while you type them, the copy/past bypass this.<br />
|}<br />
<br />
<br />
After some testing, saving <code>Trap</code> as a character [[Journal#Abilities|abilities]] with a roll button for the damage:<br />
'''Trap :'''<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
&{template:default} {{name=Trap}} {{Pikes=[[1d4]]}} {{Damages=[Throw](~PikesDamages$[[0]])}}<br />
</pre><br />
Then save these 4 with '''exactly''' these names, as more character abilities: <br />
<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
PikesDamages Rolling 1d4 = (1)'>1<br />
&{template:default} {{name=Pikes Damages}} {{Damages=[[1d4+2]]}}<br />
<br />
PikesDamages Rolling 1d4 = (2)'>2<br />
&{template:default} {{name=Pikes Damages}} {{Damages=[[2d4+4]]}}<br />
<br />
PikesDamages Rolling 1d4 = (3)'>3<br />
&{template:default} {{name=Pikes Damages}} {{Damages=[[3d4+6]]}}<br />
<br />
PikesDamages Rolling 1d4 = (4)'>4<br />
&{template:default} {{name=Pikes Damages}} {{Damages=[[4d4+8]]}}<br />
</pre><br />
<br />
[[File:Reuse-rolls-advanced-ability-button-ex.gif|700px|thumbnail|center|Rolling the Trap. Depending on the initial <code>1d4</code> result, it changes which dmg ability is used for rolling damage.]]<br />
<br />
'''Note(Gibli):''' I haven't found why, but it seems that the button need to be put at the end of the rolltemplate, it might not appear in the chat otherwise. And be careful if your rolltemplate has many intricate [[Inline Rolls]], try to always put the one you want to Reuse first, and your button last in the rolltemplate.<br />
<br />
===Computed rolls and order independence===<br />
[https://app.roll20.net/forum/permalink/10534037/ Rainbowencoder]<br />
<br />
With the addition of [[CRP|computed rolls]] comes new syntax to reference those rolls.<br />
<br />
So if you have a roll <code><nowiki>$[[0]]</nowiki></code> you can access the computed roll based on it via <code><nowiki>$[[0.computed]]</nowiki></code> additionally all rolls have a computed roll that defaults to the original roll. You can even use the <code>.computed</code> version without requiring a [[Roll Template]] at all.<br />
<br />
Referencing a roll in this way also doesn't interfere with nested rolls like a standard reference would.<br />
<br />
So while this breaks:<br />
<pre><br />
$[[0]] plus $[[1]] equals [[ [[1d10]] + [[2d6]] ]]</pre><br />
<br />
Using the <code>.computed</code> version allows it to work<br />
<pre><br />
$[[0.computed]] plus $[[1.computed]] equals [[ [[1d10]] + [[2d6]] ]]</pre><br />
<br />
<br />
This could also be used when [https://app.roll20.net/forum/permalink/9112320/ Overwriting template fields in macros]. Since the fields you overwrite have to be before the ones that do the conditional overwriting you wouldn't have previously been able to reference any of the rolls used in determining the decision but with this you can<br />
<br />
=== Reusing rolls, [] pair matter and math ===<br />
* https://app.roll20.net/forum/post/10690257/reusing-rolls-pair-matter-and-math-seems-to-possible<br />
<br />
Long thread with many tricks and insights<br />
<br />
=== Macro curiosities, or how to overcomplicate everything ===<br />
In the [https://app.roll20.net/forum/post/10693202/macro-curiosities-or-how-to-overcomplicate-everything forum thread Macro curiosities, or how to overcomplicate everything by RainbowEncoder], RainbowEncoder shows a way to duplicate the result of a roll and to reuse it multiple times for further rolls or calculation shown in [https://app.roll20.net/forum/post/10693202/macro-curiosities-or-how-to-overcomplicate-everything/?pageforid=10693212#post-10693212 the post about Improved roll index manipulation and Duplicating a roll result for further calculations].<br />
<br />
===Reusing Rolls to get additional crit damage===<br />
* [https://app.roll20.net/forum/permalink/10925029/ trick] by Spencer <br />
<br />
<pre><br />
&{template:default} {{name=Crit}} {{2= Damage : [[ [[1d6+5]]+[[floor(( $[[1]]/50)d6)]] ]]}} {{1=Check : [[ [[1d20+5]] ]]}}<br />
</pre><br />
<br />
==Sheets using this trick==<br />
* {{repo|Roll20/roll20-character-sheets/tree/master/Barbaric Barbaric!}} "reuse roll" trick is used for determining if a <code>2d6</code> roll is either a <code>2</code> or <code>12</code>, which in the system are crit success and fumble. • by [[Andreas J.]]<br />
<br />
==See Also==<br />
* [[Toggleable template fields]]<br />
* [[Inline Rolls]]<br />
* '''[[Complete Guide to Macros & Rolls]]'''<br />
** {{Text Chat}} - where the roll results appear, & info on the common chat commands<br />
** [[Dice Reference]] - Comprehensive list of how the Roll20 dice-rolling syntax works, and list the features available<br />
** [[Macros]] - How to create macros, and other info on how the Roll20 {{Text Chat}} works, like referencing stats on character sheets, roll queries, nesting macros & initiative<br />
*** [[Chat Menus]]<br />
** [[Roll Templates]] - a method of formatting roll results in the chat, with some extra functions<br />
** [[API]]''(Pro Only)'' - API commands can be used in the <span style="font-family:Pictos;">q</span>Text Chat<br />
* [[Building Character Sheets]]<br />
<br />
[[Category:Tips]]<br />
[[Category:Macros]]<br />
[[Category:Roll Templates]]</div>1223200https://wiki.roll20.net/Roll20_UI_IconsRoll20 UI Icons2024-03-18T06:23:32Z<p>1223200: cleanup msg</p>
<hr />
<div><noinclude>{{revdate}}<br />
<br />
The font families used for many of the Roll20 icons are [http://pictos.cc/classic/font Pictos], Pictos Custom, and dicefontd4 through dicefontd20. Check the [[CSS#Icon Fonts|Icon Fonts]] section on the [[CSS Wizardry]] page for a full list of symbols for the fonts.<br />
<br />
</noinclude><br />
{{cleanup-msg|Needs to add the New Roll20 icons both for toolbox (right), and for the sidebar(left)|March 2023}}<br />
* '''[[Sidebar]]'''<br />
** <span style="font-family:Pictos;">q</span> / [[Text Chat|{{button|1 = <span style="font-family:Pictos;">q</span>|2 = white}}]]<code><nowiki><span style="font-family:Pictos;">q</span></nowiki></code> [[Text Chat]] tab<br />
** <span style="font-family:Pictos;">P</span> / [[Art Library|{{button|1 = <span style="font-family:Pictos;">P</span>|2 = white}}]] <code><nowiki><span style="font-family:Pictos;">P</span></nowiki></code> [[Art Library]] tab<br />
** <span style="font-family:Pictos;">N</span> / [[Journal|{{button|1 = <span style="font-family:Pictos;">N</span>|2 = white}}]] <code><nowiki><span style="font-family:Pictos;">N</span></nowiki></code> [[Journal]] tab<br />
** <span style="font-family:Pictos;">i</span> / {{button|1 = <span style="font-family:Pictos;">i</span>|2 = white}} <code><nowiki><span style="font-family:Pictos;">i</span></nowiki></code> [[Compendium]] tab<br />
** <span style="font-family:Pictos Custom;">u</span> / {{button|1 = <span style="font-family:Pictos Custom;">u</span>|2 = white}} <code><nowiki><span style="font-family:Pictos Custom;">u</span></nowiki></code> [[Jukebox]] tab<br />
** <span style="font-family:Pictos;">l</span> / {{button|1 = <span style="font-family:Pictos;">l</span>|2 = white}} <code><nowiki><span style="font-family:Pictos;">l</span></nowiki></code> [[Collections]] tab<br />
** <span style="font-family:Pictos;">y</span> / {{button|1 = <span style="font-family:Pictos;">y</span>|2 = white}} <code><nowiki><span style="font-family:Pictos;">y</span></nowiki></code> [[My Settings]] tab<br />
<br />
* '''[[Toolbox]]'''<br />
** <span style="font-family:Pictos Custom;">w</span> <code><nowiki><span style="font-family:Pictos Custom;">w</span></nowiki></code> [[Select and Pan Tool]]<br />
*** [[File:Hand.png|middle|15px]] <code><nowiki>[[File:Hand.png|middle|15px]]</nowiki></code> Pan mode<br />
** <span style="font-family:Pictos;">b</span> <code><nowiki><span style="font-family:Pictos;">b</span></nowiki></code> [[Layers]]<br />
*** <span style="font-family:Pictos;">@</span> <code><nowiki><span style="font-family:Pictos;">@</span></nowiki></code> Map & Background layer<br />
*** <span style="font-family:Pictos;">b</span> <code><nowiki><span style="font-family:Pictos;">b</span></nowiki></code> Objects & Tokens layer<br />
*** <span style="font-family:Pictos;">E</span> <code><nowiki><span style="font-family:Pictos;">E</span></nowiki></code> GM Info Overlay layer<br />
*** <span style="font-family:Pictos Custom;">r</span> <code><nowiki><span style="font-family:Pictos Custom;">r</span></nowiki></code> Dynamic Lighting layer<br />
** <span style="font-family:Pictos Custom;">i</span> <code><nowiki><span style="font-family:Pictos Custom;">i</span></nowiki></code> [[Drawing Tools]]<br />
*** <span style="font-family:Pictos Custom;">a</span> <code><nowiki><span style="font-family:Pictos Custom;">a</span></nowiki></code> Draw Shapes tool<br />
*** <span style="font-family:Pictos Three;">c</span> <code><nowiki><span style="font-family:Pictos Three;">c</span></nowiki></code> Polygon/Line Tool<br />
*** <span style="font-family:Pictos Custom;">q</span> <code><nowiki><span style="font-family:Pictos Custom;">q</span></nowiki></code>Text Tool<br />
*** <span style="font-family:Pictos;">#</span> <code><nowiki><span style="font-family:Pictos;">#</span></nowiki></code> Clear Drawings tool<br />
** <span style="font-family:Pictos;">e</span> <code><nowiki><span style="font-family:Pictos;">e</span></nowiki></code> [[Custom FX|FX Tool]]<br />
** <span style="font-family:Pictos;">s</span> <code><nowiki><span style="font-family:Pictos;">s</span></nowiki></code> [[Zoom|Zoom Tool]]<br />
** [[File:Ruler.png|middle|15px]] <code><nowiki>[[File:Ruler.png|middle|15px]]</nowiki></code> [[Ruler|Ruler Tool]]<br />
** {{torch}} <code><nowiki>{{torch}}</nowiki></code> or <code><nowiki>[[File:Place-light-torch-icon.png|middle|18px]]</nowiki></code> [[Place Light Tool]]<br />
** <span style="font-family:Pictos;">C</span> <code><nowiki><span style="font-family:Pictos;">C</span></nowiki></code> [[Fog of War]]<br />
*** <span style="font-family:Pictos;">E</span> <code><nowiki><span style="font-family:Pictos;">E</span></nowiki></code> Reveal<br />
*** <span style="font-family:Pictos Three;">c</span> <code><nowiki><span style="font-family:Pictos Three;">c</span></nowiki></code> Polygon Reveal<br />
*** <span style="font-family:Pictos;">C</span> <code><nowiki><span style="font-family:Pictos;">C</span></nowiki></code> Hide Areas<br />
*** <span style="font-family:Pictos;">#</span> <code><nowiki><span style="font-family:Pictos;">#</span></nowiki></code> Reset Fog<br />
** [[File:Udl-hide-icon.jpg|middle|15px]] <code><nowiki>[[File:Udl-hide-icon.jpg|middle|15px]]</nowiki></code> [[Darkness Tool]]<br />
*** [[File:Udl-reveal-icon.jpg|middle|15px]] <code><nowiki>[[File:Udl-reveal-icon.jpg|middle|15px]]</nowiki></code> Reveal<br />
*** [[File:Udl-perm_darkness-icon.jpg|middle|15px]] <code><nowiki>[[File:Udl-perm_darkness-icon.jpg|middle|15px]]</nowiki></code> Permanent Darkness<br />
*** [[File:Udl-explorer-icon.jpg|middle|15px]] <code><nowiki>[[File:Udl-explorer-icon.jpg|middle|15px]]</nowiki></code> Explorable Darkness<br />
*** [[File:Udl-polygon-icon.jpg|middle|15px]] <code><nowiki>[[File:Udl-polygon-icon.jpg|middle|15px]]</nowiki></code> Polygon <br />
*** [[File:Udl-rectangle-icon.jpg|middle|15px]] <code><nowiki>[[File:Udl-rectangle-icon.jpg|middle|15px]]</nowiki></code> Rectangle <br />
** <span style="font-family:Pictos;">t</span> <code><nowiki><span style="font-family:Pictos;">t</span></nowiki></code> [[Turn Tracker]]<br />
** <big><span style="font-family:dicefontd20;">t</span></big> <code><nowiki><big><span style="font-family:dicefontd20;">t</span></big></nowiki></code> [[Dice Rolling GUI]]<br />
** <span style="font-family:Pictos;">?</span> <code><nowiki><span style="font-family:Pictos;">?</span></nowiki></code> [[Toolbox_Overview|Help Tool]] <br />
<br />
'''[[Character Sheet]]'''<br />
* <span style="font-family:Pictos;">&</span> / {{button|1 = <span style="font-family:Pictos;">&</span>|2 = white}} <code><nowiki><span style="font-family:Pictos;">&</span></nowiki></code> Add, [[Repeating Section]]<br />
* <span style="font-family:Pictos;">(</span> / {{button|1 = <span style="font-family:Pictos;">(</span>|2 = white}} <code><nowiki><span style="font-family:Pictos;">(</span></nowiki></code>/<code><nowiki>{{Lock}}</nowiki></code> Lock, repeating section<br />
* <span style="font-family:Pictos;">)</span> / {{button|1 = <span style="font-family:Pictos;">)</span>|2 = white}} <code><nowiki><span style="font-family:Pictos;">)</span></nowiki></code>/<code><nowiki>{{Unlock}}</nowiki></code> Unlock, repeating section<br />
* '''<big>≡</big>''' / {{button|{{3lines}}|white}} <code><nowiki>'''<big>≡</big>'''</nowiki></code> Reorder symbol, repeating section.<br />
* <span style="font-family:Pictos;">w</span> / {{button|1 = <span style="font-family:Pictos;">w</span>|2 = white}} <code><nowiki><span style="font-family:Pictos;">w</span></nowiki></code>/<code><nowiki>{{Bubble}}</nowiki></code> Send to chat<br />
* <span style="font-family:Pictos;">y</span> / {{button|1 = <span style="font-family:Pictos;">y</span>|2 = white}} <code><nowiki><span style="font-family:Pictos;">y</span></nowiki></code>/<code><nowiki>{{Gear}}</nowiki></code> Settings, gear icon<br />
* <span style="font-family:Pictos;">x</span> / {{button|1 = <span style="font-family:Pictos;">x</span>|2 = white}} <code><nowiki><span style="font-family:Pictos;">x</span></nowiki></code>/<code><nowiki>{{hammer}} or {{wrench}} </nowiki></code> Alternative Settings icon.<br />
* [[File:Charmancer-logo.png|20px]] [[Charactermancer]] logo<br />
<br />
'''Misc.'''<br />
* {{button|{{3dots}}|white}} <code><nowiki>{{button|{{3dots}}|white}}</nowiki></code> - Token Settings -Player Permission menu<br />
* {{folder}} <code><nowiki>{{folder}}</nowiki></code> - like {{button|{{folder}}Add|white}}-button<br />
* UI buttons: {{button|{{gear}}|blue}}, {{button|'''<big>+</big>'''|white}}, {{button|'''<big>-</big>'''|white}}, {{button|1 = <span style="font-family:Pictos;">#</span>|2 = white}}, {{button|1 = <span style="font-family:Pictos;">z</span>|2 = white}}, {{button|1 = <span style="font-family:Pictos;">s</span>|2 = white}}, {{button|1 = <span style="font-family:Pictos;">z</span>|2 = white}}, {{button|1 = <span style="font-family:Pictos;">{{!}}</span>|2 = white}}<br />
* {{button|Delete|red}}, {{button|Apply Changes|white}}, {{button|{{upload}}Upload|white}}, {{button|Save Settings|blue}}, {{button|'''<big>+</big>'''Add|white}}<br />
<br />
'''Dice'''<br />
* <span style="font-family:dicefontd20;">t</span> <code><nowiki><span style="font-family:dicefontd20;">t</span></nowiki></code> d20<br />
* <span style="font-family:dicefontd4;">d</span> <code><nowiki><span style="font-family:dicefontd4;">d</span></nowiki></code> d4<br />
* <span style="font-family:dicefontd6;">f</span> <code><nowiki><span style="font-family:dicefontd6;">f</span></nowiki></code> d6<br />
* <span style="font-family:dicefontd8;">h</span> <code><nowiki><span style="font-family:dicefontd8;">h</span></nowiki></code> d8<br />
* <span style="font-family:dicefontd10;">j</span> <code><nowiki><span style="font-family:dicefontd10;">j</span></nowiki></code> d10<br />
* <span style="font-family:dicefontd12;">l</span> <code><nowiki><span style="font-family:dicefontd12;">l</span></nowiki></code> d12<br />
<noinclude>[[Category:Miscellaneous]]</noinclude></div>1223200https://wiki.roll20.net/Reusing_RollsReusing Rolls2024-03-18T06:14:06Z<p>1223200: formatting, some links</p>
<hr />
<div>{{revdate}}In early 2020, it was noticed that you could re-use roll in [[macros]] without using [[API]]. This page lists some of the top posts and comments that figures out uses for it.<br />
<br />
* {{forum|permalink/9091992/ Reusing Rolls - Megathread}}<br />
* {{forum|post/9161706/re-use-die-rolls-in-macros-treated-as-numbers-rather-than-just-text Re-use die rolls in macros, treated as numbers rather than just text}} - Suggestion Forums<br />
{{NavMacroDocs}}<br />
* {{forum|permalink/8716289/ Original discovery}} by Syneran<br />
<br><br />
==Collected Tricks==<br />
===Scott C's Original Trick===<br />
{{forum|permalink/8747581/ Stupid Roll20 Tricks (and some clever ones)}} - Initial Trick writeup - [[Scott|Scott C]]<br />
<br />
'''Disclaimer: This trick takes advantage of emergent behavior that may not be intended and may be patched'''<br />
<br />
I can't take credit for this trick. Syneran discovered the capability. But, long story short, it is actually possible to reuse rolls with some small caveats. Here's a summary of the info discovered in the linked forum thread:<br />
<br />
The chat accepts the [[Inline Rolls|inline roll]] indexing used in the [[API]] (and apparently the roll parser itself), so you can do:<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
[[ [[1d20]] + [[1d6]] + [[6]] ]] = $[[0]] + $[[1]] + $[[2]]<br />
</pre><br />
And get an output that would read like this:<br />
<br />
[[File:Reuse-rolls-ex1.png]]<br />
<br />
The limited part is you can't use those indexed rolls inside other rolls. So for instance, you '''cannot''' reverse the above output in the following way:<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
[[1d20]] + [[1d6]] + [[6]] = [[$[[0]] + $[[1]] + $[[2]] ]]<br />
</pre><br />
Using the indexes appears to break any containing [[Inline Rolls|inline rolls]], like so:<br />
<br />
[[File:Reuse-rolls-ex2-bad.png]]<br />
<br />
Additionally, the indexing is line specific, so this also doesn't work:<br />
<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
[[1d20]] + [[1d6]] + [[6]]<br />
[[$[[0]] + $[[1]] + $[[2]] ]]<br />
</pre><br />
[[File:Reuse-rolls-ex3-bad.png]]<br />
<br />
However, a new line can be achieved by using <code>%NEWLINE%</code>:<br />
<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
[[1d20]] + [[1d6]] + [[6]] %NEWLINE% [[$[[0]] + $[[1]] + $[[2]] ]]<br />
</pre><br />
<br />
These are pretty big limitations if you're just typing rolls into {{Text Chat}}, but we can circumvent it through good use of [[Roll Templates|roll templates]]. For instance, we could hide the actual roll in between roll template fields, and then present them in whatever order we wanted:<br />
<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
&{template:default} [[ [[1d20]] + [[1d6]] + [[6]] ]] {{name=My Attack}} {{$[[0]] + $[[1]] + $[[2]]==$[[3]]}}<br />
</pre><br />
<br />
which would give us this output:<br />
<br />
[[File:Reuse-rolls-ex4-template.png|Reuse Rolls example using roll template]]<br />
<br />
For those with API access, the API sees this message with the proper indexes showing, so any API that handles rolls should react to these indexed rolls just like they were regular rolls.<br />
<br />
While you can't nest indexed rolls, you '''can''' nest the roll it's referencing, e.g:<br />
<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
[[ [[ [[1d20]] + @{str_mod} ]] - @{str_mod} + 6 ]]<br />
</pre><br />
<br />
In this case, <code>index 0</code> will find the result of <code>1d20</code>, <code>index 1</code> will include the <code>str_mod</code>, and <code>index 2</code> will subtract the <code>str_mod</code> from the previous value and add the 6.<br />
<br />
'''What's it allow us to do though?'''<br />
<br />
There's several new things this allows the community to do that were previously locked behind access to the Mods(API).<br />
<br />
'''Character Sheets'''<br />
<br />
When making [[BCS|custom character sheets]] (or sheets for the repo), one of the big hurdles has been accommodating systems that require you to know multiple things about a complex roll. Something like say the success of a roll in relation to a target number, as well as the value of the roll itself. Or if a given number on a die counts as 0 (or some other number).<br />
<br />
'''General Macro Creation'''<br />
<br />
Now we can create macros that do our math for us. Total the damage from a complicated attack (or one that hit several times), display the parts of a roll so that what went into that roll is visible without needing to hover over it. And I'm sure folks will come up with quite a few other ideas that I haven't even thought of.<br />
<br />
===Reordering Rows===<br />
* {{fpl|8761813/ post}} by [[GiGs]]<br />
<br />
Develops further some ideas based on Scott's original '''Reuse Rolls''' trick.<br />
<br />
one feature lots of people have asked for over the years, is to be able to roll a set of ability scores, and show the total at the same time. With this new trick, you can do that. For example:<br />
<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
&{template:default} {{name=Stats}} {{total=[[ [[4d6kh3]] + [[4d6kh3]] + [[4d6kh3]] + [[4d6kh3]] + [[4d6kh3]] +[[4d6kh3]] ]] }} {{STR=$[[0]]}} {{DEX=$[[1]]}} {{CON=$[[2]]}} {{INT=$[[3]]}} {{WIS=$[[4]]}} {{CHA=$[[5]]}}<br />
</pre><br />
This will result in:<br />
<br />
[[File:Reuse-rolls-rows-ex1.png]]<br />
<br />
The problem here is it shows the Total first. I haven't found a way to use the <code>$[[ ]]</code> syntax to access a roll that others are nested inside, like Total here? Has anyone else figured out how to do that?<br />
<br />
<br />
My trick is: there is way to reorder the rows within the template, if you don't mind using numbers as the row titles:<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
&{template:default} {{name=Stats}} {{total=[[ [[4d6kh3]] + [[4d6kh3]] + [[4d6kh3]] + [[4d6kh3]] + [[4d6kh3]] +[[4d6kh3]] ]] }} {{1=$[[0]]}} {{2=$[[1]]}} {{3=$[[2]]}} {{4=$[[3]]}} {{5=$[[4]]}} {{6=$[[5]]}}<br />
</pre><br />
This will result in:<br />
<br />
[[File:Reuse-rolls-rows-ex2.png]]<br />
<br />
It turns out that if your default template row name (the part before the <code>=</code>) is just a number, it gets sorted before any text entries, and in numerical ascending order. <br />
<br />
If you want text labels, you put them after the <code>=</code>, like so:<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
&{template:default} {{name=Stats}} {{total=[[ [[4d6kh3]] + [[4d6kh3]] + [[4d6kh3]] + [[4d6kh3]] + [[4d6kh3]] +[[4d6kh3]] ]] }} {{1=STR: $[[0]]}} {{2=DEX: $[[1]]}} {{3=CON: $[[2]]}} {{4=INT: $[[3]]}} {{5=WIS: $[[4]]}} {{6=CHA: $[[5]]}}<br />
</pre><br />
<br />
[[File:Reuse-rolls-rows-ex3.png]]<br />
<br />
So there you go, another implementation of the new 'feature' (or is it a bug), and another undocumentated feature (or is it a bug?) of [[Roll Templates]]. <br />
<br />
'''Note:''' negative numbers are sorted just like text, they don't change position. '''This trick works only for numbers 0 and higher.''' They don't have to be consecutive. It also doesnt work for [[Inline Rolls|inline rolls]].<br />
<br />
[[File:Reuse-rolls-rows-ex3.png]]<br />
<br />
===Rolltemplate Helper functions===<br />
by '''[[GiGs]]'''<br />
<br />
* {{fpl|9028352/ link}}<br />
<br />
'''Note:''' This is specifically for [[BCS|character sheet designers]], but it's an implementation of an earlier trick from this thread that is only documented here.<br />
<br />
Here's another nifty and counter-intuitive thing about Reusing rolls:<br />
<br />
When using them in a rolltemplate, you can use them with logic functions, like <code>rollGreater()</code>.<br />
<br />
For instance:<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
&{template:custom} [[ [[1d100]] - ?{Target Number?|50}]] {{target=[[?{Target Number?}]]}} {{raw_roll=$[[0]]}} {{difference=$[[1]]}}<br />
</pre><br />
<br />
and a rolltemplate<br />
<pre data-language="html" style="overflow:hidden;white-space:pre-wrap"><br />
<rolltemplate class="sheet-rolltemplate-custom"><br />
<div class="sheet-content"><br />
<div class="sheet-key">Target</div><br />
<div class="sheet-value">{{target}}</div><br />
<div class="sheet-key">Raw Roll</div><br />
<div class="sheet-value">{{raw_roll}} {{#rollGreater() raw_roll target}} (above Target) {{/rollGreater() raw_roll target}}</div><br />
<div class="sheet-key">Difference</div><br />
<div class="sheet-value">{{difference}}</div><br />
</div><br />
</rolltemplate><br />
</pre><br />
<br />
This will show the text '''(above Target)''' for <code>raw_rolls</code> that roll above the target - even though <code>row_roll</code> is one of these weird pseudo-inline rolls.<br />
<br />
This makes these quantities even more useful for character sheet design.<br />
<br />
===Two Unique Roll Results===<br />
by '''Persephone'''<br />
* {{fpl|9029428/ link}}<br />
<br />
I was trying to find a way to roll 2d8, getting both results separately without getting the same result twice, when I remembered this trick. Turns out it works for inline rolls that are nested inside each other.<br />
<br />
<pre><br />
[[1d8r[[1d8]]]], $[[0]]<br />
</pre><br />
<br />
The outer nesting is treated as the last one in the line, so <code><nowiki>$[[0]]</nowiki></code> gives you the result of the first inline roll in the deepest layer of the roll while <code><nowiki>$[[1]]</nowiki></code> gives you the same result as the complete roll. If the nested <code>1d8</code> results in a <code>4</code>, the outer roll becomes <code>1d8r4</code> so it rerolls any results of <code>4</code>. The <code><nowiki>$[[0]]</nowiki></code> will show an output of <code>4</code> and the inline roll will have a result of any number between <code>1</code> and <code>8</code>, except for <code>4</code>.<br />
<br />
I haven't yet tested multiple nested layers or multiple inline rolls within the main roll, but I suspect preventing more than 2 rolls from matching would get quite complex, if at all possible.<br />
<br />
('''Comment''': [[GiGs]] would rather call this something like ''Multiple Rolls - Each Unique'')<br />
<br />
===Reusing Rolls (advanced)===<br />
{{fpl|9091003/ example}} by '''Gibli'''<br />
<br />
<br />
I always wanted to be able to re-use a Roll in a subsidiary Roll, but as stated by Scott C. {{fpl|8747581/ here}}, it breaks the [[Inline Roll]].<br />
<br />
<br />
So, here I thought of a workaround : why not call an Ability depending of the result of my Roll through a button, like making a [[Chat Menu]] ?<br />
It might ask a lot of work most of the time, but in some cases it's pretty simple and quick to put in place.<br />
<br />
{| role="presentation" class="wikitable mw-collapsible mw-collapsed"<br />
| '''What didn't work'''<br />
|-<br />
| Initial attempt: <br />
<br />
I have a trap which when you fall in it make you hit by 1d4 spikes, each spike doing 1d4+2 damages.<br />
<br />
Then, I wanna have something like this(Of course, it doesn't work as is.):<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
[[1d4]] [[ $[[0]]d4 + 2*$[[0]] ]]<br />
</pre><br />
<br />
<br />
* Naming the abilities <code>PikesDamages1</code> to <code>PikesDamages4</code> didn't work, as pressing the roll button on <code>Trap</code> will not process <code><nowiki>PikesDamages$[[0]]</nowiki></code>, but instead interpret the ability name as <code>PikesDamages Rolling 1d4 = (1)'>1</code><br />
<br />
* When you put the caller to the previous roll <code><nowiki>$[[0]]</nowiki></code> in the parenthesis for the name of the ability, it is replaced by a text such like this :<br />
<br />
<br />
<code><nowiki>[Throw](~PikesDamages Rolling 1d4 = (1)'>1)</nowiki></code><br />
<br />
This text is specifically for a call to a Roll of 1d4 which resulted in a 1.<br />
<br />
For you to have spaces in the name of an Ability, you can simply write the name you want anywhere and then simply copy/past it.<br />
Spaces are replaced by dashes only while you type them, the copy/past bypass this.<br />
|}<br />
<br />
<br />
After some testing, saving <code>Trap</code> as a character [[Journal#Abilities|abilities]] with a roll button for the damage:<br />
'''Trap :'''<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
&{template:default} {{name=Trap}} {{Pikes=[[1d4]]}} {{Damages=[Throw](~PikesDamages$[[0]])}}<br />
</pre><br />
Then save these 4 with '''exactly''' these names, as more character abilities: <br />
<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
PikesDamages Rolling 1d4 = (1)'>1<br />
&{template:default} {{name=Pikes Damages}} {{Damages=[[1d4+2]]}}<br />
<br />
PikesDamages Rolling 1d4 = (2)'>2<br />
&{template:default} {{name=Pikes Damages}} {{Damages=[[2d4+4]]}}<br />
<br />
PikesDamages Rolling 1d4 = (3)'>3<br />
&{template:default} {{name=Pikes Damages}} {{Damages=[[3d4+6]]}}<br />
<br />
PikesDamages Rolling 1d4 = (4)'>4<br />
&{template:default} {{name=Pikes Damages}} {{Damages=[[4d4+8]]}}<br />
</pre><br />
<br />
[[File:Reuse-rolls-advanced-ability-button-ex.gif|700px|thumbnail|center|Rolling the Trap. Depending on the initial <code>1d4</code> result, it changes which dmg ability is used for rolling damage.]]<br />
<br />
'''Note(Gibli):''' I haven't found why, but it seems that the button need to be put at the end of the rolltemplate, it might not appear in the chat otherwise. And be careful if your rolltemplate has many intricate [[Inline Rolls]], try to always put the one you want to Reuse first, and your button last in the rolltemplate.<br />
<br />
===Computed rolls and order independence===<br />
[https://app.roll20.net/forum/permalink/10534037/ Rainbowencoder]<br />
<br />
With the addition of [[CRP|computed rolls]] comes new syntax to reference those rolls.<br />
<br />
So if you have a roll <code><nowiki>$[[0]]</nowiki></code> you can access the computed roll based on it via <code><nowiki>$[[0.computed]]</nowiki></code> additionally all rolls have a computed roll that defaults to the original roll. You can even use the <code>.computed</code> version without requiring a [[Roll Template]] at all.<br />
<br />
Referencing a roll in this way also doesn't interfere with nested rolls like a standard reference would.<br />
<br />
So while this breaks:<br />
<pre><br />
$[[0]] plus $[[1]] equals [[ [[1d10]] + [[2d6]] ]]</pre><br />
<br />
Using the <code>.computed</code> version allows it to work<br />
<pre><br />
$[[0.computed]] plus $[[1.computed]] equals [[ [[1d10]] + [[2d6]] ]]</pre><br />
<br />
<br />
This could also be used when [https://app.roll20.net/forum/permalink/9112320/ Overwriting template fields in macros]. Since the fields you overwrite have to be before the ones that do the conditional overwriting you wouldn't have previously been able to reference any of the rolls used in determining the decision but with this you can<br />
<br />
=== Reusing rolls, [] pair matter and math ===<br />
* https://app.roll20.net/forum/post/10690257/reusing-rolls-pair-matter-and-math-seems-to-possible<br />
<br />
Long thread with many tricks and insights<br />
<br />
=== Macro curiosities, or how to overcomplicate everything ===<br />
In the [https://app.roll20.net/forum/post/10693202/macro-curiosities-or-how-to-overcomplicate-everything forum thread Macro curiosities, or how to overcomplicate everything by RainbowEncoder], RainbowEncoder shows a way to duplicate the result of a roll and to reuse it multiple times for further rolls or calculation shown in [https://app.roll20.net/forum/post/10693202/macro-curiosities-or-how-to-overcomplicate-everything/?pageforid=10693212#post-10693212 the post about Improved roll index manipulation and Duplicating a roll result for further calculations].<br />
<br />
===Reusing Rolls to get additional crit damage===<br />
* [https://app.roll20.net/forum/permalink/10925029/ trick] by Spencer <br />
<br />
<pre><br />
&{template:default} {{name=Crit}} {{2= Damage : [[ [[1d6+5]]+[[floor(( $[[1]]/50)d6)]] ]]}} {{1=Check : [[ [[1d20+5]] ]]}}<br />
</pre><br />
<br />
==Sheets using this trick==<br />
* {{repo|Roll20/roll20-character-sheets/tree/master/Barbaric Barbaric!}} "reuse roll" trick is used for determining if a <code>2d6</code> roll is either a <code>2</code> or <code>12</code>, which in the system are crit success and fumble. • by [[Andreas J.]]<br />
<br />
==See Also==<br />
* [[Inline Rolls]]<br />
* '''[[Complete Guide to Macros & Rolls]]'''<br />
** {{Text Chat}} - where the roll results appear, & info on the common chat commands<br />
** [[Dice Reference]] - Comprehensive list of how the Roll20 dice-rolling syntax works, and list the features available<br />
** [[Macros]] - How to create macros, and other info on how the Roll20 {{Text Chat}} works, like referencing stats on character sheets, roll queries, nesting macros & initiative<br />
*** [[Chat Menus]]<br />
** [[Roll Templates]] - a method of formatting roll results in the chat, with some extra functions<br />
** [[API]]''(Pro Only)'' - API commands can be used in the <span style="font-family:Pictos;">q</span>Text Chat<br />
* [[Building Character Sheets]]<br />
<br />
[[Category:Tips]]<br />
[[Category:Macros]]<br />
[[Category:Roll Templates]]</div>1223200https://wiki.roll20.net/Beginner%27s_Guide_to_GitHubBeginner's Guide to GitHub2024-03-18T06:01:01Z<p>1223200: </p>
<hr />
<div>{{revdate}}<br />
Submitting [[Character Sheets]], [[Character Sheet i18n|enabling translations for them]] and submitting [[API:Script Index|API Scripts]] to the community requires familiarity with {{repo| GitHub}}, and this is a guide to show the minimum needed to operate it. '''It's highly advisable to learn more than the minimum to spare yourself from headaches.'''<br />
{{clear}}{{NavSheetDoc}}<br />
See '''[[Beginner%27s_Guide_to_GitHub#Other_Guides|Other Guides]]''' for more.<br />
<br />
This document is a bare-bone guide to get you from "What in the world is Git?" to "Everybody should use my brand new character sheet!" as quickly as possible, without trying to teach you all the intricacies the system is capable of. Git is version control software and is underlying everything on GitHub, but this guide will ignore it, and focus on showing the steps how to send Roll20 your proposed Character Sheet or API updates.<br />
<br />
The '''[[Short Git Guide]]''' is an alternative to this guide, which instead of using GitHub Desktop for some parts of the process, uses the [https://docs.gitlab.com/ee/gitlab-basics/start-using-git.html Git Command Line Interface(CLI)] to perform most steps, while still performing the final step of sending Roll20 the update through GitHub in the browser. Github desktop (and other git Graphical User Interfaces) are simple to use, but can frequently run into issues that cannot be easily resolved via the GUI application. The command line interface is slightly more complicated, but offers much greater control over what you are doing to your repository.<br />
<br />
The [[Beginner's_Guide_to_GitHub#Other_Guides |Other Guides]]-section contains more guides/resources for how Git/GitHub works that are more general in nature, and not necessarily tailor-made for Roll20-related things.<br />
__TOC__<br />
[[File:GitHub.png|thumb|right|500px|The {{repo|Roll20/roll20-character-sheets Roll20 Character Sheet repository}} on GitHub. ]]<br />
== What is Git/GitHub? ==<br />
'''Git''' is a piece of software that you install locally on your computer which handles version control for you.<br />
'''GitHub''' is a hosting service for '''Git''' repositories.<br />
So they are not the same thing: '''Git''' is the tool, '''GitHub''' is the service for projects that use '''Git'''. [https://jahya.net/blog/git-vs-github/ Brief comparison]<br />
<br />
See Also: '''[[Short_Git_Guide#Glossary|Git/GitHub Glossary]]'''<br />
<br />
There are several different ways to use Git. Git is very powerful, but in order to get the very most out of it you need to learn how to use the command line interface (CLI) ([https://imgs.xkcd.com/comics/git.png xkcd comic]). The [[Beginner's_Guide_to_GitHub#Other_Guides |Other Guides]]-section has additional reading about the CLI for those interested. However, everything that this document is going to be walking you through can be done using only GitHub Desktop GUI (very good at keeping your computers hard drive synchronized with your repository - See [[Beginner's_Guide_to_GitHub#CLONE_Your_Repository|Clone your Repository]]) and the GitHub web tools both of which are simplified tools to use the underlying Git.<br />
<br />
== Setup '''GitHub''' ==<br />
This is the steps & setup you only need to perform once to get you started with GitHub, and the [[#GitHub Branch-based Workflow, with Forks|GitHub Branch-based Workflow, with Forks]] will show how to do things if/when you submit changes beyond the first time.<br />
=== Create Your Account ===<br />
In order to use GitHub, you need to have an account on their website. You can create a paid account or you can create a free account. Unless you plan to create a large number of projects which you don't want to share with the world, there is no reason to create a paid account: the only difference between the various pricing levels is the number of private repositories you're allowed to have. Everyone, including free accounts, gets to have an unlimited number of public repositories.<br />
<br />
You will be dealing with the master Roll20 Repositories for roll20-character-sheets and/or roll20-api-scripts which are public repositories. You will also be creating a fork of these repositories, which might as well also be public, so for your Roll20 usages, a free account is all you need. <br />
<br />
=== '''FORK''' the Official Roll20 Repository ===<br />
<blockquote style="border:1px solid #aaa;background:#ccc;padding:10px">A ''fork'' is a copy/[https://docs.github.com/en/github/getting-started-with-github/github-glossary#clone clone] of another repository, with the difference that you are able to make direct changes to it. Forking a repository allows you to freely experiment with changes without affecting the original project.</blockquote><br />
[[Image:Fork.png|thumb|800px|center|"roll20-character-sheets" is the Character Sheets repository. For API Scripts, fork "roll20-api-scripts".]]<br />
<br />
Forking is easily done using GitHub. Click the Fork button on the official repository located at [https://github.com/Roll20/roll20-character-sheets https://github.com/Roll20/roll20-character-sheets] or [https://github.com/Roll20/roll20-api-scripts https://github.com/Roll20/roll20-api-scripts] as appropriate. This will create a copy of that repository in your account, which you will have permission to make changes to as you please. You ''can'' fork the repository as many times as you want, but you only ''need'' to fork it once. This new repository will have an address identical to the original, except instead of being at root "Roll20" will have a root of your GitHub account name. <br />
<br />
If you are working with another user on the same sheet or script, it may be a good idea to go into your new repository's settings and add them as a collaborator. The details of how to add a collaborator or work with a collaborator are beyond the scope of this tutorial, however.<br />
<br />
If you are familiar with [https://git-scm.com/ Git](which GitHub is basicly just a web-version/hosting platform of), you shouldn't need any other information to complete your character sheet submission. Everyone else, read on!<br />
<br />
=== '''CLONE''' Your GitHub Repository to your Computer ===<br />
<blockquote style="border:1px solid #aaa;background:#ccc;padding:10px">''Cloning'' a repository also makes a copy, but a cloned repository is used as a working copy and is on your local computer's hard drive as normal folders and files. Git maintains a link &ndash; by default named "origin" &ndash; between the folders and the repository it was cloned from.</blockquote><br />
[[Image:Clone.png|thumb|250px|The list will include all repositories on your account]]<br />
<br />
The reason why you forked Roll20's repository was because you don't have direct rights to edit it, and the reason why you then clone your forked Roll20's repository instead of Roll20's repository, is so you can update/send things from your computer to your Github repository, from where you then send the Pull Requests to Roll20's repository.<br />
<br />
For the beginner Git user, it is strongly recommend to download and install either [https://windows.github.com/ GitHub for Windows] or [https://mac.github.com/ GitHub for Mac] as appropriate for your operating system (Linux users need to directly use Git CLI or find an alternative for GitHub Desktop). These will hereafter be referred to in this document as "GitHub Desktop" or "the desktop app". In addition to being a simple way to install and setup Git version control on your computer, the GitHub desktop applications make it easy to link to your GitHub user account. It will tell you whenever your files on your computer are out of date with your repository on GitHub and allow you to easily synchronize the two. <br />
<br />
When you first run the GitHub application, it will prompt you to log in to your GitHub account. Then, click the large plus sign in the top left to Clone your repository. When you clone the repository, you'll be prompted to select a location to put the files. Make sure you select a location that you can find easily, you'll need to know where it is! If you get a new computer, installing the GitHub desktop and Cloning your repository is the only step that needs to be repeated. <br />
<br />
The desktop app also has the easiest interface for managing Branches. When you switch branches within the desktop application, it will add / remove / change files so that they match the last commit done from the branch you have switched to. <br />
<br />
If you're not using the GitHub application, you can find the clone url for your repository on the page for your repo. GitHub offers both SSH and HTTPS clone urls, as well as a Subversion checkout url. The details of cloning your repo manually are beyond the scope of this guide, however.<br />
<br clear=all><br />
<br />
== GitHub Branch-based Workflow, with Forks==<br />
The previous section's action & setup is only needed to do once. The following section describes the procedures that is recommended to do each time you want to submit a new update to Roll20.<br />
<br />
Alternatively, read the [[Short Git Guide]] for how you can use the Git CLI instead of GitHub Desktop for most things. The guide also have more clear method on how to keep your repository up to date with Roll20.<br />
<br />
=== Update your Repository to be on par with Roll20's Repository ===<br />
[[File:GitHub Compare.png|thumb|right|500px]]<br />
If you have just forked/cloned your repository a few minutes ago, it is still in sync. But if you are coming back to your repository after more than a week, some of the character sheets or API scripts will have been updated in Roll20's Repository, but this isn't automatically done to your Repository.<br />
<br />
While the updated things might not be related to the sheets you want to edit, it's still best to have your repository updated to be in sync with Roll20's. You do ''not'' need to create another fork, nor do you need to clone your repository again. You will need to update your Github repository's <code>master</code> branch(as well as any local copy copy of your repository on your computer) to be on par with Roll20 repository's <code>master</code> branch.<br />
<br />
* '''{{repo|KirstieJane/STEMMRoleModels/wiki/Syncing-your-fork-to-the-original-repository-via-the-browser a guide to sync your repository with Original}}'''<br />
<br />
When you are done with this, the files in the Roll20 master repository, your own Github repository, and your cloned repository on your computer should all be the same. <br />
<br />
Note that Github is making frequent upgrades to the UI. There is now a button labeled "Fetch Upstream" that makes sync'ing easy.<br />
<br clear=all><br />
<br />
=== Make a '''Branch''' ===<br />
''Recommended Read:'' '''[https://guides.github.com/introduction/flow/Understanding the GitHub's branch-based workflow]<br />
<br />
It is very strongly recommended to make a new branch for every update, and every separate project (character sheet or API script). For example if you are going to be updating two different API scripts at the same time, make a branch for each script. If a few weeks later you decide to make additional changes to the same script, make a new branch for the newer update. As a rule of thumb, make one new branch for every pull request. '''Roll20 is likely to reject or delay Pull Request that makes changes to more than one sheet.'''<br />
<br />
The desktop app also has the easiest interface for managing Branches. On the menu at the top, just pick "Branch / New branch". When you switch branches within the desktop application (The 2nd line allows you to switch the repository you are working on, and switch the current branch), it will add / remove / change files on your hard drive so that they match the last commit done from the branch you have switched to.<br />
<br />
=== '''COMMIT''' Your Changes and '''PUSH''' your commits ===<br />
<blockquote style="border:1px solid #aaa;background:#ccc;padding:10px">When you ''commit'' changes, you store a record of everything you changed as well as a human-readable description of what you've done upon your local computer. <br>You then ''push'' your commits to your repository.</blockquote><br />
Once you have a working copy of your repository cloned, you can make changes to it. This includes creating a new folder for your character sheet or API script and adding the source code to it, or making modifications to files already there. <br />
<br />
Many people, when developing Roll20 scripts or character sheets, do all of the actual editing in a [[Sheet_Author_Tips#Code_with_a_Proper_Text_Editor|text editor]] (for example notepad++). You can simply open the files on your hard drive (the ones created in the 'clone' step) in any text editor and make the changes in the editor. Whenever you wish to run the code on Roll20, hit {{button|Ctrl}}+{{button|A}} and {{button|Ctrl}}+{{button|C}} to select all the text, and copy it to the clipboard. Then paste it({{button|Ctrl}}+{{button|V}}) into the correct Roll20 campaign field. If additional changes are needed (for example debugging) it is often easiest to continually perform a cycle of edit, copy, paste and test.<br />
<br />
When you command the text editor to save your changes, it will finally write your changes to the file you have been editing, and GitHub Desktop will detect that the file you edited has changed and display the name of the file that has changed in its left pane, and in the right pane display a summary of what it detects as being different between the current save and the last commit that was made. However these changes have only been detected, GitHub does not actually made any record of these changes until you commit them. The Git experts recommend commiting often, as commiting gives you an off-site backup of your work, and a record of each commit. <br />
<br />
<center>[[File:Git Changed.png|thumb|1013px|center|You can't commit any change without a Summary, but the Description is optional]]</center><br />
<br />
Commiting is very simple. The desktop app has already done all the work of identifying what needs to be commited. Enter a title for the changes and ''optionally'' enter a longer description, commit the change by presing the "commit to (branch)" button. Make sure you make your commits to your working branch, not your master branch. Making frequent commits provides you with a detailed history of the changes you're making, as opposed to a single commit with everything once you're done. Note that there is a length limit to the Summary. However, if you exceed the limit, your message will automatically overflow into the longer Description. You can see this happening when text in the Summary field turns gray.<br />
<br />
As soon as you make the commit, GitHub desktop should display a large notice that there are No Local Changes. It should also suggest that you push your commit to the origin. Alternatively it might suggest that you "Publish Branch". Committing your changes still only stores them on your computer. In order to get those changes onto GitHub, you need to push them up to your origin, the repository being stored online. Simply push the "Push Origin" or "Publish Branch" button. Alternatively, at any time origin and clone are out of date there should be a very poorly labeled button in the upper right that has a number and an arrow on it. That should, among other nice things, sync everything between your repository and the clone, so you could push that instead. At the top of the desktop tool, the drop-down menu item "Repository - Push" will also get the job done. <br />
<br />
Continue to edit and make commits until your changes are complete and you have tested and debugged code ready to be submitted for the rest of roll20 to enjoy. You are now ready to request that the roll20 site administrators "pull" your changes into the official roll20 master repository.<br />
<br />
=== Create a '''PULL''' Request ===<br />
<blockquote style="border:1px solid #aaa;background:#ccc;padding:10px">As its name suggests, a ''pull'' is the opposite of a push. Instead of a copied repository sending commits to the original, the original asks for commits from the copy.</blockquote><br />
[[Image:Pull request button.png|thumb|511px]]<br />
On the webpage for your repository, there is a green button which says "Compare, review, create a pull request" when you hover over it. This button will take you to a page where you can create a pull request. If there are any differences between your repository ("head") and Roll20's version of the repository ("base"), they'll be displayed here. (Note that you can change what to use as both the head and the base by clicking the nearby "Edit" button.) <br />
<br />
'''Since your changes are all in your working branch, not your master branch, you want your pull request to come from your working branch.''' It is very important to never try to do a pull request from your master branch. Things that other people do get synced to your master, plus any other projects you might have also end up in your master. If you tell github to pull from your master, it might report that it is incorporating dozens, or even hundreds of commits into your pull request. Some of these might be for projects that are years old, or out of date, or wrong, or even some weird random files that should not be in your projects at all. This will complicate your pull request and might make it impossible to correctly update the files you want without messing up other projects. If this seems to happen to you, check to see if you started to pull from your master, and if so cancel or close the pull request and start a new pull request from your working branch. If worst comes to worst, copy all your work to a separate folder, and make another brand new branch that you can drop your files into. Always pull from the cleanest branch you can. <br />
<br />
If you pull from a clean, new branch then when you do a pull request from that working branch to the roll20 master branch, then only those commits specifically committed to the working branch will be included in the pull request.<br />
<br />
Because you don't have collaborator permissions on Roll20's repository, you can't perform the pull action yourself, but you can ''request'' someone else to perform the pull. Press the large green button labeled "Create pull request" and a pull request will be opened on the base repository.The people with permission to do so (ie, the Roll20 developers) can examine the pull request as well as the content of the changes proposed, and then merge the request into the official repository.<br />
<br />
'''For clarity's sake, please include the name of the sheet you have made changes for in the pull request, eg. "[Dungeondivers 3rd Edition] fixed broken Might roll".'''<br />
<br />
For character sheet submissions, remember to include [[sheet.json]] and a preview image &ndash; check the {{repo|Roll20/roll20-character-sheets/blob/master/README.md Sheet Repository Readme}} for more information. <br />
For API script submissions, remember to include <code>script.json</code> &ndash; check the {{repo|Roll20/roll20-api-scripts/blob/master/README.md API repository Readme}} for more information.<br />
Assuming everything is correct, your sheet or script should get added by Roll20's repo maintainer to the <code>[https://github.com/Roll20/roll20-character-sheets/blob/master/approved.yaml approved.yaml]</code> file and be available to all users!<br />
<br />
Once a week, Roll20 processes all available sheet requests. They usually start this process on Mondays after the weekly submit-deadline, and does their last changes on Tuesdays shortly before the weekly character sheet changes go live. When this occurs, you'll receive an email from GitHub. This email will either let you know a comment was left on your request regarding an issue that was discovered with your submission OR if your sheet was merged(because it was completed successfully).<br />
<br />
==== Making changes to your PULL Request ====<br />
<br />
If you create a pull request and then commit & push some additional changes to your repository/ working branch before the Pull Request is merged, those new changes will be automatically be updated/included in the original pull request; there is no need to make a second pull.<br />
<br />
=== Cleanup ===<br />
Do NOT delete any branch until all pull requests from that branch are completed and closed. Actually there is never any hurry to delete a branch at all. They don't hurt anything so long as you remember to only use each branch once. <br />
<br />
The GitHub software will recommend that you Merge your Branch back into master, '''but do not perform this action'''. This is a step that is needed with other workflows, but not in the Forking Workflow which we are using. Instead, we recommend synchronizing your fork with the roll20 master branch as the first step in preparing for your next update. This will bring the updates you just did (as well as any changes anybody else has done) into your fork.<br />
<br />
Therefore there is no cleanup that needs done. <br />
<br />
==GitHub Gist==<br />
[[File:GitHub-Gist.png|thumb|550px|right|Example of a Gist, showing the code changes comparison for the latest version and the previous one.]] <br />
[https://gist.github.com/ GitHub Gist] is a simple and smart way to share code with others, and is a lightweight option for sharing and updating code for your character sheets with other without having to go into detail with how to work with repositories, branches, commits and other things.<br />
<br />
Using a Gist enables you to easily update the code and have access to a clear change history for the code, so you and other see clearly what have changed from previous versions of your gist. This history can be accessed in the "Revisions"-tab.<br />
<br />
If you don't want to go through the trouble of forking the Roll20 repo or creating a repository just for sharing some code, Github Gist is a good alternative to other ways of sharing/hosting code many less regular programmer use such as [https://pastebin.com/ Pastebin], [https://www.dropbox.com/ Dropbox] or [https://drive.google.com Google Drive].<br />
<br />
* [https://docs.github.com/en/enterprise/2.13/user/articles/about-gists More about Gist]<br />
<br><br />
<br><br />
<br><br />
== Other Guides ==<br />
Here are links to various other guide on how to use GitHub and/or Git which are made for understanding them in general, and aren't tailored to how they apply to Roll20. <br />
<br />
These guides will give you a better understanding of Git/GitHub itself which which lends itself to better understanding when you encounter trouble with Roll20 related things, as this [[Beginner's Guide to GitHub]](and the [[Short Git Guide]] to a lesser extent) skims over many things to only learn the bare essential to operate GitHub/Git in Roll20 context, but doesn't really teach how they actually work.<br />
<br />
'''Understanding Git will make you understand GitHub better,''' and things related to it easier.<br />
<br />
Understanding Git/GitHub better is especially useful if you intend to collaborate/host own repositories for something like character sheet development for a specific sheet.<br />
<br />
'''[https://cybersphere.me/publishing-sheets-to-github/ Publishing Roll20 Character Sheets to GitHub]''' is an article by [[GiGs]] that goes through the steps<br />
<br />
====General====<br />
Some general guides on how to use Git or GitHub<br />
<br />
* {{forum|post/7282579/questions-about-github-advice-request-request-that-somebody-edit-beginners-guide-to-github-to-explain-a-bit-more Tips on how to use Github}}<br />
<br />
* [https://guides.github.com/introduction/flow/ The GitHub Workflow(visualization)] (not the flow we use, but a good visualization) and [https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow Forking Workflow] (what we use)<br />
<br />
* [https://rogerdudler.github.io/git-guide/ Git -The simple guide (command line tool)] by Roger Dudler<br />
<br />
* [https://www.atlassian.com/git/tutorials Atlassian Git Tutorials]<br />
<br />
* {{yt|watch?v=ISkPyNkM2iY | GitHub Workflow (GitHub Desktop)}} 6/22/16<br />
<br />
==== Git and Github for Poets Youtube Tutorial ====<br />
10-20 min long videos for non-technical people that teaches the basics on Git and Github, showing how to work with Github in the browser, but also have an intro to using the command line. It was made in 2016, but seems to still be accurate when viewed(March 2019)<br />
<br />
* {{yt|watch?v=BCQHnlnPusY&list=PLRqwX-V7Uu6ZF9C0YMKuns9sLDzK6zoiV | 1.1 Git/GitHub intro}} 14 min<br />
<br />
* {{yt|watch?v=oPpnCh7InLY&list=PLRqwX-V7Uu6ZF9C0YMKuns9sLDzK6zoiV&index=2 | 1.2 Branches}} 12 min<br />
<br />
* {{yt|watch?v=_NrSWLQsDL4&list=PLRqwX-V7Uu6ZF9C0YMKuns9sLDzK6zoiV&index=3 | 1.3 Forks and Pull Requests}} 13 min<br />
<br />
==== Git and Github for Poets (beyond basics) ====<br />
* {{yt|watch?v=WMykv2ZMyEQ&list=PLRqwX-V7Uu6ZF9C0YMKuns9sLDzK6zoiV&index=4 | 1.4 GitHub Issues}} 12 min<br />
<br />
* {{yt|watch?v=oK8EvVeVltE&list=PLRqwX-V7Uu6ZF9C0YMKuns9sLDzK6zoiV&index=5 | 1.5 Intro to command line}} 9 min<br />
<br />
* {{yt|watch?v=yXT1ElMEkW8&list=PLRqwX-V7Uu6ZF9C0YMKuns9sLDzK6zoiV&index=6 | 1.6 Cloning Repo and Pull/Push}} 22 min<br />
<br />
* {{yt|watch?v=JtIX3HJKwfo&list=PLRqwX-V7Uu6ZF9C0YMKuns9sLDzK6zoiV&index=9 | 1.9 Resolve Merge Conflicts}} 9 min<br />
<br />
* {{yt|watch?v=lR_hYwCAaH4&list=PLRqwX-V7Uu6ZF9C0YMKuns9sLDzK6zoiV&index=10 | 1.10 Git Remotes}} 14 min<br />
<br />
* {{yt|watch?v=_sLgRBrZh6o | Git Workflow (command line)}} 7 min<br />
<br />
== See Also ==<br />
* [[Short Git Guide]] - A guide to use the command line version of Git to work on your computer with character sheets<br />
** [https://cli.github.com/ GitHub CLI beta] - Take GitHub to the command line, and create PRs in the CLI instead of through the GitHub website or the Desktop application.<br />
* [[Sheet Author Tips]] - Contains some advice related to GitHub/Git<br />
* [[Andreas Guide to Sheet Development]]<br />
* {{repo|Roll20/roll20-character-sheets Roll20 Character Sheet repository}}<br />
* {{repo|apps/pull Fork Update App}} - GitHub extension that automates the process of updating your fork. '''Warning:''' [[Sheet_Author_Tips#Install_Pull_to_GitHub|Read this]] before using it.<br />
<br /><br />
[[Category:Guides]]<br />
[[Category:Character Sheet Creation]]<br />
[[Category:External Tools]]<br />
[[Category:API Development]]</div>1223200https://wiki.roll20.net/Short_Git_GuideShort Git Guide2024-03-18T06:00:07Z<p>1223200: link to GitHub guide more prominent</p>
<hr />
<div>{{revdate}}This is a short guide on how to work with Git/GitHub locally on your computer, and how to update your fork of {{repo|Roll20/roll20-character-sheets Roll20's GitHub Repository}}, using the Git Command Line(CLI). <br />
<br />
{{clear}}<br />
{{NavSheetDoc}}The guide is aimed towards people who want to work with Roll20's [[BCS|Character Sheets]] and be able to interact with Roll20's Github & Git through the command line(CLI). It's recommended by those who do lots of work on character sheets and/or juggles more that one sheet at a time.<br />
<br />
'''[[Beginner's Guide to GitHub]]''' is the other guide focusing on the GitHub part.<br />
<br />
==Why Git CLI instead of GitHub Desktop?==<br />
* Git command line(CLI) have more guides & [https://git-scm.com/docs documentation] than the GitHub Desktop/Browser<br />
* Using the CLI makes it easier to troubleshoot, as you clearly know what steps you took, and can see the messages or error message the CLI gives back, which you can then search for on the web or share with others<br />
* Learning to use Git gives you a better understanding of how Git and GitHub works. GitHub is essentially a website hosting Git, with a few extra features.<br />
<br />
== Reading this guide ==<br />
* In most places/steps, it's first written in bold the action to be done, and afterwards an explanation of what it does, and why it's done. This is to make revisiting the guide quicker when you already remember what each step means, but don't remember the exact commands/actions or their order. <br />
* Start with reading the guide's [[#Glossary|Glossary]] to understand commonly used words or phrases in the guide. If you encounter words you don't understand, google for it together with "Git" or "Github", as it is likely a term linked to them. The author of the guide has English as a second language. <br />
* The [https://github.com/Roll20/roll20-character-sheets GitHub repository for Character Sheets] are used as an example here, but it works the same with any other GitHub project you have forked, such as Roll20's [https://github.com/Roll20/roll20-api-scripts API Script repo].<br />
* This guide is made with Linux in mind, but should work universally, if you install & setup Git on your computer with the unix-compatible option. In some places help for Windows-users are linked, while Linux-users are assumed to knowing or figure out the basics. <br />
<br />
== First Time Setup ==<br />
If you've already worked with a GitHub desktop or other graphical user interface, some steps are redundant, and should be skipped if it seems to create duplicates. The setup in '''Step 7.''' will be needed for the "Update your Fork"-section if you otherwise already have a github fork and a local copy. The steps below outline how to clone the entire repository onto your computer. For most users, this is not necessary. After completing '''Step 6''', see the [[#Sparse Checkout|Sparse Checkout]] section for a series of alternate setup instructions to only clone the files you need.<br />
<br />
# '''Have your own [https://github.com/ GitHub account], and have a fork created from Roll20's repository.''' (When logged into GitHub, press the "fork" icon in the upper left corner of {{repo|Roll20/roll20-character-sheets this page}}. It will ask you to name your fork, and my recommendation is to keep the default name, as it will keeps things simple later). Now you have your own fork of the repo, that you can do whatever you want with, but it's still only on the internet, and we want to make a local copy on your computer.<br />
# '''Download and install Git on your computer.''' [https://www.atlassian.com/git/tutorials/install-git Atlassian Guide For Linux/Mac/Windows]<br />
# '''Go to your file manager, and navigate to a folder where you want to place your copy of the roll20 repo.''' The "Documents" folder is a good choice.<br />
# '''Open up a command line prompt/interface(CLI) in this folder.''' [https://www.thewindowsclub.com/how-to-open-command-prompt-from-right-click-menu Windows guide]<br />
# '''Copy the URL for your GitHub fork.''' Open up your browser and navigate to your Github Fork. On the left side is a green "Clone or Download" button, and if pressed, show an url that ends in ".git", which you will need in the next step. Copy it somewhere easily accessible for Step 6. (it should look something like <code>https://github.com/YourGitHubUserName/roll20-character-sheets.git</code>) <br />
# '''Type <code>git clone </code> and the url you have from Step 5.''' (for github user Anduh this would look like: <code>git clone https://github.com/Anduh/roll20-character-sheets.git</code>). Now git is downloading and making you a local copy of your GitHub repository, and it may take some time. This will automatically set your GitHub fork as the default remote (called "origin"). When you later use commands like <code>git push</code> or <code>git fetch</code>, it will act as if you had typed <code>git push origin</code> or <code>git fetch origin</code>, interacting with your GitHub fork. More on this later.<br />
# '''Navigate your CLI to be inside the folder created in Step 6.'''<br />
# '''Type in <code>git remote add upstream https://github.com/Roll20/roll20-character-sheets.git </code>.''' This will set up Roll20's repository as an remote called <code>upstream</code> for your local copy, where you can pull updates from. This will be used later in the "update your Fork" section.<br />
<br />
===Additional Configs===<br />
Other configs and setup that can be nice: <br />
<br />
'''Skip {{c|--set-upstream origin}} when pushing new branch to Github'''<br><br />
Starting from Git 2.37.0, you can run just {{c|git push}} to push new branches. No more {{c|--set-upstream origin}} or need to setup complicated aliases.{{source|https://twitter.com/JI/status/1546948817462800384 1}} Enable with:<br><br />
{{c|git config --global --add --bool push.autoSetupRemote true}}<br />
<br />
* [https://www.git-scm.com/book/en/v2/Customizing-Git-Git-Configuration Git Configuration]<br />
** [https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-config Git Configs - Atlassian]<br />
<br />
'''Git Aliases'''<br><br />
Make aliases to longer commands you need often or often forget. Configure new aliases with command like this:<br />
<pre data-language="bash"><br />
git config --global alias.cmsg 'git commit -m'<br />
git config --global alias.co checkout<br />
git config --global alias.cm 'checkout master'<br />
git config --global alias.pullr20 'pull upstream master'<br />
git config --global alias.fixmaster 'reset --hard upstream/master'<br />
</pre><br />
If you do the above commands, you now have shortcuts for some common commands shown in this guide.<br />
* [https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases Git Aliases]<br />
** [https://snyk.io/blog/10-git-aliases-for-faster-and-productive-git-workflow/ 10 git aliases for a faster and productive git workflow]<br />
<br />
'''Example situation:''' You've been working on an ExampleRPG update in branch {{c|exRPG-1-40}} for a few weeks, and now want to quickly submit a typo fix to the GenericQuest sheet, you'd probably do commands like:<br />
<pre data-language="bash"><br />
git add . //stage all current changes<br />
git cmsg "ExampleRPG 1.40 - styling Skills-section WIP" // commit changes using one of our aliases <br />
git cm // checkout to master-branch<br />
git pullr20 // pull latest changes from the roll20 repo<br />
git co -b GenericQuest-weapontypo // create new branch for our GenericQuest changes<br />
// do the edits you need<br />
git add .<br />
git cmsg "GenericQuest - fix typo in weapons"<br />
git push // push your changes to your github, automatically creates new branch there if you've setup the config from the above section, otherwise the CLI will suggest you the command which you can copy and paste<br />
git co exRPG-1-40 //go back to your original branch to continue on your ExampleRPG update<br />
</pre><br />
If you haven't setup any of the aliases nor the {{c|push.autoSetupRemote true}} setting, you'd have to use the full commands for each:<br />
{| role="presentation" class="wikitable mw-collapsible mw-collapsed"<br />
| Commands w/o aliases or autoSetupRemote<br />
|-<br />
| <pre data-language="bash"><br />
git add .<br />
git commit -m "ExampleRPG 1.40 - styling Skills-section WIP"<br />
git checkout master<br />
git pull upstream master<br />
git checkout -b GenericQuest-weapontypo<br />
// do the edits you need<br />
git add .<br />
git commit -m "GenericQuest - fix typo in weapons"<br />
git push --set-upstream origin GenericQuest-weapontypo<br />
git checkout exRPG-1-40<br />
</pre><br />
|}<br />
<br />
'''Global vs Local'''<br><br />
You might not want to use all settings or aliases in all git repositories, so instead of using {{c|--global}}(user setting for any git repo), you could instead use {{c|--local}} to save repository-specific settings. {{source|https://stackoverflow.com/a/66108560/10281722 stackoverflow}}<br />
<br />
== Sparse Checkout ==<br />
The character sheet and API repositories have grown to massive sizes in the years since they were initially created. At the time of writing, the Character Sheet repository contained 1006 sheets and was several GB in size. It is very unlikely that you need, or want, all of those files on your computer's hard disk. This is where git's <code>sparse-checkout</code> feature comes in. This will allow us to only locally sync the files that we actually need for our projects. You can setup sparse checkout when you initially clone a repository or on a repository that you already have cloned. If you are switching an existing local clone of a repository to sparse checkout, skip to '''Step 3'''.<br />
<br />
# '''Do steps 1 - 5 from [[#First Time Setup|First Time Setup]]'''. Or skip to '''Step 3''' if your repository is already cloned.<br />
# '''Type <code>git clone --no-checkout</code> and the url of your repository.''' (for github user Anduh, this would be <code>git clone --no-checkout https://github.com/Anduh/roll20-character-sheets.git</code>) Git is now downloading the top level files from the repository (any files that are not in a specific directory in the repository).<br />
# Figure out which directory you are going to want to track and clone locally.<br />
#* Keep in mind that these directory paths are from the repository's perspective.<br />
#* Directories with spaces in their names should be wrapped in double quotes (<code>"</code>).<br />
#* Directory names are Case Sensitive<br />
#* E.g. You want to track only files in <code>Repository/My Directory</code>, you would use it as <code>"My Directory"</code><br />
# '''Type <code>git sparse-checkout set --sparse-index <Directory Name> <Directory Name> <...> <Last Directory Name></code>'''<br />
#* If you wanted to locally clone The files in the Storypath, rapidfire_system, and Official Savage Worlds directories, you would write <code>git sparse-checkout set --sparse-index Storypath rapidfire_system "Official Savage Worlds"</code><br />
<br />
=== Adding Directories to Sparse Checkout ===<br />
Adding directories is as simple as a single line git command.<br />
# '''Type <code>git sparse-checkout add <Directory Name> <Directory Name> <...> <Last Directory Name></code>`. Essentially the same as '''Step 4 above''', but replacing <code>set --sparse-index</code> with <code>add</code><br />
<br />
=== Removing Directories from Sparse Checkout ===<br />
Removing a directory from the list of valid sparse checkout directories cannot be done solely from the command line at this time, but it is still a relatively simple process with just 4 steps.<br />
<br />
# Delete the directory that you no longer want to track<br />
# Open the <code>sparse-checkout</code> file for your repository. It is located in your repository at <code>.git/info/sparse-checkout</code><br />
# Delete the directory name(s) from the list of directory names in the file. Make sure that each directory name is on a separate line when you are done and save the file<br />
#* Note that you can also add directories to clone locally by adding them to a new line here instead of deleting a line.<br />
# Open your command line for your repository<br />
# '''Type <code>git read-tree -mu HEAD</code> and then hit enter'''. This will tell your repository to reset what files it tracks. If this step is skipped, then the directory deletions will be tracked as a repository change.<br />
<br />
== Commonly used commands ==<br />
The central commands you will need for everyday work with your local copy, your GitHub repo & Roll20's repo.<br />
<br />
* <code>'''git fetch'''</code> - will fetch links on any changes and new branches done in your GitHub repo. If you specify a name of a remote after it, it will fetch update links from that remote. (E.g. <code>git fetch upstream</code> will do this for Roll20's repo, as we had set the "upstream" name to track Roll20's repo)<br />
* <code>'''git pull'''</code> - will pull any changes done in your GitHub repo from the branch with the same name(if the active branch has tracking). <br />
* <code>'''git branch'''</code> - lists all your local branches. if you type <code>git branch name-of-branch</code> it will create a new branch with the name<br />
* <code>'''git checkout''' ''name-of-branch''</code> - switches which branch you have active, to the branch-name you have selected. If you write <code>-b</code> before the name, you create the branch before changing to it, making it redundant to first type <code>git branch name-of-branch</code><br />
* <code>'''git add .'''</code> - will index all changes you have made. The "." specifies to index all changes in the repo. This index will later be used by <code>git commit</code> to save the changes.<br />
* <code>'''git commit -m''' ''"ExampleRPG: write-description-here"''</code>''' - saves all changed registered by <code>git add .</code>, and saves what's written inside the double quotes as a description for your saved commit.<br />
* <code>'''git push'''</code> - will push any new commits made in the branch you're working in, to a branch on your GitHub with the same name, if you have set up an upstream for it. If you haven't, the command line will tell you this, and display an example of the command to create an upstream tracking to your repo.<br />
* '''<code>git log</code>'''- <code>git log</code> shows latest commits in your branch<br />
** '''<code>git reflog</code>''' shows full git history across all branches. Useful for cherry-picking and more<br />
* '''<code>git cherry-pick</code>''' pick specific commits from other branches & add them to the active branch<br />
** [https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/How-to-git-cherry-pick-from-another-branch-to-your-own How to 'git cherry-pick' from another branch to your own]<br />
<br />
== Workflow ==<br />
When you work with git/github, you keep your "master" branch up to date with Roll20's master branch, and when you work on making changes to something, you create a new branch from your up-to-date master branch and commit changes there. This way your master branch is still intact if you want to create a more branches to work on other things/sheets, without having the work-in-progress in your other working branches interfere with this new branch. This will also mean that if you mess up something in your working branch, your master branch and other working branches are intact.<br />
<br />
=== Update Your Fork ===<br />
If you use GitHub Desktop or other method to work on your local copy, you can still use this section to streamline how you update your fork against Roll20's repo. This requires to have done '''Step 7.''' from [[#First Time Setup|First Time Setup]].<br />
<br />
# '''Open a CLI, and navigate it to be inside your repo's folder.''' - If you're unsure whether you have your master branch active, type <code>git checkout master</code> to switch to your master branch.<br />
# '''Type <code>git pull upstream master</code>''' - This will fetch & merge any updates Roll20's main repo have done on GitHub, and save the changes to your master branch on your local copy.<br />
# '''Type <code>git push</code>.''' - This will prompt the CLI to ask for your github username & password to approve the changes you are now trying send to your GitHub repo. When you have successfully provided your username & password, you have now managed to update both your local copy and your GitHub repo to be up to date with Roll20's main repository. (There are methods to automatically send the username and password to avoid needing to write it each time for both Windows and Linux.) If you want to update some of your working branches, in Step 1 you need to do <code>git checkout name-of-the-branch</code> instead.<br />
<br />
'''Only the commands:'''<br />
* <code>git checkout master</code><br />
* <code>git pull upstream master</code><br />
* <code>git push</code><br />
<br />
==== Updating a work-in-progress branch ====<br />
If you have some branch you have been working on for a longer time, and want to update to not lag behind the <code>master</code> branch too much, you can update your branch as well. '''Note:''' This has the potential to create merge conflict if changes to the same files you have been working on have been saved to Roll20's repo. Do this only if you're sure, or create a copy of your working branch as a backup in case the update goes wrong.<br />
<br />
# '''type <code>git checkout name-of-your-branch</code>''' - This switches your active branch to the one you want to update<br />
# '''Type <code>git pull upstream master</code>'''- This will fetch & merge any updates Roll20's main repo have done on GitHub, and save the changes to your active branch . (If the CLI doesn't give any complaints.)<br />
# '''Type <code>git push</code>.''' This will update your copy of the branch on Github to be up to date with your local copy. Now if you look at the branch on Github, it will say it is <code>0 commits behind, and X commits ahead</code>, meaning the only difference between the branch and Roll20's master branch is the changes you have worked on, and isn't lagging behind. This will make comparison of changes & creating PRs easier.<br />
<br />
=== Creating a small fix and saving your progress ===<br />
<br />
Situation: You have been made aware of a tiny bug for the ExampleRPG's character sheet, and know what to edit in the sheet's <code>.html</code>-file; someone have misspelled an attribute in the button for Strength-checks. But you don't know your way around Git/GitHub too well. This is how to do it.<br />
<br />
# Open a CLI in your local repo's folder. Type <code>git checkout master</code> to set your master branch as the active one.<br />
# You will now create a new branch. Type <code>git branch ExampleRPG-smallfix</code>.<br />
# Type <code>git checkout ExampleRPG-smallfix</code> and now it will be the active branch where you can start working.<br />
# Find and Open the <code>.html</code>-file for ExampleRPG, and edit it with any text editor you want, and then save the changes.<br />
# In your CLI, type <code>git add .</code>. ''(This will update Git's tracking to note all the changes you made in your repo this far for later use. Now we have only changed one file.)'' (Alternatively, type <code>git add ExampleRPG.html</code> to only stage the changes to this file, if you think you might have made changes to other files you didn't intend.<br />
# Type <code>git status</code>, to see that you only staged changes to files you wanted to change, i.e. only files related to this character sheet. See [[#Git Status/Unstage File]] for more details if you have staged files you don't want.<br />
# Type <code>git commit -m "ExampleRPG: Str-button fix"</code>. ''(This will commit all tracked changes with a message describing what you did. As there are many character sheets and people collaborating with the character sheets, it's a good idea to first mention the affected character sheet, and then a short description of what changed. This will later help you & others to read old commits and change history when searching bugs or similar)''<br />
# Type <code>git push -u origin ExampleRPG-smallfix</code>. ''(This will telling git it's a new branch that should be tracked to your Github, while push your changes to your GitHub. If you go and see your GitHub repo in the browser, you should see that a new branch have been created)''<br />
<br />
=== Submit a Pull Request to Roll20(on Github) === <br />
This is a continuation of the previous example, where you Create a PR based on a branch you have on your GitHub.<br />
<br />
# Open a browser to Roll20 Github Repo, and and if you recently updated one of your branches, there should be a yellow notification at the top mentioning this, and a button to to create a Pull Request. Press this button. ''(If this doesn't appear, navigate to your own Github repo's page, where you find a button saying "Create Pull Request". Before you press it, you can from the dropdown beside it select the name of the branch you want to make a PR from, and it will be automatically set the correct one. If you don't, you need to change the dropdown when you are on the page in the next step)''<br />
# Change the title of the Pull Request to clearly indicate what it is about. We'll change the name to "[ExampleRPG] Str button fix". In the Description section, we write "This fixes an attribute name typo in the Str button.'', and leave no other comment as this was a small change.(Now our PR will have the same naming format as PRs submitted by other people, and have a short description of what what it does. This will make it easier for others to get a quick & self-explanatory overview of what the PR is about. In this example the description & title-change of the PR might seem a bit redundant, but will be much more useful when you make lot of changes, or of the PR consists of several commits)''<br />
# Now the Pull Request is submitted, and you see the description looks like. At the end of the description, there is a list of checkboxes that needs to be checked, so that Roll20 have easier to know what the PR is about. We check the two first boxes, as we mention the character sheet's name in the title, and this is a bug fix. <br />
<br />
Now the pull request is submitted, and will eventually be reviewed by Roll20(Review happen once a week, on Mondays). They may comment on it and request some clarifications or changes, but in this case they will likely approve and merge it without problems. When the pull request turns from green to purple, Roll20 have merged the changes into the main repo.<br />
<br />
<br />
=== Working with multiple branches ===<br />
If you work on updates to two different sheets, the smart thing to do is to have separate branches for each update.<br />
<br />
Let's say you have recently been working on creating a ship page for the MegaSmashRPG character sheet, but also want to start working on a visual update to ExampleRPG. You don't quite remember if you committed all your changes for MegaSmashRPG, and don't remember what branch you have active.<br />
<br />
# Open your CLI in the character sheet folder, and type <code>git branch</code>. It shows the list of branches you have on your local repo, and shows an asterisk next to the branch that's active, and in this case it shows "MegaSmashShipupdate".<br />
# type <code>git add .</code>. This indexes all your un-tracked changes if you this command wasn't the last thing you did last time. If the CLI say anything, you can skip step 3 and 4.<br />
# type <code>git commit -m "MegaSmashRPG: Ship update"</code>. This will save all this last change you did, and give the commit a name that tells what the changes was related to, even if you don't remember the details. This is still better that a commit message that says "last changes", as it won't later tell anyone any context on what it contains.<br />
# (Optional) type <code>git push</code>. If you had previously already saved this branch on Github with <code>git push -u origin MegaSmashShipupdate</code>, this will update your github with the changes from your computer. Now others can see how long you current progress since you updated your GitHub the last time. This will also save your progress on the internet for you in case a mimic destroys and eats your computer. <br />
# type <code>git checkout master</code>. You have now changed your active branch to master which is the "clean" branch we want to start form if we want to work on something new.<br />
# type <code>git checkout -b ExampleRPG-visual</code>. This will create a fresh new branch based on your master branch, with a name that makes sense to you and what you intended to work on. if you don't first switch to the master branch before performing this step, you would also copy all your work on MegaSmashRPG to this branch, which will cause you trouble when you try submit your next PR.<br />
# Open up the files for ExampleRPG and work on the changes you want. Remember to save often, in case a goblin comes and turns of your computer while you're working. (Let's say you worked on improving how the inventory section looked like, and adjusted some colors.)<br />
# type <code>git add .</code> This indexes all your un-tracked changes you have done since you last used the command.<br />
# type <code>git commit -m "ExampleRPG: Visual update on inventory, small color adjustments"</code>. Now we have commit all our changes, together with a commit message that describes what we did.<br />
# (Optional) type <code>git push -u origin ExampleRPG-visual</code>. This will update your github to have the new branch you just created, tell this branch on your computer to push/pull/fetch things from there in the future, and upload all your changes. When you later work in this branch, you can type just <code>git push</code> and it now knows where to send things.<br />
# (Optional) <code>git checkout master</code>. Now your have set your active branch to "master", which means next time when you decide to work/check on things, you know you shouldn't have any uncommitted changes laying around. It will make for an easier starting point next time around.<br />
<br />
<br />
<br />
<br />
===Fixing your master branch===<br />
<br />
Sometimes you might do something that result in you making changes to your master branch, which could cause troubles down the line. One way to revert these changes to your branch is by performing the <code>git reset</code> command and telling git to reset your branch to how Roll20's master branch currently looks like.<br />
<br />
# When having the branch you want to reset be the active one, type <code>git reset --hard upstream/master</code>. This will force the currently active branch to reset so it is identical to the master branch of the "upstream"(the shorthand for Roll20's repository, as defined in [[#First Time Setup|First Time Setup]]). '''Warning:''' this will erase any changes you have done in this branch, so be sure to copy/save any WIP outside the repo.<br />
# (Optional) type <code>git push</code>. This will update the branch on your github repo, and making it easier to check if things are okay comparing to Roll20's repo on github. If there is some discrepancy between your local repo and your github repo after '''Step 1.''', you git might warn against pushing the changes to your github repo. If you're sure about performing this step, you can force the command to work by typing <code>git push '''--force'''</code>.<br />
<br />
<br />
If you've created the Git Aliases suggested in [[#Additional Configs]], you'd have setup the much easier-to-remember command for the same thing:<br><br />
{{c|git fixmaster}}<br />
<br />
===Git Status/Unstage File===<br />
If you accidentally staged file-changes you don't want to commit, you can use <code>git reset</code> to unstage the files you don't want to change in your next commit.<br />
<br />
'''1.''' type <code>git status</code> in the CLI, and you will be shown all the files that have been staged.<br />
<br />
In this example, we've been working on an update to the [[Stargate]] character sheet, and realize we have accidentally made some edits to ExampleRPG, and even staged one of the files.<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
On branch stargateNPC-june<br />
Changes to be committed:<br />
(use "git restore --staged <file>..." to unstage)<br />
modified: ../Stargate-RPG/src/pug/core.pug<br />
new file: ../Stargate-RPG/src/pug/variables.pug<br />
modified: ../Stargate-RPG/stargate.pug<br />
modified: ../ExempleRPG/ExempleRPG.html<br />
<br />
Changes not staged for commit:<br />
(use "git add <file>..." to update what will be committed)<br />
(use "git restore <file>..." to discard changes in working directory)<br />
modified: ../ExempleRPG/ExempleRPG.css<br />
</pre><br />
'''2.''' navigate your CLI to the folder where the <code>ExempleRPG.html</code> file is located, and <code>git reset ExempleRPG.html</code>. This should now have unstaged the file. (Alternatively, from the root folder for <code>roll20-character-sheets</code>, do <code>git reset /ExempleRPG/ExempleRPG.html</code>)<br><br />
'''3.''' type <code>git status</code> to see what files are staged, and we should now see that only the files we want are staged, so we can go ahead & commit the changes as normal.<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
On branch stargateNPC-june<br />
Changes to be committed:<br />
(use "git restore --staged <file>..." to unstage)<br />
modified: ../Stargate-RPG/src/pug/core.pug<br />
new file: ../Stargate-RPG/src/pug/variables.pug<br />
modified: ../Stargate-RPG/stargate.pug<br />
<br />
Changes not staged for commit:<br />
(use "git add <file>..." to update what will be committed)<br />
(use "git restore <file>..." to discard changes in working directory)<br />
modified: ../ExempleRPG/ExempleRPG.css<br />
modified: ../ExempleRPG/ExempleRPG.html<br />
</pre><br />
'''4.''' when we want to change active branch back to master(or other branch), git will mention the unstaged changes, and stop you from checking out from the branch. If you don't want to keep the changes at all, you can do <code>git checkout -f master</code>, which will discard these changes while changing active branch.<br />
<br />
* [https://phoenixnap.com/kb/git-unstage-files How To Unstage Files on Git - phoenixNAP]<br />
<br />
===Clean up Commits===<br />
If you end up having tons of commits, or want to rewrite the commit message for the latest one, you might want to consider ''squashing'' them.<br />
<br />
'''Combining last two commits: Example'''<br />
<br />
Let's say we are working on a small update to the ExampleRPG sheet, and we have saved our progress in two commits so far. But we realize now that we left very vague commit messages for both, <code>"fix inititive"</code> and <code>"ExampleRPG fix"</code>. We feel the update is good enough, but want to replace the vauge messages with one that clearly states which sheet was affected, the sheet version, and a short version of what was done. <br />
<br />
# Type <code>git reset --soft HEAD~2</code>. ''This will remove the last two commits, but keep the changes from them, like if you only had saved the progress with <code>git add .</code> but not yet committed the changes.''<br />
# Type <code>git commit -m "ExampleRPG v.1.61: Fixed init bug & minor visual updates"</code>. ''This will become the new commit message for what we done, and it's now clear from the message alone what was done without having to check the actual changes.''<br />
<br />
After this we continue as normal.<br />
<br />
* You can find some other methods from: [https://gist.github.com/patik/b8a9dc5cd356f9f6f980#file-how-to-squash-commits-in-git-md Squashing Git Commits] by Patik<br />
<br />
=== How to Collaborate ===<br />
If you want to collaborate with someone to create a single PR for both of your works, you can set up remote tracking to your collaborators GitHub so you can pull their latest work to your computer without having to wait for them to be merged to Roll20's repo first.<br />
<br />
# Find/get a link to your collaborator's Github repo. (check '''Step 6''', [[#First Time Setup|First Time Setup]]). If they don't have a fork of the Roll20 repo, they must first create one. (For example, if your collaborator is [https://github.com/Anduh Anduh], the url would be:<code>https://github.com/Anduh/roll20-character-sheets.git</code>)<br />
# Open up the CLI in your working folder, and type <code>git remote add ''name-you-want-for-this-remote'' ''https://github.com/name-of-your-collborator/name-of-their-repo.git''</code>. (For example, if your collaborator is "Anduh", it would be smart to name the remote simply that. the command would then look like <code>git add remote Anduh https://github.com/Anduh/roll20-character-sheets.git</code>)<br />
<br />
Now you have added the other person's repo as a remote, which makes it easier to copy any work they have going on by simply referring to the nickname you've give the remote, rather than having to use the full url of the repo.<br />
<br />
==== Create a copy of someone's branch ====<br />
(This is an continuations directly from the previous section.) Let's assume Anduh have been working on an update to ExampleRPG, you know his branch is up to date with roll20. You want to save it for yourself on your local copy.<br />
<br />
'''Method A'''<br />
# '''type <code>git fetch Anduh</code>'''. This will update refs from the remote, and informing if about changes since last time you checked, as well as new branches. This info is displayed in the CLI, and among things it shows that Anduh has a branch named "ExampleRPG-v1_5", which sounds right.<br />
#* ''( Doing {{code|git fetch --all}} would fetch latest info from all your remotes, not just {{code|Anduh}}.)''<br />
# ''(optional)'' type {{code|git branch -r}} to find out the names of all remote branches.<br />
#* {{code|git branch -a}} will show all tracked branches, local & remote.<br />
# '''type {{code|git switch ExampleRPG-Anduh-v1_5}}'''. This will checkout to a branch named {{code|ExampleRPG-Anduh-v1_5}}, and as the branch doesn't exist yet locally, and git knows about the remote branch by Anduh, it will automatically create the new branch for you, and fetch the content from the remote branch.<br />
#* You can you the {{code|-t}} parameter to automatically setup the branch to your own repo, so that if you push the branch later it works the first time as well. E.g. {{code|git switch -t ExampleRPG-Anduh-v1_5}}<br />
#* About: [https://git-scm.com/docs/git-switch git switch] <br />
<br />
'''Method B'''<br />
<br />
This does the same thing as '''Method A''', just using the older commands, and shows step-by-step what's happening.<br />
# '''type <code>git checkout master</code>''' to set active branch to your master branch.<br />
# '''type <code>git fetch Anduh</code>'''. This will update refs from the remote, and informing if about changes since last time you checked, as well as new branches. This info is displayed in the CLI, and among things it shows that Anduh has a branch named "ExampleRPG-v1_5", which sounds right.<br />
# '''type <code>git checkout -b ExampleRPG-Anduh-v1_5</code>'''. This will create & switch us to this new branch, which we named in a way that reminds us that this isn't something we are working on.<br />
# '''type <code>git pull Anduh ExampleRPG-v1_5</code>'''. This will pull all the changes from the "ExampleRPG-v1_5" branch in Anduh's remote and save it in this branch. Now, while you have the "ExampleRPG-Anduh-v1_5"-branch active, can go and see his changes to the sheet, without having it interfere with any work you have saved up.<br />
<br />
'''(Optional)''' Save the branch on github<br />
:4. '''type {{code|git pull -u origin ExampleRPG-Anduh-v1_5}}'''. This will create this branch in your GitHub repo, and save all it's info there as well. {{code|git pull -u}} is a shorter form of the command {{code|git pull --set-upstream}}.<br />
<br />
==== Creating a sheet update suggestion & sending it to your collaborator ====<br />
Continuing from the previous section where we created the <code>ExampleRPG-v1_5</code>-branch, taken from Anduh's Github repo, we now could start working on an suggested update on their sheet/update directly, instead of going through Roll20's official repo. This means two ore more people could collaborate on creating a larger sheet update among themselves by sending PRs back and forth, and then later would only one coherent PR be submitted to Roll20's repo, that contains work of the collaborators.<br />
<br />
Let's assume (from the previous section) that the v.1.5 update for "ExampleRPG" that Anduh have been working on his <code>ExampleRPG-v1_5</code>-branch have miss-spelt a new attribute name that the update would introduce, and you want to create a quick fix that he could merge into his work.<br />
<br />
# Open a CLI in your local repo's folder. Type <code>git checkout ExampleRPG-Anduh-v1_5</code>. This sets the active branch to branch containing the current version of Anduh's v.1.5 update that you have on your local repo.<br />
# type <code>git checkout -b ExampleRPG-Anduh-v1_5_attrfix</code>. This will create us a new working branch based on <code>ExampleRPG-Anduh-v1_5</code>, and changing it to be our active branch. If any mistakes are made here, we can always go back to and create a new branch from <code>ExampleRPG-Anduh-v1_5</code> without having to download it again.<br />
# Open the files for ExampleRPG, make the changes needed, and then save.<br />
# Type <code>git add .</code>. ''(Updates Git's tracking so all file changes will be committed with the next commit.)''<br />
# Type <code>git commit -m "ExampleRPG v.1.5: correct typo in attr name perception-mod "</code>. ''(Commits the changes & leaves a commit message clearly stating what was done)''<br />
# Type <code>git push -u origin ExampleRPG-Anduh-v1_5_attrfix</code>. ''(This will create this branch on your github repo)''<br />
# On GitHub, navigate to your github repository, and then select and go to your <code>ExampleRPG-Anduh-v1_5_attrfix</code>-branch. Press on the "Create Pull Request"-button.<br />
# This will by default suggest to make a PR to "base repository: Roll20/roll20-character-sheets", "base:master" We will change this destination to instead be "base repository: Anduh/roll20-character-sheets" and "base:ExampleRPG-Anduh-v1_5".<br />
# GitHub might take a few seconds to update, but it should now display the changes between the branches, which should only be one commit, the one we named ''"ExampleRPG v.1.5: correct typo in attr name perception-mod "''. If everything looks good, Update the PR title and description if needed and then press submit.<br />
<br />
Now your fix to the ExampleRPG's v.1.5 have been sent to Anduh, and he can then on GitHub merge your changes, update his local branch, and when eventually submitting the update to Roll20, your commit will be included in it.<br />
<br />
====Updating your branch when your collaborator have updated theirs====<br />
[[#Updating_a_work-in-progress_branch|Updating a work-in-progress branch]] is very similar to how we'd update our local copy/branch of of our collaborators work.<br />
<br />
Continuing form the previous section, let's assume Anduh merged the attribute fix into his <code>ExampleRPG-Anduh-v1_5</code>-branch as well as some other changes, so now we want to update our copy of <code>ExampleRPG-Anduh-v1_5</code> so that we see the current state of the sheet, as well as be able to submit more updates without trouble.''(If you don't update your local version of the branch before making more changes and them submitting them, it will likely result in merge conflicts due to your files not being up-to-date)''<br />
<br />
# Type <code>git checkout ExampleRPG-Anduh-v1_5</code>. ''(This switches your active branch to the one you want to update)''<br />
# Type <code>git pull Anduh ExampleRPG-Anduh-v1_5</code> - This will fetch & merge any updates from Anduh's repo for the branch named "ExampleRPG-Anduh-v1_5", and save the changes to your active branch. (If the CLI doesn't give any complaints.)<br />
# '''(optional)''' Type <code>git push</code>. This will update the branch on your GitHub as well.<br />
<br />
<br />
It's best to perform this step before each time you start working on a new change, to ensure you stay up-to-date with your files. You can now do [[#Creating_a_sheet_update_suggestion_.26_sending_it_to_your_collaborator_.3D|Creating a sheet update suggestion & sending it to your collaborator]] again without issue.<br />
<br />
== Glossary ==<br />
* '''"CLI"''': short for "[[wikipedia:Command-line_interface|Command Line Interface]]"<br />
* '''"your local repo/copy/working folder"''': In this context I refer to the copy of your GitHub repo you have saved on your computer with <code>git clone</code>. <br />
* '''"your Github Repo/fork"''': Refers to the GitHub repo you have forked from Roll20 repo. It's the repo you "local copy" interacts and mirrors with when you do most things <br />
* '''"repo"''': short for a Git/GitHub '''"repository"'''. A Git repository is a virtual storage of your project. It allows you to save versions of your code, which you can access when needed.<br />
* '''"PR"''': Pull Request, a GitHub concept. [https://www.dummies.com/web-design-development/what-are-github-pull-requests/ What Are GitHub Pull Requests?]<br />
* '''"ref/refs"''': reference, references. [https://git-scm.com/book/en/v2/Git-Internals-Git-References git-specific meaning] <br />
* '''"origin"''': Is the original source your local copy was cloned from. In this guide, it refers to your GitHub fork/repo. When you perform most git commands that sends or receives info, it will assume you refer to this "origin" remote, rather than someone other remote you have defined, such as "upstream" <br />
* '''"upstream"''': In this guide, it refers specifically to Roll20's remote repo, which we have defined as being named "upstream". For more, see [https://www.atlassian.com/git/tutorials/git-forks-and-upstreams Git Forks & Upstreams]<br />
* '''ExampleRPG''': Not a real game or character sheet(yet?), but serves as the repeated example in the guide for clarity.<br />
<br />
== Related Pages ==<br />
* [[Beginner%27s_Guide_to_GitHub| Beginners Guide To GitHub]] - Alternative guide to "Short Git Guide"<br />
* [[Building Character Sheets]]<br />
* [[Andreas Guide to Sheet Development]]<br />
* [[Sheet Author Tips]]<br />
<br />
==See Also ==<br />
* [https://www.atlassian.com/git/tutorials Atlassian Git Tutorials]<br />
* [https://git-scm.com/doc Official Git Documentation]<br />
* [https://cli.github.com/ GitHub CLI beta] - Take GitHub to the command line, and create PRs in the CLI instead of through the GitHub website or the Desktop application.<br />
* [https://github.com/Roll20/roll20-character-sheets Roll20's Character Sheet Repository on GitHub]<br />
* [https://wiki.roll20.net/Beginner%27s_Guide_to_GitHub#Git_and_Github_for_Poets_.28beyond_basics.29 Git/GitHub for Poets Youtube tutorial] - Teaches what they are, and the basics of how to use GitHub & Git basics <br />
* [https://rogerdudler.github.io/git-guide/ Git -The simple guide] by Roger Dudler<br />
<br />
<br><br />
<br><br />
[[Category:Guides]]<br />
[[Category:Character Sheet Creation]]<br />
[[Category:External Tools]]</div>1223200https://wiki.roll20.net/Template:K_scaffoldTemplate:K scaffold2024-02-27T22:19:51Z<p>1223200: fix</p>
<hr />
<div>[https://kurohyou-studios.github.io/k-scaffold K-Scaffold]<noinclude>[[Category:External Link Templates]]</noinclude></div>1223200https://wiki.roll20.net/Template:K_scaffoldTemplate:K scaffold2024-02-27T22:18:41Z<p>1223200: update link</p>
<hr />
<div>[https://kurohyou-studios.github.io/k-scaffold/.]<noinclude>[[Category:External Link Templates]]</noinclude></div>1223200https://wiki.roll20.net/Complete_Guide_to_Macros_%26_RollsComplete Guide to Macros & Rolls2024-02-27T19:50:54Z<p>1223200: /* Advanced */ Toggleable template fields</p>
<hr />
<div>{{revdate}}{{clear}}<br />
{{NavMacroDocs}}<br />
This is meant to serve as a comprehensive guide & starting point for figuring out how the {{Text Chat}}, [[Dice Reference|Dice Rolling]], [[Macros]] and related things work and interact with each-other, to find the documentation for each, and to list everything you can write/make appear in the {{Text Chat}}.<br />
<br />
This is both for [[Players]] and [[GM|Gamemasters]] who are just writing their own custom rolls or macros to be used in their game, as well as those who [[BCS|build Character Sheets]] and are creating/editing [[Button#Roll Button|Roll Buttons]] for their sheets.<br />
<br />
{{#evp:youtube|SlwAXIDFveo|Creating [[Macros]] in Roll20 (Nick Olivo)|right|600}}<br />
==[[Text Chat]]==<br />
[[File:Basic-roll-example.png|left|thumbnail|400px|]]<br />
The {{Text Chat}}-page shows the basic commands that can be used in the chat, such as <code>/roll</code>(<code>/r</code>) for making simple rolls, <code>/em</code> for emoting actions, <code>/w</code> for whispering to someone, and <code>/gmroll</code>( <code>/gr</code>) for sending simple rolls to the GM.<br />
<br />
You can write in the {{Text Chat}} normal text without using any commands like <code>/r</code>.<br />
<br />
See [[#Chat Commands|Chat Commands]]-sections for examples, or the <br />
<br />
'''Normal macros can't edit stats, only read them.''' To edit stats with a command, you need to use [[#API|API]] in some form. <br />
{{clear}}<br />
===Formatting===<br />
{{main|Macros/Formatting}}<br />
{{:Macros/Formatting}}<br />
<br />
==Chat Commands==<br />
''Main Page:'' '''{{Text Chat}}'''<br />
<br />
* <code>/r</code>, <code>/roll</code> - for making simple rolls. '''Ex.''' <code>/r 1d20+5</code><br />
* <code>/w</code> - for whispering a message to a person so only they see it. '''Ex.''' <code>/w Alice Does the goblin know the paladin?</code>, <code>/w "Bob Smith" Where's the money pouch?!</code><br />
* <code>/gr</code>, <code>/gmroll</code> - to make rolls only to the GM. '''Ex.''' <code>/gr 2d6+3</code><br />
* <code>/em</code> to emote as the character selected. '''Ex.''' <code>/em takes out one of his throwing daggers and brandishes it threateningly.</code><br />
* <code>/ooc</code> - to message something that is Out-of-character '''Ex.''' <code>/ooc I could really use another coffee right now.</code><br />
* <code>/talktomyself</code> - To turn off your chat display for all others, including the GM and the chat archive recording. Use it again to turn it back on<br />
* <code>/fx</code> - used for creating visual effects '''Ex.''' <code>/fx beam-acid @{target|Caster|token_id} @{target|Foe|token_id}</code><br />
* [[GM]]-exclusive:<br />
** <code>/desc</code> to describe the situation '''Ex.''' <code>The old house begins to creak and moan...</code><br />
** <code>/as</code> to send a regular chat message as any character, but with no avatar '''Ex.''' <code>/as "Sir Bearington" I'm going to eat you for breakfast.</code><br />
** <code>/emas</code> emote as any character, similar to <code>/em</code> but with no avatar '''Ex.''' <code>/emas Sir Bearington decides to have porridge instead.</code><br />
<br><br />
Beyond using the various Roll Commands shown on the {{Text Chat}}-page, here are some other examples of what you can write in the {{Text Chat}}:<br />
* [[Macros]] - Start with <code>#</code>, and start typing the macro name, and a list of your macros will be displayed.<br />
** '''Example:''' writing <code>#testmacro</code> in the chat will roll the macro with that name<br />
* [[Roll Templates]] - <code><nowiki>&{template:name-of-roll-template} {{sectionname(optional)=content of roll template}}</nowiki></code>.<br />
** The Default Roll Template is available in any games, other templates are tied to specific Character Sheet Templates. (E.g. you can only access the specific <code>&{template:simple}</code> when you have [[D&D 5E by Roll20]]-sheet in the game). <br />
** '''Example:''' <code><nowiki>&{template:default} {{name=Test Attack}} {{attack=[[1d20]]}} {{damage=[[2d6]]}}</nowiki></code><br />
** This will generate a roll template using the default template, displaying "Test Attack" in the purple title, then on a new row the result of <code>1d20</code> roll, and on the third row the <code>2d6</code> roll<br />
* [[Character#Attributes|Character Abilities]]/Character Sheet Button - <code>%{character name|ability or roll button name}</code><br />
** '''Example 1;''' writing <code>%{Sam Bobbins|initiative}</code> in the chat, will work if there exists a Character with that name, who have a Character Ability/[[Character Sheet]] Roll Button by that name<br />
** '''Example 2:''' selecting a [[Token]] on the map, and then writing <code>%{selected|initiative}</code> in the chat, will work if the token is linked to a character sheet that has an Ability or Roll button with that name.<br />
* [[API|API commands]]''(available in games hosted by a pro user)'', - Start with <code>!</code> to call the API command, and then write and parameters it can take<br />
** '''Example:''' writing <code>!setattr</code> in the chat will trigger an API that uses <code>setattrd</code> as a keyword. Often these commands may have additional parameters, e.g. <code>!setattr --name John --hp|15</code><br />
<br />
===[[Dice Reference|Dice Syntax]]===<br />
The [[Dice Reference]] page shows how the syntax for the Roll20 dice rolling works, and all the advanced alternatives you can use, such as rolling [[Dice_Reference#FATE_Dice|Fate Dice]], or [[Dice_Reference#Target_Number_.28Successes.29|counting successes]] rather than the sum of the rolls. It also details when the green & red "[[Dice_Reference#Critical_Success_and_Fumble_Points|Critical Success/Failure]]"-highlights are shown. <br />
<br />
''Tricks:''<br />
* {{fpl|9171656/ Comparing numbers, greater than or equal to}} - Mike deBoston<br />
* {{fpl|7510681/ Bypass Blank Ability Call Math}} - Blue64<br />
* {{fpl|6113861/ Summing "Success" Rolls}} - Usually you can't both coun't the success and sum up rolls, but this is a close workaround by Bryan P. <br />
* {{fpl|8068345/ Fake Crits Using Math Instead of Dice}} - Noon<br />
* {{fpl|8717558/ Auto calculating level specific buffs. (Basic IF/THEN statement, no API)}} - Greg S.<br />
* {{fpl|6003370/ Keep Crits/Fumbles from Display on Attack Rolls}} - [[Scott|Scott C.]]<br />
<br />
====Inline Rolls====<br />
{{main|Inline Rolls}}<br />
[[File:Roll template default example2.JPG|right|thumb|350px|The output of a '''default template''' that shows an '''inline roll'''(yellow box) ]]<br />
If you use simple roll commands/macros like <code>/roll 2d10+5</code>, the whole command is a dice roll. But when you use [[#Roll Templates|Roll Template]], or have embedded dice rolls with other commands like <code>/em</code>, you use '''inline rolls''', where you wrap <code><nowiki>[[ ]]</nowiki></code> around the calculation for it to be processed. The result of "Normal" dice rolls is shown as individual dice images displaying the result on each dice separately, along with the total result.<br />
<br />
Inline rolls are just like regular rolls, with the following exceptions:<br />
<br />
* You can use them in any chat message, not just a roll. For example, you can do a regular chat message, an emote(<code>/em</code>), or a whisper(<code>/w</code>), with an inline roll included.<br />
* They are evaluated completely before any (<code>/roll</code>) commands, so you can use them as "random variables" in your rolls.<br />
* You will only see the result of the total roll, and you can hover over the result to see the individual dice rolls.<br />
* Highlights<br />
** If an inline roll contains a '''critical success''', it will be highlighted with a green box.<br />
** If there's a '''critical failure''', it's highlighted in red.<br />
** If it has '''both''' (because there was more than one roll), it's in blue.<br />
<br />
Also when you mouse-over the inline roll to see the details of the roll, it'll show red and green highlights for the rolls themselves for crits/fumbles.<br />
<br />
With inline rolls, the numerical end result is shown in a (yellow) box, and if you hover you mouse over the result, you see the full equation of the roll, along with the result of each.<br />
<br />
{{ex}}<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
/em swings their sword and does [[2d6+2]] damage.<br />
</pre><br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
&{template:default} {{name=Test Attack}} {{attack=[[1d20+5]]}}<br />
</pre><br />
<br />
====[[Inline Rolls#Inline Labels|Inline Labels]]====<br />
If you want to include additional comments before the end of the roll (we call them &quot;inline labels&quot;), use square brackets. For example, <code>/roll 2d10+5[Fire Damage] + 3d6[Ice Damage]</code>. Inline labels works both with "normal" rolls and '''inline rolls'''. <br />
<br />
When these comments are applied directly after a die roll they show up as tool-tips on the dice:<br />
<div class="diceroller"><br />
/roll 2d10+5[Fire Damage] + 3d6[Ice Damage]<br />
</div><br />
<br />
This is especially useful if a roll contains multiple variables and you want to look up what number comes from what attribute.<br />
<br />
'''You can even use sheet attributes in labels.''' Especially useful if the name of the stat can be customized by the user, so the corresponding label should change to reflect the name.<br />
{{ex}}<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
/r @{selected|customskill1}d6[@{selected|customskill1name}] + @{selected|str}[str]<br />
</pre><br />
<br />
===[[Order of Operations]]===<br />
{{:Order of Operations}}<br />
<br />
===[[Macros]]===<br />
The [[Macros]] page lists all the the other kind of options for modifying rolls that isn't covered by the '''[[Dice Reference]]'''-page. Also check the [https://app.roll20.net/forum/permalink/5899495/ Stupid Roll20 Tricks (and some clever ones)]-thread for Advanced and clever tricks that might not be linked on this page yet.<br />
<br />
Features include:<br />
* Adding options to user when roll is made('''Roll Queries''')<br />
* Using [[Macros#Using_a_Targeted_Token_with_a_Macro|@{target}]] and [[Macros#Using_a_Selected_Token_with_a_Macro|@{selected}]] to target tokens and their stats. See [[#Token|Token]]-section for interaction with them<br />
** {{forum|permalink/8048203/ Variable numbers of targets in an AoE attack}} - GenKitty<br />
* Automatically add a roll to the [[Turn Tracker]]<br />
* [[Reusing Rolls]]<br />
<br />
====[[Roll Query|Roll Queries]]====<br />
Sometimes you may have a roll (or a macro) which you want to change every time it is rolled. For example, you may want to roll a variable number of dice, or add a different modifier onto the roll each time you perform the action.<br />
<br />
Roll Queries allow you to prompt whoever is performing the roll to fill in a value when the roll is made. The syntax for a roll query is:<br />
<br />
<pre style="overflow:auto;white-space:pre-wrap;" data-language="javascript"><br />
?{Prompt Message}<br />
//Example:<br />
/roll ?{Number of Dice}d20<br />
//You can also include a default value:<br />
/roll ?{Number of Dice|1}d20<br />
// 1 would be the default<br />
</pre><br />
<br />
=====Drop-down Queries=====<br />
<br />
You can specify a list of options which can be presented to the [[player]], rather than only a free-form text field. Be mindful about if/when you add spaces inside a Roll Query, as having/not having them changes how things work. If the content of the dropdown query includes characters like <code>|</code>,<code>{</code>,<code>}</code>, and<code>,</code>, you will likely need to use [[#HTML replacement|HTML replacement]] for them to make it work.<br />
<br />
Syntax:<br />
<pre style="overflow:auto;white-space:pre-wrap;">?{Name of Query|Option1|Option2|Option3|Option4|Option5}</pre><br />
<br />
Example:<br />
<pre style="overflow:auto;white-space:pre-wrap;">/em attempts ?{Difficulty level|an Easy|a Moderate|a Hard} task.</pre><br />
<br />
You can also specify a separate label for each option, instead of displaying the Option itself in the dropdown.<br />
<pre style="overflow:auto;white-space:pre-wrap;">?{Name of Query|Label 1,Option1|Label 2,Option2}</pre><br />
This can be useful if the Option itself is long, or if it's better to describe what the options represent, rather than show exactly what they are.<br />
<br />
'''Example:'''<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
/r d20+?{Stat:|Strength,2|Dexterity,1}<br />
</pre><br />
<br />
If you place the drop-down query at the start of a macro, make sure there is no space after the <code>,</code>, as this will break any macro or command inside it.<br />
<br />
<pre style="overflow:auto;white-space:pre-wrap;">?{Attack|Just roll,/r d20+5|Description,/em swings the sword with a result of [[d20+5]]}</pre><br />
{| role="presentation" class="wikitable mw-collapsible mw-collapsed"<br />
| non-functional version<br />
|-<br />
| <pre style="overflow:auto;white-space:pre-wrap;">?{Attack|Just roll, /r d20+5|Description, /em swings the sword with a result of [[d20+5]]}</pre><br />
|}<br />
<br />
Repeating the same-named Roll Query within a macro will prompt the [[player]] only once, however the result will be evaluated wherever it is included.<br />
<pre style="overflow:auto;white-space:pre-wrap;">&{template:default} {{name=Test Attack}} {{attack=[[1d20]]}} {{damage=[[2d6+?{Extra Damage?|0}]]}} {{Crit damage=[[12+?{Extra Damage?|0}]]}}</pre><br />
<br />
You may also split up Roll Queries on multiple rows to make the code more readable. ''Extra line breaks in code isn't generally a good idea, and could be good to avoid to not create errors.''<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
/roll 1d20 + ?{Choose an Attack|<br />
Melee,3[STR] |<br />
Ranged,2[DEX] |<br />
Magic,1[INT] }<br />
</pre><br />
<br />
If you're listing macros in your roll query, you '''must''' have a space after the macro name, so Roll20 knows the name ends inside the query.In the below example, the three rolls have been saved into macros on the {{Collections}}-tab which then can be referenced in the macro.<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
?{Choose an Attack|<br />
Melee,#str |<br />
Ranged,#dex |<br />
Magic,#int }<br />
</pre><br />
<br />
* {{forum|permalink/6053873/ Query Ordering Without Affecting Functionality}} how to borrow API command syntax(works for free users) - [[Ziechael]]<br />
* [[Chat Menus]],by Keith – In some cases, creating a '''chat menu''' for your macros is easier or better than making a complicated Query with several options.<br />
<br />
====[[Nesting]]====<br />
To some degree, you can nest abilities, macros and queries. <br />
<br />
* [[Nesting#Nesting Queries|Nesting Queries]]<br />
* [[Nesting#Nesting Macros|Nesting Macros]]<br />
* [[Nesting#Nesting Abilities|Nesting Abilities]]<br />
* [[#HTML replacement|HTML replacement]]<br />
<br />
If you start nesting queries too much, you need to start using HTML replacement characters to keep the macros working. Once saved, these macros shouldn't be opened(if saved in the {{Collections}}-tab's Macro section, as opening a macro that have HTML replacement will result in those being converted into regular things, breaking your macro.<br />
<br />
* [https://app.roll20.net/forum/permalink/6582632/ Drop down Nester] google sheet that generates the HTML replacement code needed. by [[Scott C.]]<br />
* [https://www.freeformatter.com/html-entities.html HTML entities] contains a longer list of all the existing HTML replacement code, of which only few are used/needed in Roll20 context.<br />
<br />
====Initiative====<br />
<small>{{main|Macros/Initiative}}</small><br />
<!-- TODO translcusion Macros/Initiative --><br />
To send a roll result directly to the {{Turn Tracker}}, first, select the [[Token]] you wish to roll initiative for, and then make a roll that includes the <br />
<code>&{tracker}</code>-flag. You can also increase/decrease initiative by using <code>&{tracker:+}</code>/<code>&{tracker:-}</code>.<br />
{{ex}}<br />
* <code>/roll 1d20 + 5 &{tracker}</code><br />
* <code><nowiki>&{template:default} {{name=Initiative}} {{Roll=[[1d20+4 &{tracker}]]}} </nowiki></code><br />
* <code>/roll 1d4 + 1 '''&{tracker:+}'''</code> (increases the initiative by <code>1d4+1</code>)<br />
* <code>/roll 2 '''&{tracker:-}'''</code> (decreases the initiative by a flat <code>2</code>)<br />
* <code>[[5 &{tracker:-}]]</code> (inline roll that decreases the initiative by a flat <code>2</code>)<br />
<br />
See also: [[Cards#Using_Cards_for_Initiative_Order|Using Cards for Initiative Order]]<br />
<br />
'''Referencing values on the turn tracker:''' by calling <code>@{Tracker|character_id}</code> <code>@{Tracker|character_name}</code>, you can check what values are on the turn tracker. ex. <code>Bobs initiative is @{tracker|Bob}.</code><br />
<br />
Tricks using the {{Turn Tracker}}:<br />
{{:Turn Tracker/Tricks}}<br />
<br />
====Chat Buttons====<br />
There are two types of buttons you can create in the Text Chat to be included in a macro/dicerolling result.<br />
<br />
'''[[Macros#Ability_Command_Buttons|Ability Command Buttons]]'''<br />
<br />
Ability Command Buttons can be used to call [[Journal#Abilities|Abilities]] (or [[Character_Sheets#Sheet_Rolls|sheet button rolls]]) from a clickable button in the Text Chat. They are very closely related to [[API:Chat#API_Command_Buttons|API Command Buttons]].<br />
<br><br><br />
Their syntax is as follows:<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
[Label](~<keyword>|<ability name>)<br />
[Dex Check](~Bob|dexterity)<br />
[Dex Check](~selected|dexterity_save)<br />
[Dex Check](~selected|repeating_attack_$0_attack)<br />
</pre><br />
As with [[Journal#Attributes|Attribute]] and [[Journal#Abilities|Ability]] calls, the '''keyword''' is your choice of <code>selected</code>, <code>target</code> or a character_name. You can also use a character_id as a keyword.<br />
<br><br><br />
If you have an Ability Command Button saved somewhere within one of the tabs of the [[Journal#Character_Window|Character Window]], you can choose to omit a keyword:<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
[Label](~<ability name>)<br />
[Dex Check](~dexterity)<br />
</pre><br />
<br />
'''[[#API_Command_Buttons|API Command buttons]]'''<br />
<br />
API Command buttons do not actually use the API—anyone can make and use them. The '''[[Chat Menus]]''' trick by Keith, uses utilizes them to great length.<br />
<br />
====Errors====<br />
If there is a mistake in the macro, or an attribute is missing, the roll might not work at all and only send and error message in the chat.<br />
<br />
In some cases you can suppress error message and the roll will try to do what it can while removing the error message.<br />
: <code>/roll 1d20 + @{selected|nonexistent_attribute} '''&{noerror}'''</code><br />
<br />
* Advanced Trick: [https://app.roll20.net/forum/permalink/9102789/ Catering for 'missing attributes' when summing values] by Ziechael shows how you can account for unknown number of stats in a repeating section, beyond just using <code>&{noerror}</code><br />
<br />
===[[Roll Table]]===<br />
If you have [[Roll Tables]] on your {{Collections}}-tab, they can be used in rolls & macros.<br />
<br />
'''Example1:'''<br />
<br />
Let's assume there exist a roll table with the name <code>fumble</code>.<br />
<br />
You can roll a table directly in the chat input, or in a macro, simply as <code>1t[fumble]</code>.<br />
<br />
'''Example 2:'''<br />
To roll your &quot;crit-failure&quot; table two time, you would enter <code>/roll 2t[crit-failure]</code>. You can change <code>2</code> to whatever number you would like. However, this currently does not work with inline rolls.<br />
<br />
You can also roll a table inline in chat or a macro by wrapping it in double square brackets like this <code>[[1t[table-name]]]</code>. Currently, any number beyond 1 does not display for the inline roll, the results are show on mouseover though.<br />
<br />
* [https://app.roll20.net/forum/post/5899495/stupid-roll20-tricks-and-some-clever-ones/?pageforid=6948596#post-6948596 Nestable Rollable Tables (Free User Version)] - Blue64<br />
* [https://app.roll20.net/forum/permalink/8724512/ Using Rollable Tables and Custom Handouts for Character Cards Using Rollable Tables and Custom Handouts for Character Cards] - Drew<br />
* [https://app.roll20.net/forum/permalink/8851426/ Inline Rolls in Rollable Tables] - Eric B (plus followup posts)<br />
* [https://app.roll20.net/forum/permalink/8788506/ Conditional Text] - Mike deBoston<br />
* [https://app.roll20.net/forum/permalink/6852555/ Rollable Encounter Images] - Blue64<br />
* {{forum|permalink/9898031/ Nesting Roll Tables}}<br />
<br />
<br />
===[[Roll Templates]]===<br />
''Main Page:'' '''[[Roll Templates]]'''<br />
<br />
You can access the Default Roll template in any game, to structure your results in the Text Chat. You simply write the template in the chat/macro( and don't use the <code>/roll</code>).<br />
[[File:Roll template default example.JPG||right]]<br />
<pre style="overflow:hidden;white-space:pre-wrap"><br />
&{template:default} {{name=Test Attack}} {{attack=[[1d20]]}} {{damage=[[2d6]]}}<br />
</pre><br />
<br />
You can use a Roll Template in general messages (without a command like <code>/desc</code> or <code>/emote</code>) and whispers. You can't use roll templates with the <code>/roll</code> command; instead, Roll Templates are meant to be used with inline rolls. As long as they use inline rolls, you can use Roll Templates with macros, Character Abilities, and sheet authors can use them inside of their Roll Buttons on sheets.<br />
<br />
{{orange| Macros for roll templates are sensitive to leading spaces, so '''<code><nowiki>{{name=Dexterity}}</nowiki></code>''' will work, but '''<code><nowiki>{{ name=Dexterity}}</nowiki></code>''' won't. }}<br />
<br />
Many character sheets have built in Roll Templates that can only be used with those specific character sheets.<br />
<br />
''Tricks:''<br />
<br />
* '''Use images with Default Roll Template:''' If you want to dress up your default template, you can stuff an image in the name portion instead of just text<br />
** Example: <code><nowiki>&{template:default}{{name=[x](YOUR_IMAGE_URL#.png)}}{{test=foo}}</nowiki></code><br />
* '''[https://app.roll20.net/forum/permalink/9112320/ Overwriting Template Fields in Macros]''' - Oosh<br />
<br />
<br />
===Advanced===<br />
<br />
{{forum|permalink/5899495/ Roll20 Tips and Tricks (Innovative Solutions to Common Problems)}} contains a large amount of tricks and examples of clever uses for macros etc. that is a must to check out. <br />
<br />
* [[Hidden Rolls]] - have the player make blind rolls, and only the GM see the result.<br />
* [[Macro Character Sheet]] - [[keithcurtis]]<br />
* [[Reusing Rolls]] - clever trick to reuse rolls withing the same command. Was discovered in mid-2020.<br />
<br />
Here under are mentioned a limited number of the list's tricks(more could be listed or copied entirely to the wiki):<br />
* [[Toggleable template fields]]<br />
* [https://app.roll20.net/forum/permalink/10693202/ Macro curiosities, or how to overcomplicate everything] by RainbowEncoder <br />
* {{forum|permalink/9663315/ Tooltips for links, roll buttons etc.}} - RainbowEncoder |{{forum|permalink/6397574/ Tooltip Hack (older)}} - Aranador<br />
* {{forum|permalink/6356266/ DM whispers without breaks}}<br />
* {{forum|permalink/8080373/ Dynamic Multitarget Roll without API}} - Barakka<br />
* {{forum|permalink/6137639/ Prefix Trick to Variably Call Attributes}} - Kyle G.<br />
* {{forum|permalink/8511142/ Hypertext Macro to Open a Linked Character Sheet}} - [[Vince]]<br />
* {{forum|permalink/7406810/ Use a Macro to Report on Obscure Character Abilities and Rules}} - macro template for calculating/showing derivative stats that aren't listed on the sheet but can be known, such as how long a character can hold breath. by PapaWhiskey11<br />
* [https://app.roll20.net/forum/permalink/9840963/ Skill check with text result]<br />
* [https://app.roll20.net/forum/permalink/10557595/ Keep Nth; Select from sequence] - RainbowEncoder<br />
====Images====<br />
Various ways to use or show images in macros or the chat.<br />
<br />
* {{forum|permalink/6814834/ Pictures and GIFs in Chat and Abilities}} - Blue64<br />
* {{forum|permalink/6827714/ Monster Images in Chat}} - Kirsty<br />
* {{forum|permalink/9031455/ Using Images as Links}} - [[Oosh]]<br />
* {{forum|post/9209645/inserting-images-into-macros Inserting Images into Macros}}<br />
* [https://app.roll20.net/forum/permalink/10377160/ Make gif loop infinitely] - [[Oosh]]<br />
* [https://app.roll20.net/forum/permalink/10376893/ Displaying Images Based On Roll Results] - Fnux<br />
====Chat Menus====<br />
''Idea by Keith Curtis''<br />
<br />
Creating a '''[[Chat Menus]]''' for your macros is a great shortcut to have access to many buttons by only calling the chat menu macro.<br />
<br />
==[[Token]]==<br />
Main Section: [[Macros#Token]]<br />
<br />
You can target the stats of tokens(and the stats of a linked character sheet) by two methods, using either '''[[Macros#Using_a_Selected_Token_with_a_Macro|@{selected}]]''', or '''[[Macros#Using_a_Targeted_Token_with_a_Macro|@{target}]]'''.<br />
<br />
<br />
===Variables===<br />
List of token-specific stats you can target with the usual <code>@{}</code> commands, that doesn't need to rely on having a [[Link Token|character sheet linked to the token]]:<br />
<br />
* <code>bar1</code>,<code>bar2</code>,<code>bar3</code> ''(max values called with <code>@{bar1|max}</code>, <code>@{bar2|max}</code>, <code>@{bar3|max}</code>)''<br />
* <code>token_name</code><br />
* <code>token_id</code><br />
<br />
If a character sheet is linked, and you have linked a sheet attribute to one of the bars, you can reference that stat either by targeting the token's bar, or the actual name of the attribute on the sheet.<br />
<br />
{{ex}}<br />
* <code>Token **"@{selected|token_name}"** has [[@{selected|bar1}]] out of [[@{selected|bar1|max}]] HP left.</code> - displays the token name and the current/max value of bar1<br />
** token bar max values need to be referenced with <code>@{attrname|max}</code>, using <code>@{attrname_max}</code> doesn't work.<br />
* <code><nowiki>&{template:default} {{name=**Character & Token ID**}} {{Character Name=@{selected|character_name} }} {{**Character ID**= @{selected|character_id} }} {{**Token Name**= @{selected|token_name} }} {{**Token ID**= @{selected|token_id} }} {{**Bar 1**= @{selected|bar1} / @{selected|bar1|max} }} {{**Bar 2**= @{selected|bar2} / @{selected|bar2|max} }} {{**Bar 3**= @{selected|bar3} / @{selected|bar3|max} }}</nowiki></code><br />
** a macro that displays the <code>token_id</code>, <code>token_name</code> and token bar values, as well as the <code>character_id</code> & <code>character_name</code> if token is linked to a sheet.<br />
<br />
===selected===<br />
Main page: '''[[Macros#Selected_Token_with_a_Macro|@{selected}]]'''<br />
<br />
When using '''[[Macros#Selected_Token_with_a_Macro|@{selected}]]''', you need to first select the token you want to use, before making the roll, and you can only have one token using this method.<br />
<br />
The <code>selected</code>-keyword will allow you to pull information from the element that is currently selected on the screen when the roll/macro is executed. So for example, if you want to pull the value of Bar 1 from the selected [[Token]] during a roll, you can do:<br />
<br />
<pre data-language="javascript">/roll 1d20 + @{selected|bar1}</pre><br />
<br />
You can use "bar1", "bar2", or "bar3". In addition, you can also pull an attribute from the Character linked to that token, if there is one:<br />
<br />
<pre data-language="javascript">/roll 1d20 + @{selected|Intelligence}</pre><br />
<br />
You can pull the Name of the currently selected tokens by using the &quot;token_name&quot; variable.<br />
<br />
<pre data-language="javascript">/em @{selected|token_name} fires his gun!</pre><br />
<br />
If the selected token has a character journal linked to it, you can pull the Name from the character journal instead, using the &quot;character_name&quot; variable.<br />
<br />
<pre data-language="javascript">/em @{selected|character_name} blocks with his shield!</pre><br />
<br />
You can also trigger abilities from the linked character journal by using the ability name as a variable.<br />
<br />
<pre data-language="javascript">%{selected|Attack}</pre><br />
<br />
Finally, we've introduced a third argument for variables, allowing you to pull the "max" of a bar or attribute:<br />
<br />
<pre data-language="javascript"><br />
/roll 1d20 + @{Guard|Intelligence|max}<br />
/roll 1d20 + @{selected|bar2|max}<br />
</pre><br />
<br />
On token bars, you must reference max values with the <code>@{selected|bar1|max}</code> syntax, while for character attributes, both <code>@{selected|attrname|max}</code> and <code>@{selected|attrname_max}</code> works.<br />
<br />
===target===<br />
Main page: '''[[Macros#Targeted_Token_with_a_Macro|@{target}]]''',<br />
<br />
When using [[Macros#Targeted_Token_with_a_Macro|@{target}]], you make the roll first, and then get prompted to select the target token(s), before the roll is then executed. You can target several tokens/characters in a single roll.<br />
<br />
<pre data-language="javascript"><br />
/roll @{target|bar2}d6<br />
/roll 1d20 - @{target|strength}<br />
</pre><br />
This will bring up a prompt screen for the player to select which token target they are rolling against:<br />
<br />
[[File:Choosetarget.png]]<br />
<br />
The full syntax for the target variable is:<br />
<br />
<pre data-language="javascript">@{target|<target_name>|<attribute_name>|<optional_flags>}</pre><br />
(Note that <code>target_name</code> is optional if you only have one target. Name can be anything you like, and can include spaces.)<br />
<br />
So if you want to have multiple targets in your macro you can do:<br />
<br />
<pre data-language="javascript">@{target|Target1|HP} vs @{target|Target2|AC}</pre><br />
<br />
And if you want to use the max of an attribute:<br />
<br />
<pre data-language="javascript"><br />
@{target|bar1|max} - token max values can only be referenced with "|max"<br />
@{target|HP_max} - max value of HP, from the linked character sheet<br />
@{target|Target1|HP|max} - alternative method for the above<br />
@{target|target 1|HP_max} @{target|target 2|HP_max} - check max HP of two tokens<br />
@{target|target 1|HP|max} @{target|target 2|HP|max} - alternative method for the above<br />
</pre><br />
<br />
Note that if you want to use the "max" flag you must specify the name of the target yourself, even if you just put "target1" as above.<br />
<br />
Additionally, if you use the same target_name in multiple attribute queries, you will only get prompted for it once and the same token will be used to fulfill all of the attribute queries. This also applies when you have multi-line macros or commands:<br />
<br />
<pre data-language="javascript">/me strikes out at @{target|foe|character_name}!<br />
**To Hit**: [[1d20+3]] vs. @{target|foe|npc_AC} AC<br />
</pre><br />
<br />
===[[Token Actions]]===<br />
Token Actions are specially-designated [[Macros|macros]] and [[Character#Abilities|character abilities]] (with tokens [[Linking_Tokens_to_Journals|representing a character]]) which appear whenever a token is selected on the screen. They appear in a bar along the top of your screen, and the contents of the bar are context-sensitive. When you select a token, all macro token actions will be shown, as well as ability token actions for the token's linked character (if applicable).<br />
<br />
==Journal==<br />
main page: [[Journal#Journal_Command_Buttons|Journal Command Buttons]]<br />
<br />
<br />
===Character Attributes===<br />
How to reference character/Character sheet Attributes: [[Journal#Attributes]]<br />
<br />
Each character also have a few [[BCS/Pseudo-attributes|pseudo-attributes]] that always exists, even if there is no sheet or Attributes statted for them<br />
<br />
From a custom command, anywhere:<br />
<pre><br />
/r 1d20+@{Bob|str}<br />
</pre><br />
<br />
If macro is saved to a character's [[Journal#Attributes_.26_Abilities_Tab|A&A]]-tab, to a [[Link Token|token linked]] to a sheet, or is embedded in the character sheet's button (code): <br />
<pre><br />
/me makes a Strength roll of [[1d20+@{str}]]<br />
</pre><br />
<br />
====Repeating Section====<br />
[[Macros#Referencing_Repeating_Attributes|Referencing Repeating Attributes]]<br />
<br />
===Character Abilities/Roll Buttons===<br />
<br />
'''Button'''<br />
Most char sheets have roll buttons, which can be called directly with a <code>%</code>-command.<br />
<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
%{Bob|dexterity} // call the dex roll for a character named bob<br />
%{selected|dexterity} // call the dex roll for the character linked to the selected token<br />
</pre><br />
<br />
'''[[Character#Abilities|Abilities]]'''<br />
<br />
If you have saved custom Abilities to a character's [[A&A#Attributes_.26_Abilities_Tab|Attributes & Abilities]]-tab, you can call the ability with the same <code>%</code>-syntax as buttons. These are character-specific, so unless other characters have an ability with the same name, it wont work.<br />
<br />
<pre style="overflow:auto;white-space:pre-wrap;"><br />
%{Bob|customability}<br />
%{selected|customability}<br />
</pre><br />
<br />
When writing an ability macro, you dont have to specify the characters name, and can call attributes directly(<code>/r 1d20+@{dex}</code>)<br />
<br />
===Handout===<br />
You can add roll buttons with macros to [[Journal#Handouts|Handouts]], with the help of hyperlinks.<br />
<br />
* {{yt.be|pkDC-nP3vCE Running Commands from Handouts in Roll20}} 8min, Nick O.<br />
<br />
* {{fpl|9283622/ handout link in macro}} - opens the handout in the [[Journal#External_Journal_Access|External Journal]]<br />
<br />
==[[API]]==<br />
{{pro only|section}}{{apiboxRec}}<br />
<br />
'''[[API|API commands]]'''(AKA '''API calls'''), start with <code>!</code> and then the name of the API command, and then write any other parameters for the API. Some API macros can be embedded into regular macros, such as [[ChatSetAttr]]. To use any API in macros, the specific APIs[[API#Install_API| need to be installed in the game]] for them to work. Here are some examples of API commands/macros.<br />
<br />
'''Example 1:'''<br />
writing <code><nowiki>!wd [[4d6+2]]</nowiki></code> in the chat will trigger the '''[[Script:Wild Dice]]''' script to make a custom roll output, rolling 3 normal d6 dice, and one Wild Die, presenting it in a table. If the Wild Die comes up as a "1", it, and the value of the highest dice is removed form the roll total. This is not something that can be done with macros alone, which is why this API was created.<br />
<br />
[[File:Wild-Dice-result-v3-4.png]]<br />
<br />
'''Example 2:'''<br />
<br />
writing <code>!group-init</code> in the chat will trigger the '''GroupInitiative'''(must be installed) API that uses <code>group-init</code> as a keyword. This particular API command would roll initiative order for all selected tokens, if the API is configured to know what stats to roll.<br />
<br />
'''Example 3:'''<br />
<br />
writing <code><nowiki>&{template:default} {{name=Cthulhu}} !modattr --silent --charid @{target|character\_id} --sanity|-{{Sanity damage=[[2d10+2]]}} --corruption|{{Corruption=Corruption increases by [[1]]}}!!! {{description=Text}}</nowiki></code> in the chat, and selecting a [[Token]] on the map, will decrease sanity by 2d10+2 and increase corruption by 1 for the character selected.<br />
<br />
This is the '''[[Script:ChatSetAttr|ChatSetAttr]]''' API, which can be used standalone with the <code>!modattr</code> command, but more notably, can be incorporated into regular macros, resulting in you being able to both make rolls and have the result change the stats.<br />
<br />
===[[API:Chat#API_Command_Buttons|API Command Buttons]]===<br />
{{main|API:Chat#API_Command_Buttons}}<br />
{{notebox| '''You don't need Pro or API access to use API Command Buttons!''' They are heavily featured in [[Chat Menus]], which everyone can create.}}<br />
<br />
They have simple Markdown formatting:<br />
<br />
<code>[Attack Roll](!attackroll)</code><br />
<br />
You can also send them into the chat for others to use, but them needs to use HTML Replacement like with [[#Nesting|Nesting]]:<br />
<br />
<code>[Attack Roll](!attackroll &amp;#64;{target|token_id} &amp;#91;[1d6+&amp;#63;{Bonus|0}]&amp;#93;)</code> <br />
<br />
API Command buttons do not actually use the API — anyone can make and use them. The '''[[Chat Menus]]''' trick by [[Keith]], uses utilizes them to great length.<br />
<br />
''Tricks:''<br />
* {{forum|permalink/6009949/ 2 column API buttons in Default Roll Template}} - Bryan P<br />
===Macros===<br />
{{:Macros/API}}<br />
===Relevant API===<br />
APIs that have lots of commands or have lot to do with dice rolling.<br />
<br />
* '''[[Script:ChatSetAttr|ChatSetAttr]]''' - can be used [[inline]] & mixed in with other macros, and can edit stats, which normal macros can't<br />
* [[ScriptCards]] - API made to display stats in variety of way in the chat, essentially a sophisticated, API-based version of the Default Roll Template with massive amount of features. It can be used to call other API like ChatSetAttr or TokenMod<br />
* [[APILogic]] -- Gives If/ElseIf/Else Processing, [[Inline]] Math operations, and Variable Muling to Other Scripts | {{forum|permalink/9771314/ APILogic}}<br />
* {{fpl|9817678/ SelectManager}} - help other API with properly sharing token selection between other APIs. Often API that can call other APIs doesn't share what tokens are currently selected.<br />
* {{forum|permalink/9770117/ libInline}} - provides an easy interface for inlinerolls<br />
* {{forum|permalink/9097236/ InsertArg & XRay}} script that gives you a way to interact with information in the game and feed it to the chat and/or other scripts, or to build your own output on the fly.<br />
* [[TokenMod]] – API that can edit any info on tokens. If token's are linked to a character, the changes to token bars extends to the character sheet.<br />
* {{forum|permalink/9441420/ CombatMaster}} Manages many facets of combat. It allows for API and Macro calls at various timing points (beginning of each round, beginning of each turn, when a condition is assigned, when a condition is removed). <br />
* {{forum|permalink/8458497/ Token Action Maker}}<br />
* [[Script:Rollable_Table_Macros|Rollable Table Macros]] -- a simple script that gets an item from a [[Roll Table|rollable tables]] and enters its name as a chat message rather than showing it as a rollable table result<br />
* [[Script:Star Wars: Fantasy Flight Games - Dice Roller]] - API for rolling the custom dice system used in the game<br />
* [[Script:It's a Trap|It's a Trap!]] Can be used to create a Trap that can automate rolls related to the trap, both for the trap and for the character(such as saves). There exists a generic one, as well as a number of system-specific version designed with popular sheets in mind(D&D5e, Pathfinder 1E)<br />
* '''[[API:Script Index]]''' curated list of Roll20 APIs available<br />
<br />
==Character Sheet Creation==<br />
Info and links to things that are only relevant or usable for when you're [[BCS|Building/Editing Character Sheets]]. Consult the rest of the guide for general details.<br />
<br />
* [[Select Attributes for Sheet Roll]] - An advanced technique for creating a dynamic roll button on your sheet <br />
<br />
===[[Button#Roll_Button|Roll Button]]===<br />
The rest of this guide will help in creating more complicated macros, but the main [[Button#Roll_Button]]-page have some concrete examples of how macros are implemented in character sheets.<br />
<br />
===[[Sheetworkers]]===<br />
With the info from [[Macros]], fairly complex outputs to the {{Text Chat}} can be made, but to be able to construct complex and dynamic results based on various factors on your character sheet, you will need to use JavaScript to write [[Sheet Worker Scripts]] that modify & construct your roll output dynamically.<br />
<br />
* [[Select Attributes for Sheet Roll]]<br />
<br />
===Roll Template===<br />
When you create/edit a character sheet, you can make your own Roll Templates to make your roll output look like you want, and to do some conditional things such as only showing some sections in case of a critical roll in another sections.<br />
<br />
See '''[[Building_Character_Sheets/Roll_Templates|Creating Roll Templates]]''' for how to make your own.<br />
<br />
[[Building_Character_Sheets/Roll_Templates#Helper_Functions|Helper Functions]] describes what functions you can build into your sheets.<br />
<br />
==External Tools==<br />
* '''[https://app.roll20.net/forum/permalink/10515058/ Roll20 Macros - a Visual Studio Code Extension]''' by [[Andreas J.]]<br />
** syntax highlight and autocomplete help for roll20 macro writing, makes reading, writing, & identifying mistakes in macros easier<br />
* [[Stylus]]<br />
** Can be used for some advanced macro tricks, like [[Hidden Rolls]]<br />
* [[Browser Developer Tools#Macros]] - can be used to figure out attribute & Repeating section names from character sheets<br />
<br />
==Related Pages==<br />
* '''[[Complete Guide to Macros & Rolls]]'''<br />
** {{Text Chat}} - where the roll results appear, & info on the common chat commands<br />
** [[Dice Reference]] - Comprehensive list of how the Roll20 dice-rolling syntax works, and list the features available<br />
** [[Macros]] - How to create macros, and other info on how the Roll20 <span style="font-family:Pictos;">q</span>Text Chat works, like referencing stats on character sheets, roll queries, nesting macros & initiative<br />
*** [[Reusing Rolls]]<br />
*** [[Chat Menus]]<br />
** [[Roll Templates]] - a method of formatting roll results in the chat, with some extra functions<br />
** [[Tokens]]<br />
** [[API]]''(Pro Only)'' - API commands can be used in the <span style="font-family:Pictos;">q</span>Text Chat<br />
* [[Forum Tricks]]<br />
** [[Macro Sheet]]<br />
<br />
==Other Guides==<br />
<br />
==TODO==<br />
* add image examples of every macros used, input + output<br />
* at least one example for each mentioned concept<br />
* Roll Template examples<br />
* List rest of the examples from "Stupid Tricks" thread<br />
* new sections<br />
** Chat Tooltip<br />
** [[Stylus|Stylus]], for tricks like the hidden rolls<br />
* Split page:<br />
** macro formatting<br />
** HTML styling<br />
* copy tips from [[Macros/Pathfinder Examples]]<br />
<br />
=See Also=<br />
* {{forum|permalink/5899495/ Roll20 Tips and Tricks (Innovative Solutions to Common Problems)}} - Well maintained List of good Roll20 Tricks.<br />
* [https://cybersphere.me/roll20-dice/ Everything About Rolling Dice] - A comprehensive guide to rolling dice in Roll20.<br />
* [[Macro Character Sheet]] - how to easily move all your macros between games<br />
* {{Text Chat}}<br />
* {{Collections}}<br />
** [[Macros]]<br />
** [[Roll Tables]]<br />
** [[Cards]]<br />
* [[Building Character Sheets]] - {{Pro}}<br />
* [[API]] - {{Pro}}<br />
* [[Campaign Management]]<br />
** [[Link Token|Link Token to Sheet]]<br />
** [[Add Character Sheet]]<br />
** [[GM]] & [[Player]] tools & limits<br />
* [[Browser#Stylus|Stylus Plugin]] - customize the looks of Roll20 for yourself<br />
<br><br />
<br><br />
[[Category:Macros]]<br />
[[Category:Character Sheet Creation]]<br />
[[Category:Guides]]<br />
[[Category:Featured articles]]</div>1223200https://wiki.roll20.net/GlossaryGlossary2023-12-31T10:49:25Z<p>1223200: </p>
<hr />
<div>{{revdate}}{{Stub}}<br />
<br />
==List==<br />
List of common words and abbreviations frequently used with Roll20, that may not be common elsewhere.<br />
<br />
__TOC__<br />
===General===<br />
* [[GM]] - Game Master, can access all tools in a Roll20 game. (in some game systems this role is called things like Dungeon Master/DM, Storyteller, Referee, Guide)<br />
* [[Explorer Mode]] - setting in Dynamic Lighting that leaves map revealed for players when their character no longer sees an area directly<br />
* '''DL''' - '''[[Dynamic Lighting]]''', a feature available to [[Plus]] and [[Pro]] subscribers<br />
** '''UDL''' - [[Updated Dynamic Lighting]]<br />
** '''LDL''' - [[LDL|(Legacy) Dynamic Lighting]]<br />
* '''[[Charactermancer]]''' (or ''Charmancer'') - The optional character creation & level-up tool integrated into some Roll20 Character sheets, such as [[D&D 5E by Roll20]] & [[Burn Bryte]]<br />
* '''FoW''' - '''[[Fog of War]]''', a free feature to obscure player's vision<br />
** '''AFoW''' - [[Advanced Fog of War]], a feature of the Legacy Dynamic Lighting. The equivalent tool in UDL is {{Darkness}} <br />
* '''[[Multi-Sided Token]]''' - a [[token]] that has a [[Roll Table|roll table]] linked to it, enabling the token to easily switch between which to show.<br />
* '''OGL 5E''' - refers to the [[D&D 5E by Roll20]] character sheet ''(was it's old name)''<br />
* '''SRD Compendium''' - The free {{Compendium}} for [[D&D 5E by Roll20]] in Roll20, which contains everything from the [https://dnd.wizards.com/articles/features/systems-reference-document-srd 5E SRD]<br />
** The content not the same content as in the 5E Basic Rules. You need to by {{market|browse/bundle/3828/players-handbook Player's Handbook (PHB)}} and the others to get access to those parts in your compendium<br />
* '''[[Transmogrifier]]'''/Transmog - An {{Pro}} feature that enables you to copy Pages, [[character|characters]], [[Decks]], playlists, macros form one game to another<br />
* [[Token]]<br />
** '''Link Token''' - When new characters are created, they need to be assigned tokens. [[Link Token]] for details <br />
** [[Default Token]] - the token attached to a [[character]] that appears when you drag the character from the {{Journal}} to the map.<br />
* '''[[Roll Template]]''' - template for roll outputs, where each game system have their own versions built into their character sheets<br />
** [[Default Roll Template]] <br />
* [[Character Sheet]]<br />
** [[Repeating Section]] - part of sheets that works a bit differently<br />
* '''A&A -tab''' - refers to {{A&A}} that all [[Character|Characters]] have, the two other being [[Character#Bio_.26_Info_Tab|Bio & Info-tab]] and (not always) [[Character#Character_Sheet_Tab|Character Sheet tab]].<br />
===Character Sheet Development===<br />
{{main/bcs}}<br />
<br />
* '''Beacon''' - [[Beacon Sheet Development Kit]]<br />
* '''CSE''' - [[Character Sheet Enhancement]]<br />
** the sheet creation framework/method update released in March 2021, with new features and less restrictions than LCS.<br />
** By default, The [[Sheet Editor]] and [[Sheet Sandbox]] assumes sheets added are CSE.<br />
* '''LCS''' - [[Legacy Character Sheets]](''Legacy Sheet Sanitization'')<br />
** refers to the older and more restricted framework/method used for creating custom character sheets.<br />
* '''CRP''' - [[Custom Roll Parsing]]<br />
** method for handling sheet dice rolls and how the result is parsed and displayed for the player<br />
* '''Sheetworker''' - [[Sheetworker]] are the [[javascript]] code and special functions that can be used for making more advanced sheet features. Not all JavaScript-features are available. <br />
<br />
===API===<br />
{{pro only|section}}<br />
{{main|API}}<br />
<br />
* '''CRL''' - [[Script:Customizable Roll Listener]]<br />
* '''GroupInit''' - [[Script:Group Initiative]]<br />
* '''Roll20AM''' - [[Script:Roll20 Audio Master]]<br />
* '''TM''' could refer to [[TokenMod]] or [[TurnMarker]]<br />
<br />
===Other===<br />
<br />
* '''Stylus''' - [[Stylus]] is a browser extension that can be used to tweak how Roll20 looks with CSS, like hiding things you don't want, adjusting clor or size of boxes, and more.<br />
<br />
==See Also==<br />
* [[Community FAQ]]<br />
* [[Roll20 Basics]]<br />
* [[Intro to TTRPGs]]<br />
<br />
[[Category:Miscellaneous]]<br />
[[Category:Guides]]<br />
[[Category:FAQ]]<br />
[[Category:Character Sheet Creation]]</div>1223200https://wiki.roll20.net/CharactersCharacters2023-12-31T10:41:35Z<p>1223200: change from redirect to disambiguation page</p>
<hr />
<div>{{dmbox}}<br />
<br />
* [[Character]] - How characters work and are handled in-game<br />
* [[Roll20 Characters]] - Feature formerly known as "Character Vault"</div>1223200https://wiki.roll20.net/TransferTransfer2023-12-31T10:39:20Z<p>1223200: transmog can now transfer macros & pdfs</p>
<hr />
<div>{{revdate}}{{dmbox}}<br />
This is a page for info and links on how to transferring various things on the Roll20 platform between games.<br />
<br />
=Options=<br />
<br />
==Characters==<br />
There are two methods for transferring [[Characters]] between games.<br />
<br />
'''A) [[Character Vault]]'''<br />
<br />
All users have access to it, and it can be used to save [[character]]/ [[Character Sheets]] & their linked [[tokens]]/ avatars to the User's Vault.<br />
* From the Vault, character's can be imported to any games that have Full Vault Access, and FVA can be gained: between '''any''' [[Campaign|campaign/games]], regardless of owner.<br />
** [[Plus]] & [[Pro]] members have FVA in all their games.<br />
** Any game created with a [[Market#Module|Marketplace Module]] that has built in FVA, will always have FVA, regardless of [[subscription]] status.<br />
** '''Note:''' The [[GM]] needs to turn on the option on the [[Game Settings]]-page, for other people to be able to import their character<br />
<br />
<br />
'''B) [[Transmogrifier]]''' <br />
<br />
[[Pro]] user can use the tool to easily transfer multiple characters at a time directly between games '''they have created themselves''', without having to use the Character Vault.<br />
<br />
==Maps==<br />
[[Pro]] user can use the '''Transmogrifier''' to easily transfer maps & pages together with all their settings & [[Dynamic Lighting]] directly between games '''they have created themselves'''.<br />
<br />
==Tokens==<br />
'''A) [[Transmogrifier]]''' [[Pro]] user can use the tool to transfer full pages with [[tokens]] and everything between games '''they have created themselves'''. Alternatively, transfer characters that have saved [[Default Token]] between games to get tokens & their settings transferred.<br />
<br />
'''B) Character Vault''' If you save the token as a Default token on a character, you can use the Vault to move them between any games.<br />
<br />
==Card Decks, Roll Tables & Jukebox Playlists==<br />
The Transmogrifier can transfer [[Card Decks]], [[Roll Tables]] & {{Jukebox}} Playlists between game '''the person have created themselves'''.<br />
<br />
==Handouts==<br />
'''A) Transmogrifier''' [[Pro]] user can use the tool to transfer full pages with [[tokens]] and everything between games '''they have created themselves'''. Alternatively, transfer characters that have saved [[Default Token]] between games to get tokens & their settings transferred.<br />
<br />
'''B) Use Characters as Handouts''' If you save The content of a Handout to a Character's [[Journal#Bio_.26_Info_Tab|Bio & Info]]-tab, you could use the Character Vault to transfer pseudo-Handouts between games.<br />
<br />
==Macros==<br />
[[Transmogrifier]] can transfer macros bewteen games for Pro-subscribers. (2023 update)<br />
<br />
[[Macros]] are generally annoying to transfer between games, but using the [[Macro Character Sheet]]-trick, it will be much easier. <br />
<br />
==Ownership==<br />
===Campaign===<br />
Changing who is the [[GM#Creator|creator/owner]] of a [[Campaign]] is not something that can be done normally, but if you {{contact us}} and explain why, it's known that Roll20 have at times transferred game ownership from one account to another.<br />
<br />
Usually you can get a long way with just promoting the intended account to GM in the game and they can do most things themselves, with the exception that access to Plus/Pro features is reliant on the Creator's [[subscription]] level.<br />
<br />
===Marketplace Module/Roll20 Credit===<br />
Changing which account is owner of these things is not something that can be done normally, but if you {{contact us}} and explain why these should change ownership, Roll20 will change it.<br />
<br />
::''<b>Community Opinion/Speculation</b>:'' ''Contacting Roll20 ASAP is improving your chances for this to happen, so if several weeks or even months have passed since to purchase, or the product have been used to a great extent over a good period of time, might decrease changes they will agree.''<br />
<br />
Mistakenly gifting a product to the wrong person, buying it for yourself when it was meant as a gift, or confusion on who in the group should own something to gain the most benefits for the group/game, are likely reasons they might change things.<br />
<br />
The [[GM]] doesn't always have to be the creator of the game, and if the GM only has a [[free]] account, it might be smart for a player who has a subscription to create/own the game, for the game/GM to get access to features like [[Dynamic Lighting]]. However, transferring maps, pages and a bunch of other things with the [[Transmogrifier]] can only be done between games created by that account, so a promoted GM can't use Transmogrifier to transfer content, only the creator.<br />
<br />
==PDFs===<br />
Transmogrifier can transfer PDFs between games (possible since 2023).<br />
<br />
=See Also=<br />
* [[Library Campaign]] - storing unused characters & maps in a separate campaign will improve the performance of campaigns with lot of content.<br />
* [[Game Management]]<br />
* [[Character Vault]]<br />
* [[Transmogrifier]]<br />
<br />
[[Category:Tips]]</div>1223200https://wiki.roll20.net/CharacterCharacter2023-12-31T10:35:51Z<p>1223200: Roll20 Characters link at top</p>
<hr />
<div><noinclude>{{revdate}}<br />
{{notebox|See '''[[Roll20 Characters]]''' for the feature formerly known as '''Character Vault'''}}<br />
=Character=<br />
{{main|Journal}}<br />
{{#evp:youtube|hLELEovjrDQ|Characters, Handouts, and Folders|right|600}}<br />
[[Character]] are found and managed on the {{Journal}}, and only a [[GM]] can create them. They work differently than [[Handout|Handouts]]. '''[[Character Sheet]]''' is a part within "Character" which is often used.<br />
</noinclude><br />
<br />
Character Journal entries are intended to represent either PCs, NPCs, or anything else that might take advantage of the various features Character Journals have, such as: [[Character Sheets]], [[Link Token|Linked Tokens]], and [[#https://wiki.roll20.net/Character#Attributes_.26_Abilities_Tab|Attributes and Abilities]] macros.<br />
<noinclude>__TOC__</noinclude><br />
<br />
== Character Right-Click Options ==<br />
[[File:Journal7.0.png|framed|right|Right-Click Option Menu]]<br />
While inside the Journal Tab, right-click the Character's Name to reveal the following options:<br />
*'''Show to Players''': This will force the Character Window to open on your [[players]]' Roll20 client for them to view. If your players don't already have permissions assigned yet to view this entry, Roll20 will ask you to confirm whether you want to show the entry to everyone.<br /><br /><br />
*'''Archive Item''': The Journal tab has an archival system, so you can store Character and Handout entries away when not needed for play. This can help with keeping your Journal tab organized. Archiving a Character will remove it from view in the Journal tab and place it in the Archive that is displayed at the bottom of the tab as soon as a single item is placed in it.<br />
** '''Note:''' an archived Character still loads at game startup, it's only hidden from view. <u>Archiving Characters does not reduce load on campaign.</u> {{Pro}} users have the option of using the [[Transmogrifier]] to move unused characters to & from a [[Library Campaign|storage campaign]].<br /><br />
*'''Delete Item''': This will permanently remove the Character entry from the Journal Tab. This can't be undone, so Roll20 will ask for confirmation before initiating the deletion. <br />
<br clear="all" /><br />
<br />
== The Character Window ==<br />
Click the Character entry's Name from the {{Journal}}-tab to open it.<br />
<br />
===The Character Window Header===<br />
At the left hand corner is the [[File:Journal Popout Button.png|x]] '''Character Popout''' Button. Click this to pop this Character Window out into a new browser window. This can come in handy if you're a GM or Player who uses multiple monitors. Visit the '''[[My_Settings#Use_Window_Popouts_for_Characters|My Settings]]''' page to set popout windows to automatic. Click the '''Show to Players''' button to reveal the Character to all players or click the "Edit" button to customize.<br />
<br />
To the right of the Journal Popout Button is the entry's Character Name. This is the display name for this journal entry and what you will see if you wish to refer to it elsewhere in the game like a macro, Chat As, or Token Representation.<br />
<br />
On the right hand side of the Character Window are the following row of four buttons: [[File:Journal Top Right Buttons.png|x]]<br />
<br />
1. '''Show to Players Button:''' Clicking on this button behaves the same way as the earlier mentioned Journal Entry Right-Click Option Menu.<br /><br />
2. '''Edit Button:''' Edit allows you to change various options for Character including Name, Token Image, Visibility in Player's Journals, and Player Editing of Characters, GM private notes, and Character Bio (visible in the Bio and Info Tab. More specific in-depth discussion on Edit Mode is discussed there.<br /><br />{{mbox | text = Allow a Player to view, edit, and control a Character and Character Sheet, click the Edit button and add the Player or Players names to ''in Player's Journal'' '''and''' ''Can be Edited and Controlled by'' fields, finally click ''Save''.}}<br /><br /><br />
3. '''Zoom Options Button:''' Clicking on this button gives you ability to increase or decrease the zoom of all content within the Character Window. At default, the zoom is set at 100%. This affects the view of all tabs within this window.<br /><br /><br />
4. '''Close Window Button:''' Clicking on the X icon at the top right corner of the window will close it if you are in View Mode. If you are in Edit Mode, Clicking on the X button will revert you back to View Mode.<br />
<br /><br />
<br />
===Edit===<br />
[[File:Character Journal in Edit Mode.png|right|500px|The Character Journal in '''Edit Mode''']]<br />
Only the GM can access the sheet '''Edit Mode'''<br />
<br />
* '''In Player's Journals:''' By default, only the [[GM]] sees Characters in to the {{Journal}}-tab. To allow other [[Players]] to see the Character in their {{Journal}}, add their names to the "In Player's Journals"-field. Player names are only available once they've launched the game at least once. You can also choose "All Players" to allow everyone to view the Character. <br /><br />Players who can view the Character will see the Name, Avatar, and any text typed in the Character's Bio & Info field only. They will not have access to the '''Character Sheet'''-tab (if applicable) nor the '''Attributes and Abilities'''-tab.<br /><br /><br />
<br />
*'''Can Be Edited & Controlled By:''' Adding players to "The Controlled By" field gives them the following permissions: <br />
** They will be able to choose the Character from the "Speak As" drop down menu in the {{Text Chat}}-tab.<br /><br /><br />
** They will be able to edit the Character's '''Name''', '''Bio'''-text field of the '''Bio & Info'''- tab.<br /><br /><br />
** If the game uses a [[Character Sheets|Character Sheet]], they will have permission to view AND edit information on '''Character Sheet'''-tab.<br /><br /><br />
** They will be able to control any [[Token]] set to Represent this Character. See [[Link Token|Linking Token to Character Sheet]]-guide for more details.<br />You can also choose "All Players" to allow everyone to control or edit the Character entry.<br /><br /><br />
<br />
* '''Tags:''' The Tags field allows you add Tags to the Character entry so that you can quickly find it later using the Search box at the top of the Journal tab on the Sidebar.<br /><br /><br />
<br />
* '''Duplicate:''' Using the "Duplicate"-feature will create a duplicate of the current Character entry on the {{journal}}-tab with the name "Copy of (original-character)". This can be useful when using a Character entry as a template for new Character entries.<br /><br /><br />
<br />
* '''Archive:''' This button behaves exactly as the Right Click Option in the Journal Tab. Archiving the Character will put it in long-term storage. Once you've archived at least one Character or Handout entry, an Archive icon will appear at the bottom of the Journal Tab.<br /><br /><br />
<br />
* '''Delete:''' Deleting the Character will permanently remove it from the Game. ''This cannot be undone!''<br /><br /><br />
<br />
====Avatar====<br />
The '''Avatar''', (aka. '''Character Portrait'''), is an image that represent this Character in the Journal listing (it replaces the default thumbnail) as well as the [[Text Chat|Chat interface]]. Drag and drop an image from your computer, use the '''Choose a file...'''-button to select the image from a file explorer, or drag and drop an image from the [[Art_Library|Art Library]] into the box. Once an image is added, you can remove it at any time by hovering your mouse over the Avatar area and clicking on the '''Remove''' link that appears in the upper right of the square.<br /><br /><br />
<br />
====Default Token====<br />
[[File:Journal9.0.gif|right|thumbnail|400px| How drag-n-drop the Default token of a sheet to the map.]]<br />
The Default Token field gives you the ability to select a [[Token|token]] on the [[Tabletop Overview|tabletop]] to use as the default token for this Character whenever it is added to the table. Just select a token on the Tabletop, then press the "Use Selected Token" button. A copy of the token will be stored, including any notes, player permissions settings, and bar values and links. A GM or a player that can [[Journal#Can_Be_Edited_.26_Controlled_By|'''Edit and Control''']] this Character can then drag-and-drop the Character from the Journal listing in the right sidebar onto the tabletop, and a new copy of the Character's default token will be added to the table.<br /><br />Once a Token is tied to a Character in the Journal, a {{button|Shift}}+{{button|Click}} on the Settings icon when a token is selected or {{button|Shift}}+{{button|Double Click}} on the token directly will open the attached Character; {{button|Alt}}+{{button|Click}} opens the character to the Attributes &amp; Abilities tab. You can also [[Link_Token#Drag-n-Drop|drag and drop]] the character name from the {{Journal}}-tab to add tokens directly to the tabletop, once a token has been linked to it's Character. To drag-n-drop a character/token from the {{Journal}}, you need to select its name, not the character icon/three bar. If you select the icon (or three horizontal bars) to the left of the name, it will move the character's position in the Journal.<br /><br /><br />
<br />
{{mbox | text = '''Useful Tip:''' For PCs, set up all your tokens ahead of time and assign them to their respective PC Character entries. Then when your Players join your game, just give them control of the Character and they'll be able to control all the tokens for that Character right away.<br />Please see the '''[[Link Token|Linking Token to Character Sheet]]'''-guide for further details.}}<br />
<br clear="all" /><br />
<br />
===Character Tabs===<br />
The Character Window will either have two or three tabs of content depending on whether your game is using a [[Character Sheet]]. They are listed in this order: <br />
# '''Bio & Info Tab:''' This tab is where you edit the basics of the Character entry from Name, to its assigned Token, User Permissions, as well as a place to take PC and GM notes.<br /><br /><br />
# '''Character Sheet''' (optional)''':''' If your game is using a community or Roll20 created Character Sheet, it will show up on this tab.<br /><br /><br />
# '''Attributes & Abilities:''' This tab is where you can create custom attributes and macros to roll dice formulas from. ('''Note:''' If you're using a Character Sheet, there will already be Ability fields created to be used by the Sheet.)<br />
<br /><br />
The following sections will go over each tab in detail.<br />
<br clear="all" /><br />
<br />
==== Bio & Info Tab ====<br />
* '''Name:''' This will change the '''Character Name''' for this Entry.<br /><br /><br />
<br />
* '''Bio & Info Field:''' The Bio & Info field allows you to input information about the Character.<br /><br /><br />
<br />
* '''GM Notes Field:''' Use the GM Notes area to add additional notes that only the GM can see.<br /><br /><br />
<br />
{{mbox | text = '''Note:''' Both Bio and GM Note fields have text formatting options available, as well as, the ability to add tables and copy and paste from PDFs or other Word Documents.}}<br />
<br />
==== Character Sheet Tab ====<br />
{{main|Character Sheet}}<br />
<br />
Your Character may also have a [[Character Sheet]]-tab, which is a way to display information about the character which mimics a paper character sheet for the game you are playing. Your [[GM]] will set this feature up if it's available for your game. Filling out the sheet is usually fairly straightforward, just click on any text/number-field, and enter your information. Some fields will also auto-update based on other information (for example, your Strength Modifier may auto-calculate based on the Strength of your Character). Finally, Character Sheets often have roll buttons which you can click to quickly perform skill checks and other actions (such as attacks) for your Character.<br />
<br />
The complexity and sophistication between different character sheet templates can vary a lot, from being a simple digital version of the game's paper sheet where you just use it for storing simple info and numbers, going all the way to to having integrated [[Charmancer|character creation tools]], {{Compendium}}-compatibility, detailed settings, and options to customize the sheet and dice rolls made from it.<br />
<br />
Roll20 have a massive number of option from sheets to use for game systems. Sheets that have '''[[by Roll20]]''' in their name (~15 sheets) are created and maintained by Roll20, but the majority of sheets (several hundreds) are created & maintained by the community. A number of sheets are maintained by [[publisher|publishers]] themselves.<br />
<br />
'''Related:'''<br />
* [[Adding Character Sheet]]<br />
* [[Link Token]]<br />
<br />
==== Attributes & Abilities Tab ====<br />
[[File:Journal8.0.png|right|thumbnail|650px|The "Attributes & Abilities" tab on a character sheet]]<br />
The Attributes & Abilities Tab is used to track the '''Attributes''' of the Character if you don't use any Character Sheet template, or want a custom stat, and store rolls and other chat commands that could be used by that Character.<br />
<br clear=all><br />
===== Attributes =====<br />
{{mbox | text = '''Note:''' If you have a '''Character Sheet'''-tab, you seldom( or never) need to edit any Attributes on the [[Character#Attributes_.26_Abilities_Tab|A&A]]-tab, as it can interfere with how the visual sheet functions. Most of the sheet's stats, apart from repeating sections, are mirrored there.}}<br />
<br />
You can add Attributes to your Character by clicking on the '''+ Add''' Button in the Attributes column. Each Attribute requires a Name, as well as, a Current Value and an (optional) Max Value. Any [[players]] that you give permission to edit/control the Character entry will also be able to edit and add more Attributes. Attributes can be used as variables in '''[[Macros|Macros]]''' and Abilities.<br />
{{NavMacroDocs}}<br />
To call an Attribute within on the [[Journal#Character_Sheet_Tab|Character Sheet Tab]] or within an [[Character#Abilities|Ability]]-macro on the [[Character#Attributes_.26_Abilities_Tab|Attributes & Abilities Tab]]), it follow this format: <code>@{AC}</code>, <code>@{level}</code>)<br />
<br />
If you want to call a specific character's attributes in the {{Text Chat}} or in a [[Macro]], you need to specify the name of the character (e.g. <code>@{Charlie|level}</code>), or use:<br />
* [[Macros#Selected_Token_with_a_Macro|Selected Token with a Macro]] <code>@{selected|level}</code><br />
* [[Macros#Targeted_Token_with_a_Macro|Targeted Token with a Macro]] <code>@{target|level}</code><br />
<br />
===== Abilities =====<br />
{{cleanup-msg|This section could do with a cleanup|March 2021}}<br />
Abilities are designed to work in conjunction with Attributes, and work almost exactly as '''[[Macros|Macros]]'''.<br />
<br />
You can input any valid chat command (rolls, emotes, etc.) into an '''Ability''', and by using an '''Attribute''' that the character have as a variable, you can create complex Character-based Abilities.<br />
<br />
When creating an Ability, type <code>@</code> to view a list of Attributes that can be used. Since the variable used in the Ability is linked to a Character Attribute, the value will sync when changed in the Character editor.<br />
<br />
You can easily add and remove Abilities from your [[Quickbar|Macro Quick-Bar]] by selecting the Character from the {{Journal}} Tab.<br />
<br />
{{button|Shift}}+{{button|Click}} on an Ability on the Macro Bar will open that Character's Ability editor. Abilities can also be used as '''[[Token Actions|Token Actions]]''' which is a token specific macro feature.<br />
[[File:Token-action-editor.gif|center|650px|thumb|Abilities Macro Editor.]]<br />
Abilities can be called directly from the chat by typing them similarly to an Attribute. The format is <code>%{'''<character name>'''|'''<ability name'''}</code>, for example: <code>%{Bob the Slayer|Massive-Axe}</code><br />
<br />
Finally, you can hover over Attributes and Abilities to drag and drop to re-order them or delete them.<br />
<br />
Ability calls (e.g. <code>%{Bob the Slayer|Massive-Axe}</code>) always require a '''keyword''' (e.g. the Character Name keyword; "<code>Bob the Slayer</code>"), even within a tab of a Character Window. (e.g. <code>%{Massive-Axe}</code> won't work for Bob but <code>%{selected|Massive-Axe}</code> can.)<br />
<br />
'''[[Macros#Ability_Command_Buttons|Ability Command Buttons]]''' can be used to call Abilities from the {{Text Chat}}.<br />
<div style='clear: both; height: 10px;'></div><br><br><br />
<noinclude><br />
==API==<br />
{{pro only|section}}<br />
{{main|Character_Sheet#API}} <br />
<br />
There are a number of APIs that helps with character & Character Sheet management, including options for [[players]] to create their own characters. See [[Character Sheet#API]] for more<br />
<br />
=Related Pages=<br />
* [[Pseudo-attributes]]<br />
* {{Journal}}<br />
** [[Handouts]]<br />
** [[External Journal]] - {{Plus}} feature <br />
* [[Character Sheet]]<br />
* [[Roll20 Characters]] (formerly "Character Vault")<br />
* [[Transmogrifier]] - {{Pro}} feature<br />
[[Category:Character Sheets]]<br />
[[Category:Game Management]]</noinclude></div>1223200https://wiki.roll20.net/Roll20_CharactersRoll20 Characters2023-12-31T10:31:34Z<p>1223200: redirect</p>
<hr />
<div>#REDIRECT[[Character Vault]]</div>1223200https://wiki.roll20.net/About:Community_WikiAbout:Community Wiki2023-12-31T10:30:28Z<p>1223200: Update Wiki situation & history as of December 2023</p>
<hr />
<div>[[File:Wiki-Logo large.png|right|400px]]{{Revdate}}<br />
The '''Roll20 Community Wiki'''(<code><nowiki>wiki.roll20.net</nowiki></code>) is intended to serve as a community resource for help and documentation of the platform, as well as tips and tricks for best using Roll20 with your tabletop games. We welcome community contributions and would love for you to help us create the best resource we can for your fellow Roll20 users!<br />
<br />
<br />
'''See the {{hc| Roll20 Help Center}} for Official Documentation.'''(that may or may not have more/better info than the Community Wiki) If the Official documentation have errors/mistakes, remember to {{bug}}.<br />
{| class="wikitable" style="float:right;"<br />
|+ Wiki Statistics<br />
|-<br />
| Total # of Articles || '''{{NUMBEROFARTICLES}}''' <br />
|-<br />
| Total # of Files || '''{{NUMBEROFFILES}}''' <br />
|-<br />
| Total # of Edits || '''{{NUMBEROFEDITS}}'''<br />
|-<br />
| Total # of Pageviews || '''{{NUMBEROFVIEWS}}'''<br />
|}<br />
__TOC__<br />
==Contribute==<br />
If you want to contribute to the wiki, see '''[[Help:Contents]]''' for more info.<br />
<br />
* Check '''[[:Category:Stubs]]''' and '''[[:Category:Tagged for Cleanup]]''' for pages that can really need help with updating.<br />
* [[Anduh|Andreas J.]] is also maintaining a list of wiki update suggestions & ideas.<br />
* [[Special:RecentChanges|Special:Recent Changes]] - pages recently updated<br />
<br />
{| role="presentation" class="wikitable mw-collapsible mw-collapsed"<br />
| old wiki notes<br />
|-<br />
| <pre>As of January 16, 2015, there are:<br />
* 484 wanted pages, the vast majority of which are from links in default wikimedia content, or automatically generated from templates (eg, /sandbox and /testcases subpages of a template with {{tl|documentation}})<br />
* 179 long pages<br />
* 179 short pages<br />
* 83 uncategorized files<br />
* 80 dead-end pages<br />
* 28 unused files (several caused by the deletion of [[Script:Custom Power Cards]])<br />
* 27 orphaned pages<br />
* 9 unused templates, one of which is marked as a candidate for deletion, 5 are used in the article deletion process, and 2 are caused by errors<br />
* 7 wanted categories<br />
* 4 uncategorized pages, three of which I do not have permissions to edit and therefore cannot categorize<br />
* 3 unused categories, although two ought to be empty, and the third is the target of a soft redirect which contains pages I can't edit<br />
* 1 uncategorized category ([[:Category:Docs]]), which I do not have permissions to edit and therefore cannot categorize<br />
* 1 broken redirects, although the target should be re-created eventually<br />
* 0 wanted templates<br />
* 0 uncategorized templates<br />
* 0 wanted files (plus 39 links to a redirected file name)<br />
* 0 double redirects </pre><br />
|}<br />
<br />
==Help Center vs. Community Wiki, which has better info?==<br />
{{Ambox<br />
| small = {{{small|}}}<br />
| type = content<br />
| class = ambox-POV<br />
| image = [[File:Unbalanced scales.png|50x40px|link=]]<br />
| text = This section is largely based on personal opinion of [[User:1223200|1223200]], an Roll20 user & wiki contributor who active updated the wiki until 2022, after <br />
| date = {{{date|}}}<br />
}}<br />
<br />
The [[Help Center]] has the official documentation, and is generally the better source for learning about how newer Roll20 features works or for a more surface-level understand of most features.<br />
<br />
The Community Wiki is updated by the community, so for features Roll20 haven't changed in a long time the Wiki is likely to have:<br />
* more detailed info on how the feature can be used<br />
* addressing quirks of the system<br />
* suggesting workarounds for commonly requested things(e.g. things like [[Map Pins]] or [[Library Campaign]])<br />
* providing internal & external links to<br />
* and linking to the [[Help Center]]-equivalent page for convenience<br />
<br />
Still, in many cases it's a good idea to check both the [[Help Center]] and the Community Wiki pages for information, as it's not clean-cut which one has better info.<br />
<br />
* The '''[[About:Community Wiki|Community Wiki]]''' have greater variance on content, but due to community user updating & creating various pages & articles<br />
** All pages related to [[Building Character Sheets]] are vastly more complete and numerous than on the Help Center, and the community keeps adding more example and expand on it as times go by.<br />
** [[Complete Macro Guide]] & the related pages has better info on making macros the the Help Center pages<br />
** [[Mod:Script Index]] & subpages gives a better overview on some popular mods than trying to check from 1-click install, and lots of mods have [[:Category:API_User_Documentation|documentation & example uses]] on wiki. <br />
** Community Wiki versions of some pages that also exists on the Help Center might contain more practical info or pointers, or be more up to date than the Help Center version.<br />
*** Some core pages, like [[Token]], lists some relevant [[Mods]] on the page<br />
*** Wiki articles might more often addresses smaller possible bugs, pain-points, & useful workarounds of the platform; while HC likely glosses over anything except the most longstanding/large issues.<br />
** [[Legacy Dynamic Lighting]] has more collected info on the topic than the Help Center, and some history of {{udl}}<br />
** There are many aspects of Roll20 that only have pages on the Community Wiki, such as for [[GM]] and [[players]], lists for {{pro}} and {{plus}} subscriptions,<br />
** community wiki pages often contains info on known issues with specific features that might not be covered on the Help Center. Such as the [[D&D 5E by Roll20]]-page having a '''Known Issues''' and a '''Recent Updates'''-section.<br />
** Mentions [[:Category:External_Tools|External Tools]] useful for Roll20, like [[Stylus]] for minor visual fixes<br />
<br />
* The '''[[Help Center]]''' usually have fairly comprehensive & up-to-date pages for newer features like latest Dynamic Lighting features or the [[UI Redesign]], while pages for older existing Roll20 features might not always have been updated with info on features.<br />
** '''{{hc|sections/360008414313-General Marketplace Creators}}''' docs is better on the HC<br />
** For any Policy & legal info, see Help Center's '''{{hc|categories/360003756453-Policy-Information Roll20 Policy}}'''<br />
** Help Center has the '''{{hc|articles/360037772613-Change-Log Official Roll20 Changelog}}'''<br />
<br />
==History==<br />
The Roll20 Wiki was unveiled in [[Changelog#April_30.2C_2013|April , 2013]], and had a section dedicated to Official documentation(Docs), and user submitted content (Tips, Games, & Guides-categories)<br />
<br />
In early 2020, the Roll20 Wiki was changed into being the '''Community Wiki''' for the users, as Roll20 migrated their official documentation to the [[Help Center]]. Many Core pages on the Community Wiki links to the corresponding Help Center page.<br />
<br />
Sometime Late 2020/Early 2021, all of the links to the Community Wiki on the main site, where updated to say "Community Wiki". Until then, any links had still called it just "Wiki", creating some confusion between the distinction between [[Help Center]] and the [[About:Community Wiki|Community Wiki]].<br />
<br />
In Sept.-Oct. 2021, [[Andreas J.]] restructured & updated the looks of the wiki.<br />
<br />
Since around mid-2022, the Help Center documentation have started to outpace the Community Wiki on articles regarding Roll20 features & updates created since. The wiki is still invaluable for it's many comprehensive articles like [[Macro Guide]], [[:Category:Character_Sheet_Documentation|Sheet documentation]], [[:Category:Tips|Community Tricks]], as well as [[Sheet Development|Character Sheet Development]] and [[Mod Development|Mod:Development]]. <br />
<br />
In late 2023, with the updated icons for the [[sidebar]], The [[Toolbar Redesign]], [[Page Folders]] release, the Community Wiki's articles & images related to the main UI is getting outdated, and is requiring a lot of work to getting up to speed to Roll20's current state. It's to the point that some articles should just be replaced with link to the HC article and maybe just keep the extra tips that are still relevant. <br />
<br />
== Wiki Experience tricks == <br />
<br />
'''Dark Mode'''<br />
<br />
While the main site has [[Dark Mode]], the community wiki didn't get one. If you install the [[Stylus]] browser plugin, you can install the Roll20 Wiki Dark Mode.<br />
* [https://userstyles.world/api/style/3108.user.css Install] | [https://userstyles.world/style/3108/roll20-dark-mode Roll20 Wiki Dark Mode] by [[Andreas J.]]<br />
<br />
<br />
'''Wiki Editor'''<br />
<br />
The wiki is running on an older version of the wiki editor, so is lacking many features you may seen in other wikis' text editors. <br />
<br />
[https://code.visualstudio.com/ Visual Studio Code] with the [https://marketplace.visualstudio.com/items?itemName=RoweWilsonFrederiskHolme.wikitext Wikitext] is a solid text editor option for wikitext.<br />
<br />
When editing longer articles, it's a good idea to use an external text editor:<br />
<br />
:1. '''Syntax highlight for wikitext helps with readability & spotting mistakes'''<br />
:2. '''Updating article directly in browser has a small chance of losing your progress if the session times out.''' Sometimes when submitting a change from an article you been editing for a long time might reply "something went wrong, progress wasn't saved", but sometimes if you use the back-button to go back to the editor your changes are still there and you can resubmit it. Saving & writing in an external program & then copy-pasting to the wiki editor when you're finished avoid the risk of losing progress.<br />
:3. '''Leveraging text editor features speeds up writing process.''' Keyboard Shortcuts, find&replace, plugins, etc<br />
<br />
[[Category:Miscellaneous]]<br />
[[Category:Community]]</div>1223200https://wiki.roll20.net/Macro_Character_SheetMacro Character Sheet2023-12-31T10:16:31Z<p>1223200: Mention Transmog can now transfer macros</p>
<hr />
<div>{{revdate}}''Trick {{fpl|5924364/ originally mentioned}} by [[Keith]], & later expanded to a {{fpl|7605679/ full guide}} by gui8312''<br />
<br />
<br />
A '''Macro Character Sheet'''('''Macro Character''' /'''Macro Mule'''), is a great trick to use for moving [[macros]] between your games, if you aren't {{Pro}}-subscriber and able to use the [[Transmogrifier]] to transfer macros. Often when you create a new game as a [[GM]], you need to move/copy a ton of macros you have already created. For Free/Plus users this is a rather than do a laborious copy and paste, a good practice to get into is building your [[campaign]] macros as character abilities, which can den be moved to other game with [[Character Vault]].<br />
<br />
Transfer macros with [[Transmogrifier]] became possible in 2023, and up to that point the Macro Mule was the main workaround. <br />
{{NavMacroDocs}}<br />
=Macro Character=<br />
This is just an otherwise blank [[character]], with the [[Character#Attributes_.26_Abilities_Tab|Attributes & Abilities]]-tab filled with your campaign macros. Then, when you create a new campaign, you can use the [[Transmogrifier]]({{pro}} feature) or the [[Character Vault]] to move the Macro Character of your [[macros]] in one swell swoop.<br />
<br />
While [[Transmogrifier]] can more macros between your games, a Macro Mule can be imported to games owned by other users, so can help with sharing macros with others.<br />
<br />
If any of the macros calls [[Mods]], the mods [[API#Install_API|needs to still be installed]] in the campaign for the macros to work. [[The Aaron]] has a [[Library_Campaign#The_Aaron.27s_Bookmaklet|script for that]], too (technically a bookmarklet), although it doesn't work for One-Click installs.<br />
<br />
==Why it's useful==<br />
<br />
Starting a new campaign on Roll20 does have its quirks: a big one is that transferring all macros can be downright infuriating. But, with some prep over time you can transfer all your macros in a couple of clicks!<br />
This trick is equally amazing at keeping [[GM]] notes organized, as well as making/updating any macro a breeze.<br />
<br />
Roll20 has a [[Character Vault]] and a [[Transmogrifier]], for the sake of easily sharing content between campaigns, but it does not work with macros. Following Roll20's (otherwise) simplest workflow of copy&pasting, you're stuck with a task which is extremely tedious and prone to errors. All that work, creating maybe hundreds of macros, and now they are are spread over so many windows that are slow to access in bulk... Let's fix this.<br />
<br />
==How it works==<br />
<br />
You probably know that the [[characters]] on Roll20 have an [[Character#Attributes_.26_Abilities_Tab|Attributes & Abilities]]-tab. We will focus on these [[CS|character sheet]] abilities, and use them to store pretty much all our game's macros.<br />
<br />
[[File:Macro-char-sheet-ex.png|800px|thumbnail|center|A character's [[Character#Attributes_.26_Abilities_Tab|Attributes & Abilities]]-tab, showing some of the stored abilities/macros it has.]]<br />
<br />
This character sheet is normal in every way except for one: '''the abilities it has are actually many of the macros you use in your game for utility purposes.''' It is not intended to be used during live sessions in the same way as an enemy character for example. The idea is, you store all these macros here, instead of in the {{collections}}-tab.<br />
<br />
You can still access all these macros during gameplay, but now the [[transmogrifier]] or [[Character Vault]] can easily copy this character and with it all the macros it holds as abilities.<br />
<br />
===The Result===<br />
<br />
You can now '''save all types of macros and information in a portable way'''. You can create a single character and save all the macros you have in the game to it, but it can be a good idea to splitting it up in multiple characters, such as:<br />
<br />
* one for GM '''utility macros'''<br />
* another one for '''monster attack macros'''<br />
* one for [[Player]]-used macros<br />
* one for all your GM notes / shop info<br />
<br />
Using a GM Notes Character Sheet can be useful to have everything in one place, avoiding duplicates, being able to review info very quickly, as well as much easier to transfer to another game.<br />
<br />
This requires that we '''create a macro character sheet only once''', and we can keep updating the single master copy, and then transfer copies of the updated one to all your campaigns.<br />
<br />
If you play multiple game systems, it might be practical to keep separate macro character sheets for each sheet/system type, and have your universal/API-related macros on a separate macro character sheet. <br />
<br />
==Access an ability stored this way==<br />
<br />
Just use the format,<br />
<br />
<pre>%{MacroCharacterName|AbilityName}</pre><br />
<br />
What this means is you can access these abilities from the chat through [[Chat Menu|API buttons]], but also from any [[token]]/ character... just add this piece of code to the ability entry of your monsters, NPCs and Players... The token still has quick access, but it uses the reference ability to work. Updating the ability in the macro Sheet will update how all the tokens work that use this reference.<br />
<br />
=See Also=<br />
* '''[[Script:Muler]]''' API to get/set variables that can be saved as tables in character abilities. Part of the [[Meta-Toolbox]]<br />
* {{forum|permalink/7605679/ Macro Character Sheet - More info}} - gui8312<br />
* {{forum|permalink/6138238/ Macro Character Sheet - Giving Players Limited Access}} - Kyle.G<br />
* '''[[Complete Guide to Macros & Rolls]]'''<br />
** [[Chat Menu]] - creating menus with roll buttons in the {{Text Chat}}<br />
* [[Character Vault]]<br />
* [[Library Campaign]] - good idea for reducing load on your campaign<br />
* [[Community FAQ]]<br />
* [[Forum Tricks]]<br />
* [[:Category:Tips]]<br />
* [[:Category:Guides]]<br />
<br><br />
<br><br />
[[Category:Tips]]<br />
[[Category:Guides]]<br />
[[Category:Character Sheets]]<br />
[[Category:Macros]]<br />
[[Category:Game Management]]</div>1223200https://wiki.roll20.net/TransmogrifierTransmogrifier2023-12-31T10:07:07Z<p>1223200: </p>
<hr />
<div>{{revdate}}{{HCbox| {{hc|articles/360037774433-Transmogrifier Here}} }}<br />
{{Pro only|page}}<br />
{{gm only tool}}<br />
{{pro features}}{{#evp:youtube|u3Zsydh89b8|How to Use the Roll20 Transmogrifier|right|630}}<br />
[[File:Transmogrifier.png|right]]<br />
<br />
<br />
The '''Transmogrifier'''('''Transmog'''/'''TM''') is a tool which allows you to take elements out of any of games [[creator|you created]] and copy them into any other game that you own. It's available to {{Pro}} users.<br />
<br />
To use the Transmogrifier, just click the "Transmogrifier" button under the '''Miscellaneous'''-section of the {{My Settings}}-tab on the right sidebar. The Transmogrifier window will open, with the current game pre-selected. <br />
<br />
To move copy between games, simply choose the two games you want to use in the drop-down menus (it doesn't matter which game is in which drop-down). A listing of all the objects in the game that are eligible to be moved will appear. Just drag and drop between the two lists to copy elements between the games. Note that you are '''copying''' elements, not moving them, so the original will remain in the first game.<br />
<br />
==Content that can be "Transmogrified"==<br />
* [[Page Toolbar|Pages]]<br />
** (any [[tokens]], dynamic lighting & settings comes with the page)<br />
* [[Journal|Characters]]<br />
* [[Cards|Decks]]<br />
* [[Journal|Handouts]]<br />
* [[Rollable tables]]<br />
* {{Jukebox}} playlists<br />
* [[Macros]]{{source|https://help.roll20.net/hc/en-us/articles/360037772613-Change-Log#march-27-2023-0-14 March 2023}}<br />
* [[PDF|PDFs]]{{source|https://help.roll20.net/hc/en-us/articles/360037772613-Change-Log#april-17-2023-0-11 April 2023}}<br />
<br />
==Tips==<br />
Few tips to keep in mind when using the Transmogrifier:<br />
<br />
* The transmogrifying tool does not allow you to take anything from someone else's game and move it to yours, nor does it allow you to move anything from your games to your friend's.<br />
** You can use [[Character Vault]] to move characters between any games<br />
* Currently, if you try to copy over an existing object, you will receive a warning that it will be overwritten. This is based on the original ID of the object, not the name, so it should only happen if you really did already copy over that object previously. Pages don't have this restriction due to the way that they are implemented, so you can copy over the same page as many times as you'd like.<br />
* You can't copy over [[Players]] or [[Macros]]. This means that any "Controlled By" flags that are set on tokens/characters will need to be set again once they are in the new game.<br />
** [[Macro Character Sheet]] is a trick you can use for transferring macros between games<br />
* If you don't copy a Character and you copy a Page that has tokens that represent that Character, you will need to manually change them back to "Generic Token".<br />
* Having a [[Library Campaign]] for larger campaigns is smart to store&backup content that isn't actively used in the game. The Transmogrifier makes this possible & easy to copy things back and forth.<br />
* In case you need to do a [[Rollback]], always make a copy of your game so you can then transmog any content from the new copy to the rolled back campaign, if you have content you want to preserve from both. Creating a copy of your game is always a good idea before making a [[Rollback]], as it's unclear if rollbacks are reversible.<br />
<br />
=Related pages=<br />
* [[Game Management]]<br />
* [[Pro]] - other Pro subscription features<br />
* [[Character Vault]] - useful for transferring characters between games<br />
** Char Vault can even transfer between games created by different people, while Transmogrifier can only copy content between game [[Creator|created by the user]].<br />
<br />
[[Category:Docs]]<br />
[[Category:Pro]]<br />
[[Category:Game Management]]</div>1223200https://wiki.roll20.net/Character_VaultCharacter Vault2023-12-31T10:03:40Z<p>1223200: new name of tool + cleanup-msg</p>
<hr />
<div>{{revdate}}{{HCbox| {{hc|articles/360037258594-Character-Vault Here}} }}<br />
{{cleanup-msg|Needs info on chreating characters in the tool, and clean up references to old name of tool.|December 2023}}<br />
{{#evp:youtube|CsmMHYRG_2I|Importing and Exporting Characters (Dec 2021)|right|650}}<br />
==Roll20 Characters ==<br />
<br />
The '''[https://app.roll20.net/characters Roll20 Characters]'''-tool(<code>roll20.net/vault</code>) (previously known as '''Character Vault'''/'''My Vault''') allows you to store your own [[Character Sheets|Characters]] so that you can use them in multiple games without the need to re-create them from scratch each time.<br />
<br />
'''Since Aug 2023{{source|https://help.roll20.net/hc/en-us/articles/360037772613-Change-Log#aug-2-2023-0-4}}, it's also been possible to [[#Create Characters|create characters]] for some character sheet types.'''<br />
<br />
For example, in society-style play you have a single Character that you play many different game sessions with, across different [[GM|GMs]], etc. Previously on Roll20 you would need to keep track of that Character yourself and then re-create it in each new game. However with the Vault feature, you can import the Character out of a game and into your Vault, and then re-export it out of your Vault and into a new game. Rinse and repeat, and now you've got a Character that travels with you between games.<br />
[[File:Character-Vault.png|thumb|right|500px|Example of a person's '''Character Vault''' with two characters,<br>where the second character has both a [[Journal#Avatar|Portrait]] & a linked [[Token]]. ]]<br />
The Vault is also useful for GMs to store pre-generated Player Characters that they may want to share in multiple games, or a number of interesting NPCs, monsters, spaceships etc.<br />
<br />
'''Definition:'''<br />
<br />
* '''"Importing Character"''' here refers to '''Importing''' a character sheet '''to your Character Vault'''<br />
* '''"Exporting Character"''' here refers to '''Exporting''' a character sheet '''from your Character Vault, to a game'''<br />
<br />
The info that is saved with the sheet:<br />
<br />
* Large character [[Journal#Avatar|Avatar]] and [[Token]] preview<br />
* Information about the game the character is exported from<br />
* The [[Character Sheet|character sheet]] used, and all stats saved.<br />
* Truncated [[Journal#Bio_.26_Info_Tab|Bio]] text <br />
<br />
=== Create Characters ===<br />
<br />
Launch of the updated Character Vault, which allows for character creation outside of the VTT; support currently for [[Marvel Multiverse]] RPG Official Sheet with more to come. {{source|https://help.roll20.net/hc/en-us/articles/360037772613-Change-Log#aug-2-2023-0-4 Aug. 2nd, 2023}}<br />
<br />
=== Importing Characters ===<br />
'''"Importing Characters"''' here refers to '''Importing a character sheet to your Character Vault'''<br />
<br />
You can import a character to your Vault from any Game you are a [[player]] or [[GM]] in. However, if you are a player in the game, you must have permission to edit the Character to be able to import it to your Vault.<br />
<br />
Importing Characters is easy -- just click the "Import Character" button on your Character Vault page. You'll see a list of Games to choose from. After you choose a Game, you'll see a list of Characters that you have permission to edit. Just choose the Character you want to import and press the "Import Character" button. The process may take a few seconds to complete. <br />
<br />
Note that once the Character is in your Vault, it is stored as a "snapshot", meaning that it will no longer update or receive changes from the Game it came from. If you want to import an "updated" version of a Character, just delete the existing Character from your vault, and re-import it from the Game.<br />
<br />
'''Vault Location:'''<br />
<br />
'''Home''' (out of game) -> '''Tools''' -> '''Character Vault'''<br />
<br />
[[File:Menu-Character-Vault.png|600px]]<br />
<br />
=== Exporting Characters ===<br />
'''"Exporting Characters"''' here refers to '''Exporting a character sheet from your Character Vault to a game'''<br />
<br />
{{notebox| Since [https://app.roll20.net/forum/post/11550134/free-transfers-now-available-in-the-character-vault July 2023], Free users can export up to 3 characters per game}}<br />
<br />
When you are ready to use a Character from your Vault in a new game, click the "Export to Game" link that is on the right side of the Character, when you are on the main Vault page. You'll be presented with a list of eligible Games to export the Character to.<br />
[[File:Character-vault-export-char.gif|right|thumbnail|600px|Exporting a character to a game]]<br />
Note that you can only export Characters to Games where:<br />
<br />
'''1.''' You are the [[GM]] of the Game<br />
* If you are {{Plus}}/{{Pro}} subscriber, you can export to any game<br />
* If you are free user, and haven't used up the 3 free transfers/per game yet.{{source|https://help.roll20.net/hc/en-us/articles/360037258594-Character-Vault#CharacterVault-ExportingCharacters Help Center}}<br />
* If you are free user, and the game is created with a [[Market#Modules|marketplace module]] that have '''Full Access'''<br />
<br><br />
'''2.''' You are a [[player]] in the game, and the [[GM]] has expressly turned on the "Allow Players to Import Characters"-setting on the [[Game_Settings#Character_Vault_Options|Game Settings]]-page:<br />
* If you are {{Plus}}/{{Pro}}-subscriber, or the [[Game Creator]] is a {{Plus}}/{{Pro}}-subscriber<br />
* If both you and the Game Creator are free users, but the game is created with a marketplace module that have '''Full Access'''<br />
<br />
<br />
'''If you are a free user, the game must also have All Access Vault enabled (see below for more information on Vault Access Levels.)'''<br />
<br />
If a Game you want to export a Character to isn't showing up in the list, be sure that one of those criteria are met, and then reload the page.<br />
<br />
Once the Character is exported to the Game, it will be up to the GM of that game to set it up for the player(showing it in the {{Journal}} and giving control over it).<br />
<br />
== Vault Access Levels ==<br />
<br />
Each game will have one of two access levels, which determines who can export characters into the game:<br />
[[File:Allaccessvalutenabled.png|thumbnail|right|600px|the green '''All Access Vault unlocked''' banner at to bottom of the module's marketplace page]]<br />
=== Limited Vault ===<br />
<br />
This is the default level. With this level, only players who are themselves Plus or Pro subscribers (and therefore have "All Access Vault" enabled for their whole account) can import characters into the game.<br />
<br />
=== All Access Vault ===<br />
<br />
This is the premium level of vault access. It allows anyone (including players in the game who don't have a subscription) to import Characters into the game. GMs of the game can also import characters (or NPCs, monsters, etc.) into the game. <br />
<br />
The level of a game is determined by the subscription level of the [[GM#Creator|game creator's]] account. If the game creator does not have a subscription, the game will have the default Limited Vault level. If the game creator has a subscription, the game will have an All Access Vault level.<br />
<br />
Additionally, selected(most, if not all) [[Market#Module|Marketplace modules]] feature the '''All Access Vault''' level for all games based on that module(as indicated on the bottom of their details page).<br />
<br />
For example, if you purchase {{market|browse/bundle/9403/lost-mine-of-phandelver "Lost Mine of Phandelver"}}, all games you create with that module will have the "All Access Vault unlocked", even if the game creator does not have a {{Plus}} or {{Pro}} [[subscription]].<br />
<br />
=See Also=<br />
* {{blogs|an-introduction-to-the-roll20-character-vault/ An Introduction to the Roll20 Character Vault}} Aug 2021<br />
* [[Character Sheets]]<br />
** [[Link Token]] - how to link token to a character sheet, and have the token saved to the sheet<br />
** [[Add_character_sheet#Assign_to_player|Assign to player]] -how to assign an imported character to a player <br />
* [[Tokens]]<br />
* [[Subscription]]<br />
** [[Free]]<br />
** [[Plus]]<br />
** [[Pro]]<br />
* [[Transmogrifier]] tool for moving characters, maps & handouts between games ({{pro}} feature)<br />
<br />
[[Category:Docs]]<br />
[[Category:Roll20]]<br />
[[Category:Character Sheets]]<br />
[[Category:Game Management]]</div>1223200https://wiki.roll20.net/StylusStylus2023-12-31T09:10:58Z<p>1223200: /* Toolbar Redesign */</p>
<hr />
<div><noinclude>{{revdate}}{{main|Browser}}</noinclude>'''Stylus''' is a browser plugin that can change how webpages look, and many roll20 users have created their own tricks and minor adjustments to Roll20 for personal use. Things like changing how certain tools look in Roll20, making a [[Dark Mode]], adjusting looks on [[CS|character sheets]], or how things look in the {{Text Chat}}.<br />
<br />
* Install Plugin: [https://chrome.google.com/webstore/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne?hl=en Chrome/Edge] | [https://addons.mozilla.org/en-US/firefox/addon/styl-us/ Firefox] | [https://cascadea.app/ Cascadea(Safari-alternative)] <br />
* Latest megathread '''{{fpl|10802054/ Latest Show off Your Style 4: A New Hope}}''' April 2022<br />
* Check '''{{fpl|9784281/ Show off Your Style 3: Third Time is the Charm}}''' for more info and good tricks others have created. The first post has a massive index of snippets to use<br />
** [[Hidden_Rolls#Blind_Rolls.28Stylus.29|Hidden Rolls]] - trick relies on Stylus to work<br />
** [[Using_Roll20_while_Playing_In-Person#User_Style_Manager|Play In-Person, Hide UI]]<br />
* [https://userstyles.org/styles/browse?search_terms=Roll20&type=false userstyles.org] - search for styles people have shared online for any sites.<br />
** [https://userstyles.org/users/404405 Userstyles by #Keith Curtis] made by [[Keith]]<br />
* Older threads:<br />
** {{fpl|7841113/ Show Off Your Style 2: The Stylening!}}<br />
** {{fpl|7209333/ Show Off Your Style}}<br />
<br />
'''Note:''' there is a similarly named extension "Stylish", but it's stealing your browser history [https://robertheaton.com/2018/08/16/stylish-is-back-and-you-still-shouldnt-use-it/ "Stylish" is back, and you still shouldn't use it]<br />
<noinclude>__TOC__</noinclude><br />
<br />
<noinclude><br />
==Stylus Snippets==<br />
* https://app.roll20.net/forum/post/10695950/wrapping-macro-bar-when-you-have-many-buttons<br />
* https://app.roll20.net/forum/post/11479684/stylus-script-for-stacking-names<br />
===Toolbar Redesign===<br />
Minor tweaks for the [[Toolbar Redesign|new toolbar]]:<br />
<br />
By Jarren:<br />
<br />
this code to make the left toolbar background transparent and not blurry: <br />
<pre><br />
div.master-toolbar-outer#master-toolbar { background: transparent; backdrop-filter: none; }<br />
</pre><br />
<br />
Or you can adjust the transparency of the entire toolbar (including the buttons)<br />
<pre><br />
div.master-toolbar-outer#master-toolbar { opacity: 50%; }<br />
</pre><br />
<br />
Maguillage: Transparency with fade-in, fade out:<br />
<pre><br />
div#master-toolbar {opacity: 0.2; transition: opacity 1s ease-out 0.5s;}<br />
div#master-toolbar:hover {opacity: 1; transition: opacity 0.2s ease-in 0s;}<br />
</pre><br />
<br />
===Dark Mode===<br />
</noinclude><br />
'''[[Dark Mode]]''' options:<br />
{{:Dark Mode}}<br />
<noinclude><br />
===Display filesize/dimensions in Art Library===<br />
(by Keith)<br />
<br />
Fix for {{Art Library}}<br />
<pre data-language="css">#marketplaceresults li::after,<br />
#recentuploads li::after{<br />
background-color: white;<br />
content: attr(data-grid-width)"x"attr(data-grid-height);<br />
display: inline-block;<br />
font-size: 1em;<br />
padding-left: 30px;<br />
position: absolute;<br />
right: 0;<br />
}<br />
</pre><br />
<br />
===5E Sheet Dark Mode Red to purple===<br />
by keith<br />
<br />
Stylus can use the CSS variable names. This code will change all {{5E}} red to purple, when you have [[Dark Mode]] on:<br />
<pre data-language="css"><br />
.sheet-darkmode .npc .display .red span {<br />
color: var(--dark-primary);<br />
}<br />
</pre><br />
<br />
[[Category:Web Browser]][[Category:Web Browser Extensions]] [[Category:Dark Mode]]</noinclude></div>1223200https://wiki.roll20.net/Toolbar_and_Layers_RedesignToolbar and Layers Redesign2023-12-31T09:08:05Z<p>1223200: </p>
<hr />
<div>{{revdate}}<br />
{{#evp:youtube|06A41a6OmzQ|Updated Toolbar and Layers Preview, May 25th,2023|right|600}}<br />
The [[Toolbar]] and [[Layers]]-design is being reworked, and as of July 22nd 2023, is opt in for {{Pro}}-users, and will later be rolled out for everyone.<br />
<br />
* '''[https://pages.roll20.net/redesign Roll20 Virtual Tabletop Redesign]''' main info page<br />
* https://roll20.io/redesign-feedback<br />
<br />
==Goals==<br />
The main goals for the redesign, as stated in the [https://app.roll20.net/forum/post/11484071/opt-in-to-the-new-toolbar-and-layers-redesign blog]:<br />
<br />
<br />
:1. '''Less Menus, More Suggestions.''' To provide not only guidance and learnability through suggestions and auto-correction of mistakes, but providing users only what they need based on their intention at any given time.<br />
:2. '''Simplification.''' The current VTT contains a lot of repetitive actions. Enable the user to do the same thing in fewer steps.<br />
:3. '''Automation.''' The current VTT is very manual in nature. We wanted to streamline things like assigning [[tokens]], having settings carry over from action to action, and much more.<br />
:4. '''[[Player]] view vs [[GM]] View.''' Currently, the player side of the VTT looks almost identical to the GM side. We want GMs to have a guided way to build their games through menus unique to their role, while players should have an area focused on how they play the game.<br />
<br />
==Toolbar==<br />
Some of the tools have been renamed and changed how they are grouped & ordered.<br />
<br />
<br />
* (New) '''Settings-submenu''' added to the top, options like:<br />
** "preview as token"<br />
** [[Dark Mode]] toggle<br />
** Logout button<br />
** opt-out from redesign <br />
* '''Select''', used to be a switch in [[Select/Move_Tool#Select_Mode|Select/Move_Tool]]<br />
* '''Pan''', used to be a switch in [[Select/Move_Tool#Pan_Mode|Select/Move_Tool#Pan_Mode]]<br />
** so you click between Select & Pan to switch mode, while previously you had to open the menu or use keyboard shortcut to switch between them. <br />
* [[Draw Tool]] ''(but Text tool is now separate)''<br />
* '''[[Drawing_Tools#Text|Text]]''' tool is separated from the Drawing Menu<br />
* '''Effects''', renamed from {{FX Tool}} <br />
* '''Lighting''', renamed from [[Place Tool]]<br />
* '''Fog of War''', renamed from {{Darkness}} <br />
* '''Measure''', renamed from {{Ruler}}<br />
** Includes now shapes like circles, cones to measure AoE {{source|https://help.roll20.net/hc/en-us/articles/360037772613-Change-Log#aug-9-2023-0-1 Aug 9, 2023}}<br />
** {{blogs|new-measure-tool-shows-aoe-and-shapes/ New Measure Tool Shows AoE and Shapes}} Aug. 10, 2023<br />
* '''Turn Order''', renamed from {{Turn Tracker}}<br />
* '''Dice''', renamed from {{DiceGUI}}<br />
<br />
There is then a gap and [[Layers]] is at the bottom, so it's always in the bottom-left corner of the screen.<br />
<br />
===Layers===<br />
<br />
[[Layers]] are now at the bottom of the Toolbar, and their order is now:<br />
* Tokens<br />
* GM<br />
* Light<br />
* Map<br />
<br />
Not clear how the planned [[Foreground Map Layer]] will be integrated.<br />
<br />
=Tips=<br />
* [[Stylus#Toolbar_Redesign|Stylus snippets]] to adjust the toolbar's look<br />
<br />
=Links=<br />
* [https://app.roll20.net/forum/post/11484071/opt-in-to-the-new-toolbar-and-layers-redesign Opt In to the New Toolbar and Layers Redesign] Forum thread May 31st, 2023<br />
* [http://blog.roll20.net/posts/roll20-virtual-tabletop-redesign-our-research/ Roll20 Virtual Tabletop Redesign: Our Research] Blog - Apr 13, 2023<br />
'''Videos'''<br />
* [https://www.youtube.com/watch?v=j7YyMWDruv4 New Roll20 VTT Experience!] 2min, May 2nd, 2023<br />
* [https://www.youtube.com/watch?v=wnZgSRgJVPs Let's Look at the Roll20 VTT Redesign] 25min, RogueWatson, (June 10th, 2023) <br />
* [https://www.youtube.com/watch?v=v24pYeBHae8 Discussing The New Roll20 Virtual Tabletop Redesign with Morgan Buck and Andrew Searles] 23min, Really Dicey (June 1st, 2023)<br />
<br />
[[Category:VTT Interface]]<br />
[[Category:Toolbar]]<br />
[[Category:New features in 2023]]</div>1223200https://wiki.roll20.net/StylusStylus2023-12-31T09:06:21Z<p>1223200: Toolbar Redesign - transparency</p>
<hr />
<div><noinclude>{{revdate}}{{main|Browser}}</noinclude>'''Stylus''' is a browser plugin that can change how webpages look, and many roll20 users have created their own tricks and minor adjustments to Roll20 for personal use. Things like changing how certain tools look in Roll20, making a [[Dark Mode]], adjusting looks on [[CS|character sheets]], or how things look in the {{Text Chat}}.<br />
<br />
* Install Plugin: [https://chrome.google.com/webstore/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne?hl=en Chrome/Edge] | [https://addons.mozilla.org/en-US/firefox/addon/styl-us/ Firefox] | [https://cascadea.app/ Cascadea(Safari-alternative)] <br />
* Latest megathread '''{{fpl|10802054/ Latest Show off Your Style 4: A New Hope}}''' April 2022<br />
* Check '''{{fpl|9784281/ Show off Your Style 3: Third Time is the Charm}}''' for more info and good tricks others have created. The first post has a massive index of snippets to use<br />
** [[Hidden_Rolls#Blind_Rolls.28Stylus.29|Hidden Rolls]] - trick relies on Stylus to work<br />
** [[Using_Roll20_while_Playing_In-Person#User_Style_Manager|Play In-Person, Hide UI]]<br />
* [https://userstyles.org/styles/browse?search_terms=Roll20&type=false userstyles.org] - search for styles people have shared online for any sites.<br />
** [https://userstyles.org/users/404405 Userstyles by #Keith Curtis] made by [[Keith]]<br />
* Older threads:<br />
** {{fpl|7841113/ Show Off Your Style 2: The Stylening!}}<br />
** {{fpl|7209333/ Show Off Your Style}}<br />
<br />
'''Note:''' there is a similarly named extension "Stylish", but it's stealing your browser history [https://robertheaton.com/2018/08/16/stylish-is-back-and-you-still-shouldnt-use-it/ "Stylish" is back, and you still shouldn't use it]<br />
<noinclude>__TOC__</noinclude><br />
<br />
<noinclude><br />
==Stylus Snippets==<br />
* https://app.roll20.net/forum/post/10695950/wrapping-macro-bar-when-you-have-many-buttons<br />
* https://app.roll20.net/forum/post/11479684/stylus-script-for-stacking-names<br />
===Toolbar Redesign===<br />
Minor tweaks for the new toolbar:<br />
<br />
By Jarren:<br />
<br />
this code to make the left toolbar background transparent and not blurry: <br />
<pre><br />
div.master-toolbar-outer#master-toolbar { background: transparent; backdrop-filter: none; }<br />
</pre><br />
<br />
Or you can adjust the transparency of the entire toolbar (including the buttons)<br />
<pre><br />
div.master-toolbar-outer#master-toolbar { opacity: 50%; }<br />
</pre><br />
<br />
Maguillage: Transparency with fade-in, fade out:<br />
<pre><br />
div#master-toolbar {opacity: 0.2; transition: opacity 1s ease-out 0.5s;}<br />
div#master-toolbar:hover {opacity: 1; transition: opacity 0.2s ease-in 0s;}<br />
</pre><br />
===Dark Mode===<br />
</noinclude><br />
'''[[Dark Mode]]''' options:<br />
{{:Dark Mode}}<br />
<noinclude><br />
===Display filesize/dimensions in Art Library===<br />
(by Keith)<br />
<br />
Fix for {{Art Library}}<br />
<pre data-language="css">#marketplaceresults li::after,<br />
#recentuploads li::after{<br />
background-color: white;<br />
content: attr(data-grid-width)"x"attr(data-grid-height);<br />
display: inline-block;<br />
font-size: 1em;<br />
padding-left: 30px;<br />
position: absolute;<br />
right: 0;<br />
}<br />
</pre><br />
<br />
===5E Sheet Dark Mode Red to purple===<br />
by keith<br />
<br />
Stylus can use the CSS variable names. This code will change all {{5E}} red to purple, when you have [[Dark Mode]] on:<br />
<pre data-language="css"><br />
.sheet-darkmode .npc .display .red span {<br />
color: var(--dark-primary);<br />
}<br />
</pre><br />
<br />
[[Category:Web Browser]][[Category:Web Browser Extensions]] [[Category:Dark Mode]]</noinclude></div>1223200https://wiki.roll20.net/Character_Sheet_TranslationCharacter Sheet Translation2023-12-12T04:09:54Z<p>1223200: /* Step One, Sheet Formatting */ Dev server was discontinued</p>
<hr />
<div>{{revdate}}{{BCS}}<br />
<br />
{{cleanup-msg| These tips & examples are made to work with [[Legacy Sheet]], so '''might''' need adjustments to work with newer [[CSE]]-sheets. See the [[Character Sheet Enhancement]]-page for more info. |April 2021}}<br />
<br />
{{NavSheetDoc}}'''Character Sheet Translation''' (previously known as '''Character Sheet [http://www.i18nguy.com/origini18n.html i18n]'''), will allow you to design your [[Building Character Sheets|character sheet]] in such a way that our community of translators will be able to translate your sheet into their language, making that language available to anyone on Roll20.<br />
<br />
If your sheet has been translated into another language, French for example, and someone using your sheet has their account language set to French, your sheet will show up as the French translation of your sheet for that user. <br />
<br />
'''[[Andreas J.]] has created a tool to partially automate the insertion of sheet translations code into an existing sheet. See [[#ACSI]] for more details.''' <br />
<br />
{{mbox | text = '''Note to Translation volunteer:'''If a character sheet already translations capabilities, Roll20 prefers translation to be handled through the [https://crowdin.com/ CrowdIn]-service, which can be used by people without any programming background. If you want to translate only character sheets, all you need to do is create account on CrowdIn and go to the [https://crowdin.com/project/roll20-character-sheets community sheet] & [https://crowdin.com/project/roll20-official-character-shee official sheet]-projects to join. More info: [[Translation]] }} <br />
<br />
__TOC__<br />
==Issues==<br />
See [[Character Sheet Development/Bugs & Quirks]] for known issues related to translations.<br />
<br />
== Designing Your Sheet ==<br />
Setting up your [[Building Character Sheets|sheet]] to be able to respond to the <code>i18n</code> service is fairly simple for most parts, it just can take some time, especially if you are working with a large, pre-existing sheet. There are 2 steps you must take to allow your sheet to be translated.<br />
<br />
* '''Step one''', mark the elements that you want to contain the translated text.<br />
* '''Step two''', create a translations file that contains all of the strings that will be translated.<br />
<br />
<br />
This file will be fed to our translation service, [[CrowdIn]], where our volunteers can go string-by-string and translate them into another language. This will generate the same translation file in all of the other languages, which we will then use accordingly when someone has that language selected on Roll20.<br />
<br />
Since creating one single design that can fit multiple sizes of translated text can be hard, we've added a class to the parent <code>.charsheet</code> element to let you have separate css for individual languages. The class is <code>lang-[2 char language code]</code>, so if the language is English(<code>lang-en</code>) or French(<code>lang-fr</code>). This will allow you, after your sheet has been translated, to change a style, specifically for one language, if the new text for that language doesn't fit your current design.<br />
<br />
See [[#Changing Language-Specific Looks|Changing Language-Specific Looks]] for examples.<br />
<br />
=== Attributes ===<br />
<br />
List of the <code>data-i18n</code> [https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes global attributes] available:<br />
<br />
{| class="wikitable"<br />
|+ <br />
|-<br />
! style="width:170px;" | Attribute !! style="min-width:260px;" | Use !! Example<br />
|-<br />
| <code>data-i18n</code> || Replace the text inside an element || <code><nowiki><span data-i18n="strength">Strength</span></nowiki></code><br />
|-<br />
| <code>data-i18n-title</code> || Replace an element's <code>[https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title title]</code>-attribute || <code><nowiki><span data-i18n="constitution" title="Con determine how much health you have." data-i18n-title="constitution-title">Constitution</span></nowiki></code><br />
|-<br />
| <code>data-i18n-placeholder</code> || <code>[https://www.w3schools.com/TAGS/att_input_placeholder.asp placeholder]</code>-attribute || <code><nowiki><textarea name="attr_inventory" placeholder="backpack, 2 torches, dagger ..." data-i18n-placeholder="inventory-placeholder"></textarea></nowiki></code><br />
|-<br />
| <code>data-i18n-label</code> || || <br />
|-<br />
| <code>data-i18n-aria-label</code> || || <br />
|-<br />
| <code>data-i18n-alt</code> || Image description text || <br />
|-<br />
| <code>data-i18n-vars</code> || [[#Variable Replacement]] || <br />
|-<br />
| <code>data-i18n-dynamic</code> || [[#Dynamic Key Replacement]] || <br />
|-<br />
| <code>data-i18n-list</code> || [[#List Ordering]] || <br />
|-<br />
| <code>data-i18n-list-item</code> || || <br />
|}<br />
<br />
=== Sheet.json ===<br />
More details: [[Sheet.json#translation]]<br />
<br />
=== Step One, Sheet Formatting ===<br />
You will want to add the <code>data-i18n=[unique-key]</code>-attribute to every element that has text in it that you want translated. Keep all of the text that is already there in the element, because it can be used to generate your translation file for you when you are done (explained later). If you want further examples of how the i18n translations work, check out the [https://github.com/Roll20/roll20-character-sheets/blob/master/DD5thEditionLegacy/sheet.json D&D 5E by Roll20's sheet.json] sheet which has already been fitted with the i18n translations keys.<br />
<br />
Some of the advanced translation-methods uses [[Sheet Worker Scripts|sheetworkers]].<br />
<br />
====Standard Text====<br />
<pre data-language="html"><br />
<div class="col"><br />
<div class="row"><br />
<span data-i18n="acrobatics-u">ACROBATICS <span>(Dex)</span></span><br />
<input class="num" type="text" name="attr_npc_acrobatics" placeholder="0"><br />
</div><br />
<div class="row"><br />
<span data-i18n="animal-handling-u">ANIMAL HANDLING</span><br />
<input class="num" type="text" name="attr_npc_animal_handling" placeholder="0"><br />
</div><br />
<div class="row"><br />
<span data-i18n="arcana-u">ARCANA</span><br />
<input class="num" type="text" name="attr_npc_arcana" placeholder="0"><br />
</div><br />
<div class="row"><br />
<span data-i18n="athletics-u">ATHLETICS</span><br />
<input class="num" type="text" name="attr_npc_athletics" placeholder="0"><br />
</div><br />
<div class="row"><br />
<span data-i18n="deception-u">DECEPTION</span><br />
<input class="num" type="text" name="attr_npc_deception" placeholder="0"><br />
</div><br />
<div class="row"><br />
<span data-i18n="history-u">HISTORY</span><br />
<input class="num" type="text" name="attr_npc_history" placeholder="0"><br />
</div><br />
</div><br />
</pre><br />
Notice how every <code><nowiki><span></nowiki></code> in this code-block has the <code>data-i18n</code>-attribute with a key that references the text contained in the <code><nowiki><span></nowiki></code>. Also notice that there is HTML within the <code><nowiki><span></nowiki></code>, this is totally fine. The HTML will be marked by Crowdin so it is easy for them to copy and paste the HTML into their translation. While HTML is okay inside of the translation, try and keep it as simple as possible because the translators are most likely not code-savvy and may have issues copying the code if it's not simple. It is very important that every unique string has a unique key; notice that since this text is in all caps I'm using a -u at the end of each key. That is because these words show up later in the sheet, but are cased normally.<br />
<br />
There are some cases where you will want to add extra context to the key that the translator might not get from the the text alone, like with abbreviations.<br />
<pre data-language="html"><br />
<div class="row"><br />
<span data-i18n="components:-u">COMPONENTS:</span><br />
<input type="checkbox" name="attr_spellcomp_v" value="{{v=1}}" checked="checked"><br />
<span data-i18n="spell-component-verbal">V</span><br />
<input type="checkbox" name="attr_spellcomp_s" value="{{s=1}}" checked="checked"><br />
<span data-i18n="spell-component-somatic">S</span><br />
<input type="checkbox" name="attr_spellcomp_m" value="{{m=1}}" checked="checked"><br />
<span data-i18n="spell-component-material">M</span><br />
<input type="text" name="attr_spellcomp_materials" accept="Material" style="margin-left: 17px; width: 215px;" placeholder="ruby dust worth 50gp" data-i18n-place="ruby-dust-place"><br />
</div><br />
</pre><br />
Notice the keys for the <code>V</code>, <code>S</code>, and <code>M</code>-texts spells out exactly what the single character is referring to. Otherwise the translator would have no idea what <code>V</code> means. This way the translator can change <code>V</code> to the first letter of whatever <code>Verbal</code> is in their language, if it is different.<br />
<br />
====Datalist====<br />
If your sheet is adapted to use [[CSE]], you can have translations for your [[CSE#Datalist|datalist]] options.<br />
<br />
<pre style="overflow:auto;white-space:pre-wrap;" data-language="html"><br />
<input type="text" list="lister" name="attr_list_get" value=""><br />
<datalist id="lister"><br />
<option data-i18n="test">Test</option><br />
<option data-i18n="test2">Test2</option><br />
</datalist><br />
</pre><br />
<br />
<pre style="overflow:auto;white-space:pre-wrap;" data-language="json"><br />
{<br />
"test": "tester",<br />
"test2": "test2ada"<br />
}<br />
</pre><br />
<br />
There seems to be an issue with translation of datalists as the value of the option is entered as the value of the input which links to the list. The ARC sheet https://github.com/Roll20/roll20-character-sheets/tree/master/ARC has a workaround with a sheet worker that replaces the value with the translated text.<br />
<br />
<pre data-language="html" style="overflow:auto;"><br />
on("change:repeating_inventory:name", (eventInfo) => {<br />
const id = eventInfo.sourceAttribute.split("_")[2];<br />
const updateAttrs = {};<br />
const name = eventInfo.newValue.trim();<br />
let translation = getTranslationByKey(name)<br />
if (translation) {<br />
updateAttrs[`repeating_inventory_${id}_name`] = translation;<br />
<br />
const searchInputs = _.difference(GLOBAL__INVENTORY_INPUTS, ["name"]);<br />
_.each(searchInputs, (key) => {<br />
const attr = `repeating_inventory_${id}_${key}`;<br />
const i18n = `${name}_${key}`;<br />
<br />
// check if property exists in global<br />
if (GLOBAL__INVENTORY[name][key]) {<br />
updateAttrs[attr] = GLOBAL__INVENTORY[name][key];<br />
}<br />
// check if translation exists<br />
else if (getTranslationByKey(i18n)) {<br />
updateAttrs[attr] = getTranslationByKey(i18n);<br />
}<br />
});<br />
<br />
log(updateAttrs)<br />
setAttrs(updateAttrs, { silent: true });<br />
}<br />
});<br />
</pre><br />
<br />
====Element Attribute Text====<br />
Many times you will have text inside of an element attribute that needs translated, for example placeholder and titles. To replace the text in these attributes you can use <code>data-i18n-[attribute]='key'</code> to tell the parser that the key you are supplying is to be used to replace the text within the given attribute. For example if you were replacing the text in a placeholder attribute:<br />
<br />
<pre data-language="html"><input name="attr_weapon_name" data-i18n-placeholder="weapon-name" placeholder="Hand Axe" /><br />
</pre><br />
<br />
The supported attributes are: <code>title</code>, <code>alt</code>, <code>aria-label</code>, <code>label</code>, <code>placeholder</code><br />
<br />
=====Tricky scenarios=====<br />
<br />
It can become tricky in some scenarios, with elements breaking if you are using the wrong i18n attribute. For instance a <code>select</code> element could look like this (extract from the Fading Suns v2.75 sheet):<br />
<br />
<pre data-language="html"><br />
<select class="fs-table-cell" name="attr_power_characteristic"><br />
<option value="" selected></option><br />
<optgroup label="Body" data-i18n-label="body"><br />
<option value="strength" data-i18n="strength">Strength</option><br />
<option value="dexterity" data-i18n="dexterity">Dexterity</option><br />
<option value="endurance" data-i18n="endurance">Endurance</option><br />
</optgroup><br />
<optgroup label="Mind" data-i18n-label="mind"><br />
<option value="wits" data-i18n="wits">Wits</option><br />
<option value="perception" data-i18n="perception">Perception</option><br />
<option value="tech" data-i18n="tech">Tech</option><br />
</optgroup><br />
<optgroup label="Spirit" data-i18n-label="spirit"><br />
<option value="presence" data-i18n="presence">Presence</option><br />
<option value="will" data-i18n="will">Will</option><br />
<option value="faith" data-i18n="faith">Faith</option><br />
</optgroup><br />
</select><br />
</pre><br />
<br />
Notice how <code>optgroup</code> is using <code>data-i18n-label</code>. If you were to use a <code>data-i18n</code> like you are for <code>option</code>, then the <code>select</code> element would not display properly (it would show the <code>optgroup</code>'s but not the <code>option</code>'s).<br />
<br />
====Variable Replacement====<br />
If you need to have some text translated and other pieces of the text not translated, you can use the <code>data-i18n-vars</code> attribute to define text that should not be translated. Separate each bit of text that should not be translated with a vertical bar (i.e. <code>|</code>). This makes an array of text to be inserted untranslated. You reference this text in the translation.json using <code>{{[index]}}</code> to reference the specific row of the array. Remember that arrays are indexed from 0. This looks like:<br />
<br />
'''HTML'''<br />
<pre data-language='html' style="white-space:pre-wrap;"><br />
<span data-i18n="translated text" data-i18n-vars=", but this isn't|neither is this">This is translated{{0}},and{{1}}</span><br />
</pre><br />
'''Translation.json'''<br />
<pre data-language='json' style="white-space:pre-wrap;"><br />
{<br />
"translated text":"This is translated{{0}},and{{1}}"<br />
}<br />
</pre><br />
<br />
All pieces of text that are not going to be translated for a given element are put in the <code>data-i18n-vars</code> attribute, regardless of which <code>data-i18n</code> property they are actually going to be used in. For instance the below code will create an action button with a title property that has the ability reference call (not translated), and help text for interacting with the action button(translated):<br />
<br />
'''HTML'''<br />
<pre data-language='html' style="white-space:pre-wrap;"><br />
<button type='action' name='act_title_demo' data-i18n-title="title demo" data-i18n-vars="%{title_demo} ⦀ " title='{{0}}alt-click to sell dice'>Click Me!</button><br />
</pre><br />
'''Translation.json'''<br />
<pre data-language='json' style="white-space:pre-wrap;"><br />
{<br />
"title demo":"{{0}}alt-click to sell dice"<br />
}<br />
</pre><br />
Note that if you have translation text that you use for several elements that uses this variable functionality, all the elements must have a data-i18n-vars property. This allows a single translation key to be used across several use cases. For instance, the below code creates two buttons, each with a title referencing the ability call required to call that button, as well as help text about how to sell dice. All with a single translation key.<br />
<br />
'''HTML'''<br />
<pre data-language='html' style="white-space:pre-wrap;"><br />
<button type='action' name='act_purchase_d8' data-i18n-title="title demo" data-i18n-vars="%{purchase_d8} ⦀ " title='{{0}}alt-click to sell dice'>d8</button><br />
<button type='action' name='act_purchase_d10' data-i18n-title="title demo" data-i18n-vars="%{purchase_d10} ⦀ " title='{{0}}alt-click to sell dice'>d10</button><br />
</pre><br />
'''Translation.json'''<br />
<pre data-language='json' style="white-space:pre-wrap;"><br />
{<br />
"title demo":"{{0}}alt-click to sell dice"<br />
}<br />
</pre><br />
However, an important limitation of this to keep in mind is that if you forget the <code>data-i18n-vars</code> property on an element, it's translated text will not recognize the variable call correctly, and will simply put the call in the text. As an example, if our sheet had a third button in addition to the two in the code above:<br />
<br />
'''HTML'''<br />
<pre data-language='html' style="white-space:pre-wrap;"><br />
<button type='action' name='act_purchase_d12' data-i18n-title="title demo" title='{{0}}alt-click to sell dice'>d8</button><br />
</pre><br />
This would simply have a title that would show the array reference instead of omitting it.<br />
<br />
====Dynamic Key Replacement====<br />
There are some situations where you need to fetch a translation based off of a changing key. For example, you have a "class selection" dropdown menu where the user can select their class. The class names that show up in this list can be translated using the normal tools. But, you cannot translate the value inside of the option in the select box. (we do this so that if you change languages, the sheet data doesn't have to be translated. The translation system stays purely in the front-end and not in the data layer) Instead, where you want to display this class name, translated, you mark the span with the attribute <code>data-i18n-dynamic</code>. This will tell the parser to use the value that would normally show up in the span as the key to fetch a translation.<br />
<br />
<pre data-language="html"><br />
// This part doesn't have to change<br />
<select class="hiding" name="attr_class" style="width: 64px;"><br />
<option value="Barbarian" data-i18n="barbarian">Bárbaro</option><br />
<option value="Bard" data-i18n="bard">Bardo</option><br />
<option value="Cleric" data-i18n="cleric">Clerigo</option><br />
<option value="Druid" data-i18n="druid">Druida</option><br />
</select><br />
...<br />
<span data-i18n="class-options">Class Options</span> (<span name="attr_class" data-i18n-dynamic></span>)<br />
...<br />
{<br />
"Barbarian":"Bárbaro",<br />
"Bard":"Bardo",<br />
"Cleric":"Clerigo",<br />
"Druid":"Druida"<br />
}<br />
</pre><br />
<br />
Now, with the above code, when you select "Bárbaro" from the select box, "Barbarian" will be saved under attr_class. But when the sheet refreshes and the span with <code>name="attr_class"</code> would normally be filled in with "Barbarian", instead "Barbarian" will be used as the key to reference the translation JSON and display "Bárbaro" instead.<br />
<br />
====Roll Queries====<br />
<br />
Text in roll queries cannot be translated in the character sheet HTML, however using [[Sheet Worker Scripts]] and attributes, the text can be translated in JavaScript and substituted into the roll query.<br />
<br />
<pre data-language="javascript"><br />
<script type="text/worker"><br />
<br />
on("sheet:opened", function(eventInfo){<br />
<br />
setAttrs({<br />
bonusmacro: getTranslationByKey("ask-bonus")<br />
}); <br />
<br />
});<br />
<br />
</script><br />
...<br />
<span style="display: none" data-i18n="ask-bonus">What is your bonus?</span><br />
<button type='roll' value='[[d20 + ?{@{bonusmacro}|0}]]' ></button><br />
</pre><br />
<br />
The <code><nowiki><span></nowiki></code> tag will not appear, but it will cause the key <code>ask-bonus</code> to be included in the generated translation file. The script will create an attribute called <code>bonusmacro</code> with the value <code>What is your bonus?</code>, and the roll button will use that value to send the command, <code><nowiki>"[[d20 + ?{What is your bonus?|0}]]"</nowiki></code>. If the sheet is opened while another translation file is active, it will set the attribute to the new translated value for <code>bonusmacro</code>. This technique can be used to substitute individual keys, or a single attribute can be used to store a complex query, with the Sheet Worker Script inserting translated keys into the query code as needed.<br />
<br />
<pre data-language="javascript"><br />
<script type="text/worker"><br />
on("sheet:opened", function(eventInfo){<br />
<br />
setAttrs({<br />
rollquery: "?{" + getTranslationByKey("advantageordisadvantage") +"|" + getTranslationByKey("neither") + ",d20|" + getTranslationByKey("advantage") + ",2d20kh1[" + getTranslationByKey("withadvantage") + "]|" + getTranslationByKey("disadvantage") + ",2d20kl1[" + getTranslationByKey("withdisadvantage") + "]}",<br />
});<br />
<br />
});<br />
<br />
</script><br />
...<br />
<span style="display: none" data-i18n="advantageordisadvantage">Are you rolling with Advantage or Disadvantage?</span><br />
<span style="display: none" data-i18n="neither">Neither</span><br />
<span style="display: none" data-i18n="advantage">Advantage</span><br />
<span style="display: none" data-i18n="withadvantage">with Advantage</span><br />
<span style="display: none" data-i18n="disadvantage">Disadvantage</span><br />
<span style="display: none" data-i18n="withdisadvantage">with Disadvantage</span><br />
<button type='roll' value='[[@{rollquery}]]' ></button><br />
</pre><br />
<br />
This example will create the following roll using the default translation file<br />
<br />
<nowiki>[[?{Are you rolling with Advantage or Disadvantage?|Neither,d20|Advantage,2d20kh1[with Advantage]|Disadvantage,2d20kl1[with Disadvantage]}]]</nowiki><br />
<br />
====getTranslationByKey([key])====<br />
<br />
A synchronous function which immediately returns the translation string related to the given key. If no key exists, false will be returned and a message in the console will be thrown which list the specific key that was not found in the translation JSON.<br />
<br />
====[[BCS/Roll Templates|Roll Templates]]====<br />
Static HTML inside of the sheet's roll template definition can use all of the above tools, including Dynamic Keys. If it is in the sheet's [[BCS/Roll Templates|rolltemplate]] definition, code like <code><span data-i18n-dynamic><nowiki>{{strength-key}}</nowiki></span></code> will give the translated value of whatever is the value of <code><nowiki>{{strength-key}}</nowiki></code>. If you would like to send dynamically translated values inside of a roll function, use the tool below.<br />
<br />
Inside of a roll function, using a roll template, you can wrap any text in <code>^{ [key] }</code> to denote the text as a translation key. This text will be replaced with the translated version associated with that key. This step happens after character sheet values are swapped in, so <code>^{ @{ability_key} }</code> where <code>ability_key = STRENGTH</code> will be parsed as <code>^{STRENGTH}</code> and will display whatever translation value you have for <code>STRENGTH</code>. This also works on the key, for the key/value pairs used in the <code>allprops()</code> function.<br />
<br />
'''Example:''' <code>{{^{TEXT}=@{content} }}</code> will have the translation value for <code>TEXT</code> as <code><nowiki>{{key}}</nowiki></code> inside of the <code>allprops()</code> function.<br />
<br />
====List Ordering====<br />
If you have a list of items in a container, that in English is alphabetically ordered, and you want to be able to change the order in other languages you can use this tool. The re-ordering will respect all current formatting in the list, so even if your list spans several sub-containers, everything should remain formatted the same way.<br />
<br />
Identify the container. All list items must be inside of the container, or they will be ignored:<br />
<code><nowiki>data-i18n-list="list-key"</nowiki></code><br />
<br />
Identify the individual items in the list. These items can be a block of HTML. When they are reordered, the whole block will be moved.<br />
<code><nowiki>data-i18n-list-item="item-key"</nowiki></code><br />
<br />
(Optional) The "starting" order of the list is assumed to be read top-down in the HTML. If your order is different, you can manually number the items (starting at 1) to set the order.<br />
<code><nowiki>data-i18n-list-item-num="1"</nowiki></code><br />
<br />
(Special) This is not a tag that you will "use", it is a tag that will be created if there is an error with your formatting. If there is an error with your List Order code, the list will be ignored and this tag will be created on the list container element with the error. If you are not seeing the list be reordered, like you expect, check the parent element for an error.<br />
<code><nowiki>data-i18n-error="Error Message"</nowiki></code><br />
<br />
Add the key to your translation file. This will contain a comma-delimited list of all of the item keys, in the language of the original translation. Reordering these keys will reorder the items. The list key can be used for several lists, if all of the items being sorted are the "same" items. The HTML doesn't have to be the same, only the words that are being sorted. For example, a list of "Skills" in D&D may show up in several places on a sheet with totally different HTML but they can all use the same list key. I will use the example code below so generate my list key.<br />
<code><nowiki>"skills-list":"acrobatics,arcana,sleight-of-hand,survival"</nowiki></code><br />
<br />
To reorder this list for the Czech language, the list key value would look like:<br />
:<code><nowiki>"skills-list":"acrobatics,sleight-of-hand,arcana,survival"</nowiki></code><br />
<br />
{{ex}}<br />
<pre data-language="html"><br />
<div data-i18n-list="skills-list"> // Label your list container and point it to the key it will use to set the order<br />
<div> // notice that the items are in a sub-container, these columns will still exist after the reordering happens<br />
<div data-i18n-list-item="acrobatics"> // Label your list items, these are the blocks that will be reordered<br />
<span data-i18n="acrobatics-u">ACROBATICS</span><br />
<input type="text" name="attr_npc_acrobatics" placeholder="0"><br />
</div><br />
<div data-i18n-list-item="arcana"><br />
<span data-i18n="arcana-u">ARCANA</span><br />
<input type="text" name="attr_npc_arcana" placeholder="0"><br />
</div><br />
</div><br />
<div><br />
<div data-i18n-list-item="sleight-of-hand"><br />
<span data-i18n="sleight-of-hand-u">SLEIGHT OF HAND</span><br />
<input type="text" name="attr_npc_sleight_of_hand" placeholder="0"><br />
</div><br />
<div data-i18n-list-item="survival"><br />
<span data-i18n="survival-u">SURVIVAL</span><br />
<input type="text" name="attr_npc_survival" placeholder="0"><br />
</div><br />
</div><br />
</div><br />
</pre><br />
<br />
The same example only, rather than having the list go down the columns then across, we're going to have the list go across the columns then down:<br />
<pre data-language="html"><br />
<div data-i18n-list="skills-list"><br />
<div><br />
<div data-i18n-list-item="acrobatics" data-i18n-list-item-num="1"><br />
<span data-i18n="acrobatics-u">ACROBATICS</span><br />
<input type="text" name="attr_npc_acrobatics" placeholder="0"><br />
</div><br />
<div data-i18n-list-item="sleight-of-hand" data-i18n-list-item-num="3"><br />
<span data-i18n="sleight-of-hand-u">SLEIGHT OF HAND</span><br />
<input type="text" name="attr_npc_sleight_of_hand" placeholder="0"><br />
</div><br />
</div><br />
<div><br />
<div data-i18n-list-item="arcana" data-i18n-list-item-num="2"><br />
<span data-i18n="arcana-u">ARCANA</span><br />
<input type="text" name="attr_npc_arcana" placeholder="0"><br />
</div><br />
<div data-i18n-list-item="survival" data-i18n-list-item-num="4"><br />
<span data-i18n="survival-u">SURVIVAL</span><br />
<input type="text" name="attr_npc_survival" placeholder="0"><br />
</div><br />
</div><br />
</div><br />
</pre><br />
<br />
===Step Two, Generating the Translation File===<br />
Once you have formatted your sheet, following the instructions above, you can very easily create your translation file. After loading your sheet within the editor,''' go into the game,''' and there open the Developer Tools for your browser and go to the console. <br />
<br />
At the very bottom of the console, where you can enter code, type <code>console.log(i18nOutput)</code> (or just <code>i18nOutput</code>). (it will most likely start to auto-complete once you start typing)<br />
<br />
Hit enter to retrieve this object, and it will dump a JSON string containing all of the keys you have used with the corresponding text from within the element/placeholder. You should be able to then copy this text into your favorite JSON formatter (optional, but recommended) and then into the "Translation" tab in the Game Settings Custom Sheet area.<br />
<br />
If you wish to create the translation.json manually, you can use the following format:<br />
<pre data-language="json"><br />
{<br />
"key": "string",<br />
"key-2": "Another string."<br />
}<br />
</pre><br />
<br />
Once you have your formatted sheet and the translation JSON saved for your custom sheet, it should look exactly like it did before you translated everything, assuming everything was done correctly.<br />
<br />
If you see any red text like <code>{{red|[translation-key]}}</code>, it means a key you have defined in the HTML, but have not entered into the <code>translation.json</code>. If you use the <code>.json</code> generated by the system, you should not see any of these.<br />
<br />
Once you have a working translation file, you can upload this with the rest of your sheet code to the root of your character sheet folder as <code>translation.json</code>. This will automatically be picked up by our system and uploaded to CrowdIn, where it can then be translated.<br />
<br />
===Other===<br />
<br />
==== Changing your Translation ====<br />
{{mbox | text = '''Note:''' Roll20 prefers editing of (existing) translations to be handled through the [https://crowdin.com/ CrowdIn]-service. More info found at:[[Translation]]}} <br />
<br />
If you wish to change your translation after it has already been generated, you can edit your <code>translation.json</code> file, and the changes will be propagated to the language files the next time translations are updated. However, certain changes will not cause translation values to be overwritten, even if the values haven't been translated yet. In other words, sometimes changes to the <code>translation.json</code> will not show up in your sheet.<br />
<br />
Changes that will not trigger an update include changes where the only difference is white space or special characters, and changes that only remove characters and do not change or add new characters.<br />
<br />
====Changing Language-Specific Looks====<br />
{{orange| might currently be broke for images or in general. See {{repo|Roll20/roll20-character-sheets/issues/9053 issue #9053}} and [[BCS/Bugs]] for more details. [[User:1223200|1223200]] ([[User talk:1223200|talk]]), 10 October 2021 }}<br />
<br />
Sometimes, sections of a sheet is coded in a way that makes sense for the original language, but may cause troubles in other languages if the translated text for the section is considerably longer or shorter than the default. In those cases, you can create <code>CSS</code> rules to make some parts of the sheet look/behave differently when a specific language is used with the sheet.<br />
<br />
A class to the parent <code>.charsheet</code>-element to let you have separate css for individual languages, in the form of <code>lang-[2 char language code]</code>, so if the language is English, you use <code>.lang-en</code>; with French, use <code>.lang-fr</code>, with Swedish, use <code>.lang-sv</code>. This will allow you, after your sheet has been translated, to change a style, specifically for one language, if the new text for that language doesn't fit your current design. <br />
<br />
'''Example: Change width of section'''<br />
<br />
A radio "button"(the area you click on) and the "button"'s width is designed to fit the word "Core", but doesn't work well if the word is longer, in which case the two need to be made wider and adjusted to the width of the word for the given language. [https://github.com/Roll20/roll20-character-sheets/tree/master/DD5thEditionLegacy D&D 5E by Roll20 Legacy code]<br />
<br />
<pre data-language="html"><br />
<div class="container pc"><br />
'''<input class="tab-button core" name="attr_tab" type="radio" value="core" checked="checked"/><span data-i18n="core-u">CORE</span>'''<br />
<input class="tab-button bio" name="attr_tab" type="radio" value="bio"/><span data-i18n="bio-u">BIO</span><br />
<input class="tab-button spells" name="attr_tab" type="radio" value="spells"/><span data-i18n="spells-u">SPELLS</span><br />
<input class="tab-button options" name="attr_tab" type="radio" value="options"/><span style="font-family: pictos">y</span><br />
<div class="page core"><br />
<div class="header"><br />
/* stuff in header section */<br />
</div><br />
/* stuff on page core */<br />
</div><br />
/* rest of the Player character sheet */<br />
</div><br />
</pre><br />
<br />
<pre data-language="css"><br />
/* The original width of the "button" displaying the word "Core" */<br />
input[type=radio].sheet-tab-button.sheet-core,<br />
input[type=radio].sheet-tab-button.sheet-core + span {<br />
right: 116px;<br />
width: 45px; }<br />
<br />
/* The shifted position and increased width for the same "button", making the longer */<br />
.lang-es input[type=radio].sheet-tab-button.sheet-core,<br />
.lang-es input[type=radio].sheet-tab-button.sheet-core + span {<br />
right: 137px;<br />
width: 76px; }<br />
</pre><br />
<br />
(The "bio" and "spells" buttons ahve similar adjustments)<br />
<br />
'''Images'''<br />
<br />
This can even be used to change what images are show on a sheet. One example could be to replace the default game's logo with an image that shows the translated version of the logo, if such exists. The [https://github.com/Roll20/roll20-character-sheets/tree/master/Forbidden_Lands Forbidden Lands] sheet by '''Vince''' is a sheet that have made it so that the sheet will show the Swedish logo/name (Svärdet's Sång) if you have your account set to Swedish.<br />
<br />
'''Forbidden Lands Example'''<br />
<br />
The Logo at the top of the sheet will display the image spelling "Forbidden Lands" by default, and if an account is set to Swedish, it will display the image spelling "Svärdets Sång"(the Swedish name of the game).<br />
<br />
<pre data-language="html"><br />
<div class="logo" title="FORBIDDEN LANDS" data-i18n-title="logo-forbidden-lands"><br />
<span class="sheet-logo-image lang-sv"></span><br />
</div><br />
</pre><br />
<br />
<pre data-language="css"><br />
/* defines the default behaviour */<br />
span.sheet-logo-image {<br />
background-image: url(https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/Forbidden_Lands/images/FBL_logo.png);<br />
background-size: contain;<br />
background-repeat: no-repeat;<br />
width: 220px;<br />
height: 70px; <br />
margin: -15px 0 0 0;<br />
display: inline-block;<br />
}<br />
/* defines the changes to the section if the user account is set to Swedish */<br />
.charsheet span.logo-image.lang-sv {<br />
background-image: url(https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/Forbidden_Lands/images/FBL_logo_sv.png);<br />
}<br />
</pre><br />
<br />
====ACSI====<br />
'''{{repo|Anduh/acsi ACSI - Automated Character Sheet Internationalizer}}''' A Linux command line tool that can save a bunch of time by automatically adding the sections to the code and creating the <code>translation.json</code>-file. Created by [[Andreas J.]]<br />
<br />
If a HTML-file contains no translation tags, is well formatted, and doesn't have [[Roll Templates]] or [[Sheetworkers]](script will make nonsensical changes to these sections if not removed), ACSI should be able to do a good job of creating a new version of the file that have the i18n-keys added. It's not perfect, so it will usually give a result that need to be cleaned up a bit, and on some sheets might not give a useful result at all.<br />
<br />
It's suggested you save a version of the sheet that have the roll templates & sheetworkers removed and use that file with ACSI, and then add back them to the file afterwards to be able to inspect the result. ACSI can also generate the <code>translation.json</code>-file, which is a bit easier than having to create/copy it from developer web tools as suggested in the previous sections.<br />
<br />
If you don't have the option to run the script yourself, you can contact {{user profile|1223200|Andreas J.}} and he can test how well the script does with your sheet and give you the result.<br />
<br />
==Submitting your changes to Roll20==<br />
{{main|Beginner's Guide to GitHub}}<br />
<br />
Roll20 prefers updates to sheets that already have translations enabled should go through [[CrowdIn]], but if the i18n keys aren't in the sheet code, you need to submit your updated version to GitHub.<br />
<br />
Alternative Guide: [[Short Git Guide]]<br />
<br />
<br />
= See Also =<br />
* '''[[Building Character Sheets]]'''<br />
** [[Sheet Worker Scripts|Sheetworkers]]<br />
** [[Building_Character_Sheets/Roll_Templates|Roll Templates - Create/Edit]]<br />
** [[Andreas Guide to Sheet Development]]<br />
** [[Sheet Author Tips]]<br />
* [[Translation]] Translating Roll20 in general, and about ''CrowdIn''<br />
* [[Roll Templates]] - General use <br />
* {{hc|articles/360037773493-Character-Sheet-Translation Character-Sheet-Translation}} - ([[Help Center]] is usually outdated/lacking on sheet development documentation compared to the Community Wiki<br />
<br />
[[Category:Docs]]<br />
[[Category:Sheetworker]]<br />
[[Category:Character Sheet Creation]]<br />
[[Category:New features in 2016]]<br />
[[Category:Language]]<br />
[[Category:json]]</div>1223200https://wiki.roll20.net/Character_Sheet_Development/TutorialsCharacter Sheet Development/Tutorials2023-12-12T04:00:49Z<p>1223200: Update links to GiGs' guides</p>
<hr />
<div><noinclude>{{revdate}}{{BCS}} {{NavSheetDoc}}<br />
{{main|Building Character Sheets}}<br />
Tutorials to Roll20's [[Character Sheet Development]]-framework, & tips to get started. See also the [[Character Sheet Development/Complete Examples|Sheet Examples]] & [[Character Sheet Development/Sheet Templates|Sheet Templates]].__NOTOC__</noinclude><br />
=Tutorials=<br />
<br />
==[[GiGs]]==<br />
In 2022, [[GiGs]] started writing a Roll20 Sheet Author Guide at [https://cybersphere.me/ cybersphere.me], breaking it down by topic. Articles are simple & approachable.<br />
* Forum discussion of the guide: [https://app.roll20.net/forum/permalink/10824110/ Sheet Author Guide: Using HTML] April 22, 2022<br />
<br />
Below are listed a few highlights:<br />
* [https://cybersphere.me/roll20-sheet-author-master-list/ Roll20 Sheet Master List] Guide for Roll20 Sheet Authors - Groups articles by topic<br />
* [https://cybersphere.me/guide-to-the-guide/ Guide to the Guide] shorter rundown of some general sheet author stuff.<br />
** [https://cybersphere.me/publishing-sheets-to-github/ Publishing Sheets to GitHub]<br />
** [https://cybersphere.me/html-building-blocks/ HTML – The Building Blocks] - further split into smaller pages<br />
*** [https://cybersphere.me/inputs-and-attributes/ Inputs and Attributes]<br />
** [https://cybersphere.me/guide-to-rolltemplates-and-translations/ RollTemplates and Translation] Aug. & Dec. 2023<br />
** CSS<br />
*** [https://cybersphere.me/hiding-and-revealing-things-with-css/ How To Hide and Reveal Things With CSS]<br />
*** [https://cybersphere.me/avoid-using-inline-styles/ Avoid Using Inline Styles]<br />
*** [https://cybersphere.me/dont-use-table-use-grid/ Don’t Use TABLE – use GRID]<br />
<br />
==[[A Sheet Author's Journey]]==<br />
{{:Sheet Author's Journey}}<br />
<br />
<br />
==Other==<br />
* {{yt.be|v-sJ_Qr-0CM Roll20 custom sheet step by step}} 5min (Sept. 2021) by GM Mike<br />
* [https://www.debigare.com/creating-a-paranoia-25th-anniversary-edition-character-sheet-for-roll20/ Creating a Paranoia 25th Anniversary Edition character sheet for Roll20] Blog post<br />
* {{yt.be|k6wDQJnGJCk PT1 coding a Roll20 Character Sheet}} 40min (April 2021)<br />
* {{yt.be|1=NXE1EQ4eJ48?t=1205 Working on a Roll20 Sheet for Romance of the Perilous Land}} 120min stream, by "Live from Pellam's Wasteland" - show basics on how HTML work in Roll20, create from scratch.<br />
* {{yt.be|UxDQ5oa-Ocs Roll20 tutorial custom character sheet I made my own Roll20 custom character sheet}} 8 min (Sept 2021) -- explains the sheet editor, and how they made their sheet<br />
<noinclude><br />
<br />
=Resources=<br />
==Translation==<br />
See [[Character Sheet Translation]] for how internationalization of sheets work. <br />
<br />
==Tools==<br />
To truly test sheets, one needs to do so inside Roll20 using either available tool, and any try at offline/local testing will lack connection to Roll20's backend & the default CSS libraries/styling Roll20 has for character sheet elements.<br />
* [[Sheet Sandbox]]<br />
* [[Sheet Editor]]<br />
* [[VS Code]] Great cross-platform code editor, which even have a few Extensions specifically for Roll20 sheet development.<br />
==See Also==<br />
* [[Character Sheet Development/Bugs & Quirks]]<br />
* [[Character Sheet Development/Common Mistakes]]<br />
* [[Character Sheet Development/Complete Examples|Sheet Examples]]<br />
* [[Character Sheet Development/CSS]]<br />
** [[Designing Character Sheet Layout]]<br />
** [[Image use in character sheets]]<br />
* [[Sheet Author Tips]]<br />
* [https://github.com/Roll20/roll20-character-sheets Character Sheet Repository]<br />
[[Category:Character Sheet Creation]]<br />
[[Category:Character Sheet Development]]</noinclude></div>1223200https://wiki.roll20.net/Default_Sheet_SettingsDefault Sheet Settings2023-12-12T03:31:07Z<p>1223200: cleanup msg</p>
<hr />
<div>{{revdate}}{{BCS}}<br />
{{cleanup-msg|1=According to [https://app.roll20.net/forum/post/11603811/every-sheet-author-should-read-this/?pageforid=11603811#post-11603811 this Sept. 2023 thread], there are errors on page on when '''default''' vs. '''value''' is used for values.|2=December 2023}}<br />
This is documentation for how the '''Default Sheet Settings''' are constructed, aimed at [[Sheet Authors|sheet authors]] & creators.<br />
{{NavSheetDoc}}<br />
For the '''Default Sheet Settings''' in your game, see '''[[Game_Settings_Page#Default_Sheet_Settings|Game Settings Page - Default Sheet Settings]]'''.<br />
<br />
<br />
'''Default Settings''' for character sheets is a feature available for some [[Character Sheets]] found in the [[Add_character_sheet#Adding_a_Character_Sheet_to_your_Campaign|Sheet Selection Dropdown]]. Default Sheet Settings can't be used with [[Using_Custom_Character_Sheets|custom character sheets]].<br />
<br />
They can be used to make changes in the default information, options, and presentation of [[Journal#Adding_Characters|new characters added inside a game]]. If a Character Sheet(available from the drop-down menu) have Default Settings available, they can be found on the [[Game_Settings_Page#Default_Sheet_Settings|Game Settings Page]]. Changing any Default Settings doesn't affect existing character sheets, but every new character created afterwards use the new defaults.<br />
<br />
'''To apply the Default Settings to all existing Character Sheets''', the GM can go to the {{My Settings}}-tab, and scroll to the bottom where a '''[[My_Settings#Apply_Default_Settings|Apply Default Settings]]'''-button can be seen.<br />
<br />
The [[Sheet_Sandbox#Game_Default_Settings|Sheet Sandbox]] can be used for testing Default Sheet Settings.<br />
[[File:Default-Settings-Example.png|400px|thumbnail|right|Some of the Default Settings of [[D&D 5E by Roll20]]]]<br />
<br />
Default Sheet Settings are stored on the '''useroptions''' section of the [[sheet.json]]-file. These settings can be updated easily in the [[Game_Settings_Page#Default_Sheet_Settings|Game Settings]].<br />
__TOC__<br />
===Common Usage===<br />
* Change if new sheets are Player or NPC by default. Example: [[D&D 5E by Roll20]]<br />
** If all player sheets have been made, it can be handy for the GM to change so any new sheets are NPC right away, saving a few clicks if they need to quickly create a new character.<br />
* Set default values for starting gold/credit/character points/attributes/health for a new character. Example: [[Star Wars WEG D6 character sheet|Star Wars D6]]<br />
** In many games, lvl.1/starter characters start with a set number for several stats, but if a game is started at a higher level, or with homebrew rules, it can be handy to have characters have the right values right of the bat, so the GM doesn't have to go correct each sheet before giving them to the player.<br />
* Toggle various user options, cosmetic or practical. Example: [[Star Wars WEG D6 character sheet|Star Wars D6]]<br />
** turn on/off popups that asks for roll modifiers before each roll<br />
** change if character name is shown on the roll template<br />
** changing character sheet and/or roll-template color/layout<br />
** hiding/revealing sheet sections, like hiding magic section from characters who don't have access to it<br />
* Change a shared stat between players. Example: [[Stargate|Stargate RPG]] Tension Die usually changes from session to session.<br />
** If the GM isn't a Pro user, they would be forced to manually edit each sheet if there is no Def Sheet Settings for the stat that could be used for changing the stat campaign-wide.<br />
* Token bar settings for [[Compendium#Drag_and_Drop_Functionality|Compendium Drag&drop]]<br />
<br />
==For sheet authors==<br />
<br />
==="useroptions" options===<br />
See also the example section down the page<br />
<br />
* '''attribute''' - the name of the sheet attribute changed with this option. Don't include the <code>attr_</code> part.<br />
* '''displayname''' - The short desc. of what the setting does<br />
* '''displaytranslationkey''' - i18n [[Character Sheet Translation|translation key]] for translation into other languages(not needed if sheet doesn't use translations)<br />
* '''description''' - for giving further detail about the option and the changes it controls. Text is displayed in a smaller font than '''displayname'''<br />
* '''descriptiontranslationkey''' - i18n translation key used for the description (not needed if sheet doesn't use translations)<br />
* '''type''' - the HTML input element to be used in [[Game Settings Page]]. Options are:<br />
** <code>text</code><br />
*** '''value''' - set the default value for the text input<br />
** <code>number</code><br />
*** '''value''' - set the default value for the number input<br />
** <code>checkbox</code><br />
*** '''value''' - set the value of the checkbox if checked<br />
*** '''checked''' - If you want a checkbox checked by default, add <code>"checked": "checked",</code> under the attribute<br />
** <code>select</code><br />
*** '''options''' - If the setting-type is <code>select</code>. Storing the key/value pairs are listed here<br />
*** '''optiontranslationkeys''' - i18n translation keys for the options (not needed if sheet doesn't use translations)<br />
*** '''default''' - the default value of the select. If used for a select input with multiple options, set this to the value of the wanted default selection, not including the key.<br />
** <code>radio</code> - radio does not appear to work at this time.<br />
<br />
===Testing your <code>sheet.json</code> file===<br />
<br />
Default Sheet Settings may be tested via the [[Sheet Sandbox]].<br />
<br />
Every time you want to test out a new [[sheet.json]] file, you have:<br />
* copy its contents in the "Sheet.json Editor" section of the settings page of the sandbox (which URL looks like https://app.roll20.net/sheetsandbox/settings/#######)<br />
* click the "Reload Default Sheet" in the sandbox itself (url: [https://app.roll20.net/editor/ https://app.roll20.net/editor/]).<br />
<br />
<br />
If you [https://github.com/Roll20/roll20-character-sheets/search?q=%22useroptions%22%3A&unscoped_q=%22useroptions%22%3A search the Roll20 Sheet repository] for uses of <code>"useroptions"</code> you can find further examples of Default option in usage.<br />
<br><br><br />
<br />
== Examples ==<br />
Few examples of Default Settings currently in use.<br />
<br />
{{repo|Roll20/roll20-character-sheets/blob/master/Star%20Trek%20Adventures%20by%20Roll20/sheet.json Star Trek Adventures}} is a simple example, while {{repo|Roll20/roll20-character-sheets/tree/master/DD5thEditionLegacy/sheet.json D&D 5e by Roll20}} & {{repo|roll20-character-sheets/blob/master/Pathfinder%20by%20Roll20/sheet.json Pathfinder Official}} have a ton of settings.<br />
<br />
==={{repo|Roll20/roll20-character-sheets/blob/master/Fate%20Core%20v2/sheet.json Fate Core}} by MagooChris===<br />
Contains example of text inputs, checkboxes(some checked by default), default values, and use of language tags for multilingual support. <br />
<pre style="overflow:auto;white-space:pre-wrap;" data-language="json"><br />
"useroptions": [<br />
{<br />
"attribute": "show_hints_flag",<br />
"displayname": "Show First Time Hints",<br />
"displaytranslationkey": "ShowHints-Q",<br />
"type": "checkbox",<br />
"value": "1",<br />
"checked": "checked",<br />
"description": "Show hints that might be useful for first time players or those upgrading from the previous sheet design.",<br />
"descriptiontranslationkey": "ShowHints-D"<br />
},<br />
{<br />
"attribute": "run_firstTime_setup",<br />
"displayname": "Run First Time Setup",<br />
"displaytranslationkey": "RunFirstTimeSetup-Q",<br />
"type": "checkbox",<br />
"value": "1",<br />
"checked": "checked",<br />
"description": "Run scripts to setup the sheet for a default character.",<br />
"descriptiontranslationkey": "RunFirstTimeSetup-D"<br />
},<br />
{<br />
"attribute": "default_stressSkills",<br />
"displayname": "Default Stresses and Skills",<br />
"displaytranslationkey": "DefaultStressSkill-Q",<br />
"type": "text",<br />
"default": "Physical:Physique,Mental:Will",<br />
"description": "When setting up a default sheet, what stress tracks and their guiding skill should be set up? e.g. \"Mental:Will,Extra:3\"",<br />
"descriptiontranslationkey": "DefaultStressSkill-D"<br />
},<br />
{<br />
"attribute": "attr_default_consequences",<br />
"displayname": "Default Consequences",<br />
"displaytranslationkey": "DefaultConsequences-Q",<br />
"type": "text",<br />
"default": "2,4,6",<br />
"description": "When setting up a default sheet, what consequences are the default consequences? e.g. \"2,4,6\"",<br />
"descriptiontranslationkey": "DefaultConsequences-D"<br />
},<br />
{<br />
"attribute": "show_conditions_flag",<br />
"displayname": "Use Conditions instead of Consequences",<br />
"displaytranslationkey": "ShowConditions-Q",<br />
"type": "checkbox",<br />
"value": "1",<br />
"description": "Use the Conditions from the Fate Toolkit to replace Consequences",<br />
"descriptiontranslationkey": "ShowConditions-Q"<br />
},<br />
{<br />
"attribute": "show_phase0_flag",<br />
"displayname": "Show Phase 0 Tab",<br />
"displaytranslationkey": "ShowPhase0-Q",<br />
"type": "checkbox",<br />
"value": "1",<br />
"checked": "checked",<br />
"description": "If you are starting with a Phase 0, then you can use this tab to build up your ideas.",<br />
"descriptiontranslationkey": "ShowPhase0-Q"<br />
},<br />
{<br />
"attribute": "show_notesTab_flag",<br />
"displayname": "Show Notes Tab",<br />
"displaytranslationkey": "ShowNotesTab-Q",<br />
"type": "checkbox",<br />
"value": "1",<br />
"description": "Set this if you would prefer the notes to show on a Tab of their own.",<br />
"descriptiontranslationkey": "ShowNotesTab-Q"<br />
}<br />
]<br />
</pre><br />
<br />
==={{repo|Roll20/roll20-character-sheets/blob/master/D6StarWars/sheet.json Star Wars D6}} by [[Andreas J.]]===<br />
[[File:SWD6-Default-Settings.png|250px|thumbnail|right|Default Settings of Star Wars D6 sheet(using this section's code)]]<br />
<br><br><br><br />
<br><br />
Contains example of:<br />
* dropdown menu(<select>)<br />
* checkboxes<br />
* number inputs<br />
* default values<br />
<br />
<br />
Sheet doesn't contain [[i18n|translation]] attributes, so they are also left out from the Default Settings.<br />
<br><br><br><br />
<br><br><br />
<br><br><br />
<br />
<pre style="overflow:auto;white-space:pre-wrap;" data-language="json"><br />
"useroptions": [<br />
{<br />
"attribute": "sheettype",<br />
"displayname": "Sheet Type: ",<br />
"type": "select",<br />
"options": [<br />
"PC|0",<br />
"NPC|1",<br />
"Ship|2",<br />
"Container|3"<br />
],<br />
"default": "0",<br />
"description": "PC is the normal sheet, NPC is a compact version of the same, Ship shows stat blocks for ship only, and Container shows only the Weapon/Armor/Equipment sections(simulating a Container or Shop display)."<br />
},<br />
{<br />
"attribute": "gmrollswitch",<br />
"displayname": "Hide GM Rolls: ",<br />
"type": "checkbox",<br />
"value": "1",<br />
"description": "When checked, the sheet hides the extra dice that makes hidden rolls to the GM."<br />
},<br />
{<br />
"attribute": "rollmodswitch",<br />
"displayname": "Disable Roll Mods Query: ",<br />
"type": "checkbox",<br />
"value": "1",<br />
"description": "If checked, rolls don't ask for roll modifiers and rolls right away when selected."<br />
},<br />
{<br />
"attribute": "wilddie",<br />
"displayname": "Use Wild Die: ",<br />
"type": "select",<br />
"options": [<br />
"Yes|!cf1cs6",<br />
"No|cf0cs0"<br />
],<br />
"default": "!cf1cs6",<br />
"description": "If Wild Die isn't used, the last die wont explode or highlight critical successes/failures."<br />
},<br />
{<br />
"attribute": "forceswitch",<br />
"displayname": "Hide Force Section: ",<br />
"type": "checkbox",<br />
"value": "1",<br />
"description": "Practical for those who are not Force-sensitive."<br />
},<br />
{<br />
"attribute": "equipmentswitch",<br />
"displayname": "Hide Equipment Section: ",<br />
"type": "checkbox",<br />
"value": "1",<br />
"description": "Practical for those who are not Force-sensitive."<br />
},<br />
{<br />
"attribute": "backgroundswitch",<br />
"displayname": "Hide Background Section: ",<br />
"type": "checkbox",<br />
"value": "1",<br />
"description": "Hides Backstory & Misc. section"<br />
},<br />
{<br />
"attribute": "cpswitch",<br />
"displayname": "Hide Character Point Summary: ",<br />
"type": "checkbox",<br />
"value": "1",<br />
"description": "Hides the Character Point Summary table used for tracking gain/usage history"<br />
},<br />
{<br />
"attribute": "creditswitch",<br />
"displayname": "Hide Credit Summary: ",<br />
"type": "checkbox",<br />
"value": "1",<br />
"description": "Hides the Credit Summary section used for tracking balance history"<br />
},<br />
{<br />
"attribute": "credits",<br />
"displayname": "Starting Credits: ",<br />
"type": "number",<br />
"value": "1000",<br />
"description": "How many credits a character starts with."<br />
},<br />
{<br />
"attribute": "characterPoints",<br />
"displayname": "Character Points: ",<br />
"type": "number",<br />
"value": "0",<br />
"description": "How many Character Points a character starts with."<br />
},<br />
{<br />
"attribute": "forcePoints",<br />
"displayname": "Force Points: ",<br />
"type": "number",<br />
"value": "1",<br />
"description": "How many Force Points a character starts with."<br />
} <br />
]<br />
</pre><br />
<br />
===[[Stargate RPG]] by [[Andreas J.]]===<br />
* {{repo|Roll20/roll20-character-sheets/blob/master/Stargate-RPG/sheet.json Stargate sheet.json}}<br />
<br />
<pre style="overflow:auto;white-space:pre-wrap;" data-language="json"><br />
"useroptions": [<br />
{<br />
"attribute": "show_name",<br />
"displayname": "Show name in rolls? ",<br />
"type": "select",<br />
"options": [<br />
"Yes|{{subtitle=@{character_name} }}",<br />
"No| "<br />
],<br />
"default": "{{subtitle=@{character_name} }}",<br />
"description": "Determine if newly created characters displayed their names in rolls by default. GMs can find useful to hide the names of NPCs in some situations. This option can be be later changed on individual sheets from the 'Settings-page.'"<br />
},<br />
{<br />
"attribute": "whisper",<br />
"displayname": "Whisper Rolls to GM?",<br />
"type": "checkbox",<br />
"value": "/w gm",<br />
"description": "Determine if newly created characters only shows their rolls to the GM by default. Players and GMs can sometime find it useful to hide a roll from the other players if a secret roll needs to be made. This option can be be later changed on individual sheets from the 'Settings-page.'"<br />
},<br />
{<br />
"attribute": "campaign",<br />
"displayname": "Campaign Name: ",<br />
"type": "text",<br />
"value": "",<br />
"description": "Writes the campaign name on newly created character sheets."<br />
},<br />
{<br />
"attribute": "td",<br />
"displayname": "Tension die?",<br />
"type": "select",<br />
"options": [<br />
"d4|d4",<br />
"d6|d6",<br />
"d8|d8",<br />
"d10|d10",<br />
"d12|d12"<br />
],<br />
"default": "d6",<br />
"description": "Determine what the Tension Die is for newly created character."<br />
}<br />
],<br />
</pre><br />
<br />
==={{repo|Roll20/roll20-character-sheets/blob/master/Official%20Savage%20Worlds/sheet.json Official Savage Worlds}} by finderski===<br />
Contains example of text inputs, checkboxes(some checked by default), selects, default values, and use of language tags for multilingual support. <br />
<pre style="overflow:auto;white-space:pre-wrap;" data-language="json"><br />
"useroptions":[<br />
{<br />
"attribute":"WCI",<br />
"displayname":"Wild Card Symbol",<br />
"displaytranslationkey":"wild-card-symbol",<br />
"type":"text",<br />
"value":"",<br />
"description":"Set the default icon to designate a Wild Card. Will accept most unicode characters (including emojis--though these may make it difficult to tell a Wild Card from an Extra, because they don't gray out).",<br />
"descriptiontranslationkey":"set-default-icon-for-wild-card-characters",<br />
"default":"✪"<br />
},<br />
{<br />
"attribute":"is_npc",<br />
"displayname":"Extra",<br />
"displaytranslationkey":"extra",<br />
"type":"checkbox",<br />
"value":"1",<br />
"description":"This option sets new characters to default as Extras, instead of Wild Cards.",<br />
"descriptiontranslationkey":"extra-config"<br />
},<br />
{<br />
"attribute":"sheet_theme",<br />
"displayname":"sheet-theme",<br />
"displaytranslationkey":"sheet-theme",<br />
"type":"select",<br />
"options":[<br />
"Generic|0",<br />
"Deadlands|1",<br />
"Pathfinder|2",<br />
"Rifts|3"<br />
],<br />
"optiontranslationkeys": [<br />
"generic",<br />
"deadlands",<br />
"pathfinder",<br />
"rifts"<br />
],<br />
"default":"0",<br />
"description":"Selecting a sheet theme will set the background image, logo displayed, and any special styling associated with the theme. The theme options are: Generic (the default), Deadlands (an Old West styled theme), Pathfinder (a theme to match the Pathfinder for Savage Worlds books), and Rifts&reg; (a more sci-fi type of theme). Even if a theme is selected, you can still change the packground or logo if desired.",<br />
"descriptiontranslationkey":"sheet-theme-paragraph"<br />
},<br />
{<br />
"attribute":"dark_mode",<br />
"displayname":"Dark Mode (inverted colors)",<br />
"displaytranslationkey":"dark-mode-invert-colors",<br />
"type":"checkbox",<br />
"value":"1",<br />
"description":"This check box will invert the colors of the character sheet, making a quasi-Dark Mode. This only affects the Character Sheet tab of the character journal (Bio & Info, and Atttributes & Abilities are unaffected, unfortunately).",<br />
"descriptiontranslationkey":"dark-mode-paragraph"<br />
},<br />
{<br />
"attribute":"staticCore",<br />
"displayname":"Show Core Skills",<br />
"displaytranslationkey":"show-core-skills",<br />
"type":"checkbox",<br />
"value":"1",<br />
"checked": "checked",<br />
"description":"Checking this box will show the Five Core skills (Athletics, Common Knowledge, Notice, Persuastion, and Stealth) by default.",<br />
"descriptiontranslationkey":"show-core-skills-by-default"<br />
},<br />
{<br />
"attribute":"showFightingByDefault",<br />
"displayname":"Show Fighting by Default",<br />
"displaytranslationkey":"show-fighting-by-default",<br />
"type":"checkbox",<br />
"value":"1",<br />
"description":"Checking this box will show the Fighting skill by default.",<br />
"descriptiontranslationkey":"show-fighting-skill-by-default"<br />
},<br />
{<br />
"attribute":"dominion-table",<br />
"displayname":"Dominion Table Name",<br />
"displaytranslationkey":"dominion-table-name",<br />
"type":"text",<br />
"value":"",<br />
"description":"This table name is needed for the dominion roll button to function. This should the name of the rollable table for Dominion rolls. This will not set up the rollable table, so you will need to be sure to do that in the game.",<br />
"descriptiontranslationkey":"setup-the-dominion-table-for-dominion-rolls"<br />
},<br />
{<br />
"attribute":"gritty",<br />
"displayname":"Setting Rule: Gritty Damage",<br />
"displaytranslationkey":"setting-rule-gritty-damage",<br />
"type":"checkbox",<br />
"value":"{{getgritty=gritty}}",<br />
"description":"Check this to use the Gritty Damage setting rule. Need to have a rollable table set up for this to work.",<br />
"descriptiontranslationkey":"use-the-gritty-damage-setting-rule"<br />
},<br />
{<br />
"attribute":"injurytablename",<br />
"displayname":"Injury Table Name",<br />
"displaytranslationkey":"injury-table-name",<br />
"type":"text",<br />
"value":"",<br />
"description":"If using the Gritty Damage setting rule, this table name is needed and should the name of the rollable table for the Gritty Damage rolls. You will need to be sure to set this up.",<br />
"descriptiontranslationkey":"only-need-if-using-gritty-damage-rule"<br />
},<br />
{<br />
"attribute":"moneyfields",<br />
"displayname":"Number of Money Fields",<br />
"displaytranslationkey":"number-of-money-fields",<br />
"type":"select",<br />
"options":[<br />
"1",<br />
"2",<br />
"3",<br />
"4"<br />
],<br />
"default":"1",<br />
"description":"If there's more than one form of currency AND the wealth system isn't being used, this allows you to show up 4 different currencies.",<br />
"descriptiontranslationkey":"number-of-money-fields-description"<br />
},<br />
{<br />
"attribute":"moneyname",<br />
"displayname":"Money Label",<br />
"displaytranslationkey":"money-label",<br />
"type":"text",<br />
"value":"",<br />
"description":"The label used for tracking money when the Wealth System isn't being used. This could be the name of a currency, if only a single currency is used (e.g. Credits), or the generic term for all currencies (e.g. Money) if more than a single currency is used.",<br />
"descriptiontranslationkey":"money-label-description"<br />
},<br />
{<br />
"attribute":"moneyonename",<br />
"displayname":"Currency1 Label",<br />
"displaytranslationkey":"currency1-label",<br />
"type":"text",<br />
"value":"",<br />
"description":"If more than one currency is used, use this field to label the first currency type (e.g. Gold).",<br />
"descriptiontranslationkey":"first-currency-label-description"<br />
},<br />
{<br />
"attribute":"moneytwoname",<br />
"displayname":"Currency2 Label",<br />
"displaytranslationkey":"currency2-label",<br />
"type":"text",<br />
"value":"",<br />
"description":"If more than one currency is used, use this field to label the second currency type (e.g. Silver).",<br />
"descriptiontranslationkey":"second-currency-label-description"<br />
},<br />
{<br />
"attribute":"moneythreename",<br />
"displayname":"Currency3 Label",<br />
"displaytranslationkey":"currency3-label",<br />
"type":"text",<br />
"value":"",<br />
"description":"If more than one currency is used, use this field to label the third currency type (e.g. Electrum).",<br />
"descriptiontranslationkey":"third-currency-label-description"<br />
},<br />
{<br />
"attribute":"moneyfourname",<br />
"displayname":"Currency4 Label",<br />
"displaytranslationkey":"currency4-label",<br />
"type":"text",<br />
"value":"",<br />
"description":"If more than one currency is used, use this field to label the fourth currency type (e.g. Copper).",<br />
"descriptiontranslationkey":"fourth-currency-label-description"<br />
},<br />
{<br />
"attribute":"faithname",<br />
"displayname":"Rename Faith",<br />
"displaytranslationkey":"rename-faith",<br />
"type":"text",<br />
"value":"",<br />
"description":"Change the name of the Faith skill. This will change the name only, it won't change it's order in the list, etc.",<br />
"descriptiontranslationkey":"change-skill-name-of-faith"<br />
},<br />
{<br />
"attribute":"focusname",<br />
"displayname":"Rename Focus",<br />
"displaytranslationkey":"rename-focus",<br />
"type":"text",<br />
"value":"",<br />
"description":"Rename the name of the Focus skill. This will change the name only, it won't change it's order in the list, etc.",<br />
"descriptiontranslationkey":"change-skill-name-of-focus"<br />
},<br />
{<br />
"attribute":"performancename",<br />
"displayname":"Rename Performance",<br />
"displaytranslationkey":"rename-performance",<br />
"type":"text",<br />
"value":"",<br />
"description":"Rename the name of the Performance skill. This will change the name only, it won't change it's order in the list, etc.",<br />
"descriptiontranslationkey":"change-skill-name-of-performance"<br />
},<br />
{<br />
"attribute":"psionicsname",<br />
"displayname":"Rename Psionics",<br />
"displaytranslationkey":"rename-psionics",<br />
"type":"text",<br />
"value":"",<br />
"description":"Rename the name of the Psionics skill. This will change the name only, it won't change it's order in the list, etc.",<br />
"descriptiontranslationkey":"change-skill-name-of-psionics"<br />
},<br />
{<br />
"attribute":"spellcastingname",<br />
"displayname":"Rename Spellcasting",<br />
"displaytranslationkey":"rename-spellcasting",<br />
"type":"text",<br />
"value":"",<br />
"description":"Rename the name of the Spellcasting skill. This will change the name only, it won't change it's order in the list, etc.",<br />
"descriptiontranslationkey":"change-skill-name-of-spellcasting"<br />
},<br />
{<br />
"attribute":"weirdsciencename",<br />
"displayname":"Rename Weird Science",<br />
"displaytranslationkey":"rename-weird-science",<br />
"type":"text",<br />
"value":"",<br />
"description":"Change the name of the Weird Science skill. This will change the name only, it won't change it's order in the list, etc.",<br />
"descriptiontranslationkey":"change-skill-name-of-weird-science"<br />
}<br />
]<br />
}<br />
</pre><br />
<br />
===translation===<br />
using [[i18n|translations]] in the user options:<br />
<br />
* {{repo|Roll20/roll20-character-sheets/tree/master/DD5thEditionLegacy/sheet.json D&D 5e by Roll20}}<br />
<br />
==See Also==<br />
* [[Building Character Sheets]]<br />
** '''[[sheet.json]]'''<br />
** [[Custom Sheet Sandbox]] - The way to test your Default Settings<br />
** [[Beginner%27s_Guide_to_GitHub|Beginner's Guide to GitHub]]<br />
*** [[Git|Git Guide]]<br />
** [[Character Sheet Translation]]<br />
** {{repo|Roll20/roll20-character-sheets Roll20 Character Sheet GitHub repository}}<br />
* [[Game Management]]<br />
** [[Game Settings Page]]<br />
* {{hc|articles/360041542554-Default-Sheet-Settings Roll20 Help Center}} - Almost always outdated/lacking compared to any pages on sheet development on the wiki<br />
<br /><br />
[[Category:Character Sheet Creation]]<br />
[[Category:Game Management]]</div>1223200https://wiki.roll20.net/Star_Wars_D6_SheetStar Wars D6 Sheet2023-11-29T07:03:34Z<p>1223200: </p>
<hr />
<div>{{revdate}}<br />
This is a guide to the '''Star Wars: (D6) West End Games''' [[CS|character sheet]] found in the Sheet Template selection menu.<br />
<br />
It was originally created by Timothy O. in 2014, and between 2017 and 2021 primarily updated/maintained by [[Anduh|Andreas J.]], and from 2021 other contributors like Moondancer83 & tgtrammel have helped.<br />
{| class="wikitable" style="float:right; margin-left: 10px;margin-right: 60px;"<br />
|+Star Wars D6 Sheet<br />
|-<br />
|'''{{repo|Roll20/roll20-character-sheets/blob/master/D6StarWars/CHANGELOG.md Sheet Version}}'''<br />
| 2.44<br />
|-<br />
|'''Last Update'''<br />
|2022-08-08<br />
|-<br />
|'''Author'''<br />
| [[Andreas J.]], Moondancer83, tgtrammel<br />
|}<br />
See '''[[Star Wars D6]]''' for the system in general, and [[Star Wars 30th Anniversary Edition sheet|Star Wars: (D6) 30th Anniversary Edition]] for the (white) 1E sheet created by Claes.<br />
[[File:SWD6 sheet.png|410px|thumbnail|right|Sheet layout (v.2.15) ]]<br />
__TOC__<br />
<br />
<br />
=General =<br />
{{mbox | text = '''NOTE:''' This sheet is designed with primarily REUP in mind, but should work equally good for R&E and 2E.}}<br />
<br />
This sheet is for playing the'''[https://en.wikipedia.org/wiki/Star_Wars:_The_Roleplaying_Game Star Wars: The Roleplaying Game]''', published by West End Games in 1987, commonly also called '''Star Wars D6'''.<br />
The game has various iterations which are all pretty interchangeable:<br />
* Star Wars (1987) (Simplest, least options, but still some people's favorite)<br />
* Star Wars 2nd Edition (1992)<br />
* Star Wars 2nd Edition, Revised & Expanded (R&E) (1996)<br />
* Star Wars: Revised, Expanded & Updated (REUP) (2015)(massive new fan-created version, top choice for many, but essentially same as 2E R&E)<br />
* Star Wars 30th Anniversary Edition (2018)(reprint of 1E)<br />
<br><br />
If you want to play 1E/30th Anniversary, you can either:<br />
* a) Use this sheet, and turn turn off the '''Wild Die''' in the [[Star_Wars_WEG_D6_character_sheet#Settings_Menu|Settings Menu]],<br />
* b) Use the [[Star_Wars_30th_Anniversary_Edition_sheet | the 30th Anniversary sheet]] which is designed specifically for playing 1E.<br />
* c) use the [[D6 Space]] sheet, which uses more or less the same system as SWD6, just without any branding. <br />
<br />
See Also: '''[[Star_Wars_D6#Rolls_in_Star_Wars_D6 |Rolls in Star Wars D6]]'''<br />
<br />
==Rolling from the sheet==<br />
<br />
All rolls results from buttons of the sheet use a Roll Template built into the sheet(which is based on the [[Roll_Templates#Default|Default Roll Template]]), and results are rolled for all to see. There is an option to also show roll buttons that only sends results to the GM.<br />
<br />
The rolls take into account the possible penalties from <code>@{WoundMod}</code> and <code>@{Force_Up}</code>(when appropriate),if the character is wounded or concentrates on a continuous Force power. Further, the force skills takes in account <code>@{Force_EmptinessMod}</code> bonus if it is checked.<br />
<br />
For the Initiative rolls to appear on the [[Turn_Tracker|Initiative Tracker]], the sheet must be connected to a token and be selected, before rolling for initiative.<br />
The '''Character points''', '''Extra dice''' and '''Custom Roll''' buttons doesn't account for the <code>@{WoundMod}</code> and <code>@{Force_Up}</code> attributes for simplicity's sake.<br />
<br />
This is the macro code that the Dexterity Roll button uses:<br />
<pre style="overflow:auto;white-space:pre-wrap;" data-language="javascript"><br />
&{template:blue} {{name=Dexterity}} {{Roll=[[(@{dexterity} -@{WoundMod} +@{Force_Up} + ?{Dice mods|0} -1)d6cf0cs7 + @{dexteritypip} + ?{Other Mods(pip)|0} + 1d6@{wilddie}]]}}<br />
</pre><br />
<br />
The <code>1d6@{wilddie}</code> part of the roll determines if a Wild Die is rolled or not, which can be edited in the [[#Settings Menu|Settings Menu]].<br />
<br />
===Roll Results===<br />
* When you '''roll a 1 on the Wild Die''', the is highlighted with a red border<br />
* '''rolling a 6 on the Wild Die'''highlighted in green border if it explodes<br />
* TA blue border on the rolls means the wild die exploded, but on one of the exploded die rolls where a 1. This doesn't mean anything speciial the SW D& rules, but is just how Roll20 shows if both a crit fail and a crit success is rolled in one roll. It might be possible to change the blue highlight to be green, but I haven't looked into it.<br />
<br />
== Settings Menu ==<br />
[[File:SWD6 settingsmenu.png|framed|right|The "Cog" icon that opens the Settings Menu]]<br />
You access the settings menu by clicking on the cog and click again to exit the menu can show and hide a few things. All the options are independent from eachother.<br />
{| class="wikitable"<br />
|+Options<br />
|-<br />
|'''Sheet Type'''<br />
| Can switch between the four sheet types, '''PC''', '''NPC''', '''Ship''' and '''Shop/Container'''<br />
|-<br />
|'''Hide GM Rolls?'''<br />
| Hides the extra roll buttons with "GM" written on them. The GM rolls function like the regular rolls except they are whispered to the GM. <br />
|-<br />
|'''Disable Roll Mod Query?'''<br />
| Removes the popup from all rolls that asking for modifications before outputting the roll in the chat. Speeds up play if you don't do MAP often.<br />
|-<br />
|'''Disable Wild Die?'''<br />
| If checked, will change so dice rolls from the sheet doesn't have a Wild Die in them, making it easier for example to play 1E that doesn't use Wild Die.<br />
|-<br />
|'''Hide Force Section?'''<br />
|Hides the Force section, useful for characters who aren't Force sensitive<br />
|-<br />
|'''Hide Background/Equipment/etc.?'''<br />
|Hides the section from the sheet, reduce scrolling if sections aren't used.<br />
|-<br />
|'''Hide [[#Character Point & Credit Summary|Character Point/Credit Summary]] section?'''<br />
|Hides the section from the sheet, reduce scrolling if sections aren't used.<br />
|}<br />
=Sheet Types=<br />
Apart from using it as a sheet for players, there are a number of other modes you can change the sheet into, including NPC, Starship / Storage<br />
<br />
== PC Sheet ==<br />
Generally, info described in the PC sheet sections applies on the NPC sheet, which is just a simplified look of the former.<br />
<br />
===Core===<br />
<br />
* tracking various core stats, '''Wound Level''', '''Character Points''', '''Force Points''', '''Dark Side Points'''<br />
* The '''Species''' field have auto-complete for 400+ species<br />
* several buttons to make various extra rolls, with or w/o Wild Die<br />
* '''Initiative''' roll button & misc Initiative bonus<br />
<br />
===Attributes & Skills===<br />
* You can have any number of skills under each attribute<br />
* Relevant Skillnames will be suggested as you start typing them.<br />
<br />
[[File:Swd6-datalist.gif|as you type, skills for that Attribute will be suggested.]]<br />
===Weapons & Armor ===<br />
[[File:SWD6 armor.png|500px|thumb|right]]<br />
<br />
'''Weapons'''<br />
* '''Section width issue:''' currently if you have the sheet open verry narrow, the end part of Weapon & Armor rows are hidden behind separate scroll-bar. <br />
<br />
<br />
'''Armor'''<br />
* three roll buttons, for rolling damage soak with either your armor's Physical resistance(and your Strength),Energy resistance(and your Strength), or only your inherit Strength attribute.<br />
* '''star''' symbol rolls your armor's Physical soak, and the '''bolt''' icon rolls your armor's Energy soak.<br />
* '''Wounds''' doesn't affect your '''Strength''' dice in the Armor/Soak rolls(per 2E R&E rules).<br />
<br />
=== Force ===<br />
'''Force Skill'''<br />
<br />
* Force Power have autocomplete for names, suggesting Force Powers tied to that Force Skill <br />
* The three Force skills rolls takes in account<br />
** How Wounded the char is.(Resist Pain will modify this penalty)<br />
** '''Number of active powers''' (automatically subtracted)<br />
** if '''Force Emptiness''' is active, pip bonus applied.<br />
<br />
'''Force Emptiness:'''<br />
<br />
If active, adds (<code>6 - number of dark side points</code>) pips to all force rolls.<br />
<br />
'''Resist Pain:'''<br />
<br />
If active, reduces the '''Wound Penalty''' down to -1, as per 2E R&E rules.<br />
<br />
'''Number of active powers'''<br />
<br />
To keep track of the Multi-Action Penalty incurred from upholding active Force Powers. '''Resist Pain''' doesn't need to be taken into account, it's tracked separatly.<br />
<br />
'''Lightsaber Combat:'''<br />
<br />
Useful to track the usual attack bonus and damage increase/decrease one uses frequently. Both rolls takes into account if Force Emptiness is active, and the attack any Wound penalties. For other rolls will LC is active it's recommended to use above tracker for the MAP penalty coming from LC. <br />
<br />
===Character Point & Credit Summary===<br />
Trackers that can be useful for tracking your history of Char Point & Credit gains and losses. The Counter at the top of both sections counts the total.<br />
<br />
These sections are hidden by default on new sheets, you can change that on the [[#Settings Menu|Settings Menu]].<br />
<br />
[[File:SWD6-charpoint-credit-tracker.png| v.2.41]]<br />
<br />
== NPC sheet ==<br />
<br />
The NPC sheet is a condensed version of the regular sheet for ease of use. Reduces two first sections from the PC version to Name, Health tracker, init button and info box, and '''Equipment''' section down to one field. Doesn't show Char Point/Credit tracking sections.<br />
<br />
Generally, info described in the PC sheet sections applies on the NPC sheet, which is just a simplified look of the former.<br />
<br />
'''Other Comments:'''<br />
* The NPC's "Physical Description & Other Info" field uses the "Physical Description" attribute from the PC sheet<br />
* The single "Equipment" field uses the attribute from the first box in the PC version of the Equipment section<br />
* Switching between PC/NPC version of the sheet doesn't change any attributes, only hides some. The sheets share all stats so that the NPC sheet can also be used by players who favour the more compact view.<br />
<br />
==Starship==<br />
The starship sheet contains various options for starship bookkeeping. <br />
<br />
* Crew Stations<br />
* Has section for Sensor Array<br />
* Prices<br />
* Contains some roll buttons, like Ship Weapons<br />
<br />
==Vehicle==<br />
A simplified version of the starship sheet.<br />
<br />
<br />
==Container/Shop==<br />
Simply shows the '''Weapon & Armor''', and the '''Equipment''-sections, and nothing else.<br />
<br />
Useful if you want to have a separate sheet to track external container, storage or cargo bays of PCs/NPCs. Alternatively, it can serve as a display for available wares in a shop or store held by an NPC.<br />
<br />
[[File:Swd6-container.png| v2.41]]<br />
<br />
=Advanced Use=<br />
Various advanced tips & tricks for the sheet.<br />
==Default Settings==<br />
[[File:SWD6 defaultsettings.png|500px|thumb|right]]<br />
Default Settings are something the GM of a game using the SWD6 sheet can use to customize how new sheets looks like, function and what they contain. Here are a few suggestion on how these can help streamline things for both GMs and players.<br />
<br />
* '''Sheet type:''' If the GM have added all needed PC sheets already, they could change this to '''NPC''', so that subsequently when adding new NPC sheets to the campaign they show the NPC view by default<br />
* '''Hide GM Rolls?:''' If a GM doens't do hidden rolls, hiding the GM roll buttons from the sheets as default reduce the clutter for both players and the GM<br />
* '''Disable Roll Query?:''' If your game does change the values of stats often before rolling, it can be beneficial to disable this by default for new players.<br />
* '''Use Wild Die:''' If the game doesn't use Wild Die(Such as playing 1E or some homebrew), it's handy to set all sheets to not use them by default.<br />
* '''Hide Force Section:''' If a player(or NPCs in general) doesn't use Force powers, it's practical to hide the section by default.<br />
* '''Credit/Character Points/Force Points:''' If players are to start with different amounts than the defaults, it's handy to change it from here in advance.<br />
<br />
==Roll templates==<br />
The <code>&{template:swd6}</code> template is used in most roll: can be called with examples like:<br />
<pre style="overflow:auto;white-space:pre-wrap;">&{template:swd6} {{name=?{Roll Name}}} {{Roll=[[{(?{Number of dice|0} - 1)d6cf0cs7 + ?{Number of pip|0},1d6!cf1cs6}]]}} {{desc=this section is optional, but nice to have if you want to display text}}</pre><br />
<br />
You can also use <code>&{template:swd6}</code>, <code>&{template:blue}</code>, <code>&{template:red}</code>, <code>&{template:green}</code> or <code>&{template:black}</code> with the corresponding colors in your macros apart from the default template. They function otherwise identically to the default roll template.<br />
<br />
<br />
The [[Roll_Templates#Default|default roll template]] can be called with examples like:<br />
<pre style="overflow:auto;white-space:pre-wrap;">&{template:default} {{name=?{Roll Name}}} {{Roll=[[{(?{Number of dice|0} - 1)d6cf0cs7 + ?{Number of pip|0},1d6!cf1cs6}]]}}</pre><br />
<br />
==Roll20 sheet general tips==<br />
{{mbox | text = '''NOTE:''' On all rolls the pip field must be filled with a number and cannot be left empty, otherwise it will break the roll and show only show a result of "0" in the chat.}}<br />
* Wound penalties are automatically subtracted from all relevant rolls if used, same with the "Force Powers Up" tracker that automatically penalize you with the reported Multiple Action Penalty (MAP)<br />
* You can hide some unnecessary sections from the settings menu<br />
* the NPC version of the sheet can be useful for some players players<br />
* If you don't need to modify your roll, you can after clicking on the roll button on the sheet press enter twice to ignore the "dice mod" queries, or optionally completely turn off the feature from the Settings Menu. <br />
<br><br />
<br />
==Macros==<br />
Custom Roll:<br />
<br />
<pre style="overflow:auto;white-space:pre-wrap;">&{template:default} {{name=?{Roll Name}}} {{Roll=[[{(?{Number of dice|0} - 1)d6cf0cs7 + ?{Number of pip|0},1d6!cf1cs6}]]}}</pre><br />
<br />
Noteworthy attributes that can be useful in macros:<br />
<br />
<code>@{WoundMod}</code><br />
<br />
It's value can be 0,-1,-1,-2,-5,-5, corresponding to Healthy, stunned, wounded, wounded twice, incapacitated, mortally wounded as they can be selected from the sheet. Good for tracking roll penalties automatically. Incapacitated and mortally wounded have the absurd penalties in place as character shouldn't be able to function when in that shape.<br />
<br />
<code>@{Force_Up}</code><br />
<br />
It can track numbers of force powers "up", and gives the corresponding negative value for number of active powers. Good for tracking roll penalties incurring from upheld force powers automatically.<br />
<br />
Weapon Roll:<br />
Set as "Show as Token Action"<br />
<br />
<pre style="overflow:auto;white-space:pre-wrap;">&{template:red} {{name=@{selected|charactername} : @{selected|repeating_weapons_$0_weapon}}} {{Attack Roll=[[(@{selected|repeating_weapons_$0_weaponskill} -@{selected|WoundMod} +@{selected|Force_Up} + ?{Dice mods|0} -1)d6cf0cs0 + @{selected|repeating_weapons_$0_weaponskillpip} + ?{Other Mods(pip)|0} + 1d6@{selected|wilddie}]]}} {{Damage=[[(@{selected|repeating_weapons_$0_damagedice} - 1)d6cf0cs7 + @{selected|repeating_weapons_$0_damagepip} + (1d6@{selected|wilddie})]]}}</pre><br />
<br />
This will roll the attack and damage for the first weapon listed in a character sheet. With the '''Characters Name : Weapon Name''' as the title, you can modify this code for the second weapon, by changing the <code>$0</code> to <code>$1</code> in the relevant places, use your third weapon with <code>$2</code>, etc.<br />
<br />
===[[Star_Wars_D6#Macros|Generic Star Wars D6 Macros]]===<br />
{{main|Star_Wars_D6#Macros}}<br />
<br><br />
==API==<br />
{{pro only|section=true}}<br />
Great API to use with the sheet.<br />
<br />
* [[Script:Wild Dice]] make rolls that on crit fail, automatically subtracts wild die and highest roll.<br />
** '''Ex.''' <code><nowiki>!wd [[4d6+2]]</nowiki></code><br />
** '''Ex.''' <code><nowiki>!wd [[(@{Bob|dexterity} -@{Bob|WoundMod} +@{Bob|Force_Up} + ?{Dice mods|0})d6 + @{Bob|dexteritypip} + ?{Other Mods(pip)|0}]]</nowiki></code><br />
* [[ChatSetAttr]] make API commands or macros that update stats while also making rolls<br />
** the [[ChatSetAttr#Inline_roll_example|inline example]] is especially nice<br />
* [[Script:Ammo]] simple API to update & track ammo with chat commands<br />
* [[GroupInitiative]] roll initiative for several characters at once <br />
** page has an example config for SWD6 [[Script:Group_Initiative#Configuring_for_Specific_Sheets|here]]<br />
* [[GroupCheck]] could be used for rolling attribute rolls for multiple characters at the same time<br />
** you need to config API for SWD6 before use<br />
** think it would to implement for specific skills bc they are in [[Repeating Sections]] [[User:1223200|1223200]] ([[User talk:1223200|talk]]) 14:28, 5 August 2021 (UTC) <br />
* [[TokenMod]] make API Commands that update [[tokens]] quickly, and/or change token/character stats<br />
** could be useful to quickly change Token Markers for Wound levels, or show/hide token name label<br />
<br />
==Tools==<br />
[[Game_Resources#Star_Wars_D6|Tools for Star Wars D6]]<br />
<br><br />
=Changelog=<br />
{{repo|Roll20/roll20-character-sheets/blob/master/D6StarWars/CHANGELOG.md Sheet Changelog}}(more up to date than wiki page in most cases)<br />
<br />
==Version 2.42 (2021-08-13)==<br />
* '''Attributes & Skills:'''<br />
** added names to roll buttons (so they can be dragged to macro bar or called in chat)<br />
** skill name selection now have "(A)" on Advanced Skills<br />
* '''Force:'''"Burst of Speed" added to control powers, lightsaber combat name shorter<br />
* '''Starship:'''<br />
** make main info block more compact<br />
** weapons now have "location"-field, and the weapon's text-fields are more compact.<br />
** "Other Ship Stats" is more compact<br />
* '''Settings'''<br />
** added button/link to sheet instructions/Changelog<br />
** clarify & cleanup settings options<br />
* updated "Instructions" on sheet.json <br />
* minor visual fixes (Sheet-logo/title, wound level, init-bonus tracker, Background-section, footer)<br />
<br />
==Version 2.41 (2021-06-10)==<br />
* Feature: Skills, Species, Force Powers auto-suggestions, suggest relevant names as you start typing<br />
* Visual: Player Core + Secondary Info, Attributes & Skills, Weapons & Armors, Force section's layout improved<br />
* FIX: Resist Pain effect works as expected<br />
* Code Refactor & cleanup, update sheet to [[CSE]]<br />
<br />
==Version 2.34 (2021-05-20)==<br />
* Enhance Player Core info section's layout<br />
* Reformats Player Secondary Info section<br />
* Enhance Attributes & Skills section's layout<br />
* Enhance Weapons & Armors section's layout<br />
* Enhance Force section's layout<br />
* FIX: cleaning up HTML code<br />
* FIX: removes invalid CSS code<br />
* FIX: Resist Pain effect works as expected<br />
<br />
<br />
'''Version 2.33 (2021-04-06)'''<br />
update by Moondancer83 ({{repo|Roll20/roll20-character-sheets/pull/8662 PR}})<br />
* remove duplicated control force power name field<br />
* fix force power section width<br />
<br />
<br />
'''Version 2.32 (2021-02-09)'''<br />
* add missing lightsaber damage roll button<br />
<br />
<br />
'''Version 2.31 (2020-10-03)'''<br />
* removed broken logo at top<br />
* revamp of starship section<br />
* add new roll templates, used in ship weapon damage rolls<br />
<br />
See '''{{repo|Roll20/roll20-character-sheets/blob/master/D6StarWars/CHANGELOG.md Full Changelog}}''' for older updates.<br />
<br><br />
<br />
=Feature Requests=<br />
<br />
If you have a bug or have feature you would like added, you can contact either of the active contributors, {{user profile|1223200|Andreas J.}} or {{user profile|5766339|Mark}}.<br />
* '''Rolls/Roll template'''<br />
** Multi-Action Penalty tracker, which automatically subtracts from all rolls.<br />
*** '''Workaround with current sheet:''' Use the [[#Force|Force]]-section's "Number of active Powers"-tracker <br />
** option to customize default rolls (use/don't use roll template, show/hide char name in roll, option for API integration) {{repo|Roll20/roll20-character-sheets/blob/6c555c76171eb124ce10fae6c525bdaee940b154/GODSEND-Agenda/sheet.html#L218 example}}<br />
** option to display description in some rolls (Skills, Weapons, Armor, Force Powers)<br />
** option to show Wild Die crit fail outcome result<br />
** Update char point rolls to have [[ChatSetAttr]], so if API is installed, char points are automatically subtracted<br />
** add [[Inline#Inline_Labels|inline labels]] to all roll results, makes it easier to see source for each part <br />
*** example: <code><nowiki>&amp;{template:swd6} {{name=Force:Control}} {{Roll=[[(@{control}[force control] -@{WoundMod}[woundmod] +@{Force_Up}[active force powers] +?{Dice mods|0}[dicemode] -1)d6cf0cs0 +@{controlpip}[controlpip] +@{Force_EmptinessMod}[force emptiness] +?{Other Mods(pip)|0}[pip mod] +1d6@{wilddie}[Wild Die]]]}}</nowiki></code><br />
** option to display Difficulty of roll result (Very Easy, Easy, Moderate etc.)<br />
** update to use [[Building_Character_Sheets/Roll_Templates#Jakob.27s_Better_Default_Rolltemplate|Jacob's better roll template]]<br />
*** make the roll template more SW-themed<br />
** grenade deviation direction (REUP p. 92)<br />
<br />
* '''Visuals / Info'''<br />
** integrated changelog inside sheet, [[Sheet_Author_Tips#Changelog_and_Update_Notification_inside_Sheet|notification on latest sheet updates]]<br />
** divide sheet into tabs (/w toggle between single/multi-page sheet<br />
** Option for [[#Character Point & Credit Summary|Char Point Tracker]] to update the numbers at the top of the PC sheet<br />
** light mode, or alternative sheet color-scheme to the (current) dark visuals<br />
** Inventory: change boxes into separate equipped/inventory/stash<br />
** option for "rulebook source"-field, so you can mention what book/page the item/skill/power/etc is from<br />
** option for dyslexia-friendly font<br />
** add more tooltip info shown on hover(abbrevation & stat explanations, name of macro field<code>@{controlpip}</code> Etc.)<br />
** languages tracking on Background-section, [[Repeating Section]]<br />
<br />
* '''Attributes/Skills'''<br />
** have new skills start /w parent attribute's value(instead of 3)<br />
** Add notes-field to individual powers, /w hide/show field-option<br />
** some specialization name auto-suggest<br />
** option to add species' attr max<br />
** track misc. perception bonuses (from gear, species, Force)/ Sensor roll section <br />
<br />
* '''Combat'''<br />
** add weapon description box under weapon, hide/show option. same for armor. <br />
** called shots roll mod<br />
** Random body location hit roll (REUP p.97)<br />
** Martial Arts statblock(name/difficulty/effect) (REUP p. 99)<br />
** Stun roll (person is stunned for 2d minutes)<br />
** option to show vehicle/ship weapons<br />
<br />
* '''Force powers'''<br />
** Add notes-field to individual powers, /w hide/show field-option<br />
** options to track "Enhance Attribute"(make so attr bonus is automatically added to relevant rolls)<br />
** Custom damage section for force powers<br />
** relationship & proximity charts<br />
<br />
* '''Vehicle/Ship/NPC/Droid'''<br />
** create separate Vehicle page, w/o the starship stuff<br />
*** expand the simple ship/vehicle section with rolls and more stat sections<br />
*** starship damage location roll<br />
** Container/shop phys. description field<br />
** Creature statblock (dex, per, str, size,scale, spec.a bility, Orneriness, damage roll attack)<br />
** Droid statblock, Droid Char Traits, cost, otherwise as PC<br />
*** installation/skillware/traitware/mods Tracker, sum up total cost <br />
*** when selected, auto-hides Force section<br />
** starport statblock<br />
** Planet statblock<br />
<br />
* '''Other Features'''<br />
** make an "Armor penalty"-slot for armor, so that the penalty could automatically be removed from Dex-based rolls. Probably needs a "worn" checkbox.<br />
** Wound Level<br />
*** displaying numerical Wound Penalty next to each level<br />
*** option to have WL be more viable/float in corner/show in Combat section<br />
** Difficulty Chart<br />
** Advantages & Disadvantages-field, w/ auto-suggestion(datalist), show/hide option<br />
** Streamlining sheet for 1E gameplay<br />
*** simplifying the two armor types into one<br />
*** disabling Wild Die as default<br />
*** displaying "1E" in sheet's corner<br />
** option to import characters statsblock, plaintext or <code>.json</code><br />
<br />
* '''GM'''<br />
** Mishap rolls (weapon/vehicle, nonlethal REUP p.58, astrogation p.124)<br />
** option to roll Wild Die crit fail outcome (do nothing/remove highest die, complication)<br />
** damage roll chart (objects, characters, vehicles)<br />
** illness/disease results (REUP p.105) <br />
** movement failure(REUP p113)<br />
** dice code(universal standard) chart (2d= avg. human, 6d= 1 in 100k person, 9D= 1 in 1b person) (p.269)<br />
<br />
* [[CSE]]-based stuff<br />
** add name suggestion lists for NPC Names, Weapons, Armor, Vehicles<br />
** add Adventure Journal species to suggest list (datalist)<br />
** Create one-in-all roll modifier [[CSE#Popup|popup]] (Asking both bonus dice & bonus pips), instead of using normal queries.(Might require [[Custom Roll Parsing]])<br />
** create navbar(jump to sheet section instead of scrolling)<br />
** adapt for [[mobile]]<br />
** make printer-friendly<br />
<br />
* other/code refactor<br />
** roll button refactor: change the massive number of near-identical roll buttons for each section, to be a single button which is modified by <code>@{whisper}</code>, <code>@{modquery}</code> etc.<br />
*** {{repo|Roll20/roll20-character-sheets/blob/master/GODSEND-Agenda/sheet.html GODSEND-Agenda}} example: <code><nowiki>@{whisper}&{template:rolls} {{title=con }} {{subtitle=@{character_name} }} {{roll= [[@{dice}+@{con}[con]@{modquery}]]}}</nowiki></code>, which is then altered from {{repo|Roll20/roll20-character-sheets/blob/6c555c76171eb124ce10fae6c525bdaee940b154/GODSEND-Agenda/sheet.html#L218 here}}<br />
** refactor all archaic [[Designing_Character_Sheet_Layout#Roll20_columns.2Frows|roll20 columns/rows]] to css grid & flexbox<br />
** refactor all <code><nowiki><table></nowiki></code> into css grid & flexbox<br />
** reduce amount of inline-css on <code>.html</code>, move to <code>.css</code><br />
** simplify & streamline css, keep related css close<br />
** possibly refactor to use [[Sheet_Author_Tips#PUG|PUG & SASS]], would streamline sheet development<br />
<br><br />
<br />
==Plans==<br />
Character Sheet update plans, priorities etc.<br />
<br />
* '''fixes TODO'''<br />
** make Weapons & Armor media query override, to make it stretch & to avoid the scrollbar<br />
*** make name wider as section is bigger<br />
** make sheetworker to read & save existing skills with 3 dice, to permanently save current skills that is affected by the "new skills at 3 pip disappear"-bug.<br />
*** When this is fixed, the sheet can then further updated to make new skills start with current Attr, instead of current "3"<br />
** fix color-coded roll templates to match <code>&{template:swd6}</code>, update char point roll button<br />
<br />
* '''[[Andreas J.]]''' (stuff I might do next)<br />
** skill specialisation to datalist<br />
** inline labels<br />
*** example: <code><nowiki>&amp;{template:swd6} {{name=Force:Control}} {{Roll=[[(@{control}[force control] -@{WoundMod}[woundmod] +@{Force_Up}[active force powers] +?{Dice mods|0}[dicemode] -1)d6cf0cs0 +@{controlpip}[controlpip] +@{Force_EmptinessMod}[force emptiness] +?{Other Mods(pip)|0}[pip mod] +1d6@{wilddie}[Wild Die]]]}}</nowiki></code><br />
** AJ species<br />
** Archetype datalist<br />
** Sheet navbar<br />
*** show/hide hidden section<br />
** Simple vehicle sheet<br />
*** shop/container: add description box, Character Point & Credit summary show/hide<br />
<br />
=See Also=<br />
* [[Star Wars RPG | List of Star Wars RPGs on Roll20]]<br />
** '''[[Star Wars D6]]''' general advice on running SWD6 on Roll20<br />
** [[Star Wars 30th Anniversary Edition sheet|Star Wars: (D6) 30th Anniversary Edition]]<br />
* [https://app.roll20.net/campaigns/details/2036000/star-wars-d6-hub Star Wars D6 Hub on Roll20]<br />
* {{repo|Roll20/roll20-character-sheets/tree/master/D6StarWars D6StarWars Sourcecode}} (Current Sheet)<br />
* {{repo|Anduh/roll20-StarWarsD6 Anduh's SWD6 Sheet Dev repo}}<br />
* [http://www.d6holocron.com/ D6 Holocron] Good Resources for SWD6<br />
<br><br />
<br><br />
<br />
[[Category:Macros]]<br />
[[Category:Character Sheet Documentation]]<br />
[[Category:Star Wars]]</div>1223200https://wiki.roll20.net/Star_Wars_D6_SheetStar Wars D6 Sheet2023-11-29T07:02:36Z<p>1223200: </p>
<hr />
<div>{{revdate}}<br />
This is a guide to the '''Star Wars: (D6) West End Games''' [[CS|character sheet]] found in the Sheet Template selection menu.<br />
<br />
It was originally created by Timothy O. in 2014, and between 2017 and 2021 primarily updated/maintained by [[Anduh|Andreas J.]], and from 2021 other contributors like Moondancer83 & tgtrammel have helped.<br />
{| class="wikitable" style="float:right; margin-left: 10px;margin-right: 60px;"<br />
|+Star Wars D6 Sheet<br />
|-<br />
|'''{{repo|Roll20/roll20-character-sheets/blob/master/D6StarWars/CHANGELOG.md Sheet Version}}'''<br />
| 2.44<br />
|-<br />
|'''Last Update'''<br />
|2022-08-08<br />
|-<br />
|'''Author'''<br />
| [[Andreas J.]], Moondancer83<br />
|}<br />
See '''[[Star Wars D6]]''' for the system in general, and [[Star Wars 30th Anniversary Edition sheet|Star Wars: (D6) 30th Anniversary Edition]] for the (white) 1E sheet created by Claes.<br />
[[File:SWD6 sheet.png|410px|thumbnail|right|Sheet layout (v.2.15) ]]<br />
__TOC__<br />
<br />
<br />
=General =<br />
{{mbox | text = '''NOTE:''' This sheet is designed with primarily REUP in mind, but should work equally good for R&E and 2E.}}<br />
<br />
This sheet is for playing the'''[https://en.wikipedia.org/wiki/Star_Wars:_The_Roleplaying_Game Star Wars: The Roleplaying Game]''', published by West End Games in 1987, commonly also called '''Star Wars D6'''.<br />
The game has various iterations which are all pretty interchangeable:<br />
* Star Wars (1987) (Simplest, least options, but still some people's favorite)<br />
* Star Wars 2nd Edition (1992)<br />
* Star Wars 2nd Edition, Revised & Expanded (R&E) (1996)<br />
* Star Wars: Revised, Expanded & Updated (REUP) (2015)(massive new fan-created version, top choice for many, but essentially same as 2E R&E)<br />
* Star Wars 30th Anniversary Edition (2018)(reprint of 1E)<br />
<br><br />
If you want to play 1E/30th Anniversary, you can either:<br />
* a) Use this sheet, and turn turn off the '''Wild Die''' in the [[Star_Wars_WEG_D6_character_sheet#Settings_Menu|Settings Menu]],<br />
* b) Use the [[Star_Wars_30th_Anniversary_Edition_sheet | the 30th Anniversary sheet]] which is designed specifically for playing 1E.<br />
* c) use the [[D6 Space]] sheet, which uses more or less the same system as SWD6, just without any branding. <br />
<br />
See Also: '''[[Star_Wars_D6#Rolls_in_Star_Wars_D6 |Rolls in Star Wars D6]]'''<br />
<br />
==Rolling from the sheet==<br />
<br />
All rolls results from buttons of the sheet use a Roll Template built into the sheet(which is based on the [[Roll_Templates#Default|Default Roll Template]]), and results are rolled for all to see. There is an option to also show roll buttons that only sends results to the GM.<br />
<br />
The rolls take into account the possible penalties from <code>@{WoundMod}</code> and <code>@{Force_Up}</code>(when appropriate),if the character is wounded or concentrates on a continuous Force power. Further, the force skills takes in account <code>@{Force_EmptinessMod}</code> bonus if it is checked.<br />
<br />
For the Initiative rolls to appear on the [[Turn_Tracker|Initiative Tracker]], the sheet must be connected to a token and be selected, before rolling for initiative.<br />
The '''Character points''', '''Extra dice''' and '''Custom Roll''' buttons doesn't account for the <code>@{WoundMod}</code> and <code>@{Force_Up}</code> attributes for simplicity's sake.<br />
<br />
This is the macro code that the Dexterity Roll button uses:<br />
<pre style="overflow:auto;white-space:pre-wrap;" data-language="javascript"><br />
&{template:blue} {{name=Dexterity}} {{Roll=[[(@{dexterity} -@{WoundMod} +@{Force_Up} + ?{Dice mods|0} -1)d6cf0cs7 + @{dexteritypip} + ?{Other Mods(pip)|0} + 1d6@{wilddie}]]}}<br />
</pre><br />
<br />
The <code>1d6@{wilddie}</code> part of the roll determines if a Wild Die is rolled or not, which can be edited in the [[#Settings Menu|Settings Menu]].<br />
<br />
===Roll Results===<br />
* When you '''roll a 1 on the Wild Die''', the is highlighted with a red border<br />
* '''rolling a 6 on the Wild Die'''highlighted in green border if it explodes<br />
* TA blue border on the rolls means the wild die exploded, but on one of the exploded die rolls where a 1. This doesn't mean anything speciial the SW D& rules, but is just how Roll20 shows if both a crit fail and a crit success is rolled in one roll. It might be possible to change the blue highlight to be green, but I haven't looked into it.<br />
<br />
== Settings Menu ==<br />
[[File:SWD6 settingsmenu.png|framed|right|The "Cog" icon that opens the Settings Menu]]<br />
You access the settings menu by clicking on the cog and click again to exit the menu can show and hide a few things. All the options are independent from eachother.<br />
{| class="wikitable"<br />
|+Options<br />
|-<br />
|'''Sheet Type'''<br />
| Can switch between the four sheet types, '''PC''', '''NPC''', '''Ship''' and '''Shop/Container'''<br />
|-<br />
|'''Hide GM Rolls?'''<br />
| Hides the extra roll buttons with "GM" written on them. The GM rolls function like the regular rolls except they are whispered to the GM. <br />
|-<br />
|'''Disable Roll Mod Query?'''<br />
| Removes the popup from all rolls that asking for modifications before outputting the roll in the chat. Speeds up play if you don't do MAP often.<br />
|-<br />
|'''Disable Wild Die?'''<br />
| If checked, will change so dice rolls from the sheet doesn't have a Wild Die in them, making it easier for example to play 1E that doesn't use Wild Die.<br />
|-<br />
|'''Hide Force Section?'''<br />
|Hides the Force section, useful for characters who aren't Force sensitive<br />
|-<br />
|'''Hide Background/Equipment/etc.?'''<br />
|Hides the section from the sheet, reduce scrolling if sections aren't used.<br />
|-<br />
|'''Hide [[#Character Point & Credit Summary|Character Point/Credit Summary]] section?'''<br />
|Hides the section from the sheet, reduce scrolling if sections aren't used.<br />
|}<br />
=Sheet Types=<br />
Apart from using it as a sheet for players, there are a number of other modes you can change the sheet into, including NPC, Starship / Storage<br />
<br />
== PC Sheet ==<br />
Generally, info described in the PC sheet sections applies on the NPC sheet, which is just a simplified look of the former.<br />
<br />
===Core===<br />
<br />
* tracking various core stats, '''Wound Level''', '''Character Points''', '''Force Points''', '''Dark Side Points'''<br />
* The '''Species''' field have auto-complete for 400+ species<br />
* several buttons to make various extra rolls, with or w/o Wild Die<br />
* '''Initiative''' roll button & misc Initiative bonus<br />
<br />
===Attributes & Skills===<br />
* You can have any number of skills under each attribute<br />
* Relevant Skillnames will be suggested as you start typing them.<br />
<br />
[[File:Swd6-datalist.gif|as you type, skills for that Attribute will be suggested.]]<br />
===Weapons & Armor ===<br />
[[File:SWD6 armor.png|500px|thumb|right]]<br />
<br />
'''Weapons'''<br />
* '''Section width issue:''' currently if you have the sheet open verry narrow, the end part of Weapon & Armor rows are hidden behind separate scroll-bar. <br />
<br />
<br />
'''Armor'''<br />
* three roll buttons, for rolling damage soak with either your armor's Physical resistance(and your Strength),Energy resistance(and your Strength), or only your inherit Strength attribute.<br />
* '''star''' symbol rolls your armor's Physical soak, and the '''bolt''' icon rolls your armor's Energy soak.<br />
* '''Wounds''' doesn't affect your '''Strength''' dice in the Armor/Soak rolls(per 2E R&E rules).<br />
<br />
=== Force ===<br />
'''Force Skill'''<br />
<br />
* Force Power have autocomplete for names, suggesting Force Powers tied to that Force Skill <br />
* The three Force skills rolls takes in account<br />
** How Wounded the char is.(Resist Pain will modify this penalty)<br />
** '''Number of active powers''' (automatically subtracted)<br />
** if '''Force Emptiness''' is active, pip bonus applied.<br />
<br />
'''Force Emptiness:'''<br />
<br />
If active, adds (<code>6 - number of dark side points</code>) pips to all force rolls.<br />
<br />
'''Resist Pain:'''<br />
<br />
If active, reduces the '''Wound Penalty''' down to -1, as per 2E R&E rules.<br />
<br />
'''Number of active powers'''<br />
<br />
To keep track of the Multi-Action Penalty incurred from upholding active Force Powers. '''Resist Pain''' doesn't need to be taken into account, it's tracked separatly.<br />
<br />
'''Lightsaber Combat:'''<br />
<br />
Useful to track the usual attack bonus and damage increase/decrease one uses frequently. Both rolls takes into account if Force Emptiness is active, and the attack any Wound penalties. For other rolls will LC is active it's recommended to use above tracker for the MAP penalty coming from LC. <br />
<br />
===Character Point & Credit Summary===<br />
Trackers that can be useful for tracking your history of Char Point & Credit gains and losses. The Counter at the top of both sections counts the total.<br />
<br />
These sections are hidden by default on new sheets, you can change that on the [[#Settings Menu|Settings Menu]].<br />
<br />
[[File:SWD6-charpoint-credit-tracker.png| v.2.41]]<br />
<br />
== NPC sheet ==<br />
<br />
The NPC sheet is a condensed version of the regular sheet for ease of use. Reduces two first sections from the PC version to Name, Health tracker, init button and info box, and '''Equipment''' section down to one field. Doesn't show Char Point/Credit tracking sections.<br />
<br />
Generally, info described in the PC sheet sections applies on the NPC sheet, which is just a simplified look of the former.<br />
<br />
'''Other Comments:'''<br />
* The NPC's "Physical Description & Other Info" field uses the "Physical Description" attribute from the PC sheet<br />
* The single "Equipment" field uses the attribute from the first box in the PC version of the Equipment section<br />
* Switching between PC/NPC version of the sheet doesn't change any attributes, only hides some. The sheets share all stats so that the NPC sheet can also be used by players who favour the more compact view.<br />
<br />
==Starship==<br />
The starship sheet contains various options for starship bookkeeping. <br />
<br />
* Crew Stations<br />
* Has section for Sensor Array<br />
* Prices<br />
* Contains some roll buttons, like Ship Weapons<br />
<br />
==Vehicle==<br />
A simplified version of the starship sheet.<br />
<br />
<br />
==Container/Shop==<br />
Simply shows the '''Weapon & Armor''', and the '''Equipment''-sections, and nothing else.<br />
<br />
Useful if you want to have a separate sheet to track external container, storage or cargo bays of PCs/NPCs. Alternatively, it can serve as a display for available wares in a shop or store held by an NPC.<br />
<br />
[[File:Swd6-container.png| v2.41]]<br />
<br />
=Advanced Use=<br />
Various advanced tips & tricks for the sheet.<br />
==Default Settings==<br />
[[File:SWD6 defaultsettings.png|500px|thumb|right]]<br />
Default Settings are something the GM of a game using the SWD6 sheet can use to customize how new sheets looks like, function and what they contain. Here are a few suggestion on how these can help streamline things for both GMs and players.<br />
<br />
* '''Sheet type:''' If the GM have added all needed PC sheets already, they could change this to '''NPC''', so that subsequently when adding new NPC sheets to the campaign they show the NPC view by default<br />
* '''Hide GM Rolls?:''' If a GM doens't do hidden rolls, hiding the GM roll buttons from the sheets as default reduce the clutter for both players and the GM<br />
* '''Disable Roll Query?:''' If your game does change the values of stats often before rolling, it can be beneficial to disable this by default for new players.<br />
* '''Use Wild Die:''' If the game doesn't use Wild Die(Such as playing 1E or some homebrew), it's handy to set all sheets to not use them by default.<br />
* '''Hide Force Section:''' If a player(or NPCs in general) doesn't use Force powers, it's practical to hide the section by default.<br />
* '''Credit/Character Points/Force Points:''' If players are to start with different amounts than the defaults, it's handy to change it from here in advance.<br />
<br />
==Roll templates==<br />
The <code>&{template:swd6}</code> template is used in most roll: can be called with examples like:<br />
<pre style="overflow:auto;white-space:pre-wrap;">&{template:swd6} {{name=?{Roll Name}}} {{Roll=[[{(?{Number of dice|0} - 1)d6cf0cs7 + ?{Number of pip|0},1d6!cf1cs6}]]}} {{desc=this section is optional, but nice to have if you want to display text}}</pre><br />
<br />
You can also use <code>&{template:swd6}</code>, <code>&{template:blue}</code>, <code>&{template:red}</code>, <code>&{template:green}</code> or <code>&{template:black}</code> with the corresponding colors in your macros apart from the default template. They function otherwise identically to the default roll template.<br />
<br />
<br />
The [[Roll_Templates#Default|default roll template]] can be called with examples like:<br />
<pre style="overflow:auto;white-space:pre-wrap;">&{template:default} {{name=?{Roll Name}}} {{Roll=[[{(?{Number of dice|0} - 1)d6cf0cs7 + ?{Number of pip|0},1d6!cf1cs6}]]}}</pre><br />
<br />
==Roll20 sheet general tips==<br />
{{mbox | text = '''NOTE:''' On all rolls the pip field must be filled with a number and cannot be left empty, otherwise it will break the roll and show only show a result of "0" in the chat.}}<br />
* Wound penalties are automatically subtracted from all relevant rolls if used, same with the "Force Powers Up" tracker that automatically penalize you with the reported Multiple Action Penalty (MAP)<br />
* You can hide some unnecessary sections from the settings menu<br />
* the NPC version of the sheet can be useful for some players players<br />
* If you don't need to modify your roll, you can after clicking on the roll button on the sheet press enter twice to ignore the "dice mod" queries, or optionally completely turn off the feature from the Settings Menu. <br />
<br><br />
<br />
==Macros==<br />
Custom Roll:<br />
<br />
<pre style="overflow:auto;white-space:pre-wrap;">&{template:default} {{name=?{Roll Name}}} {{Roll=[[{(?{Number of dice|0} - 1)d6cf0cs7 + ?{Number of pip|0},1d6!cf1cs6}]]}}</pre><br />
<br />
Noteworthy attributes that can be useful in macros:<br />
<br />
<code>@{WoundMod}</code><br />
<br />
It's value can be 0,-1,-1,-2,-5,-5, corresponding to Healthy, stunned, wounded, wounded twice, incapacitated, mortally wounded as they can be selected from the sheet. Good for tracking roll penalties automatically. Incapacitated and mortally wounded have the absurd penalties in place as character shouldn't be able to function when in that shape.<br />
<br />
<code>@{Force_Up}</code><br />
<br />
It can track numbers of force powers "up", and gives the corresponding negative value for number of active powers. Good for tracking roll penalties incurring from upheld force powers automatically.<br />
<br />
Weapon Roll:<br />
Set as "Show as Token Action"<br />
<br />
<pre style="overflow:auto;white-space:pre-wrap;">&{template:red} {{name=@{selected|charactername} : @{selected|repeating_weapons_$0_weapon}}} {{Attack Roll=[[(@{selected|repeating_weapons_$0_weaponskill} -@{selected|WoundMod} +@{selected|Force_Up} + ?{Dice mods|0} -1)d6cf0cs0 + @{selected|repeating_weapons_$0_weaponskillpip} + ?{Other Mods(pip)|0} + 1d6@{selected|wilddie}]]}} {{Damage=[[(@{selected|repeating_weapons_$0_damagedice} - 1)d6cf0cs7 + @{selected|repeating_weapons_$0_damagepip} + (1d6@{selected|wilddie})]]}}</pre><br />
<br />
This will roll the attack and damage for the first weapon listed in a character sheet. With the '''Characters Name : Weapon Name''' as the title, you can modify this code for the second weapon, by changing the <code>$0</code> to <code>$1</code> in the relevant places, use your third weapon with <code>$2</code>, etc.<br />
<br />
===[[Star_Wars_D6#Macros|Generic Star Wars D6 Macros]]===<br />
{{main|Star_Wars_D6#Macros}}<br />
<br><br />
==API==<br />
{{pro only|section=true}}<br />
Great API to use with the sheet.<br />
<br />
* [[Script:Wild Dice]] make rolls that on crit fail, automatically subtracts wild die and highest roll.<br />
** '''Ex.''' <code><nowiki>!wd [[4d6+2]]</nowiki></code><br />
** '''Ex.''' <code><nowiki>!wd [[(@{Bob|dexterity} -@{Bob|WoundMod} +@{Bob|Force_Up} + ?{Dice mods|0})d6 + @{Bob|dexteritypip} + ?{Other Mods(pip)|0}]]</nowiki></code><br />
* [[ChatSetAttr]] make API commands or macros that update stats while also making rolls<br />
** the [[ChatSetAttr#Inline_roll_example|inline example]] is especially nice<br />
* [[Script:Ammo]] simple API to update & track ammo with chat commands<br />
* [[GroupInitiative]] roll initiative for several characters at once <br />
** page has an example config for SWD6 [[Script:Group_Initiative#Configuring_for_Specific_Sheets|here]]<br />
* [[GroupCheck]] could be used for rolling attribute rolls for multiple characters at the same time<br />
** you need to config API for SWD6 before use<br />
** think it would to implement for specific skills bc they are in [[Repeating Sections]] [[User:1223200|1223200]] ([[User talk:1223200|talk]]) 14:28, 5 August 2021 (UTC) <br />
* [[TokenMod]] make API Commands that update [[tokens]] quickly, and/or change token/character stats<br />
** could be useful to quickly change Token Markers for Wound levels, or show/hide token name label<br />
<br />
==Tools==<br />
[[Game_Resources#Star_Wars_D6|Tools for Star Wars D6]]<br />
<br><br />
=Changelog=<br />
{{repo|Roll20/roll20-character-sheets/blob/master/D6StarWars/CHANGELOG.md Sheet Changelog}}(more up to date than wiki page in most cases)<br />
<br />
==Version 2.42 (2021-08-13)==<br />
* '''Attributes & Skills:'''<br />
** added names to roll buttons (so they can be dragged to macro bar or called in chat)<br />
** skill name selection now have "(A)" on Advanced Skills<br />
* '''Force:'''"Burst of Speed" added to control powers, lightsaber combat name shorter<br />
* '''Starship:'''<br />
** make main info block more compact<br />
** weapons now have "location"-field, and the weapon's text-fields are more compact.<br />
** "Other Ship Stats" is more compact<br />
* '''Settings'''<br />
** added button/link to sheet instructions/Changelog<br />
** clarify & cleanup settings options<br />
* updated "Instructions" on sheet.json <br />
* minor visual fixes (Sheet-logo/title, wound level, init-bonus tracker, Background-section, footer)<br />
<br />
==Version 2.41 (2021-06-10)==<br />
* Feature: Skills, Species, Force Powers auto-suggestions, suggest relevant names as you start typing<br />
* Visual: Player Core + Secondary Info, Attributes & Skills, Weapons & Armors, Force section's layout improved<br />
* FIX: Resist Pain effect works as expected<br />
* Code Refactor & cleanup, update sheet to [[CSE]]<br />
<br />
==Version 2.34 (2021-05-20)==<br />
* Enhance Player Core info section's layout<br />
* Reformats Player Secondary Info section<br />
* Enhance Attributes & Skills section's layout<br />
* Enhance Weapons & Armors section's layout<br />
* Enhance Force section's layout<br />
* FIX: cleaning up HTML code<br />
* FIX: removes invalid CSS code<br />
* FIX: Resist Pain effect works as expected<br />
<br />
<br />
'''Version 2.33 (2021-04-06)'''<br />
update by Moondancer83 ({{repo|Roll20/roll20-character-sheets/pull/8662 PR}})<br />
* remove duplicated control force power name field<br />
* fix force power section width<br />
<br />
<br />
'''Version 2.32 (2021-02-09)'''<br />
* add missing lightsaber damage roll button<br />
<br />
<br />
'''Version 2.31 (2020-10-03)'''<br />
* removed broken logo at top<br />
* revamp of starship section<br />
* add new roll templates, used in ship weapon damage rolls<br />
<br />
See '''{{repo|Roll20/roll20-character-sheets/blob/master/D6StarWars/CHANGELOG.md Full Changelog}}''' for older updates.<br />
<br><br />
<br />
=Feature Requests=<br />
<br />
If you have a bug or have feature you would like added, you can contact either of the active contributors, {{user profile|1223200|Andreas J.}} or {{user profile|5766339|Mark}}.<br />
* '''Rolls/Roll template'''<br />
** Multi-Action Penalty tracker, which automatically subtracts from all rolls.<br />
*** '''Workaround with current sheet:''' Use the [[#Force|Force]]-section's "Number of active Powers"-tracker <br />
** option to customize default rolls (use/don't use roll template, show/hide char name in roll, option for API integration) {{repo|Roll20/roll20-character-sheets/blob/6c555c76171eb124ce10fae6c525bdaee940b154/GODSEND-Agenda/sheet.html#L218 example}}<br />
** option to display description in some rolls (Skills, Weapons, Armor, Force Powers)<br />
** option to show Wild Die crit fail outcome result<br />
** Update char point rolls to have [[ChatSetAttr]], so if API is installed, char points are automatically subtracted<br />
** add [[Inline#Inline_Labels|inline labels]] to all roll results, makes it easier to see source for each part <br />
*** example: <code><nowiki>&amp;{template:swd6} {{name=Force:Control}} {{Roll=[[(@{control}[force control] -@{WoundMod}[woundmod] +@{Force_Up}[active force powers] +?{Dice mods|0}[dicemode] -1)d6cf0cs0 +@{controlpip}[controlpip] +@{Force_EmptinessMod}[force emptiness] +?{Other Mods(pip)|0}[pip mod] +1d6@{wilddie}[Wild Die]]]}}</nowiki></code><br />
** option to display Difficulty of roll result (Very Easy, Easy, Moderate etc.)<br />
** update to use [[Building_Character_Sheets/Roll_Templates#Jakob.27s_Better_Default_Rolltemplate|Jacob's better roll template]]<br />
*** make the roll template more SW-themed<br />
** grenade deviation direction (REUP p. 92)<br />
<br />
* '''Visuals / Info'''<br />
** integrated changelog inside sheet, [[Sheet_Author_Tips#Changelog_and_Update_Notification_inside_Sheet|notification on latest sheet updates]]<br />
** divide sheet into tabs (/w toggle between single/multi-page sheet<br />
** Option for [[#Character Point & Credit Summary|Char Point Tracker]] to update the numbers at the top of the PC sheet<br />
** light mode, or alternative sheet color-scheme to the (current) dark visuals<br />
** Inventory: change boxes into separate equipped/inventory/stash<br />
** option for "rulebook source"-field, so you can mention what book/page the item/skill/power/etc is from<br />
** option for dyslexia-friendly font<br />
** add more tooltip info shown on hover(abbrevation & stat explanations, name of macro field<code>@{controlpip}</code> Etc.)<br />
** languages tracking on Background-section, [[Repeating Section]]<br />
<br />
* '''Attributes/Skills'''<br />
** have new skills start /w parent attribute's value(instead of 3)<br />
** Add notes-field to individual powers, /w hide/show field-option<br />
** some specialization name auto-suggest<br />
** option to add species' attr max<br />
** track misc. perception bonuses (from gear, species, Force)/ Sensor roll section <br />
<br />
* '''Combat'''<br />
** add weapon description box under weapon, hide/show option. same for armor. <br />
** called shots roll mod<br />
** Random body location hit roll (REUP p.97)<br />
** Martial Arts statblock(name/difficulty/effect) (REUP p. 99)<br />
** Stun roll (person is stunned for 2d minutes)<br />
** option to show vehicle/ship weapons<br />
<br />
* '''Force powers'''<br />
** Add notes-field to individual powers, /w hide/show field-option<br />
** options to track "Enhance Attribute"(make so attr bonus is automatically added to relevant rolls)<br />
** Custom damage section for force powers<br />
** relationship & proximity charts<br />
<br />
* '''Vehicle/Ship/NPC/Droid'''<br />
** create separate Vehicle page, w/o the starship stuff<br />
*** expand the simple ship/vehicle section with rolls and more stat sections<br />
*** starship damage location roll<br />
** Container/shop phys. description field<br />
** Creature statblock (dex, per, str, size,scale, spec.a bility, Orneriness, damage roll attack)<br />
** Droid statblock, Droid Char Traits, cost, otherwise as PC<br />
*** installation/skillware/traitware/mods Tracker, sum up total cost <br />
*** when selected, auto-hides Force section<br />
** starport statblock<br />
** Planet statblock<br />
<br />
* '''Other Features'''<br />
** make an "Armor penalty"-slot for armor, so that the penalty could automatically be removed from Dex-based rolls. Probably needs a "worn" checkbox.<br />
** Wound Level<br />
*** displaying numerical Wound Penalty next to each level<br />
*** option to have WL be more viable/float in corner/show in Combat section<br />
** Difficulty Chart<br />
** Advantages & Disadvantages-field, w/ auto-suggestion(datalist), show/hide option<br />
** Streamlining sheet for 1E gameplay<br />
*** simplifying the two armor types into one<br />
*** disabling Wild Die as default<br />
*** displaying "1E" in sheet's corner<br />
** option to import characters statsblock, plaintext or <code>.json</code><br />
<br />
* '''GM'''<br />
** Mishap rolls (weapon/vehicle, nonlethal REUP p.58, astrogation p.124)<br />
** option to roll Wild Die crit fail outcome (do nothing/remove highest die, complication)<br />
** damage roll chart (objects, characters, vehicles)<br />
** illness/disease results (REUP p.105) <br />
** movement failure(REUP p113)<br />
** dice code(universal standard) chart (2d= avg. human, 6d= 1 in 100k person, 9D= 1 in 1b person) (p.269)<br />
<br />
* [[CSE]]-based stuff<br />
** add name suggestion lists for NPC Names, Weapons, Armor, Vehicles<br />
** add Adventure Journal species to suggest list (datalist)<br />
** Create one-in-all roll modifier [[CSE#Popup|popup]] (Asking both bonus dice & bonus pips), instead of using normal queries.(Might require [[Custom Roll Parsing]])<br />
** create navbar(jump to sheet section instead of scrolling)<br />
** adapt for [[mobile]]<br />
** make printer-friendly<br />
<br />
* other/code refactor<br />
** roll button refactor: change the massive number of near-identical roll buttons for each section, to be a single button which is modified by <code>@{whisper}</code>, <code>@{modquery}</code> etc.<br />
*** {{repo|Roll20/roll20-character-sheets/blob/master/GODSEND-Agenda/sheet.html GODSEND-Agenda}} example: <code><nowiki>@{whisper}&{template:rolls} {{title=con }} {{subtitle=@{character_name} }} {{roll= [[@{dice}+@{con}[con]@{modquery}]]}}</nowiki></code>, which is then altered from {{repo|Roll20/roll20-character-sheets/blob/6c555c76171eb124ce10fae6c525bdaee940b154/GODSEND-Agenda/sheet.html#L218 here}}<br />
** refactor all archaic [[Designing_Character_Sheet_Layout#Roll20_columns.2Frows|roll20 columns/rows]] to css grid & flexbox<br />
** refactor all <code><nowiki><table></nowiki></code> into css grid & flexbox<br />
** reduce amount of inline-css on <code>.html</code>, move to <code>.css</code><br />
** simplify & streamline css, keep related css close<br />
** possibly refactor to use [[Sheet_Author_Tips#PUG|PUG & SASS]], would streamline sheet development<br />
<br><br />
<br />
==Plans==<br />
Character Sheet update plans, priorities etc.<br />
<br />
* '''fixes TODO'''<br />
** make Weapons & Armor media query override, to make it stretch & to avoid the scrollbar<br />
*** make name wider as section is bigger<br />
** make sheetworker to read & save existing skills with 3 dice, to permanently save current skills that is affected by the "new skills at 3 pip disappear"-bug.<br />
*** When this is fixed, the sheet can then further updated to make new skills start with current Attr, instead of current "3"<br />
** fix color-coded roll templates to match <code>&{template:swd6}</code>, update char point roll button<br />
<br />
* '''[[Andreas J.]]''' (stuff I might do next)<br />
** skill specialisation to datalist<br />
** inline labels<br />
*** example: <code><nowiki>&amp;{template:swd6} {{name=Force:Control}} {{Roll=[[(@{control}[force control] -@{WoundMod}[woundmod] +@{Force_Up}[active force powers] +?{Dice mods|0}[dicemode] -1)d6cf0cs0 +@{controlpip}[controlpip] +@{Force_EmptinessMod}[force emptiness] +?{Other Mods(pip)|0}[pip mod] +1d6@{wilddie}[Wild Die]]]}}</nowiki></code><br />
** AJ species<br />
** Archetype datalist<br />
** Sheet navbar<br />
*** show/hide hidden section<br />
** Simple vehicle sheet<br />
*** shop/container: add description box, Character Point & Credit summary show/hide<br />
<br />
=See Also=<br />
* [[Star Wars RPG | List of Star Wars RPGs on Roll20]]<br />
** '''[[Star Wars D6]]''' general advice on running SWD6 on Roll20<br />
** [[Star Wars 30th Anniversary Edition sheet|Star Wars: (D6) 30th Anniversary Edition]]<br />
* [https://app.roll20.net/campaigns/details/2036000/star-wars-d6-hub Star Wars D6 Hub on Roll20]<br />
* {{repo|Roll20/roll20-character-sheets/tree/master/D6StarWars D6StarWars Sourcecode}} (Current Sheet)<br />
* {{repo|Anduh/roll20-StarWarsD6 Anduh's SWD6 Sheet Dev repo}}<br />
* [http://www.d6holocron.com/ D6 Holocron] Good Resources for SWD6<br />
<br><br />
<br><br />
<br />
[[Category:Macros]]<br />
[[Category:Character Sheet Documentation]]<br />
[[Category:Star Wars]]</div>1223200https://wiki.roll20.net/Category:Dark_ModeCategory:Dark Mode2023-11-06T10:22:19Z<p>1223200: Created page with "Anything related to supported Dark Mode and workarounds & developments for it on the platform."</p>
<hr />
<div>Anything related to supported Dark Mode and workarounds & developments for it on the platform.</div>1223200https://wiki.roll20.net/StylusStylus2023-11-06T10:20:03Z<p>1223200: </p>
<hr />
<div><noinclude>{{revdate}}{{main|Browser}}</noinclude>'''Stylus''' is a browser plugin that can change how webpages look, and many roll20 users have created their own tricks and minor adjustments to Roll20 for personal use. Things like changing how certain tools look in Roll20, making a [[Dark Mode]], adjusting looks on [[CS|character sheets]], or how things look in the {{Text Chat}}.<br />
<br />
* Install Plugin: [https://chrome.google.com/webstore/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne?hl=en Chrome/Edge] | [https://addons.mozilla.org/en-US/firefox/addon/styl-us/ Firefox] | [https://cascadea.app/ Cascadea(Safari-alternative)] <br />
* Latest megathread '''{{fpl|10802054/ Latest Show off Your Style 4: A New Hope}}''' April 2022<br />
* Check '''{{fpl|9784281/ Show off Your Style 3: Third Time is the Charm}}''' for more info and good tricks others have created. The first post has a massive index of snippets to use<br />
** [[Hidden_Rolls#Blind_Rolls.28Stylus.29|Hidden Rolls]] - trick relies on Stylus to work<br />
** [[Using_Roll20_while_Playing_In-Person#User_Style_Manager|Play In-Person, Hide UI]]<br />
* [https://userstyles.org/styles/browse?search_terms=Roll20&type=false userstyles.org] - search for styles people have shared online for any sites.<br />
** [https://userstyles.org/users/404405 Userstyles by #Keith Curtis] made by [[Keith]]<br />
* Older threads:<br />
** {{fpl|7841113/ Show Off Your Style 2: The Stylening!}}<br />
** {{fpl|7209333/ Show Off Your Style}}<br />
<br />
'''Note:''' there is a similarly named extension "Stylish", but it's stealing your browser history [https://robertheaton.com/2018/08/16/stylish-is-back-and-you-still-shouldnt-use-it/ "Stylish" is back, and you still shouldn't use it]<br />
<noinclude>__TOC__</noinclude><br />
<br />
<noinclude><br />
==Stylus Snippets==<br />
* https://app.roll20.net/forum/post/10695950/wrapping-macro-bar-when-you-have-many-buttons<br />
* https://app.roll20.net/forum/post/11479684/stylus-script-for-stacking-names<br />
<br />
===Dark Mode===<br />
</noinclude><br />
'''[[Dark Mode]]''' options:<br />
{{:Dark Mode}}<br />
<noinclude><br />
===Display filesize/dimensions in Art Library===<br />
(by Keith)<br />
<br />
Fix for {{Art Library}}<br />
<pre data-language="css">#marketplaceresults li::after,<br />
#recentuploads li::after{<br />
background-color: white;<br />
content: attr(data-grid-width)"x"attr(data-grid-height);<br />
display: inline-block;<br />
font-size: 1em;<br />
padding-left: 30px;<br />
position: absolute;<br />
right: 0;<br />
}<br />
</pre><br />
<br />
===5E Sheet Dark Mode Red to purple===<br />
by keith<br />
<br />
Stylus can use the CSS variable names. This code will change all {{5E}} red to purple, when you have [[Dark Mode]] on:<br />
<pre data-language="css"><br />
.sheet-darkmode .npc .display .red span {<br />
color: var(--dark-primary);<br />
}<br />
</pre><br />
<br />
[[Category:Web Browser]][[Category:Web Browser Extensions]] [[Category:Dark Mode]]</noinclude></div>1223200https://wiki.roll20.net/Page_ToolbarPage Toolbar2023-11-05T11:22:46Z<p>1223200: Page Folders-section, new feature</p>
<hr />
<div>{{revdate}}{{HCbox| {{hc|articles/360039675413-Page-Toolbar Here}} }}<br />
{{cleanup-msg|Page Toolbar have {{forum|post/9483471/release-note-for-november-10-2020 received an update}} in November, so the images & info here is somewhat outdated. the [[Help Center]] pages linked above are more up to date on this.| Jan 2021}}<br />
{{gm only tool}}<br />
<br />
In Roll20, a game is comprised of multiple Pages, like the pages from a storybook or the scenes in a storyboard. Each page represents an encounter, an NPC, an overland map, or some other discrete piece of the game. You can only view one page at a time.<br />
[[File:Page-toolbar-Dec2020.png|thumbnail|right|550px| The Page Toolbar (Dec 2020) ]]<br />
__TOC__<br />
=Page Toolbar=<br />
{{#evp:youtube|D5KvccWsFt4| Page Settings & The Players Ribbon: Roll20 Tutorial|right|500}}<br />
== Managing Pages ==<br />
You, as a [[Gamemaster]], manage the pages of your Game by clicking on the Page Toolbar button in the top right-hand side of the screen (a blue button with a white icon of a page). The toolbar shows you all the pages currently in your game. You can drag and drop the pages to re-order them, or click on the name of the page to edit the name. The Page Toolbar can be scrolled horizontally by using your mouse wheel while holding your keyboard's Shift key.<br />
<br />
If you hover over a page you'll also see two new buttons appear, one ({{gear}},a gear icon) for accessing the Page Settings dialog box, and the other (a crossed X) for duplicating the page. To delete the page, click on the gear and scroll to the bottom of the menu to find the red "Delete Page" button.<br />
<br />
To create a new page, just click on the &quot;Create New Page&quot; button on the left-hand side of the Page Toolbar. Change the page's name by clicking on the name under the page's icon. Enter the new name and press Enter/Return to save.<br />
{{clear}}<br />
=== Page Folders ===<br />
[[File:Roll20-page-foldersOct2023-2.png|right|thumbnail|500px]]<br />
You can organize pages/maps into [[Page Folders]]. This was added in Oct 2023.<br />
<br />
{{clear}}<br />
=== Page Icons ===<br />
The image used to represent a '''Page''' is the largest image on that page. If you would like to override the '''Page Icon''', you can place the image you want to use (or duplicate an existing graphic that isn't the largest image) and then scale it up to a very large size. You can then right click the image and move it to the back of the layer to hide it beneath other images. See: [[Manipulating_Graphics|Manipulating Graphics]]<br />
<br />
== Switching Between Pages ==<br />
<br />
The GM can quickly switch between pages at any time by accessing the Page Toolbar and clicking on the page that they want to switch to. There will be a short loading sequence and the selected page will be displayed.<br />
<br />
Note that is entirely possible that the [[GM]] and the [[players]] can be on a different page, so you can be constructing the next encounter while your players are still on a previous page.<br />
<br />
<br />
===Player Ribbon===<br />
{{:Player Ribbon}}<br />
{{clear}}<br />
<br />
== Duplicate Page Settings ==<br />
{{:True Page Duplication}}<br />
<br><br />
<br><br />
<br />
== Moving Tokens Between Pages ==<br />
<br />
Sometimes you will want to move objects (such as [[tokens]] representing the players) between pages.<br />
<br />
To do so, just select the tokens, then press {{button|Ctrl}}+{{button|C}} ({{button|Cmd}}+{{button|C}} on Mac) to copy them. <br />
<br />
Switch to the new page, then press {{button|Ctrl}}+{{button|V}}({{button|Cmd}}+{{button|V}} for Mac) to paste them onto the new page. The location that token will paste to is oriented from the last time you clicked on the tabletop.<br />
<br />
== Split the Party ==<br />
{{:Split the Party}}<br />
<br />
== Page Settings ==<br />
{{main|Page Settings}}<br />
<br />
There are a number of settings that you can change for each page, including the type of grid, enabling {{fow}}, [[Dynamic Lighting]], and more. For more details, see [[Page Settings]].<br />
<br />
=Related Pages=<br />
[[File:Roll20 Interface.jpg|thumb|right|500px|]]<br />
* [[User Interface]]<br />
** '''1.''' [[Tabletop Overview|The Tabletop]]<br />
** '''2.''' [[Toolbox Overview|The Toolbox]]<br />
** '''3.''' [[Page_Toolbar|Page Toolbar]]<br />
** '''4.''' [[Sidebar|The Sidebar]]<br />
* Other<br />
** [[Landing Page]]<br />
<br />
[[Category:Docs]]<br />
[[Category:VTT Interface]]<br />
[[Category:Maps]]<br />
[[Category:Tagged for Cleanup]]</div>1223200https://wiki.roll20.net/Page_FoldersPage Folders2023-11-05T11:19:11Z<p>1223200: Page Folders released, add img</p>
<hr />
<div>{{revdate}}<br />
[[File:Roll20-page-foldersOct2023-2.png|right|thumbnail|500px]]<br />
Option to organize pages/maps in folders was released in Oct 2023.<sup>[https://app.roll20.net/forum/post/11666661/page-folders-have-arrived/?pageforid=11666661#post-11666661 source]</sup><br />
<br />
This is an update to the [[Page Toolbar]].<br />
<br />
<br><br><br><br><br><br><br />
<hr><br />
<div style="color:gray;"><br />
Old Links from before feature was rolled out:<br />
* '''{{forum|post/1618045/a-better-way-to-organize-pages A better way to organize pages(like folders)}}''' Suggestion post -completed<br />
** [https://www.reddit.com/r/Roll20/comments/15b3dhf/folders_coming_this_summer_to_roll20/ Map folders are on the way this summer] - July 2023<br />
** Partial Workaround: You can declutter the page list by [[Page_Settings#Archive_Page|Archiving]] less used pages, and then restore them when needed.<br />
</div><br />
<br />
[[Category:New features in 2023]]</div>1223200https://wiki.roll20.net/File:Roll20-page-foldersOct2023-2.pngFile:Roll20-page-foldersOct2023-2.png2023-11-05T11:14:42Z<p>1223200: Page Folders release image from this post: https://app.roll20.net/forum/permalink/11666661/</p>
<hr />
<div>Page Folders release image from this post: https://app.roll20.net/forum/permalink/11666661/</div>1223200https://wiki.roll20.net/Character_Sheet_Development/Repeating_SectionCharacter Sheet Development/Repeating Section2023-11-05T09:40:22Z<p>1223200: /* Related Pages */</p>
<hr />
<div>{{revdate}}{{BCS}}<br />
<br />
{{NavSheetDoc}}<br />
This page is for info on how '''Repeating Sections''' are created, used & modified in [[Character Sheet Development]].<br />
<br />
See [[Repeating Section]] for general info on how to use them.<br />
=Repeating Sections=<br />
==General==<br />
Sometimes you may have a type of object where there may be one or more of them, and it's not known ahead of time how many there are. A good example of this is the Skills listing for a Character in Savage Worlds. Roll20's sheets allow you to define a template for each item in the section, and the [[player]] can then add as many of these in the listing as they need.<br />
'''Example:'''<pre data-language="html"><br />
<h3>Skills</h3><br />
<fieldset class="repeating_skills"><br />
<button type="roll" name="roll_skill" value="/em uses @{skillname}, and rolls [[@{dtype}]]"></button><br />
<input type="text" name="attr_skillname" value=""><br />
<select name="attr_dtype" class="dtype"> <br />
<option value="d6">d6</option><br />
<option value="d10">d10</option><br />
</select><br />
</fieldset><br />
</pre><br />
__TOC__<br />
===Definition & Restrictions===<br />
To define a repeating section, create a <code><fieldset></code>-element. Then define give it a unique <code>class</code> with the <code>repeating_</code> prefix and a name written in lowercase & without underscores. Inside the <code><fieldset></code>-element place the info fields that a instance of the section should have. <br />
* '''Each repeating section should have a unique name, and you <div style="color:red;display:inline;">cannot use underscores</div>.''' Use <code>repeating_melee</code>, or <code>repeating_meleeweapon</code>, <div style="color:red;display:inline;">not</div> <code>repeating_melee_weapon</code><br />
** attribute names within one repeating section doesn't have to be unique compared to attribute names in another section. Both <code>repeating_melee</code> and <code>repeating_ranged</code> can both have an attribute named <code>attr_name</code>, as they don't affect eachother <br />
* '''Class names should be all lowercase.''' If it isn't, you'll have problems with launching buttons in a repeating section from macros and scripts<br />
* '''It's not possible to create repeating sections inside repeating sections''' Nesting them isn't possible, but you can vote on {{forum|post/2942465/nested-repeating-sections the suggestion}} and comment why we want it.<br />
* referencing [[button|buttons]] in rep sections behaves slightly different than regular parts of a sheet.<br />
* '''All attributes in a repeating section should have a unique name that isn't already used by a "normal" attribute.''' If you have <code>attr_spellname</code> in your repeating section, you can not have a "normal" <code>attr_spellname</code> outside of the repeating section, but it's fine to have a <code>attr_spellname</code> inside ''another'' repeating section. Se example below:<br />
{| class="wikitable"<br />
|-<br />
! Good Example !! Bad example<br />
|-<br />
| <pre data-language="html"><br />
<fieldset class="repeating_spell-level1"><br />
<input type="text" name="attr_spellname"><br />
</fieldset><br />
<fieldset class="repeating_spell-level2"><br />
<input type="text" name="attr_spellname"><br />
</fieldset><br />
</pre> || <pre data-language="html"><br />
<input type="text" name="attr_spellname"><br />
<fieldset class="repeating_spell-level1"><br />
<input type="text" name="attr_spellname"><br />
</fieldset><br />
</pre><br />
|-<br />
| The attribute <code>attr_spellname</code> is only present inside repeating sections. The attribute <code>attr_spellname</code> can be reused in this way || The attribute <code>attr_spellname</code> is present in both a "normal" attribute and a repeating section. The attribute <code>attr_spellname</code> should '''not''' be used in this way.<br />
|}<br />
<br />
* '''Repeating sections are hard or impossible to create around a HTML <code><nowiki><table></nowiki></code>''', and is recommended to be placed within a single cell if you insist trying to use <code><nowiki><table></nowiki></code>.<br />
** Using {{code|<nowiki><table></nowiki>}} inside Rep Sections might interfere with [[sheetworkers]]. {{fpl|10631126 Button/Sheetworker not working}} ''(Jan 2022)''<br />
* See Also: '''[[Character Sheet Development/Bugs & Quirks#Repeating_Sections]]'''<br />
<br />
<br />
When the sheet is displayed, Roll20 will automatically include:<br />
* '''Add''' , to allow the player to add as many of each item as needed.<br />
* '''Modify''' buttons, which when pressed will make it possible for players to drag&reorder items in the repeating section, along with showing the delete-button(<span style="font-family:Pictos;">#</span>) for deleting individual items.<br />
<br />
<br />
Each item will have its own set of fields (in the example above, each has its own <code>attr_dtype</code> and <code>attr_skillname</code>).<br />
<br />
Internally, each repeating item is stored in an attribute like so: <code>repeating_skills_-ABC123_dtype</code> or <code>repeating_skills_$0_skillname</code>. The '''[[rowID]]''' (the <code>-ABC123</code> part of the previous example) will never change for a repeating section row, so you can reference it in [[macros]], abilities, and [[API scripts]]. New rows that you add will be randomly assigned a new unique ID. By default, Rows are ordered in the order in which they were created, the oldest at the top.<br />
<br />
== Styling Repeating Sections ==<br />
{{main|CSS Wizardry}}<br />
<br />
It's possible to style your repeating sections in a variety of ways. However, you can't just write your CSS as though the <code><fieldset></code> that's in your HTML source is what the user is viewing. After writing the code for your repeating section, here is how it will look when rendered to the user:<br />
<pre data-language="html"><fieldset class="repeating_my-repeating-section" style="display: none;"><br />
<!-- my-repeating-section HTML --><br />
</fieldset><br />
<div class="repcontainer" data-groupname="repeating_my-repeating-section"><br />
<div class="repitem"><br />
<div class="itemcontrol"><br />
<button class="btn btn-danger pictos repcontrol_del">#</button><br />
<a class="btn repcontrol_move">≡</a><br />
</div><br />
<!-- my-repeating-section HTML --><br />
</div><br />
<!-- there will be a div.repitem for each item the user has actually added to the sheet --><br />
</div><br />
<div class="repcontrol" data-groupname="repeating_my-repeating-section"><br />
<button class="btn repcontrol_edit">Modify</button><br />
<button class="btn repcontrol_add">+Add</button><br />
</div></pre><br />
When you click the Modify button, the Add button is is set to <code>display: none</code> and the text of the Modify button is changed to "Done". When you click Done, the Add button is set to <code>display: inline-block</code> and the text of the Done button is changed to "Modify". While modifying repitems, the repcontainer gains the class "editmode".<br />
<br />
Armed with this knowledge, you can do numerous things to alter how your repeating sections are displayed on the final character sheet. For example, you can have multiple repeating items per row:<br />
<pre data-language="css">.repcontainer[data-groupname="repeating_skills"] > .repitem {<br />
display: inline-block;<br />
}</pre><br />
{{note|You do '''not''' prefix the rep* classes with <code>sheet-</code>!}}<br />
<br />
Remember to use the <code>[data-groupname="repeating_..."]</code> attribute selector if you want to only apply the style to a single repeating section. Of course, if you want the style to affect all of your repeating sections, that's not needed.<br />
<br />
=== What Can't You Do? ===<br />
You cannot:<br />
* Change the "display" property of the original <code><fieldset></code>.<br />
* Change the text of the Add, Modify/Done, Delete, or Move buttons.<br />
** However, you could set their opacity to 0 and display something in their place, much like [[#Styling Checkboxes and Radio Buttons|styling checkboxes and radios]], as well as add <code>::before</code> or <code>::after</code> pseudo-elements to them.<br />
* Change the "display" property of the Add button after the user has pressed Modify once.<br />
<br />
===Add, Modify buttons===<br />
<br />
{{repo|Roll20/roll20-character-sheets/blob/729d1f19adcc365b1519f2c23923170bd98e1ed6/cepheus-atom/sheet.css#L350 Cepheus Atom}} example by [[Andreas J.]]<br />
<br />
Target the buttons:<br />
{{ex}}<br />
<pre style="overflow:auto;white-space:pre-wrap;" data-language="css">.charsheet .repcontrol[data-groupname=repeating_mutations] button.repcontrol_edit, .charsheet .repcontrol[data-groupname=repeating_mutations] button.repcontrol_add {<br />
font-family: "Special Elite";<br />
font-weight: 700;<br />
font-size: 1.1em;<br />
}<br />
.charsheet .repcontainer[data-groupname=repeating_mutations] {<br />
width: 100%;<br />
}<br />
.charsheet .repcontainer[data-groupname=repeating_mutations] > .repitem {<br />
display: flex;<br />
justify-content: center;<br />
gap: 3px;<br />
flex-flow: wrap row;<br />
}<br />
.charsheet .repcontainer[data-groupname=repeating_mutations] > .repitem .repcontrol_del {<br />
font-family: "Pictos";<br />
font-size: 1.1em;<br />
padding: 3px 7px 2px;<br />
}<br />
.charsheet .repcontainer[data-groupname=repeating_mutations] > .repitem .repcontrol_move {<br />
font-size: 1.3em;<br />
padding: 3px 7px;<br />
}</pre><br />
<br />
=== Counting Items ===<br />
[https://jsfiddle.net/7cy6uf2j/ Live Demo]<br />
<br />
CSS can let you count things. This can be applied in multiple contexts for character sheets, but one option is to count how many repeating items are in your repeating section:<br />
<pre data-language="html" style="margin-bottom:5px"><br />
<div class="sheet-repeating-fields"><br />
<fieldset class="repeating_my-repeating-section"><br />
<span class="sheet-counter"></span><br />
<input type="text" name="attr_example"><br />
</fieldset><br />
</div><br />
</pre><br />
<br />
<pre data-language="css" style="overflow:auto;white-space:pre-wrap;">.sheet-repeating-fields {<br />
counter-reset: sheet-rep-items;<br />
}<br />
<br />
.sheet-counter::before {<br />
counter-increment: sheet-rep-items;<br />
content: counter(sheet-rep-items) '. ';<br />
}</pre><br />
<br />
=== Filter Repeating section displays according to criteria within the repeating items itself ===<br />
Assume you want a tabbed section to organize/display spells. All the 1st circle spells are displayed under tab 1, all the 2nd circle spells under tab 2, Etc. One way to do this is to duplicate the html code for each spell level. You have 10 lists, and the tabs choose which of the 10 lists to display. The following code shows how to have one list, but to filter the list so it only displays certain spells.<br />
<br />
[[GiGs]] has a few forum posts that demonstrates an alternative a likely better method to do the same as this in the following forum threads:<br />
* [https://app.roll20.net/forum/permalink/8647076/ Thread 1]<br />
* more complex filters: [https://app.roll20.net/forum/permalink/8642853/ Thread 2]<br />
* for multiple filters: [https://app.roll20.net/forum/permalink/8648110/ Thread 3]<br />
<br><br />
The HTML looks something like this. <br />
<pre data-language="html" style="margin-bottom:5px"><br />
<span class="sheet-fixed-width" style="width: 11em;"><b> Spell List </b></span><br><br />
<input type="radio" name="attr_tab-spells" class="sheet-tab sheet-spells-tab0" value="0" title="All circles" checked style="margin-left:1px;"/><br />
<span class="sheet-tab sheet-spells-tab0">All</span><br />
<input type="radio" name="attr_tab-spells" class="sheet-tab sheet-spells-tab1" value="1" title="Circle 1"/><br />
<span class="sheet-tab sheet-spells-tab1">Circle 1</span><br />
<input type="radio" name="attr_tab-spells" class="sheet-tab sheet-spells-tab2" value="2" title="Circle 2"/><br />
<span class="sheet-tab sheet-spells-tab2">Circle 2</span><br />
<input type="radio" name="attr_tab-spells" class="sheet-tab sheet-spells-tab3" value="3" title="Circle 3"/><br />
<span class="sheet-tab sheet-spells-tab3">Circle 3</span><br />
<br />
<div class="sheet-section sheet-section-sp-list"><br />
<fieldset class="repeating_spell"><br />
<input type="radio" name="attr_SP_Circle" class="sheet-hidden sheet-spells-tab0" value="0" checked /><br />
<input type="radio" name="attr_SP_Circle" class="sheet-hidden sheet-spells-tab1" value="1"/><br />
<input type="radio" name="attr_SP_Circle" class="sheet-hidden sheet-spells-tab2" value="2"/><br />
<input type="radio" name="attr_SP_Circle" class="sheet-hidden sheet-spells-tab3" value="3"/><br />
<div class="sheet-filtered-box"><br />
<span><select name="attr_SP_Circle" class="sheet-nowrap sheet-label-down" style="width:5em;"><br />
<option value="0" selected title"Please choose the circle for this spell.">-</option><br />
<option value="1">1</option><br />
<option value="2">2</option><br />
<option value="3">3</option><br />
</select>Circle</span><br />
<span class="sheet-nowrap"><br />
<input name="attr_SP_Name" type="text" style="width:12em;" placeholder="Spell Name" ></span><br />
<br />
More fields.<br />
</div><br />
</fieldset><br />
</div><br />
</pre><br />
The relevant part of the css looks like this.<br />
<pre data-language="css" style="overflow:auto; width:auto;"><br />
div.sheet-section-sp-list {<br />
max-height: 999999px;<br />
visibility: visible;<br />
opacity: 1;<br />
transition: opacity 0.5s linear 0s;<br />
overflow: hidden;<br />
}<br />
<br />
.charsheet .repcontainer .repitem, /* A filterbox should look exactly like a repitem. */<br />
.sheet-filtered-box {<br />
padding: 5px 5px 2px 5px;<br />
margin: 5px;<br />
border: 2px solid #CCCCCC;<br />
border-radius: 3px;<br />
}<br />
<br />
.repcontainer .repitem {<br />
overflow: hidden;<br />
}<br />
<br />
.sheet-section-sp-list>fieldset.repeating_spell+.repcontainer>.repitem { /* A repitem within a spellslist should functionally not exist, it's place is taken by a filterbox. */<br />
padding: 0px;<br />
margin: 0px;<br />
border: none;<br />
border-radius:;<br />
}<br />
<br />
.sheet-filtered-box { /* By default, display no items of a filter box */<br />
display: none;<br />
}<br />
/* Decide which specific repitems to display. */<br />
input.sheet-spells-tab0:checked~.sheet-filtered-box, /* Always display all spells of circle zero. */<br />
.sheet-spells-tab0:checked~.sheet-section-sp-list>fieldset.repeating_spell+.repcontainer>.repitem .sheet-filtered-box, /* When tab0 is checked, display everything no matter what which of the inner boxes are checked. */<br />
.sheet-spells-tab1:checked~.sheet-section-sp-list>fieldset.repeating_spell+.repcontainer>.repitem input.sheet-spells-tab1:checked~.sheet-filtered-box,<br />
.sheet-spells-tab2:checked~.sheet-section-sp-list>fieldset.repeating_spell+.repcontainer>.repitem input.sheet-spells-tab2:checked~.sheet-filtered-box,<br />
.sheet-spells-tab3:checked~.sheet-section-sp-list>fieldset.repeating_spell+.repcontainer>.repitem input.sheet-spells-tab3:checked~.sheet-filtered-box {<br />
display: block;<br />
} <br />
</pre><br />
<br />
So basically what this does is it makes a filterbox look exactly like a repitem.<br />
By default, no filterboxes are displayed. <br />
The last css entries basically say where tab X above the repeating field is checked, and the same radio button inside a specific repitem is checked, then display that item.<br />
<br />
=== Duplicate a repeating section name to display the same data on more than one tab or present a summary of the data elsewhere ===<br />
<br />
I am not certain that this trick is recommended by the developers, but as of this writing, it works. <br />
<br />
You can put the same repeating section name in your html more than once in order to display the same information in multiple styles. You can have individual items displayed one way in one instance of the section (for example as a list of select/options) and a different way (for example as a read only text field) elsewhere. It is extremely useful to combine this trick with the previous section (filtering), so that only a select subset are displayed in different places, but you can do this with the convenience of having the data stored once in one list.<br />
<br />
For example, on one tab you can have lots of fiddly options and choices, but on another tab you can display the same list of data pared down to it's minimalist essentials. If the user needs the full list, he can go to the details tab. But the items he uses most frequently fit compactly in a section of another tab. In ether case he is looking at, and manipulating the same list of data, not a list and a separate copy. <br />
<br />
Here are the rules:<br />
* You can repeat repeating section names. Each repeated section will share the same rows and items, but each can present the data in a different way. For example : <fieldset class="repeating_weapons sheet-filtershortlist sheet-filtersummarylist"> the additional class tags can be used to differentiate how this section is to be styled as opposed to other repeating_weapons lists display the data.<br />
* Not all items must be present or displayed in all lists. However each item must be present in every list in which it is used. For example, if you have an auto-calc field, or a button that uses a field, All the fields used in the autocalc, or passed by the button, must be present in the same instance of the repeating section, it will not go looking for it in other instances of the repeating section. The referenced field may be hidden, but must be present. <br />
* You can change how fields are presented. For example they can be editable in one instance, but readonly in another. <br />
* If you change repitem to inline-block, it will float "rows" up so that it can display more than one per line.<br />
<pre data-language="css" style="margin-bottom:5px"><br />
fieldset.sheet-filtersummarylist+.repcontainer .repitem {<br />
display: inline-block;<br />
margin-right: 2em;<br />
}<br />
</pre><br />
* If you want the user to only add or modify items in one place, you can get rid of the Add/Modify buttons in the other places by simply adding display: none: to a set of tags similar to this: fieldset.sheet-filtershortlist~.repcontrol where of course the .sheet tag is whatever tag you specify in your html.<br />
<br />
==Sheetworkers==<br />
{{main|Sheetworkers}}<br />
Referencing, creating, deleting attributes in repeating sections isn't as easy & straightforward as with regular attributes, and sometimes use separate sheetworker functions than normal parts of the sheet.<br />
<br />
This section displays only the repeating-section examples, while linking to the original section in the main sheetworker documents.<br />
<br />
* [[RepeatingSum]] A great snippet making it easier to sum up values form a repeating section, such as total weight of an inventory.<br />
* {{repo|shdwjk/TheAaronSheet TheAaronSheet}} collection of sheetworker automation & simplification, including things making repeating sections easier to handle.<br />
<br />
===Events===<br />
<br />
====change:<attribute_name>====<br />
* [[Sheet_Worker_Scripts#change:.3Cattribute_name.3E|change:<attribute_name>]]<br />
<br />
Allows you to listen to the changes of specific attributes, or in the case of a repeating sections, any changes in the entire section. It's very straightforward:<br />
<br />
<pre data-language="javascript" style="overflow:auto;white-space:pre-wrap;"><br />
on("change:repeating_spells:spellname", function(eventInfo) {<br />
//Do something here<br />
// eventInfo.sourceAttribute is the full name (including repeating ID) of the attribute <br />
// that originally triggered this event, <br />
// however the entire string will have been translated into lowercase and thus might not be <br />
// suitable for being fed directly<br />
// into getAttrs() or other uses without being devandalized first.<br />
});<br />
<br />
on("change:repeating_spells", function(eventInfo) {<br />
//Would be triggered when any attribute in the repeating_spells section is changed<br />
// eventInfo.sourceAttribute is the full name (lowercased)(including repeating ID) <br />
// of the attribute that originally triggered this event. <br />
});<br />
<br />
</pre><br />
<br />
<br />
For attributes in repeating fields, all of the following would be triggered when the <code>repeating_spells_SpellName</code> attribute is updated: <br />
<code>change:repeating_spells:spellname</code>, <br />
<code>change:repeating_spells</code>, <br />
<code>change:spellname</code>, <br />
<code>change:spellname_max</code>. <br />
This gives you maximum flexibility in choosing what "level" of change event you want to bind your function to.<br />
<br />
====change:_reporder:<sectionname>====<br />
* [[Sheet_Worker_Scripts#change:_reporder:.3Csectionname.3E|change:_reorder:<sectionname>]]<br />
<br />
Sheetworkers can also listen for a change event of a special attribute that is modified whenever a repeating section is re-ordered. <br />
<pre data-language="javascript" style="overflow:auto;white-space:pre-wrap;"><br />
on("change:_reporder:<sectionname>", function(eventInfo) {<br />
// Where <sectionname> above should be a repeating section name, such as skills or spells<br />
});<br />
</pre><br />
<br />
====remove:repeating_<groupname>====<br />
* [[Sheetworkers#remove:repeating_.3Cgroupname.3E|remove:repeating_<groupname>]]<br />
This is an event which will fire whenever a row is deleted from a [[Building_Character_Sheets#Repeating_Sections|repeating field]] section. You can also listen for a specific row to be deleted if you know its ID, such as on(<code>remove:repeating_inventory:-ABC123</code>)<br />
<br />
<pre data-language="javascript" style="white-space: pre-wrap;"><br />
<br />
on("remove:repeating_inventory", function(eventInfo) {<br />
//Fired whenever a row is removed from repeating_inventory<br />
// eventInfo.sourceAttribute is the full name (including ID) of the first attribute that triggered the event (you can use this to determined the ID of the row that was deleted)<br />
});<br />
<br />
</pre><br />
<br />
The <code>removed:repeating_<groupname></code> function's <code>eventinfo</code> includes a special property <code>removedInfo</code>, that displays all of the attributes of the now removed repeating section.<br />
<pre data-language="javascript"><br />
on("remove:repeating_inventory", function(eventinfo) {<br />
console.log(eventinfo.removedInfo);<br />
});<br />
</pre><br />
<br />
<br />
====clicked:<button_name>====<br />
<br />
This event will trigger when an action button is clicked. The button's name will need to start with <code>act_</code>. Example: <br />
<br />
<pre data-language="html"><br />
<br />
<fieldset class="repeating_skills"> <br />
<button type="action" name="act_activate">Activate!</button> <br />
</fieldset><br />
<script type="text/worker"><br />
on("clicked:repeating_skills:activate", function() {<br />
console.log("Activate button clicked");<br />
});<br />
</script><br />
</pre><br />
<br />
<br />
===Functions===<br />
<br />
====getAttrs(attributeNameArray, callback)====<br />
{{Asynchronous}} <br />
<br />
The <code>getAttrs</code> function allows you to get the values of a set of attributes from the sheet. The "_max" suffix is supported, so <code>getAttrs( ["Strength", "Strength_max"], func)</code> will get both the current and max values of <code>Strength</code>. Note that the function is asynchronous, which means that there is no guarantee that the order in which multiple <code>getAttrs</code> calls are made is the order in which the results will be returned. Rather, you pass a callback function which will be executed when the values have been calculated. The callback function receives a simple JavaScript object with a list of key-value pairs, one for each attribute that you requested.<br />
<br />
Values in repeating sections require a little special handling. If the event that you are inside of is already inside of a repeating section, you can simply request the variable using its name prefaced by the repeating group name and you will receive the value in the same repeating section the event was triggered in. For example, if we have a <code>repeating_spells</code> section that has both <code>SpellName</code>, <code>SpellLevel</code>, and <code>SpellDamage</code>, then:<br />
<br />
<pre data-language="javascript"><br />
<br />
on("change:repeating_spells:spelllevel", function() {<br />
getAttrs([<br />
"repeating_spells_SpellDamage",<br />
"repeating_spells_SpellName"<br />
], function(values) {<br />
//values.repeating_spells_SpellDamage and values.repeating_spells_SpellName <br />
//will both be from the same repeating section row that the SpellLevel that changed is in.<br />
});<br />
});<br />
<br />
</pre><br />
<br />
On the other hand, if you aren't currently in a repeating section, you can specifically request that value of a field in a repeating section row by specifying its ID manually:<br />
<br />
<pre data-language="javascript"><br />
<br />
getAttrs(["repeating_spells_-ABC123_SpellDamage"]...<br />
<br />
</pre><br />
You can also request the <code>_reporder_repeating_<sectionname></code> attribute with <code>getAttrs()</code> to get a list of all the IDs in the section that have been ordered. However note that this may not include the full listing of all IDs in a section. Any IDs not in the list that are in the section are assumed to come after the ordered IDs in lexographic order.<br />
<br />
====setAttrs(values,options,callback)====<br />
<br />
For repeating sections, you have the option of using the simple variable name if the original event is in a repeating section, or you can specify the full repeating section variable name including ID in any event.<br />
<br />
<pre data-language="javascript"><br />
<br />
on("change:repeating_spells:spelllevel", function() {<br />
getAttrs(["repeating_spells_SpellLevel", "repeating_spells_SpellName"], function(values) {<br />
setAttrs({<br />
repeating_spells_SpellDamage: Math.floor(values.repeating_spells_SpellLevel / 2) + 10<br />
});<br />
});<br />
});<br />
<br />
</pre><br />
<br />
====getSectionIDs(section_name,callback) ====<br />
{{Asynchronous}} <br />
<br />
This function allows you to get a list of the IDs which currently exist for a given repeating section. This is useful for calculating things such as inventory where there may be a variable number of rows.<br />
<br />
<pre data-language="javascript"><br />
<br />
on("change:repeating_inventory", function() {<br />
getSectionIDs("inventory", function(idarray) {<br />
for(var i=0; i < idarray.length; i++) {<br />
//Do something with the IDs<br />
}<br />
});<br />
});<br />
<br />
</pre><br />
Note that you may use <code>GetAttrs()</code> (described above) to request the <code>_reporder_repeating_<sectionname></code> attribute to get a list of all the IDs in the section that have been ordered. However note that this may not include the full listing of all IDs in a section. Any IDs not in the list that are in the section are assumed to come after the ordered IDs in lexographic order. <br><br />
Which is to say that <code>getSectionIDs()</code> will get all IDs - but not in the order that they are displayed to the user. <code>getAttrs( _reporder_repeating_<sectionname></code>, ... ) will return a list of all IDs that have been moved out of their normal lexographic order. You can use the following function as a replacement for <code>getSectionIDs</code> to get the IDs in the order that they are displayed in instead.<br />
<br />
<pre data-language="javascript"><br />
var getSectionIDsOrdered = function (sectionName, callback) {<br />
'use strict';<br />
getAttrs([`_reporder_${sectionName}`], function (v) {<br />
getSectionIDs(sectionName, function (idArray) {<br />
let reporderArray = v[`_reporder_${sectionName}`] ? v[`_reporder_${sectionName}`].toLowerCase().split(',') : [],<br />
ids = [...new Set(reporderArray.filter(x => idArray.includes(x)).concat(idArray))];<br />
callback(ids);<br />
});<br />
});<br />
};<br />
</pre><br />
<br />
====generateRowID()====<br />
<br />
A synchronous function which immediately returns a new random [[rowID]] which you can use to create a new repeating section row. If you use <code>setAttrs()</code> and pass in the ID of a repeating section row that doesn't exist, one will be created with that ID.<br />
<br />
Here's an example you can use to create a new row in a repeating section:<br />
<br />
<pre data-language="javascript"><br />
<br />
var newrowid = generateRowID();<br />
var newrowattrs = {};<br />
newrowattrs["repeating_inventory_" + newrowid + "_weight"] = "testnewrow";<br />
setAttrs(newrowattrs);<br />
<br />
</pre><br />
<br />
====removeRepeatingRow( RowID )====<br />
A synchronous function which will immediately remove all the attributes associated with a given RowID and then remove the row from the character sheet. The RowID should be of the format <code>repeating_<sectionname>_<rowid></code>. For example, <code>repeating_skills_-KbjuRmBRiJNeAJBJeh2</code>.<br />
<br />
Here is an example of clearing out a summary list when the original list changes:<br />
<pre data-language="javascript"><br />
on("change:repeating_inventory", function() {<br />
getSectionIDs("repeating_inventorysummary", function(idarray) {<br />
for(var i=0; i < idarray.length; i++) {<br />
removeRepeatingRow("repeating_inventorysummary_" + idarray[i]);<br />
}<br />
});<br />
});<br />
</pre><br />
<br />
====setSectionOrder( )====<br />
(to reorder rep sections rows?)<br />
TODO<br />
<br />
==API==<br />
<br />
TODO<br />
<br />
==Tips==<br />
* {{fpl|10697275/ A Sheet Author's Journey(Part 3) - Repeating sections and writing sheetworkers!}} Feb 2022<br />
* {{fpl|10297616/ How do I reference a global attribute in a span in a repeating section?}}<br />
** {{fpl|10304798/ Referencing an attr from within a repeating section}}<br />
* {{fpl|10304806/ Calculated rolls with repeatable rows}}<br />
* {{repo|shdwjk/TheAaronSheet TheAaronSheet}} - A facade for Sheet Worker Tasks and Utility Functions. Contains a great function for sheet troubleshooting/debugging, and function for repeating sections<br />
=Related Pages=<br />
* [[Repeating Section]]<br />
* [[Designing Character Sheet Layout]] - repeating sections vary in size depending on how many components it has, and will impact your general design<br />
* [[RepeatingSum]] - [[sheetworker]] example useful for repeating section.<br />
* [[Character Sheet Development/Bugs & Quirks#Repeating_Sections]]<br />
<br />
[[Category:Character Sheet Creation]]<br />
[[Category:Character Sheet Development]]<br />
[[Category:Sheetworker]]<br />
[[Category:Repeating Section]]</div>1223200https://wiki.roll20.net/Character_Sheet_Development/Repeating_SectionCharacter Sheet Development/Repeating Section2023-11-05T09:39:54Z<p>1223200: /* Definition & Restrictions */</p>
<hr />
<div>{{revdate}}{{BCS}}<br />
<br />
{{NavSheetDoc}}<br />
This page is for info on how '''Repeating Sections''' are created, used & modified in [[Character Sheet Development]].<br />
<br />
See [[Repeating Section]] for general info on how to use them.<br />
=Repeating Sections=<br />
==General==<br />
Sometimes you may have a type of object where there may be one or more of them, and it's not known ahead of time how many there are. A good example of this is the Skills listing for a Character in Savage Worlds. Roll20's sheets allow you to define a template for each item in the section, and the [[player]] can then add as many of these in the listing as they need.<br />
'''Example:'''<pre data-language="html"><br />
<h3>Skills</h3><br />
<fieldset class="repeating_skills"><br />
<button type="roll" name="roll_skill" value="/em uses @{skillname}, and rolls [[@{dtype}]]"></button><br />
<input type="text" name="attr_skillname" value=""><br />
<select name="attr_dtype" class="dtype"> <br />
<option value="d6">d6</option><br />
<option value="d10">d10</option><br />
</select><br />
</fieldset><br />
</pre><br />
__TOC__<br />
===Definition & Restrictions===<br />
To define a repeating section, create a <code><fieldset></code>-element. Then define give it a unique <code>class</code> with the <code>repeating_</code> prefix and a name written in lowercase & without underscores. Inside the <code><fieldset></code>-element place the info fields that a instance of the section should have. <br />
* '''Each repeating section should have a unique name, and you <div style="color:red;display:inline;">cannot use underscores</div>.''' Use <code>repeating_melee</code>, or <code>repeating_meleeweapon</code>, <div style="color:red;display:inline;">not</div> <code>repeating_melee_weapon</code><br />
** attribute names within one repeating section doesn't have to be unique compared to attribute names in another section. Both <code>repeating_melee</code> and <code>repeating_ranged</code> can both have an attribute named <code>attr_name</code>, as they don't affect eachother <br />
* '''Class names should be all lowercase.''' If it isn't, you'll have problems with launching buttons in a repeating section from macros and scripts<br />
* '''It's not possible to create repeating sections inside repeating sections''' Nesting them isn't possible, but you can vote on {{forum|post/2942465/nested-repeating-sections the suggestion}} and comment why we want it.<br />
* referencing [[button|buttons]] in rep sections behaves slightly different than regular parts of a sheet.<br />
* '''All attributes in a repeating section should have a unique name that isn't already used by a "normal" attribute.''' If you have <code>attr_spellname</code> in your repeating section, you can not have a "normal" <code>attr_spellname</code> outside of the repeating section, but it's fine to have a <code>attr_spellname</code> inside ''another'' repeating section. Se example below:<br />
{| class="wikitable"<br />
|-<br />
! Good Example !! Bad example<br />
|-<br />
| <pre data-language="html"><br />
<fieldset class="repeating_spell-level1"><br />
<input type="text" name="attr_spellname"><br />
</fieldset><br />
<fieldset class="repeating_spell-level2"><br />
<input type="text" name="attr_spellname"><br />
</fieldset><br />
</pre> || <pre data-language="html"><br />
<input type="text" name="attr_spellname"><br />
<fieldset class="repeating_spell-level1"><br />
<input type="text" name="attr_spellname"><br />
</fieldset><br />
</pre><br />
|-<br />
| The attribute <code>attr_spellname</code> is only present inside repeating sections. The attribute <code>attr_spellname</code> can be reused in this way || The attribute <code>attr_spellname</code> is present in both a "normal" attribute and a repeating section. The attribute <code>attr_spellname</code> should '''not''' be used in this way.<br />
|}<br />
<br />
* '''Repeating sections are hard or impossible to create around a HTML <code><nowiki><table></nowiki></code>''', and is recommended to be placed within a single cell if you insist trying to use <code><nowiki><table></nowiki></code>.<br />
** Using {{code|<nowiki><table></nowiki>}} inside Rep Sections might interfere with [[sheetworkers]]. {{fpl|10631126 Button/Sheetworker not working}} ''(Jan 2022)''<br />
* See Also: '''[[Character Sheet Development/Bugs & Quirks#Repeating_Sections]]'''<br />
<br />
<br />
When the sheet is displayed, Roll20 will automatically include:<br />
* '''Add''' , to allow the player to add as many of each item as needed.<br />
* '''Modify''' buttons, which when pressed will make it possible for players to drag&reorder items in the repeating section, along with showing the delete-button(<span style="font-family:Pictos;">#</span>) for deleting individual items.<br />
<br />
<br />
Each item will have its own set of fields (in the example above, each has its own <code>attr_dtype</code> and <code>attr_skillname</code>).<br />
<br />
Internally, each repeating item is stored in an attribute like so: <code>repeating_skills_-ABC123_dtype</code> or <code>repeating_skills_$0_skillname</code>. The '''[[rowID]]''' (the <code>-ABC123</code> part of the previous example) will never change for a repeating section row, so you can reference it in [[macros]], abilities, and [[API scripts]]. New rows that you add will be randomly assigned a new unique ID. By default, Rows are ordered in the order in which they were created, the oldest at the top.<br />
<br />
== Styling Repeating Sections ==<br />
{{main|CSS Wizardry}}<br />
<br />
It's possible to style your repeating sections in a variety of ways. However, you can't just write your CSS as though the <code><fieldset></code> that's in your HTML source is what the user is viewing. After writing the code for your repeating section, here is how it will look when rendered to the user:<br />
<pre data-language="html"><fieldset class="repeating_my-repeating-section" style="display: none;"><br />
<!-- my-repeating-section HTML --><br />
</fieldset><br />
<div class="repcontainer" data-groupname="repeating_my-repeating-section"><br />
<div class="repitem"><br />
<div class="itemcontrol"><br />
<button class="btn btn-danger pictos repcontrol_del">#</button><br />
<a class="btn repcontrol_move">≡</a><br />
</div><br />
<!-- my-repeating-section HTML --><br />
</div><br />
<!-- there will be a div.repitem for each item the user has actually added to the sheet --><br />
</div><br />
<div class="repcontrol" data-groupname="repeating_my-repeating-section"><br />
<button class="btn repcontrol_edit">Modify</button><br />
<button class="btn repcontrol_add">+Add</button><br />
</div></pre><br />
When you click the Modify button, the Add button is is set to <code>display: none</code> and the text of the Modify button is changed to "Done". When you click Done, the Add button is set to <code>display: inline-block</code> and the text of the Done button is changed to "Modify". While modifying repitems, the repcontainer gains the class "editmode".<br />
<br />
Armed with this knowledge, you can do numerous things to alter how your repeating sections are displayed on the final character sheet. For example, you can have multiple repeating items per row:<br />
<pre data-language="css">.repcontainer[data-groupname="repeating_skills"] > .repitem {<br />
display: inline-block;<br />
}</pre><br />
{{note|You do '''not''' prefix the rep* classes with <code>sheet-</code>!}}<br />
<br />
Remember to use the <code>[data-groupname="repeating_..."]</code> attribute selector if you want to only apply the style to a single repeating section. Of course, if you want the style to affect all of your repeating sections, that's not needed.<br />
<br />
=== What Can't You Do? ===<br />
You cannot:<br />
* Change the "display" property of the original <code><fieldset></code>.<br />
* Change the text of the Add, Modify/Done, Delete, or Move buttons.<br />
** However, you could set their opacity to 0 and display something in their place, much like [[#Styling Checkboxes and Radio Buttons|styling checkboxes and radios]], as well as add <code>::before</code> or <code>::after</code> pseudo-elements to them.<br />
* Change the "display" property of the Add button after the user has pressed Modify once.<br />
<br />
===Add, Modify buttons===<br />
<br />
{{repo|Roll20/roll20-character-sheets/blob/729d1f19adcc365b1519f2c23923170bd98e1ed6/cepheus-atom/sheet.css#L350 Cepheus Atom}} example by [[Andreas J.]]<br />
<br />
Target the buttons:<br />
{{ex}}<br />
<pre style="overflow:auto;white-space:pre-wrap;" data-language="css">.charsheet .repcontrol[data-groupname=repeating_mutations] button.repcontrol_edit, .charsheet .repcontrol[data-groupname=repeating_mutations] button.repcontrol_add {<br />
font-family: "Special Elite";<br />
font-weight: 700;<br />
font-size: 1.1em;<br />
}<br />
.charsheet .repcontainer[data-groupname=repeating_mutations] {<br />
width: 100%;<br />
}<br />
.charsheet .repcontainer[data-groupname=repeating_mutations] > .repitem {<br />
display: flex;<br />
justify-content: center;<br />
gap: 3px;<br />
flex-flow: wrap row;<br />
}<br />
.charsheet .repcontainer[data-groupname=repeating_mutations] > .repitem .repcontrol_del {<br />
font-family: "Pictos";<br />
font-size: 1.1em;<br />
padding: 3px 7px 2px;<br />
}<br />
.charsheet .repcontainer[data-groupname=repeating_mutations] > .repitem .repcontrol_move {<br />
font-size: 1.3em;<br />
padding: 3px 7px;<br />
}</pre><br />
<br />
=== Counting Items ===<br />
[https://jsfiddle.net/7cy6uf2j/ Live Demo]<br />
<br />
CSS can let you count things. This can be applied in multiple contexts for character sheets, but one option is to count how many repeating items are in your repeating section:<br />
<pre data-language="html" style="margin-bottom:5px"><br />
<div class="sheet-repeating-fields"><br />
<fieldset class="repeating_my-repeating-section"><br />
<span class="sheet-counter"></span><br />
<input type="text" name="attr_example"><br />
</fieldset><br />
</div><br />
</pre><br />
<br />
<pre data-language="css" style="overflow:auto;white-space:pre-wrap;">.sheet-repeating-fields {<br />
counter-reset: sheet-rep-items;<br />
}<br />
<br />
.sheet-counter::before {<br />
counter-increment: sheet-rep-items;<br />
content: counter(sheet-rep-items) '. ';<br />
}</pre><br />
<br />
=== Filter Repeating section displays according to criteria within the repeating items itself ===<br />
Assume you want a tabbed section to organize/display spells. All the 1st circle spells are displayed under tab 1, all the 2nd circle spells under tab 2, Etc. One way to do this is to duplicate the html code for each spell level. You have 10 lists, and the tabs choose which of the 10 lists to display. The following code shows how to have one list, but to filter the list so it only displays certain spells.<br />
<br />
[[GiGs]] has a few forum posts that demonstrates an alternative a likely better method to do the same as this in the following forum threads:<br />
* [https://app.roll20.net/forum/permalink/8647076/ Thread 1]<br />
* more complex filters: [https://app.roll20.net/forum/permalink/8642853/ Thread 2]<br />
* for multiple filters: [https://app.roll20.net/forum/permalink/8648110/ Thread 3]<br />
<br><br />
The HTML looks something like this. <br />
<pre data-language="html" style="margin-bottom:5px"><br />
<span class="sheet-fixed-width" style="width: 11em;"><b> Spell List </b></span><br><br />
<input type="radio" name="attr_tab-spells" class="sheet-tab sheet-spells-tab0" value="0" title="All circles" checked style="margin-left:1px;"/><br />
<span class="sheet-tab sheet-spells-tab0">All</span><br />
<input type="radio" name="attr_tab-spells" class="sheet-tab sheet-spells-tab1" value="1" title="Circle 1"/><br />
<span class="sheet-tab sheet-spells-tab1">Circle 1</span><br />
<input type="radio" name="attr_tab-spells" class="sheet-tab sheet-spells-tab2" value="2" title="Circle 2"/><br />
<span class="sheet-tab sheet-spells-tab2">Circle 2</span><br />
<input type="radio" name="attr_tab-spells" class="sheet-tab sheet-spells-tab3" value="3" title="Circle 3"/><br />
<span class="sheet-tab sheet-spells-tab3">Circle 3</span><br />
<br />
<div class="sheet-section sheet-section-sp-list"><br />
<fieldset class="repeating_spell"><br />
<input type="radio" name="attr_SP_Circle" class="sheet-hidden sheet-spells-tab0" value="0" checked /><br />
<input type="radio" name="attr_SP_Circle" class="sheet-hidden sheet-spells-tab1" value="1"/><br />
<input type="radio" name="attr_SP_Circle" class="sheet-hidden sheet-spells-tab2" value="2"/><br />
<input type="radio" name="attr_SP_Circle" class="sheet-hidden sheet-spells-tab3" value="3"/><br />
<div class="sheet-filtered-box"><br />
<span><select name="attr_SP_Circle" class="sheet-nowrap sheet-label-down" style="width:5em;"><br />
<option value="0" selected title"Please choose the circle for this spell.">-</option><br />
<option value="1">1</option><br />
<option value="2">2</option><br />
<option value="3">3</option><br />
</select>Circle</span><br />
<span class="sheet-nowrap"><br />
<input name="attr_SP_Name" type="text" style="width:12em;" placeholder="Spell Name" ></span><br />
<br />
More fields.<br />
</div><br />
</fieldset><br />
</div><br />
</pre><br />
The relevant part of the css looks like this.<br />
<pre data-language="css" style="overflow:auto; width:auto;"><br />
div.sheet-section-sp-list {<br />
max-height: 999999px;<br />
visibility: visible;<br />
opacity: 1;<br />
transition: opacity 0.5s linear 0s;<br />
overflow: hidden;<br />
}<br />
<br />
.charsheet .repcontainer .repitem, /* A filterbox should look exactly like a repitem. */<br />
.sheet-filtered-box {<br />
padding: 5px 5px 2px 5px;<br />
margin: 5px;<br />
border: 2px solid #CCCCCC;<br />
border-radius: 3px;<br />
}<br />
<br />
.repcontainer .repitem {<br />
overflow: hidden;<br />
}<br />
<br />
.sheet-section-sp-list>fieldset.repeating_spell+.repcontainer>.repitem { /* A repitem within a spellslist should functionally not exist, it's place is taken by a filterbox. */<br />
padding: 0px;<br />
margin: 0px;<br />
border: none;<br />
border-radius:;<br />
}<br />
<br />
.sheet-filtered-box { /* By default, display no items of a filter box */<br />
display: none;<br />
}<br />
/* Decide which specific repitems to display. */<br />
input.sheet-spells-tab0:checked~.sheet-filtered-box, /* Always display all spells of circle zero. */<br />
.sheet-spells-tab0:checked~.sheet-section-sp-list>fieldset.repeating_spell+.repcontainer>.repitem .sheet-filtered-box, /* When tab0 is checked, display everything no matter what which of the inner boxes are checked. */<br />
.sheet-spells-tab1:checked~.sheet-section-sp-list>fieldset.repeating_spell+.repcontainer>.repitem input.sheet-spells-tab1:checked~.sheet-filtered-box,<br />
.sheet-spells-tab2:checked~.sheet-section-sp-list>fieldset.repeating_spell+.repcontainer>.repitem input.sheet-spells-tab2:checked~.sheet-filtered-box,<br />
.sheet-spells-tab3:checked~.sheet-section-sp-list>fieldset.repeating_spell+.repcontainer>.repitem input.sheet-spells-tab3:checked~.sheet-filtered-box {<br />
display: block;<br />
} <br />
</pre><br />
<br />
So basically what this does is it makes a filterbox look exactly like a repitem.<br />
By default, no filterboxes are displayed. <br />
The last css entries basically say where tab X above the repeating field is checked, and the same radio button inside a specific repitem is checked, then display that item.<br />
<br />
=== Duplicate a repeating section name to display the same data on more than one tab or present a summary of the data elsewhere ===<br />
<br />
I am not certain that this trick is recommended by the developers, but as of this writing, it works. <br />
<br />
You can put the same repeating section name in your html more than once in order to display the same information in multiple styles. You can have individual items displayed one way in one instance of the section (for example as a list of select/options) and a different way (for example as a read only text field) elsewhere. It is extremely useful to combine this trick with the previous section (filtering), so that only a select subset are displayed in different places, but you can do this with the convenience of having the data stored once in one list.<br />
<br />
For example, on one tab you can have lots of fiddly options and choices, but on another tab you can display the same list of data pared down to it's minimalist essentials. If the user needs the full list, he can go to the details tab. But the items he uses most frequently fit compactly in a section of another tab. In ether case he is looking at, and manipulating the same list of data, not a list and a separate copy. <br />
<br />
Here are the rules:<br />
* You can repeat repeating section names. Each repeated section will share the same rows and items, but each can present the data in a different way. For example : <fieldset class="repeating_weapons sheet-filtershortlist sheet-filtersummarylist"> the additional class tags can be used to differentiate how this section is to be styled as opposed to other repeating_weapons lists display the data.<br />
* Not all items must be present or displayed in all lists. However each item must be present in every list in which it is used. For example, if you have an auto-calc field, or a button that uses a field, All the fields used in the autocalc, or passed by the button, must be present in the same instance of the repeating section, it will not go looking for it in other instances of the repeating section. The referenced field may be hidden, but must be present. <br />
* You can change how fields are presented. For example they can be editable in one instance, but readonly in another. <br />
* If you change repitem to inline-block, it will float "rows" up so that it can display more than one per line.<br />
<pre data-language="css" style="margin-bottom:5px"><br />
fieldset.sheet-filtersummarylist+.repcontainer .repitem {<br />
display: inline-block;<br />
margin-right: 2em;<br />
}<br />
</pre><br />
* If you want the user to only add or modify items in one place, you can get rid of the Add/Modify buttons in the other places by simply adding display: none: to a set of tags similar to this: fieldset.sheet-filtershortlist~.repcontrol where of course the .sheet tag is whatever tag you specify in your html.<br />
<br />
==Sheetworkers==<br />
{{main|Sheetworkers}}<br />
Referencing, creating, deleting attributes in repeating sections isn't as easy & straightforward as with regular attributes, and sometimes use separate sheetworker functions than normal parts of the sheet.<br />
<br />
This section displays only the repeating-section examples, while linking to the original section in the main sheetworker documents.<br />
<br />
* [[RepeatingSum]] A great snippet making it easier to sum up values form a repeating section, such as total weight of an inventory.<br />
* {{repo|shdwjk/TheAaronSheet TheAaronSheet}} collection of sheetworker automation & simplification, including things making repeating sections easier to handle.<br />
<br />
===Events===<br />
<br />
====change:<attribute_name>====<br />
* [[Sheet_Worker_Scripts#change:.3Cattribute_name.3E|change:<attribute_name>]]<br />
<br />
Allows you to listen to the changes of specific attributes, or in the case of a repeating sections, any changes in the entire section. It's very straightforward:<br />
<br />
<pre data-language="javascript" style="overflow:auto;white-space:pre-wrap;"><br />
on("change:repeating_spells:spellname", function(eventInfo) {<br />
//Do something here<br />
// eventInfo.sourceAttribute is the full name (including repeating ID) of the attribute <br />
// that originally triggered this event, <br />
// however the entire string will have been translated into lowercase and thus might not be <br />
// suitable for being fed directly<br />
// into getAttrs() or other uses without being devandalized first.<br />
});<br />
<br />
on("change:repeating_spells", function(eventInfo) {<br />
//Would be triggered when any attribute in the repeating_spells section is changed<br />
// eventInfo.sourceAttribute is the full name (lowercased)(including repeating ID) <br />
// of the attribute that originally triggered this event. <br />
});<br />
<br />
</pre><br />
<br />
<br />
For attributes in repeating fields, all of the following would be triggered when the <code>repeating_spells_SpellName</code> attribute is updated: <br />
<code>change:repeating_spells:spellname</code>, <br />
<code>change:repeating_spells</code>, <br />
<code>change:spellname</code>, <br />
<code>change:spellname_max</code>. <br />
This gives you maximum flexibility in choosing what "level" of change event you want to bind your function to.<br />
<br />
====change:_reporder:<sectionname>====<br />
* [[Sheet_Worker_Scripts#change:_reporder:.3Csectionname.3E|change:_reorder:<sectionname>]]<br />
<br />
Sheetworkers can also listen for a change event of a special attribute that is modified whenever a repeating section is re-ordered. <br />
<pre data-language="javascript" style="overflow:auto;white-space:pre-wrap;"><br />
on("change:_reporder:<sectionname>", function(eventInfo) {<br />
// Where <sectionname> above should be a repeating section name, such as skills or spells<br />
});<br />
</pre><br />
<br />
====remove:repeating_<groupname>====<br />
* [[Sheetworkers#remove:repeating_.3Cgroupname.3E|remove:repeating_<groupname>]]<br />
This is an event which will fire whenever a row is deleted from a [[Building_Character_Sheets#Repeating_Sections|repeating field]] section. You can also listen for a specific row to be deleted if you know its ID, such as on(<code>remove:repeating_inventory:-ABC123</code>)<br />
<br />
<pre data-language="javascript" style="white-space: pre-wrap;"><br />
<br />
on("remove:repeating_inventory", function(eventInfo) {<br />
//Fired whenever a row is removed from repeating_inventory<br />
// eventInfo.sourceAttribute is the full name (including ID) of the first attribute that triggered the event (you can use this to determined the ID of the row that was deleted)<br />
});<br />
<br />
</pre><br />
<br />
The <code>removed:repeating_<groupname></code> function's <code>eventinfo</code> includes a special property <code>removedInfo</code>, that displays all of the attributes of the now removed repeating section.<br />
<pre data-language="javascript"><br />
on("remove:repeating_inventory", function(eventinfo) {<br />
console.log(eventinfo.removedInfo);<br />
});<br />
</pre><br />
<br />
<br />
====clicked:<button_name>====<br />
<br />
This event will trigger when an action button is clicked. The button's name will need to start with <code>act_</code>. Example: <br />
<br />
<pre data-language="html"><br />
<br />
<fieldset class="repeating_skills"> <br />
<button type="action" name="act_activate">Activate!</button> <br />
</fieldset><br />
<script type="text/worker"><br />
on("clicked:repeating_skills:activate", function() {<br />
console.log("Activate button clicked");<br />
});<br />
</script><br />
</pre><br />
<br />
<br />
===Functions===<br />
<br />
====getAttrs(attributeNameArray, callback)====<br />
{{Asynchronous}} <br />
<br />
The <code>getAttrs</code> function allows you to get the values of a set of attributes from the sheet. The "_max" suffix is supported, so <code>getAttrs( ["Strength", "Strength_max"], func)</code> will get both the current and max values of <code>Strength</code>. Note that the function is asynchronous, which means that there is no guarantee that the order in which multiple <code>getAttrs</code> calls are made is the order in which the results will be returned. Rather, you pass a callback function which will be executed when the values have been calculated. The callback function receives a simple JavaScript object with a list of key-value pairs, one for each attribute that you requested.<br />
<br />
Values in repeating sections require a little special handling. If the event that you are inside of is already inside of a repeating section, you can simply request the variable using its name prefaced by the repeating group name and you will receive the value in the same repeating section the event was triggered in. For example, if we have a <code>repeating_spells</code> section that has both <code>SpellName</code>, <code>SpellLevel</code>, and <code>SpellDamage</code>, then:<br />
<br />
<pre data-language="javascript"><br />
<br />
on("change:repeating_spells:spelllevel", function() {<br />
getAttrs([<br />
"repeating_spells_SpellDamage",<br />
"repeating_spells_SpellName"<br />
], function(values) {<br />
//values.repeating_spells_SpellDamage and values.repeating_spells_SpellName <br />
//will both be from the same repeating section row that the SpellLevel that changed is in.<br />
});<br />
});<br />
<br />
</pre><br />
<br />
On the other hand, if you aren't currently in a repeating section, you can specifically request that value of a field in a repeating section row by specifying its ID manually:<br />
<br />
<pre data-language="javascript"><br />
<br />
getAttrs(["repeating_spells_-ABC123_SpellDamage"]...<br />
<br />
</pre><br />
You can also request the <code>_reporder_repeating_<sectionname></code> attribute with <code>getAttrs()</code> to get a list of all the IDs in the section that have been ordered. However note that this may not include the full listing of all IDs in a section. Any IDs not in the list that are in the section are assumed to come after the ordered IDs in lexographic order.<br />
<br />
====setAttrs(values,options,callback)====<br />
<br />
For repeating sections, you have the option of using the simple variable name if the original event is in a repeating section, or you can specify the full repeating section variable name including ID in any event.<br />
<br />
<pre data-language="javascript"><br />
<br />
on("change:repeating_spells:spelllevel", function() {<br />
getAttrs(["repeating_spells_SpellLevel", "repeating_spells_SpellName"], function(values) {<br />
setAttrs({<br />
repeating_spells_SpellDamage: Math.floor(values.repeating_spells_SpellLevel / 2) + 10<br />
});<br />
});<br />
});<br />
<br />
</pre><br />
<br />
====getSectionIDs(section_name,callback) ====<br />
{{Asynchronous}} <br />
<br />
This function allows you to get a list of the IDs which currently exist for a given repeating section. This is useful for calculating things such as inventory where there may be a variable number of rows.<br />
<br />
<pre data-language="javascript"><br />
<br />
on("change:repeating_inventory", function() {<br />
getSectionIDs("inventory", function(idarray) {<br />
for(var i=0; i < idarray.length; i++) {<br />
//Do something with the IDs<br />
}<br />
});<br />
});<br />
<br />
</pre><br />
Note that you may use <code>GetAttrs()</code> (described above) to request the <code>_reporder_repeating_<sectionname></code> attribute to get a list of all the IDs in the section that have been ordered. However note that this may not include the full listing of all IDs in a section. Any IDs not in the list that are in the section are assumed to come after the ordered IDs in lexographic order. <br><br />
Which is to say that <code>getSectionIDs()</code> will get all IDs - but not in the order that they are displayed to the user. <code>getAttrs( _reporder_repeating_<sectionname></code>, ... ) will return a list of all IDs that have been moved out of their normal lexographic order. You can use the following function as a replacement for <code>getSectionIDs</code> to get the IDs in the order that they are displayed in instead.<br />
<br />
<pre data-language="javascript"><br />
var getSectionIDsOrdered = function (sectionName, callback) {<br />
'use strict';<br />
getAttrs([`_reporder_${sectionName}`], function (v) {<br />
getSectionIDs(sectionName, function (idArray) {<br />
let reporderArray = v[`_reporder_${sectionName}`] ? v[`_reporder_${sectionName}`].toLowerCase().split(',') : [],<br />
ids = [...new Set(reporderArray.filter(x => idArray.includes(x)).concat(idArray))];<br />
callback(ids);<br />
});<br />
});<br />
};<br />
</pre><br />
<br />
====generateRowID()====<br />
<br />
A synchronous function which immediately returns a new random [[rowID]] which you can use to create a new repeating section row. If you use <code>setAttrs()</code> and pass in the ID of a repeating section row that doesn't exist, one will be created with that ID.<br />
<br />
Here's an example you can use to create a new row in a repeating section:<br />
<br />
<pre data-language="javascript"><br />
<br />
var newrowid = generateRowID();<br />
var newrowattrs = {};<br />
newrowattrs["repeating_inventory_" + newrowid + "_weight"] = "testnewrow";<br />
setAttrs(newrowattrs);<br />
<br />
</pre><br />
<br />
====removeRepeatingRow( RowID )====<br />
A synchronous function which will immediately remove all the attributes associated with a given RowID and then remove the row from the character sheet. The RowID should be of the format <code>repeating_<sectionname>_<rowid></code>. For example, <code>repeating_skills_-KbjuRmBRiJNeAJBJeh2</code>.<br />
<br />
Here is an example of clearing out a summary list when the original list changes:<br />
<pre data-language="javascript"><br />
on("change:repeating_inventory", function() {<br />
getSectionIDs("repeating_inventorysummary", function(idarray) {<br />
for(var i=0; i < idarray.length; i++) {<br />
removeRepeatingRow("repeating_inventorysummary_" + idarray[i]);<br />
}<br />
});<br />
});<br />
</pre><br />
<br />
====setSectionOrder( )====<br />
(to reorder rep sections rows?)<br />
TODO<br />
<br />
==API==<br />
<br />
TODO<br />
<br />
==Tips==<br />
* {{fpl|10697275/ A Sheet Author's Journey(Part 3) - Repeating sections and writing sheetworkers!}} Feb 2022<br />
* {{fpl|10297616/ How do I reference a global attribute in a span in a repeating section?}}<br />
** {{fpl|10304798/ Referencing an attr from within a repeating section}}<br />
* {{fpl|10304806/ Calculated rolls with repeatable rows}}<br />
* {{repo|shdwjk/TheAaronSheet TheAaronSheet}} - A facade for Sheet Worker Tasks and Utility Functions. Contains a great function for sheet troubleshooting/debugging, and function for repeating sections<br />
=Related Pages=<br />
* [[Repeating Section]]<br />
* [[Designing Character Sheet Layout]] - repeating sections vary in size depending on how many components it has, and will impact your general design<br />
* [[RepeatingSum]] - [[sheetworker]] example useful for repeating section.<br />
<br><br><br />
[[Category:Character Sheet Creation]]<br />
[[Category:Character Sheet Development]]<br />
[[Category:Sheetworker]]<br />
[[Category:Repeating Section]]</div>1223200https://wiki.roll20.net/RowIDRowID2023-11-05T09:37:14Z<p>1223200: link to sheetdev quirks & bugs</p>
<hr />
<div>{{revdate}}{{NavSheetDoc}}{{stub}}<br />
<br />
[[RowID]] is the unique ID each item in a [[Repeating Section]] has, which can be used to reference it in [[macros]] and [[APIs]] even if the section's rows are reordered.<br />
''See Also:'' '''[[RowIndex]]'''<br />
<br />
Macros:<br />
* [[Macros#By_RowID]]<br />
* [[Repeating Section#Macro]]<br />
<br />
Character Sheet Development:<br />
* [[Sheet Worker Scripts]] there are some functions for interacting with rep sections by RowID<br />
* [[Character_Sheet_Development/Bugs#Repeating_Sections|Known Quirks & Bugs related to Repeating Sections & RowID]]<br />
<br />
API Development:<br />
* [[API:Objects#getAttrByName(character_id, attribute_name, value_type)]]<br />
<br />
[[Category:Macros]]<br />
[[Category:Character Sheet Creation]]<br />
[[Category:Character Sheet Development]]<br />
[[Category:Sheetworker]]<br />
[[Category:Repeating Section]]</div>1223200https://wiki.roll20.net/MediaWiki:Common.cssMediaWiki:Common.css2023-10-29T16:18:08Z<p>1223200: </p>
<hr />
<div>@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@200;300;400;500;600;700;800;900&display=swap');<br />
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans&display=swap');<br />
@import url('https://fonts.googleapis.com/css2?family=Montserrat&display=swap');<br />
<br />
@import url("https://p.typekit.net/p.css?s=1&k=zvt1yww&ht=tk&f=139.140.175.176&a=84346485&app=typekit&e=css");<br />
/* Above: fonts used on the main site */<br />
<br />
/* ******************************* */<br />
/* * Wiki layout changes (2021->)* */<br />
/* ******************************* */<br />
<br />
* {<br />
/* roll20 brand */<br />
--pink: #ff20a4;<br />
--purple: #b90cea;<br />
--dark: #273444;<br />
--lightblue:#3c95c6;<br />
--orange: #ffab00;<br />
--whiteish: #e9e8e9;<br />
--red: #da1c17;<br />
--green: #00853c;<br />
/* buttons in-game */<br />
--red-btn: #da4f49;<br />
--blue-btn: #0064cd;<br />
}<br />
<br />
/* use pictos symbols */<br />
.pictos{<br />
font-family:Pictos;<br />
}<br />
<br />
<br />
/* Roll20 navbar */<br />
<br />
/* hide outdated links */<br />
div.topbar-tools.container div.menu > a:nth-child(3),<br />
div.listing:nth-child(4),<br />
div.listing:nth-child(5){<br />
display: none;<br />
}<br />
/* fix broken images in menu */<br />
div.listing:nth-child(3) > div:nth-child(1) > a:nth-child(1) > img:nth-child(1),<br />
div.listing:nth-child(2) > div:nth-child(1) > a:nth-child(1) > img:nth-child(1) {<br />
display: none;<br />
}<br />
/*<br />
div.listing:nth-child(2) > div:nth-child(1) {<br />
background-image: url('https://app.roll20.net/images/banner-character-vault.jpg');<br />
height: 150px;<br />
background-size: 235px 180px;<br />
}<br />
div.listing:nth-child(3) > div:nth-child(1) {<br />
background-image: url('https://app.roll20.net/images/banner-compendium.jpg');<br />
height: 150px;<br />
background-size: 235px 180px;<br />
}*/<br />
<br />
<br />
/* wiki top navbar hover */<br />
<br />
#nav li a:hover, #nav li a:focus {<br />
text-decoration: purple underline;<br />
text-decoration-thickness: 3px;<br />
color: purple;<br />
}<br />
<br />
<br />
/* Wiki pages: condense top part */<br />
h3#siteSub, div#jump-to-nav,div#contentSub{<br />
display:none;<br />
}<br />
/* remove padding at top of page */<br />
div#main{<br />
padding: 0px 3%;<br />
margin-left: 5px;<br />
}<br />
div#main-content.with-menu h1#page-title{<br />
border-bottom: 3px solid purple;<br />
width: max-content;<br />
}<br />
@media screen and (max-width: 980px) {<br />
div#main-content.with-menu #header,<br />
div#main-content.with-menu #footer,<br />
div#main-content.with-menu #crumbs,<br />
div#main-content.with-menu h1#page-title {<br />
margin-left: 0px;<br />
}<br />
}<br />
div#breadcrumbs {<br />
width: max-content;<br />
}<br />
div#main-content.with-menu{<br />
box-shadow: 1px 1px 4px rgba(128, 0, 128, 0.5);<br />
border: 2px solid #702c91;<br />
}<br />
<br />
<br />
/* Wiki sidebar */<br />
<br />
div#wiki-tools{<br />
margin-right: 14px;<br />
padding: 63px 15px 8px 0px;<br />
min-width: 160px;<br />
max-width: 176px;<br />
border: 2px solid purple;<br />
border-radius: 10px;<br />
box-shadow: 1px 1px 4px rgba(128, 0, 128, 0.5);<br />
background-image: url(/images/2/25/Community-Wiki.png);<br />
background-position: top 3px center;<br />
background-size: auto 60px;<br />
background-repeat: no-repeat;<br />
}<br />
div#wiki-tools #p-navigation > h2:nth-child(1),<br />
#pt-logout{<br />
display: none;<br />
}<br />
<br />
div.portlet{<br />
min-width: 160px;<br />
}<br />
div#wiki-tools li{<br />
width: 90%;<br />
}<br />
div#wiki-tools a{<br />
width: 95%;<br />
}<br />
<br />
div#wiki-tools a:hover,<br />
div#wiki-tools a:focus{<br />
color: black;<br />
}<br />
div#wiki-tools a:hover::after,<br />
div#wiki-tools a:focus::after{<br />
content: " «";<br />
font-weight: bold;<br />
font-size: 1.3em;<br />
color: purple;<br />
line-height: 50%;<br />
}<br />
<br />
div#wiki-tools h2{<br />
padding: 0 0 0 5px;<br />
}<br />
<br />
/* Wiki Text Editor full width */<br />
<br />
#wpTextbox1 {<br />
width: 100%;<br />
min-width: 400px;<br />
}<br />
<br />
<br />
/* ****************** */<br />
/* wiki page element */<br />
/* ****************** */<br />
<br />
/* default style */<br />
#main-content pre{<br />
overflow:auto;<br />
white-space:pre-wrap;<br />
}<br />
<br />
#main-content code {<br />
/* background-color: #ddd; */<br />
border-radius: 3px;<br />
border: 1px solid #dadada;<br />
color: purple;<br />
}<br />
#main-content kbd{<br />
padding: 0 2px;<br />
}<br />
<br />
/* shrink margin from default */<br />
#main-content p {<br />
margin-top: 0.6em;<br />
margin-bottom: 0em;<br />
}<br />
/* shrink margin from default */<br />
#main-content blockquote.quote {<br />
white-space: pre-wrap;<br />
background: #c6c3c3;<br />
border: 2px dashed black;<br />
border-radius:5px;<br />
padding: 0.5rem;<br />
font-style: italic;<br />
}<br />
<br />
<br />
<br />
/* IMG Image fixes */<br />
div.thumb div {<br />
width: 100% !important;<br />
background-color: transparent;<br />
}<br />
img.resize{<br />
width: 100% !important;<br />
height: auto !important;<br />
}<br />
img.w500{<br />
min-width: 500px;<br />
}<br />
.magnify { /* remove redundant gallery icon */<br />
display: none;<br />
}<br />
/* Img Gallery */<br />
<br />
li.gallerybox div.thumb img {<br />
margin: 0 !important;<br />
}<br />
li.gallerybox div div.thumb div{<br />
margin: 10px;<br />
min-width: 50px !important;<br />
width: auto !important;<br />
}<br />
div.gallerytext {<br />
border: 1px solid #ccc;<br />
}<br />
<br />
/* categories: section at end of page */<br />
div.catlinks#catlinks{<br />
margin-top: 1em;<br />
border: 2px solid purple;<br />
border-radius: 6px;<br />
padding-left: 1em;<br />
}<br />
/* fix Category pages if have extra sidebar */<br />
#mw-pages > div:nth-child(3) > table:nth-child(1),<br />
#mw-subcategories > div:nth-child(3) > table:nth-child(1){<br />
width: auto !important;<br />
}<br />
<br />
<br />
/* FOOTER */<br />
<br />
#footer-wrap {<br />
margin-top: 0.5em;<br />
}<br />
<br />
/* ************************* */<br />
/* External hyperlink symbol */<br />
/* ************************* */<br />
<br />
#main-content a.external {<br />
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAVklEQVR4Xn3PgQkAMQhDUXfqTu7kTtkpd5RA8AInfArtQ2iRXFWT2QedAfttj2FsPIOE1eCOlEuoWWjgzYaB/IkeGOrxXhqB+uA9Bfcm0lAZuh+YIeAD+cAqSz4kCMUAAAAASUVORK5CYII=) top right no-repeat;<br />
padding-right: 14px;<br />
}<br />
<br />
/* roll20 logo on any link to other part of roll20.net that's outside the wiki */<br />
#main-content a[href ^="https://wiki.roll20.net"].external,<br />
#main-content a[href ^="https://app.roll20.net"].external,<br />
#main-content a[href ^="https://help.roll20.net"].external,<br />
#main-content a[href ^="https://roll20.zendesk.com"].external,<br />
#main-content a[href ^="https://roll20partners.zendesk.com"].external,<br />
#main-content a[href ^="https://blog.roll20.net"].external,<br />
#main-content a[href ^="https://marketplace.roll20.net"].external,<br />
#main-content a[href ^="https://pages.roll20.net"].external,<br />
#main-content a[href ^="https://gmhub.roll20.net"].external,<br />
#main-content a[href ^="https://con.roll20.net"].external,<br />
#main-content a[href ^="https://roll20.net"].external,<br />
#main-content a[href ^="https://app.roll20dev.net"].external,<br />
#main-content a[href ^="https://roll20con.net"].external,<br />
#main-content a[href ^="https://roll20.io"].external,<br />
#main-content a[href ^="https://portal.productboard.com/roll20"].external{<br />
background: url(/images/e/e4/Roll20-logo.png) top right no-repeat;<br />
padding-right: 14px;<br />
background-size: 10px;<br />
}<br />
<br />
/* links to help center same color-scheme as on help center */<br />
/* zendesk url is the older url that redirects to help.roll20.net */<br />
#main-content a[href ^="https://help.roll20.net"].external,<br />
#main-content a[href ^="https://roll20.zendesk.com"].external{<br />
color: rgba(236, 0, 140, 1);<br />
}<br />
#main-content a[href ^="https://help.roll20.net"].external:hover,<br />
#main-content a[href ^="https://help.roll20.net"].external:focus,<br />
#main-content a[href ^="https://roll20.zendesk.com"].external:hover,<br />
#main-content a[href ^="https://roll20.zendesk.com"].external:focus{<br />
color: #a0005f;<br />
}<br />
<br />
#main-content a[href ^="https://www.dmsguild.com"].external{<br />
background: url(images/a/a3/Dmsguild.png) top right no-repeat;<br />
padding-right: 14px;<br />
background-size: 10px;<br />
}<br />
#main-content a[href ^="https://www.drivethrurpg"].external{<br />
background: url(images/7/7b/Drivethrurpg.png) top right no-repeat;<br />
padding-right: 14px;<br />
background-size: 10px;<br />
}<br />
<br />
#main-content a[href ^="https://github.com"].external,<br />
#main-content a[href ^="https://gist.github.com"].external,<br />
#main-content a[href ^="https://raw.githubusercontent.com"].external,<br />
#main-content a[href ^="https://docs.github.com"].external{<br />
background: url(/images/d/dd/Githublogo.png) top right no-repeat;<br />
padding-right: 14px;<br />
background-size: 10px;<br />
}<br />
#main-content a[href ^="https://developer.mozilla.org"].external{<br />
background: url(/images/b/b1/Mdn.png) top right no-repeat;<br />
padding-right: 14px;<br />
background-size: 10px;<br />
}<br />
#main-content a[href ^="https://en.wikipedia.org"].external,<br />
#main-content a[href ^="https://simple.wikipedia.org"].external,<br />
#main-content a[href ^="https://fr.wikipedia.org"].external,<br />
#main-content a[href ^="https://es.wikipedia.org"].external,<br />
#main-content a[href ^="https://pt.wikipedia.org"].external,<br />
#main-content a[href ^="https://de.wikipedia.org"].external,<br />
#main-content a[href ^="https://fi.wikipedia.org"].external,<br />
#main-content a[href ^="https://se.wikipedia.org"].external,<br />
#main-content a[href ^="https://ja.wikipedia.org"].external{<br />
background: url(/images/f/f3/Wikipedia-Black-W.png) top right no-repeat;<br />
padding-right: 14px;<br />
background-size: 10px;<br />
}<br />
#main-content a[href ^="https://www.mediawiki.org"].external{<br />
background: url(images/0/05/Mediawiki.png) top right no-repeat;<br />
padding-right: 14px;<br />
background-size: 10px;<br />
}<br />
<br />
#main-content a[href ^="https://twitter.com/"].external{<br />
background: url(/images/3/3a/Twitter-logo-2021.png) top right no-repeat;<br />
padding-right: 14px;<br />
background-size: 10px;<br />
}<br />
#main-content a[href ^="https://twitch.tv/"].external{<br />
background: url(/images/4/40/Twitch.png) top right no-repeat;<br />
padding-right: 14px;<br />
background-size: 10px;<br />
}<br />
#main-content a[href ^="https://www.youtube.com"].external,<br />
#main-content a[href ^="https://youtu.be"].external{<br />
background: url(/images/b/b6/Youtube-logo.png) top right no-repeat;<br />
padding-right: 14px;<br />
background-size: 10px;<br />
}<br />
<br />
#main-content a[href ^="https://facebook.com"].external,<br />
#main-content a[href ^="https://www.facebook.com"].external{<br />
background: url(/images/5/55/Facebook.png) top right no-repeat;<br />
padding-right: 14px;<br />
background-size: 10px;<br />
}<br />
<br />
<br />
#main-content a[href ^="https://www.reddit.com"].external,<br />
#main-content a[href ^="https://new.reddit.com"].external,<br />
#main-content a[href ^="https://old.reddit.com"].external{<br />
background: url(images/b/b5/Reddit_logo.png) top right no-repeat;<br />
padding-right: 14px;<br />
background-size: 10px;<br />
}<br />
<br />
/* old, made hyper-link logo a lock<br />
#main-content a[href ^="https://"].external {<br />
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAdUlEQVQYV2P4//8/Awxv3LThf0dXKxyD+DA5DEUg+tWrV2AaWTFcIboJyJrhCtGtRMcgebhpL2/4/v//Lvn//x+7IRjIfn8v+P/t055gxZgKPzaC8Y/nMYQVLpnM8f/zo3AqKfzyOOL/h/sh/59c9sBUSIyvAeRdJWjk4E//AAAAAElFTkSuQmCC) center right no-repeat;<br />
padding-right: 18px;<br />
} */<br />
<br />
<br />
<br />
/* ************* */<br />
/* Darkmode */<br />
/* ************* */<br />
<br />
/* <br />
TODO: get colorcodes for Roll20's upcoming darkmode color pallette<br />
<br />
If you want to use Wiki in Dark Mode, try https://userstyles.world/style/3108/roll20-dark-mode<br />
<br />
@media (prefers-color-scheme: dark) {<br />
#main-content div.bg-yellow {<br />
background: #353535 !important;<br />
color: #fff !important;<br />
}<br />
#main-content is(div.bg-yellow div.darkmodefix) :is(b, i, div, span) {<br />
color: #fff !important;<br />
}<br />
*/<br />
/* hide partial darkmode until wiki gets css for complete darkmode<br />
#main-content :is(code),<br />
#main-content :is(code) * {<br />
color: #6aff0f;<br />
background: #0f2101;<br />
}<br />
*/<br />
} <br />
<br />
<br />
<br />
/* ******************************* */<br />
/* original CSS from wiki creation */<br />
/* ******************************* */<br />
<br />
/* If you change any from this section, move the CSS to the above section. */<br />
<br />
/* Cell sizes for ambox/tmbox/imbox/cmbox/ombox/fmbox/dmbox message boxes */<br />
<br />
th.mbox-text,<br />
td.mbox-text {<br />
/* The message body cell(s) */<br />
border: none;<br />
padding: 0.25em 0.9em;<br />
/* 0.9em left/right */<br />
width: 100%;<br />
/* Make all mboxes the same width regardless of text length */<br />
}<br />
<br />
td.mbox-image {<br />
/* The left image cell */<br />
border: none;<br />
padding: 2px 0 2px 0.9em;<br />
/* 0.9em left, 0px right */<br />
text-align: center;<br />
}<br />
<br />
td.mbox-imageright {<br />
/* The right image cell */<br />
border: none;<br />
padding: 2px 0.9em 2px 0;<br />
/* 0px left, 0.9em right */<br />
text-align: center;<br />
}<br />
<br />
td.mbox-empty-cell {<br />
/* An empty narrow cell */<br />
border: none;<br />
padding: 0px;<br />
width: 1px;<br />
}<br />
<br />
<br />
/* Article message box styles */<br />
<br />
table.ambox {<br />
margin: 0px 10%;<br />
/* 10% = Will not overlap with other elements */<br />
border: 1px solid #aaa;<br />
border-left: 10px solid #1e90ff;<br />
/* Default "notice" blue */<br />
background: #fbfbfb;<br />
}<br />
<br />
table.ambox+table.ambox {<br />
/* Single border between stacked boxes. */<br />
margin-top: -1px;<br />
}<br />
<br />
.ambox th.mbox-text,<br />
.ambox td.mbox-text {<br />
/* The message body cell(s) */<br />
padding: 0.25em 0.5em;<br />
/* 0.5em left/right */<br />
}<br />
<br />
.ambox td.mbox-image {<br />
/* The left image cell */<br />
padding: 2px 0 2px 0.5em;<br />
/* 0.5em left, 0px right */<br />
}<br />
<br />
.ambox td.mbox-imageright {<br />
/* The right image cell */<br />
padding: 2px 0.5em 2px 0;<br />
/* 0px left, 0.5em right */<br />
}<br />
<br />
table.ambox-notice {<br />
border-left: 10px solid #1e90ff;<br />
/* Blue */<br />
}<br />
<br />
table.ambox-speedy {<br />
border-left: 10px solid #b22222;<br />
/* Red */<br />
background: #fee;<br />
/* Pink */<br />
}<br />
<br />
table.ambox-delete {<br />
border-left: 10px solid #b22222;<br />
/* Red */<br />
}<br />
<br />
table.ambox-content {<br />
border-left: 10px solid #f28500;<br />
/* Orange */<br />
}<br />
<br />
table.ambox-style {<br />
border-left: 10px solid #f4c430;<br />
/* Yellow */<br />
}<br />
<br />
table.ambox-move {<br />
border-left: 10px solid #9932cc;<br />
/* Purple */<br />
}<br />
<br />
table.ambox-protection {<br />
border-left: 10px solid #bba;<br />
/* Gray-gold */<br />
}<br />
<br />
<br />
/* Image message box styles */<br />
<br />
table.imbox {<br />
margin: 4px 10%;<br />
border-collapse: collapse;<br />
border: 3px solid #1e90ff;<br />
/* Default "notice" blue */<br />
background: #fbfbfb;<br />
}<br />
<br />
.imbox .mbox-text .imbox {<br />
/* For imboxes inside imbox-text cells. */<br />
margin: 0 -0.5em;<br />
/* 0.9 - 0.5 = 0.4em left/right. */<br />
display: block;<br />
/* Fix for webkit to force 100% width. */<br />
}<br />
<br />
.mbox-inside .imbox {<br />
/* For imboxes inside other templates. */<br />
margin: 4px;<br />
}<br />
<br />
table.imbox-notice {<br />
border: 3px solid #1e90ff;<br />
/* Blue */<br />
}<br />
<br />
table.imbox-speedy {<br />
border: 3px solid #b22222;<br />
/* Red */<br />
background: #fee;<br />
/* Pink */<br />
}<br />
<br />
table.imbox-delete {<br />
border: 3px solid #b22222;<br />
/* Red */<br />
}<br />
<br />
table.imbox-content {<br />
border: 3px solid #f28500;<br />
/* Orange */<br />
}<br />
<br />
table.imbox-style {<br />
border: 3px solid #f4c430;<br />
/* Yellow */<br />
}<br />
<br />
table.imbox-move {<br />
border: 3px solid #9932cc;<br />
/* Purple */<br />
}<br />
<br />
table.imbox-protection {<br />
border: 3px solid #bba;<br />
/* Gray-gold */<br />
}<br />
<br />
table.imbox-license {<br />
border: 3px solid #88a;<br />
/* Dark gray */<br />
background: #f7f8ff;<br />
/* Light gray */<br />
}<br />
<br />
table.imbox-featured {<br />
border: 3px solid #cba135;<br />
/* Brown-gold */<br />
}<br />
<br />
<br />
/* Category message box styles */<br />
<br />
table.cmbox {<br />
margin: 3px 10%;<br />
border-collapse: collapse;<br />
border: 1px solid #aaa;<br />
background: #DFE8FF;<br />
/* Default "notice" blue */<br />
}<br />
<br />
table.cmbox-notice {<br />
background: #D8E8FF;<br />
/* Blue */<br />
}<br />
<br />
table.cmbox-speedy {<br />
margin-top: 4px;<br />
margin-bottom: 4px;<br />
border: 4px solid #b22222;<br />
/* Red */<br />
background: #FFDBDB;<br />
/* Pink */<br />
}<br />
<br />
table.cmbox-delete {<br />
background: #FFDBDB;<br />
/* Red */<br />
}<br />
<br />
table.cmbox-content {<br />
background: #FFE7CE;<br />
/* Orange */<br />
}<br />
<br />
table.cmbox-style {<br />
background: #FFF9DB;<br />
/* Yellow */<br />
}<br />
<br />
table.cmbox-move {<br />
background: #E4D8FF;<br />
/* Purple */<br />
}<br />
<br />
table.cmbox-protection {<br />
background: #EFEFE1;<br />
/* Gray-gold */<br />
}<br />
<br />
<br />
/* Other pages message box styles */<br />
<br />
table.ombox {<br />
margin: 4px 10%;<br />
border-collapse: collapse;<br />
border: 1px solid #aaa;<br />
/* Default "notice" gray */<br />
background: #f9f9f9;<br />
}<br />
<br />
table.ombox-notice {<br />
border: 1px solid #aaa;<br />
/* Gray */<br />
}<br />
<br />
table.ombox-speedy {<br />
border: 2px solid #b22222;<br />
/* Red */<br />
background: #fee;<br />
/* Pink */<br />
}<br />
<br />
table.ombox-delete {<br />
border: 2px solid #b22222;<br />
/* Red */<br />
}<br />
<br />
table.ombox-content {<br />
border: 1px solid #f28500;<br />
/* Orange */<br />
}<br />
<br />
table.ombox-style {<br />
border: 1px solid #f4c430;<br />
/* Yellow */<br />
}<br />
<br />
table.ombox-move {<br />
border: 1px solid #9932cc;<br />
/* Purple */<br />
}<br />
<br />
table.ombox-protection {<br />
border: 2px solid #bba;<br />
/* Gray-gold */<br />
}<br />
<br />
<br />
/* Talk page message box styles */<br />
<br />
table.tmbox {<br />
margin: 4px 10%;<br />
border-collapse: collapse;<br />
border: 1px solid #c0c090;<br />
/* Default "notice" gray-brown */<br />
background: #f8eaba;<br />
}<br />
<br />
.mediawiki .mbox-inside .tmbox {<br />
/* For tmboxes inside other templates. The "mediawiki" class ensures that */<br />
margin: 2px 0;<br />
/* this declaration overrides other styles (including mbox-small above) */<br />
width: 100%;<br />
/* For Safari and Opera */<br />
}<br />
<br />
.mbox-inside .tmbox.mbox-small {<br />
/* "small" tmboxes should not be small when */<br />
line-height: 1.5em;<br />
/* also "nested", so reset styles that are */<br />
font-size: 100%;<br />
/* set in "mbox-small" above. */<br />
}<br />
<br />
table.tmbox-speedy {<br />
border: 2px solid #b22222;<br />
/* Red */<br />
background: #fee;<br />
/* Pink */<br />
}<br />
<br />
table.tmbox-delete {<br />
border: 2px solid #b22222;<br />
/* Red */<br />
}<br />
<br />
table.tmbox-content {<br />
border: 2px solid #f28500;<br />
/* Orange */<br />
}<br />
<br />
table.tmbox-style {<br />
border: 2px solid #f4c430;<br />
/* Yellow */<br />
}<br />
<br />
table.tmbox-move {<br />
border: 2px solid #9932cc;<br />
/* Purple */<br />
}<br />
<br />
table.tmbox-protection,<br />
table.tmbox-notice {<br />
border: 1px solid #c0c090;<br />
/* Gray-brown */<br />
}<br />
<br />
<br />
/* Disambig and set index box styles */<br />
<br />
table.dmbox {<br />
clear: both;<br />
margin: 0.9em 1em;<br />
border-top: 1px solid #ccc;<br />
border-bottom: 1px solid #ccc;<br />
background: transparent;<br />
}<br />
<br />
<br />
/* Footer and header message box styles */<br />
<br />
table.fmbox {<br />
clear: both;<br />
margin: 0.2em 0;<br />
width: 100%;<br />
border: 1px solid #aaa;<br />
background: #f9f9f9;<br />
/* Default "system" gray */<br />
}<br />
<br />
table.fmbox-system {<br />
background: #f9f9f9;<br />
}<br />
<br />
table.fmbox-warning {<br />
border: 1px solid #bb7070;<br />
/* Dark pink */<br />
background: #ffdbdb;<br />
/* Pink */<br />
}<br />
<br />
table.fmbox-editnotice {<br />
background: transparent;<br />
}<br />
<br />
<br />
/* Div based "warning" style fmbox messages. */<br />
<br />
div.mw-warning-with-logexcerpt,<br />
div.mw-lag-warn-high,<br />
div.mw-cascadeprotectedwarning,<br />
div#mw-protect-cascadeon {<br />
clear: both;<br />
margin: 0.2em 0;<br />
border: 1px solid #bb7070;<br />
background: #ffdbdb;<br />
padding: 0.25em 0.9em;<br />
}<br />
<br />
<br />
/* Div based "system" style fmbox messages. Used in [[MediaWiki:Readonly lag]]. */<br />
<br />
div.mw-lag-warn-normal,<br />
div.fmbox-system {<br />
clear: both;<br />
margin: 0.2em 0;<br />
border: 1px solid #aaa;<br />
background: #f9f9f9;<br />
padding: 0.25em 0.9em;<br />
}<br />
<br />
<br />
/* These mbox-small classes must be placed after all other ambox/tmbox/ombox etc classes. "body.mediawiki" is so they override "table.ambox + table.ambox" above. */<br />
<br />
body.mediawiki table.mbox-small {<br />
/* For the "small=yes" option. */<br />
clear: right;<br />
float: right;<br />
margin: 4px 0 4px 1em;<br />
width: 238px;<br />
font-size: 88%;<br />
line-height: 1.25em;<br />
}<br />
<br />
body.mediawiki table.mbox-small-left {<br />
/* For the "small=left" option. */<br />
margin: 4px 1em 4px 0;<br />
width: 238px;<br />
border-collapse: collapse;<br />
font-size: 88%;<br />
line-height: 1.25em;<br />
}<br />
<br />
img.thumbborder {<br />
border: 1px solid #ddd;<br />
}<br />
<br />
/* *************************** */<br />
/* inline diceroller (broken?) */<br />
/* *************************** */<br />
<br />
.formula,<br />
.rolled {<br />
display: inline;<br />
padding: 3px;<br />
background: white;<br />
border-radius: 3px;<br />
border: 1px solid #D1D1D1;<br />
font-size: 1.1em;<br />
line-height: 2.0em;<br />
word-wrap: break-word;<br />
}<br />
<br />
.rolled {<br />
font-weight: bold;<br />
}<br />
<br />
.dropped {<br />
opacity: 0.55;<br />
}<br />
<br />
.critsuccess {<br />
color: #508C4D;<br />
font-weight: bold;<br />
}<br />
<br />
.critfail {<br />
color: #D61A1A;<br />
font-weight: bold;<br />
}<br />
<br />
.diceroller {<br />
background-color: #D3E5F5;<br />
padding: 10px;<br />
margin-bottom: 15px;<br />
margin-top: 15px;<br />
font-size: 1.1em;<br />
}<br />
<br />
.diceroller input {<br />
font-size: 1.2em;<br />
padding: 5px;<br />
width: 300px;<br />
margin-top: 5px;<br />
margin-bottom: 5px;<br />
}<br />
<br />
.diceroller small {<br />
display: block;<br />
margin-top: 0px;<br />
font-size: 0.9em;<br />
}<br />
<br />
.formula,<br />
.rolled {<br />
display: inline;<br />
padding: 4px;<br />
background: white;<br />
border-radius: 3px;<br />
border: 1px solid #D1D1D1;<br />
font-size: 1.1em;<br />
line-height: 2.0em;<br />
word-wrap: break-word;<br />
}<br />
<br />
.formula .parsegroup {<br />
display: inline;<br />
}<br />
<br />
.formula .parsegroup .parsegroupitem {<br />
display: inline;<br />
}<br />
<br />
.withouticons .dicegrouping .diceroll .backing {<br />
display: none !important;<br />
}<br />
<br />
.dicegrouping {<br />
display: inline;<br />
}<br />
<br />
.dicegrouping .diceroll {<br />
display: inline-block;<br />
font-size: 1.2em;<br />
}<br />
<br />
.dicegrouping .diceroll .dicon {<br />
display: inline-block;<br />
min-width: 30px;<br />
text-align: center;<br />
position: relative;<br />
}<br />
<br />
.dicegrouping .diceroll .didroll {<br />
text-shadow: -1px -1px 1px #FFFFFF, 1px -1px 1px #FFFFFF, -1px 1px 1px #FFFFFF, 1px 1px 1px #FFFFFF;<br />
z-index: 2;<br />
position: relative;<br />
color: black;<br />
height: 29px;<br />
margin-top: -3px;<br />
top: 0px;<br />
text-align: center;<br />
}<br />
<br />
.dicegrouping .diceroll .backing {<br />
position: absolute;<br />
top: -2px;<br />
left: 0px;<br />
width: 100%;<br />
text-align: center;<br />
font-size: 25px;<br />
color: #8FB1D9;<br />
text-shadow: 0px 0px 3px #8FB1D9;<br />
opacity: 0.75;<br />
pointer-events: none;<br />
z-index: 1;<br />
}<br />
<br />
.dicegrouping .diceroll.d20 .backing {<br />
font-family: "dicefontd20";<br />
}<br />
<br />
.dicegrouping .diceroll.d4 .backing {<br />
font-family: "dicefontd4";<br />
}<br />
<br />
.dicegrouping .diceroll.d6 .backing {<br />
font-family: "dicefontd6";<br />
}<br />
<br />
.dicegrouping .diceroll.d8 .backing {<br />
font-family: "dicefontd8";<br />
}<br />
<br />
.dicegrouping .diceroll.d10 .backing {<br />
font-family: "dicefontd10";<br />
}<br />
<br />
.dicegrouping .diceroll.d12 .backing {<br />
font-family: "dicefontd12";<br />
}<br />
<br />
.dicegrouping .diceroll.d20 .backing:after,<br />
.dicegrouping .diceroll.d12 .backing:after,<br />
.dicegrouping .diceroll.d10 .backing:after,<br />
.dicegrouping .diceroll.d8 .backing:after,<br />
.dicegrouping .diceroll.d6 .backing:after,<br />
.dicegrouping .diceroll.d4 .backing:after {<br />
content: "0";<br />
}<br />
<br />
.rolled {<br />
font-weight: bold;<br />
color: black;<br />
font-size: 1.2em;<br />
}<br />
<br />
.parsegroup .parsegroupitem.dropped .diceroll {<br />
opacity: 0.40;<br />
}<br />
<br />
.dicegrouping .diceroll.dropped {<br />
opacity: 0.40;<br />
}<br />
<br />
.dicegrouping .diceroll.critsuccess .didroll {<br />
color: #247305;<br />
font-weight: bold;<br />
}<br />
<br />
.dicegrouping .diceroll.critfail .didroll {<br />
color: #730505;<br />
font-weight: bold;<br />
}</div>1223200https://wiki.roll20.net/Template:ButtonTemplate:Button2023-10-29T16:15:27Z<p>1223200: </p>
<hr />
<div><kbd style="{{#switch: {{{2|}}}<br />
| blue = color:#ffffff;background-color: #0064cd;text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);border-color:black !important;background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);background-repeat: repeat-x;padding-top: 3px;font-family:Nimbus Sans;<br />
| bluelight = color:#ffffff;background-color: #35c8f5;border-color:transparent !important;padding: 5px 8px 5px 5px;font-family:Nimbus Sans;<br />
| pink = color:#ffffff;background-color: #ec008c;border-color:transparent !important;padding: 5px 8px 5px 5px;font-family:Nimbus Sans;<br />
| red = color:#ffffff;background-color: #bd362f;text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);border-color:black !important;background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);background-repeat: repeat-x;padding-top: 3px;font-family:Nimbus Sans;<br />
| white = color:#333333;background-color: #f5f5f5;text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);border-color:black !important;background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);background-repeat: repeat-x;padding-top: 3px;font-family:Nimbus Sans;<br />
| #default = background:#e6e2e2;color:black;font-weight:bold;font-family:mono;<br />
}}border:1px solid;border-radius:5px;font-size:14px;box-shadow: 3px 2px 2px rgba(0, 0, 0, 0.5);">{{{1}}}</kbd><noinclude><br />
{{ex}}<br />
Press {{button|F12}}. Do {{button|Shift}}+{{button|Alt}}+{{button|K}}<br />
<pre>Press {{button|F12}}. Do {{button|Shift}}+{{button|Alt}}+{{button|K}}</pre><br />
You can define the looks of the button to resemble buttons from the Roll20 UI, to give inline examples of what button to press. By default, a {{tlx|button}} resembles a keyboard key.<br />
<br />
Options:<br />
* {{c|blue}}, {{c|red}}, {{c|white}} are more compact<br />
* {{c|bluelight}}, {{c|pink}}, slightly larger<br />
{{ex}}<br />
* Press the {{button|{{gear}}|blue}} to open Turn tracker settings.<br />
* Press the {{button|Apply Changes|white}} to continue.<br />
* {{button|Delete|red}} is permanent, and can only be recovered with a [[rollback]].<br />
* Press {{button|{{upload}}Upload|white}} to upload more content to your {{Art Library}}, or {{button|{{folder}}Add|white}} to add new folder to the {{Journal}} <br />
* Icons from spans are a bit harder, like {{button|1 = <span style="font-family:Pictos;">@</span>Map layer |2 = white}}<br />
* grab the {{button|{{3lines}}|white}} to move a character to a different spot<br />
* {{button|&#8942;|white}} to edit token settings<br />
* Arrow keys {{button|Alt}}+({{button|&larr;}}, {{button|&rarr;}}, {{button|&uarr;}} or {{button|&darr;}})<br />
* {{button|Apply Settings|bluelight}}, {{button|Create New Wishlist|pink}}<br />
<pre>Press the {{button|{{gear}}|blue}} to open Turn tracker settings.<br />
* Press the {{button|Apply Changes|white}} to continue.<br />
* {{button|Delete|red}} is permanent, and can only be recovered with a [[rollback]].<br />
* Press {{button|{{upload}}Upload|white}} to upload more content to your {{Art Library}}, or {{button|{{folder}}Add|white}} to add new folder to the {{Journal}}<br />
* Icons from spans are a bit harder, like {{button|1 = <span style="font-family:Pictos;">@</span>Map layer |2 = white}}<br />
* grab the {{button|{{3lines}}|white}} to move a character to a different spot<br />
* {{button|&#8942;|white}} to edit token settings<br />
* Arrow keys {{button|Alt}}+({{button|&larr;}}, {{button|&rarr;}}, {{button|&uarr;}} or {{button|&darr;}})<br />
* {{button|Apply Settings|bluelight}}, {{button|Create New Wishlist|pink}}</pre><br />
[[Category:Templates]]<br />
[[Category:Template Documentation]]<br />
</noinclude></div>1223200https://wiki.roll20.net/User:1223200/sandboxUser:1223200/sandbox2023-10-29T16:14:44Z<p>1223200: /* Wiki */</p>
<hr />
<div>=Wiki=<br />
===This is a test sandbox for editing the wiki, and trying out wiki code and syntax===<br />
At the top has useful code snippets that are often used. [[Help:Contents|Wiki Help]] contains documentation on how to edit the wiki.<br />
<br />
<kbd style="background:#e6e2e2;color:black;font-weight:bold;font-family:mono;border:1px solid;border-radius:5px;font-size:14px;box-shadow: 3px 2px 2px rgba(0, 0, 0, 0.5);">Shift</kbd> -key<br />
<br />
{{test|s[[ and other stuff}} {{test|s[d}} {{test|} }}<br />
<br />
{{#tag:nowiki|{{{1}}} use in #tag:nowiki }} {{#tag:pre|pre tag}}<br />
<br />
{{test|<pre>cool stuff</pre>}} vs {{c|<pre>cool stuff</pre>}} <br />
<br />
<br />
[https://en.wikipedia.org/wiki/Help:Pipe_trick pipe] trick: [[Phoenix, Arizona|Phoenix]]<br />
<br />
{{k-scaffold}}<br />
<br />
==Useful Stuff==<br />
frequently used wiki code snippets that can easily be copypasted<br />
<pre style="overflow:scroll;">&#60;noinclude&#62; {{revdate}} {{main|}} &#60;/noinclude&#62; &#60;noinclude&#62; __TOC__ &#60;/noinclude&#62; &#60;noinclude&#62; [[Category:]] &#60;/noinclude&#62; transclusion: exclude parts of page from transclusion.<br />
{{code|&#60;nowiki&#62; &#60;/nowiki&#62;}} use this to wrap around tricky code or macros you post on the wiki<br />
<code></code><br />
{{revdate}}{{HCbox| {{hc|articles/360037772873-API-Debugging Here}} }}<br />
good template to use for posting blocks of code on the wiki. change the "data-language" to only have the relevant code<br />
&#60;pre data-language="html"&#62; &#60;/pre&#62;<br />
&#60;pre data-language="css"&#62; &#60;/pre&#62;<br />
&#60;pre data-language="javascript"&#62; &#60;/pre&#62;<br />
{{#evp:youtube|KdQg6Fhxg-I|It's a Trap" |right|500}}<br />
<br />
= &amp;#61; fix for some urls so they dont break templates<br />
(space) &amp;nbsp;<br />
<br />
<code>&#60;code&#62;</code> <code>&#60;nowiki&#62;</code> <code>&#60;pre&#62;</code> html replacements/entities to show tricky stuff<br />
&#60;span&#62; &#60;div&#62; &#60;input type="text"&#62; <br />
<br />
''' ''' bold text<br />
'' '' italic text<br />
<sup> </sup> superscript, small text slightly higher, useful for adding citations<br />
{{tlx|}} link to template<br />
<br />
{{notebox| }} normal textbox with blue border and "i" symbol. the common "mild" notice to use<br />
{{orange| }} warning textbox with orange border and "i" symbol, slighty more severe than normal<br />
{{warning| }} warning textbox with red border, and "i" symbol in a triangle, to be used sparring for dire warnings <br />
<br />
''Main Page:'' '''[[ ]]'''<br />
<br />
[[|right|thumbnail|400px|]] good default for images, place the "File:imagename.png" before the first "|"<br />
<br />
{{user profile|1223200|Andreas J.}}<br />
{{usercredit|1223200}}<br />
{{user profile||}} links to user roll20 profile. place their roll20id in the first section, and then write their name in the second section.<br />
<br />
~~~~ adds a timestamp and your name, quick way to sign your name on something, showing who and when something was written<br />
<br />
<br />
{{forum|category/18 Character & Compendium Forums}} forum link without the extra "lock" icon, that links outside the wiki usually gets<br />
{{Repo Sheet}} githublink to char sheet repo showing github logo, great for showing links to stuff on github.com<br />
{{Repo API}} <br />
{{bug}} hyperlink to roll20's ticket system<br />
<br />
{{pro only|page|section}} adds a noticebox to the section/page saying this is a pro/plus feature, linking to the plus/pro pages<br />
{{plus only|page|section}}<br />
<br />
{{user profile|157788|GiGs}} roll20 contributors who have created many of the tips listed on the wiki. for properly crediting people<br />
{{user profile|492849|Coal Powered Puppet}}<br />
{{user profile|162065|Keith Curtis}}<br />
{{user profile|1869955|Kraynic}}<br />
{{user profile|104025|The Aaron}}<br />
{{user profile|459831|Scott C.}}<br />
<br />
==Related Pages==<br />
* [[Complete Guide to Macros & Rolls]]<br />
* [[Building Character Sheets]]<br />
* [[Andreas Guide to Sheet Development]]<br />
<br><br />
<br><br />
[[Category:Character Sheet Documentation]]<br />
<br />
<br />
<div class='diceroller'> you can embed a simplified version of the roll20 diceroller on a page, such as /r 3d6+2<br />
</div><br />
<br />
how to create a table grid<br />
{| class="wikitable" style="float:right; margin-left: 10px;margin-right: 60px;" <br />
|+title<br />
|-<br />
|'''first'''<br />
| second row<br />
|-<br />
|''' '''<br />
|<br />
|-<br />
|''' '''<br />
|<br />
|}<br />
<br />
{| role="presentation" class="wikitable mw-collapsible mw-collapsed"<br />
| title<br />
|-<br />
| content<br />
|}<br />
<br />
</pre><br />
<br />
{{LDL sunset}}<br />
<br />
<pre style="background-color:#333; color: #E6DB74;"><br />
API console results style<br />
maybe useful for code readability?<br />
</pre><br />
<br />
<strike>strike out deleted material</strike><br />
<br />
{{user profile|1223200|Andreas J.}}<br />
{{usercredit|1223200}}<br />
<pre><br />
{{user profile|1223200|Andreas J.}}<br />
{{usercredit|1223200}}<br />
</pre><br />
<br />
{{forum|category/18 char forums}} link no extra icon<br />
<pre><br />
{{forum|category/18 char forums}} link no extra icon<br />
</pre><br />
<br />
easy{{dot}} creatin{{dot}}dot<br />
<pre><br />
easy{{dot}} creatin{{dot}}dot<br />
</pre><br />
<br />
==random==<br />
__TOC__<br />
<br />
{{code|does this <span>work</span> }}, even with text after?<br />
<br />
[https://www.youtube.com/watch?v=gtiZ0IBc2Tc video]<br />
[https://twitter.com/roll20app/ @roll20app]<br />
[https://www.facebook.com/roll20app roll20app]<br />
[https://www.twitch.tv/roll20app roll20app]<br />
[https://marketplace.roll20.net/browse/bundle/11218/the-wild-beyond-the-witchlight witchlight]<br />
[https://roll20.net/compendium/dnd5e/Candlekeep Mysteries Candelkeep]<br />
[https://help.roll20.net/hc/en-us/articles/360039723533-Marketplace-Creator-HQ#MarketplaceCreatorHQ-BecomingACreator marketplace creator]<br />
[https://en.wikipedia.org/wiki/List_of_Stargate_games#Stargate_Roleplaying_Game_(2021) Stargate RPG]<br />
<br />
{{tl|clear}} vs {{tlx|clear}}<br />
{{revdate/sandbox}}<br />
Sub & Sup text underneath each other: Example<div style="display: inline-block;"><sup style="display:block; position:relative; left:2px; top: 16px"><sup>&nbsp;Help</sup></sup><sub style="display:block; position:relative; left:2px; top: 1px"><sub>Center</sub></sub></div><br />
<br />
{| role="presentation" class="wikitable mw-collapsible mw-collapsed"<br />
| macro that doesn't work<br />
|-<br />
| <pre>?{Attack|Just roll, /r d20+5|Description, /em swings the sword with a result of [[d20+5]]}</pre><br />
|}<br />
<br />
What is token for?<br />
<pre><br />
{{token|/r d20+4}}<br />
{{token| [[Journal]]}}<br />
{{compact toc}}<br />
</pre><br />
<br />
{{token|/r d20+4}}<br />
{{token| [[Journal]]}}<br />
<br />
==wiki navbar template==<br />
template and stuff on hwo to create Navigation templates for the wiki, that can make it easier to navigate related wiki pages from the top of the page. Example: {{SidebarNav}}<br />
<pre style="overflow:scroll;"><br />
The main "Nav" template, which is linked to on pages, Such as {{SidebarNav}}, {{apibox}} or {{NavSheetDoc}}. At the bottom it uses {{apibox bottom}} to close of the Navigation template and make it work, no need to create a new template each time, so {{apibox bottom}} is fine:<br />
<br />
<br />
-----<br />
toolbar nav templates<br />
* {{zoom}}<br />
* {{select}}<br />
* {{ruler}}<br />
* {{layers}}<br />
* {{drawing}}<br />
* {{fx tool}}<br />
* {{fow}}<br />
* {{Darkness}}<br />
<br />
------<br />
{{SidebarNav top|{{{1|right}}}}}<br />
* <span style="font-family:Pictos;">q</span> [[Text Chat]]<br />
* <span style="font-family:Pictos;">P</span> [[Art Library]]<br />
* <span style="font-family:Pictos;">N</span> [[Journal]]<br />
* <span style="font-family:Pictos;">y</span> [[Compendium]]<br />
* <span style="font-family:Pictos Custom;">u</span> [[Jukebox]]<br />
* <span style="font-family:Pictos;">l</span> [[Collections]]<br />
* <span style="font-family:Pictos;">y</span> [[My Settings]]<br />
{{apibox bottom}}<noinclude>{{documentation}}[[Category:Navigation Templates]]</noinclude><br />
------<br />
<br />
The "Nav top" template, that determines the title of the Template:<br />
---<br />
<includeonly><div style="float: {{{1|right}}}; width: 200px; padding: 5px; border: 1px solid #777; margin: 0 15px 15px 15px; background-color: #efefef;"><br />
<br />
<span style="font-size: 1.4em; font-weight: bold;margin-bottom:0px;">[[Sidebar]]</span></includeonly><noinclude>{{documentation}}[[Category:Navigation Templates]]</noinclude><br />
------<br />
<br />
</pre><br />
<br />
toolbar nav templates<br />
* {{zoom}}<br />
* {{select}}<br />
* {{ruler}}<br />
* {{layers}}<br />
* {{drawing}}<br />
* {{fx tool}}<br />
* {{fow}}<br />
* {{Darkness}}<br />
<br />
==template to-do==<br />
<br />
* pdf link template, shows pdf icon to url<br />
* DriveThruRPG link template, shows DTrpg icon to url?<br />
* Helpdesk, Roll20 Blog link templates<br />
* code+nowiki template for macros, one without linebreak at the end.<br />
<br />
==Test==<br />
<br />
{{forum|category/18 char forums}}hopefully no linebreak<br />
<br />
{{forum|category/18/ char forums}}hopefully no linebreak<br />
<br />
[[File:SWD6 sheet.png|410px|thumb|right|link=5E|image links to a page]]<br />
<br />
<pre> {{api repository link|Foo}} then text</pre><br />
<br />
{{api repository link|Foo}} then text<br />
<br />
{{warning|this is a warning}}<br />
<br />
is <nowiki>{{Font color|yellow|this}}</nowiki> yellow <br />
<pre><br />
is <nowiki>{{Font color|yellow|this}}</nowiki> yellow <br />
</pre><br />
<br />
<tt>code alternative [[BCS]]</tt><br />
<br />
<cite>To be or not <mark>tobey</mark> mcguire- someone</cite> <br />
<br />
<br />
[[wikipedia:Roll20]]<br />
<br />
{{code| /r d20+5}}<br />
<br />
<br />
<br />
{{token|/r d20+4}}<br />
<br />
{{token| [[Journal]]}} stuff<br />
<br />
{{compact toc}}<br />
<br />
=A=<br />
add<br />
=f=<br />
fine<br />
=s=<br />
stuff<br />
=sidebar=<br />
<br />
personal sidebar seems nice, as seen on many [[Online_Role_Playing:Index]] pages.<br />
<br />
{{Sidebar<br />
| navbar = off<br />
| headingstyle = background-color:#eee;<br />
| image = [[File:|260px]]<br />
}}<br />
{{Sidebar<br />
| navbar = off<br />
| headingstyle = background-color:#eee;<br />
| title = the name<br />
| image = [[File:Us.png|40px]]<br />
| heading1 = aka nickanme<br />
}}<br />
{{Sidebar<br />
| navbar = off<br />
| headingstyle = background-color:#eee;<br />
| image = [[File:Twitch.png|40px|link=https://www.twitch.tv/Roll20app]][[File:Youtube.png|40px|link=https://www.youtube.com/roll20app]]<br />
}}<br />
<br />
<pre {{pre}}><br />
{{Sidebar<br />
| navbar = off<br />
| headingstyle = background-color:#eee;<br />
| image = [[File:|260px]]<br />
}}<br />
{{Sidebar<br />
| navbar = off<br />
| headingstyle = background-color:#eee;<br />
| title = the name<br />
| image = [[File:Us.png|40px]]<br />
| heading1 = aka nickanme<br />
}}<br />
{{Sidebar<br />
| navbar = off<br />
| headingstyle = background-color:#eee;<br />
| image = [[File:Twitch.png|40px|link=https://www.twitch.tv/Roll20app]][[File:Youtube.png|40px|link=https://www.youtube.com/roll20app]]<br />
}}<br />
</pre></div>1223200https://wiki.roll20.net/Dark_ModeDark Mode2023-10-14T11:36:46Z<p>1223200: /* Character Sheets */</p>
<hr />
<div>{{revdate}}[[File:Dark mode beta feb 2022.gif|right|550px|thumb| [[Dark Mode]] beta on [[Dev Server]] (Feb 4 2022)]]<br />
<br />
=In-Game=<br />
Dark Mode was released [https://app.roll20.net/forum/post/10728595/release-note-march-2-2022-dark-mode-for-the-vtt March 2nd, 2022], after around a month's [[Beta]] on the [[Dev Server]].<br />
<br />
You can toggle it from {{My Settings}} "personalization"-section, or from the Dark Mode toggle that can bee seen below the (old) [[Toolbar]].<br />
<br />
{{5E}} also got a dark mode, while other official sheet will get that later. Community-created character sheets needs to be updated separately to support this.<br />
<br />
==Character Sheets==<br />
As the Dark Mode is still somewhat recent, it will take time for Character Sheets creators(both Roll20, publisher & community-maintained) to adapt them to be Dark Mode compatible.<br />
<br />
Sheets with Dark Mode:<br />
* As of March 24th 2022, around a dozen character sheets supports the native Dark Mode ( observation: [[User:1223200|1223200]])<br />
* There exists a larger number of sheets that had built-in their own "Dark Mode" or color-schemes into the sheets, but those needs to be turned on manually.<br />
** These are usually available in some form of "Options" tab or menu, commonly with a {{gear}} or {{hammer}} icon. <br />
* Sheets that already had a dark color-scheme(Unknown number)<br />
** these probably works quite nicely with Dark Mode even if they don't explicitly support it, but might have minor artifacts that need to be adjusted.<br />
<br />
See [[Character Sheet Development/Dark Mode]] for help with updating sheet to Dark Mode. Alternatively, you could create a [[Stylus]] snippet to fix a sheet for yourself. These Stylus-snippets can later be used by Sheet Authors when implementing Dark Mode for the sheet.<br />
<br />
=Main Site=<br />
To turn on Dark Mode for the main site/forums/marketplace go to [[My Account]] and under "Preferences" change the "Color Mode".<br />
<br />
The [[Help Center]], the Main Site, Forums, Marketplace, Compendium has dark mode, while the [[Community Wiki]] doesn't.<br />
<br />
Community option for wiki dark mode using [[Stylus]]: [https://userstyles.world/api/style/3108.user.css Install] | [https://userstyles.world/style/3108/roll20-dark-mode Roll20 Wiki Dark Mode] by [[Andreas J.]]<br />
<br />
<br />
=Other=<br />
==Community-made Dark Modes==<br />
Using the [[Browser#Stylus|Stylus]]-browser plugin, you can try using one of the community-made attempts at a Dark Mode. Some Are for the VTT itself & adjusted for the 5E sheet, while others have made Dark Modes for rest of the site.<onlyinclude><br />
* Dark Mode(In-Game)<br />
** [https://raw.githubusercontent.com/shevernitskiy/roll20darkcobalt/master/roll20darkcobalt.user.css Install] | {{fpl|8680812/ Roll20 Dark Cobalt}} by Kirill S.<br />
** [https://userstyles.org/styles/180086/roll20-emoh-s-darkness Emoh's Darkness]<br />
** [https://addons.mozilla.org/en-US/firefox/addon/roll20-glass-theme/ Roll20 Glass Theme - Firefox Extension] | {{repo|GreenTeaSeb/Roll20-glass sourcecode}}<br />
* Dark Mode(rest of Website)<br />
** [https://userstyles.world/api/style/3108.user.css Install] | [https://userstyles.world/style/3108/roll20-dark-mode Roll20 Wiki Dark Mode] by [[Andreas J.]]<br />
** [https://gist.github.com/Anduh/a1a51238cc839314f61e6fd1bae481f2/raw/e5c04cd0d789a2eb9ba5b483686cdb8b26fcbf9b/Vince-Roll20-Site-Dark-Mode.user.css Install] | [https://gist.github.com/vince-roll20/30759bb42515c098336d Dark Mode for Roll20] by [[Vince]]<br />
</onlyinclude><br />
<br />
==Beta(Old)==<br />
A '''Dark Mode''' for Roll20 is a popular Feature Request, and from Feb 4, 2022 to March 2022 was available on the [[Dev Server]] for testing.<br />
* {{fpl|10670746/ Release Note - Feb 4, 2022: Dark Mode & Token Locking on Dev}}<br />
* {{forum|post/6835578/dark-mode-roll20-so-bright Dark Mode Suggestion Discussion}} - You can go and vote & comment on the suggestion, and follow it for updates.<br />
* On [[Roll20Con#2021|Roll20Con 2021]] it was hinted that dark mode was getting closer, when they revealed their "updated color palette". [https://blog.roll20.net/posts/designing-for-accessibility-at-roll20/ Designing for Accessibility at Roll20] - Nov 10, 2021<br />
<br />
=See Also=<br />
* [[Character Sheet Development/Dark Mode]]<br />
* [[:Category:FAQ]]<br />
<br />
[[Category:New features in 2022]]<br />
[[Category:Dark Mode]]</div>1223200https://wiki.roll20.net/Dark_ModeDark Mode2023-10-14T11:35:59Z<p>1223200: </p>
<hr />
<div>{{revdate}}[[File:Dark mode beta feb 2022.gif|right|550px|thumb| [[Dark Mode]] beta on [[Dev Server]] (Feb 4 2022)]]<br />
<br />
=In-Game=<br />
Dark Mode was released [https://app.roll20.net/forum/post/10728595/release-note-march-2-2022-dark-mode-for-the-vtt March 2nd, 2022], after around a month's [[Beta]] on the [[Dev Server]].<br />
<br />
You can toggle it from {{My Settings}} "personalization"-section, or from the Dark Mode toggle that can bee seen below the (old) [[Toolbar]].<br />
<br />
{{5E}} also got a dark mode, while other official sheet will get that later. Community-created character sheets needs to be updated separately to support this.<br />
<br />
==Character Sheets==<br />
As the Dark Mode is still somewhat recent, it will take time for Character Sheets creators(both Roll20, publisher & community-maintained) to adapt them to be Dark Mode compatible.<br />
<br />
Sheets with Dark Mode:<br />
* As of March 24th 2022, around a dozen character sheets supports the native Dark Mode [[User:1223200|1223200]]<br />
* There exists a larger number of sheets that had built-in their own "Dark Mode" or color-schemes into the sheets, but those needs to be turned on manually.<br />
** These are usually available in some form of "Options" tab or menu, commonly with a {{gear}} or {{hammer}} icon. <br />
* Sheets that already had a dark color-scheme(Unknown number)<br />
** these probably works quite nicely with Dark Mode even if they don't explicitly support it, but might have minor artifacts that need to be adjusted.<br />
<br />
See [[Character Sheet Development/Dark Mode]] for help with updating sheet to Dark Mode. Alternatively, you could create a [[Stylus]] snippet to fix a sheet for yourself. These Stylus-snippets can later be used by Sheet Authors when implementing Dark Mode for the sheet.<br />
<br />
=Main Site=<br />
To turn on Dark Mode for the main site/forums/marketplace go to [[My Account]] and under "Preferences" change the "Color Mode".<br />
<br />
The [[Help Center]], the Main Site, Forums, Marketplace, Compendium has dark mode, while the [[Community Wiki]] doesn't.<br />
<br />
Community option for wiki dark mode using [[Stylus]]: [https://userstyles.world/api/style/3108.user.css Install] | [https://userstyles.world/style/3108/roll20-dark-mode Roll20 Wiki Dark Mode] by [[Andreas J.]]<br />
<br />
<br />
=Other=<br />
==Community-made Dark Modes==<br />
Using the [[Browser#Stylus|Stylus]]-browser plugin, you can try using one of the community-made attempts at a Dark Mode. Some Are for the VTT itself & adjusted for the 5E sheet, while others have made Dark Modes for rest of the site.<onlyinclude><br />
* Dark Mode(In-Game)<br />
** [https://raw.githubusercontent.com/shevernitskiy/roll20darkcobalt/master/roll20darkcobalt.user.css Install] | {{fpl|8680812/ Roll20 Dark Cobalt}} by Kirill S.<br />
** [https://userstyles.org/styles/180086/roll20-emoh-s-darkness Emoh's Darkness]<br />
** [https://addons.mozilla.org/en-US/firefox/addon/roll20-glass-theme/ Roll20 Glass Theme - Firefox Extension] | {{repo|GreenTeaSeb/Roll20-glass sourcecode}}<br />
* Dark Mode(rest of Website)<br />
** [https://userstyles.world/api/style/3108.user.css Install] | [https://userstyles.world/style/3108/roll20-dark-mode Roll20 Wiki Dark Mode] by [[Andreas J.]]<br />
** [https://gist.github.com/Anduh/a1a51238cc839314f61e6fd1bae481f2/raw/e5c04cd0d789a2eb9ba5b483686cdb8b26fcbf9b/Vince-Roll20-Site-Dark-Mode.user.css Install] | [https://gist.github.com/vince-roll20/30759bb42515c098336d Dark Mode for Roll20] by [[Vince]]<br />
</onlyinclude><br />
<br />
==Beta(Old)==<br />
A '''Dark Mode''' for Roll20 is a popular Feature Request, and from Feb 4, 2022 to March 2022 was available on the [[Dev Server]] for testing.<br />
* {{fpl|10670746/ Release Note - Feb 4, 2022: Dark Mode & Token Locking on Dev}}<br />
* {{forum|post/6835578/dark-mode-roll20-so-bright Dark Mode Suggestion Discussion}} - You can go and vote & comment on the suggestion, and follow it for updates.<br />
* On [[Roll20Con#2021|Roll20Con 2021]] it was hinted that dark mode was getting closer, when they revealed their "updated color palette". [https://blog.roll20.net/posts/designing-for-accessibility-at-roll20/ Designing for Accessibility at Roll20] - Nov 10, 2021<br />
<br />
=See Also=<br />
* [[Character Sheet Development/Dark Mode]]<br />
* [[:Category:FAQ]]<br />
<br />
[[Category:New features in 2022]]<br />
[[Category:Dark Mode]]</div>1223200https://wiki.roll20.net/Dark_ModeDark Mode2023-10-14T11:33:34Z<p>1223200: dark mode on main site</p>
<hr />
<div>{{revdate}}[[File:Dark mode beta feb 2022.gif|right|550px|thumb| [[Dark Mode]] beta on [[Dev Server]] (Feb 4 2022)]]<br />
<br />
=In-Game=<br />
Dark Mode was released [https://app.roll20.net/forum/post/10728595/release-note-march-2-2022-dark-mode-for-the-vtt March 2nd, 2022], after around a month's [[Beta]] on the [[Dev Server]].<br />
<br />
{{5E}} also got a dark mode, while other official sheet will get that later. Community-created character sheets needs to be updated separately to support this.<br />
<br />
==Character Sheets==<br />
As the Dark Mode is still somewhat recent, it will take time for Character Sheets creators(both Roll20, publisher & community-maintained) to adapt them to be Dark Mode compatible.<br />
<br />
Sheets with Dark Mode:<br />
* As of March 24th 2022, around a dozen character sheets supports the native Dark Mode [[User:1223200|1223200]]<br />
* There exists a larger number of sheets that had built-in their own "Dark Mode" or color-schemes into the sheets, but those needs to be turned on manually.<br />
** These are usually available in some form of "Options" tab or menu, commonly with a {{gear}} or {{hammer}} icon. <br />
* Sheets that already had a dark color-scheme(Unknown number)<br />
** these probably works quite nicely with Dark Mode even if they don't explicitly support it, but might have minor artifacts that need to be adjusted.<br />
<br />
See [[Character Sheet Development/Dark Mode]] for help with updating sheet to Dark Mode. Alternatively, you could create a [[Stylus]] snippet to fix a sheet for yourself. These Stylus-snippets can later be used by Sheet Authors when implementing Dark Mode for the sheet.<br />
<br />
=Main Site=<br />
To turn on Dark Mode for the main site/forums/marketplace go to [[My Account]] and under "Preferences" change the "Color Mode".<br />
<br />
The [[Help Center]], the Main Site, Forums, Marketplace, Compendium has dark mode, while the [[Community Wiki]] doesn't.<br />
<br />
Community option for wiki dark mode using [[Stylus]]: [https://userstyles.world/api/style/3108.user.css Install] | [https://userstyles.world/style/3108/roll20-dark-mode Roll20 Wiki Dark Mode] by [[Andreas J.]]<br />
<br />
<br />
=Other=<br />
==Community-made Dark Modes==<br />
Using the [[Browser#Stylus|Stylus]]-browser plugin, you can try using one of the community-made attempts at a Dark Mode. Some Are for the VTT itself & adjusted for the 5E sheet, while others have made Dark Modes for rest of the site.<onlyinclude><br />
* Dark Mode(In-Game)<br />
** [https://raw.githubusercontent.com/shevernitskiy/roll20darkcobalt/master/roll20darkcobalt.user.css Install] | {{fpl|8680812/ Roll20 Dark Cobalt}} by Kirill S.<br />
** [https://userstyles.org/styles/180086/roll20-emoh-s-darkness Emoh's Darkness]<br />
** [https://addons.mozilla.org/en-US/firefox/addon/roll20-glass-theme/ Roll20 Glass Theme - Firefox Extension] | {{repo|GreenTeaSeb/Roll20-glass sourcecode}}<br />
* Dark Mode(rest of Website)<br />
** [https://userstyles.world/api/style/3108.user.css Install] | [https://userstyles.world/style/3108/roll20-dark-mode Roll20 Wiki Dark Mode] by [[Andreas J.]]<br />
** [https://gist.github.com/Anduh/a1a51238cc839314f61e6fd1bae481f2/raw/e5c04cd0d789a2eb9ba5b483686cdb8b26fcbf9b/Vince-Roll20-Site-Dark-Mode.user.css Install] | [https://gist.github.com/vince-roll20/30759bb42515c098336d Dark Mode for Roll20] by [[Vince]]<br />
</onlyinclude><br />
<br />
==Beta(Old)==<br />
A '''Dark Mode''' for Roll20 is a popular Feature Request, and from Feb 4, 2022 to March 2022 was available on the [[Dev Server]] for testing.<br />
* {{fpl|10670746/ Release Note - Feb 4, 2022: Dark Mode & Token Locking on Dev}}<br />
* {{forum|post/6835578/dark-mode-roll20-so-bright Dark Mode Suggestion Discussion}} - You can go and vote & comment on the suggestion, and follow it for updates.<br />
* On [[Roll20Con#2021|Roll20Con 2021]] it was hinted that dark mode was getting closer, when they revealed their "updated color palette". [https://blog.roll20.net/posts/designing-for-accessibility-at-roll20/ Designing for Accessibility at Roll20] - Nov 10, 2021<br />
<br />
=See Also=<br />
* [[Character Sheet Development/Dark Mode]]<br />
* [[:Category:FAQ]]<br />
<br />
[[Category:New features in 2022]]<br />
[[Category:Dark Mode]]</div>1223200https://wiki.roll20.net/Text_ChatText Chat2023-09-23T12:29:48Z<p>1223200: gm can hide messages</p>
<hr />
<div>{{revdate}}{{HCbox|{{hc|articles/360039675093-Text-Chat Here}} }}<br />
<br />
<!-- [[File:TextChat2020.jpg|right|thumbnail|250px|Example of the Text Chat in use]] --><br />
The <span style="font-family:Pictos;">q</span> '''Text Chat''' is the first tab in the [[Sidebar]].<br />
{{SidebarNav}}<br />
It's where all the dice roll results & other in-game messages appear.<br />
<br />
{{#evp:youtube|02uBbVcRAW0|Roll20 Chat: Basic Features to Advanced Tricks|right|600}} <br />
== Chat ==<br />
<br />
Sending a basic chat message is easy: just type your message into the chat input area and press {{button|Enter}}. Be advised that any player assigned a &quot;Character&quot; (from the {{Journal}} tab) can choose via drop-down to talk as either themselves (their registered login name) or as their assigned character. This drop-down menu can be found directly below the chat text box.<br />
<br />
If "Enable chat avatars" is checked off in the {{My Settings}}-tab on the [[Sidebar]], mini avatar icons will display to the left of chat entries. The icon will change depending on whether a user is chatting as themselves or as a player assigned character.<br />
<br />
Press {{button|&uarr;}} when having the Chat input selected, and the chat box will display the macro for the last thing you rolled this session.<br />
<br />
__TOC__<br />
=== GM ===<br />
The GM can hide chat messages.{{source|https://help.roll20.net/hc/en-us/articles/16867057096855-2022-Change-Log#01H84T3A39W17CCQ7MC3WW5VT3 Sept. 2022}}<br />
=== Multiline Chat Commands ===<br />
You can hit {{button|Shift}}+{{button|Enter}} while typing in chat commands to get to the next line. Each line will be individually interpreted allowing you to send multiple styles of chat together, preventing them from being split in the chat by other player's messages.<br />
<br />
<pre><br />
/me strikes a valiant pose.<br />
Evil doer, beware, I am on your trail!<br />
/w gm This is the signal that the thugs I paid are waiting for.<br />
</pre><br />
{{NavMacroDocs}}<br />
== Rolling (/roll, /r)==<br />
Rolling dice in Roll20 is easy. Just type <code>/roll</code> or <code>/r</code> into the text chat box, followed by a formula. In most cases, the formula is the same as the one that's printed in your game's instructions. For example, you might know that to roll an attack roll you need to roll a &quot;D20 plus your attack modifier&quot;. In Roll20, you would just type <code>/roll d20+5</code>. If you hit and you need to roll 3d6+2 damage, you would just type <code>/roll 3d6+2</code>. Finally, you can also string multiple rolls together. If you have an attack that does two types of damage, you might do <code>/roll 2d6+5 + 1d8</code>.<br />
<br />
So, the overall format for a dice roll is <code>/roll NdX+m</code> where N is the number of dice to roll, X is the number of sides of the dice, and m is the (optional) modifier, which can also be negative.<br />
<br />
After the roll is performed, you'll see the results of the roll in the text chat area. Notice that for each group of dice that were rolled, there will be a group of numbers in parentheses, representing the result of each individual dice that was rolled. You'll also see the total of all the dice values plus modifiers to the right of the equals sign.<br />
<br />
'''[[Dice Reference]]''' has info on the more advanced dice mechanics & syntax.<br />
<br />
Beyond using the various Roll Commands shown on this page, you can also start write/use:<br />
* [[Macros]] - Start with <code>#</code>, and start typing the macro name, and a list of your macros will be displayed.<br />
** '''Example:''' writing <code>#testmacro</code> in the chat will roll the macro with that name<br />
* [[Roll Templates]] - <code><nowiki>&{template:name-of-roll-template} {{sectionname(optional)=content of roll template}}</nowiki></code>.<br />
** The Default Roll Template is available in any games, other templates are tied to specific Character Sheet Templates. (E.g. you can only access the specific <code>&{template:simple}</code> when you have [[D&D 5E by Roll20]]-sheet in the game). <br />
** '''Example:''' <code><nowiki>&{template:default} {{name=Test Attack}} {{attack=[[1d20]]}} {{damage=[[2d6]]}}</nowiki></code><br />
** This will generate a roll template using the default template, displaying "Test Attack" in the purple title, then on a new row the result of <code>1d20</code> roll, and on the third row the <code>2d6</code> roll<br />
* [[Journal#Attributes|Character Abilities]]/Character Sheet Button - <code>%{character name|ability or roll button name}</code><br />
** '''Example 1;''' writing <code>%{Sam Bobbins|initiative}</code> in the chat, will work if there exists a Character with that name, who have a Character Ability/[[Character Sheet]] Roll Button by that name<br />
** '''Example 2:''' selecting a [Token]] on the map, and then writing <code>%{selected|initiative}</code> in the chat, will work if the token is linked to a character sheet that has an Ability or Roll button with that name.<br />
* [[API|API commands]]''(available in games hosted by a pro user)'', - Start with <code>!</code> to call the API command, and then write and parameters it can take<br />
** '''Example:''' writing <code>!MassInit</code> in the chat will trigger an API that uses <code>MassInit</code> as a keyword.<br />
<br />
===To GM===<br />
To make a roll that's only visible to the [[GM]], you use either <code>/gmroll</code> or <code>/gr</code>, instead of the default<br />
<br />
== Chat Commands ==<br />
<br />
=== Whispers (/w)===<br />
<br />
To whisper, simply type <code>/w</code> and the name (either [[player]] or character) you wish to engage via whisper. Do note that there is a tab-auto-complete function for names to speed this process.<br />
<br />
Example: <code>/w Galstaff Then how come you had to cast magic missile?</code><br />
<br />
Example: <code>/w Rob Where are the Cheetos?!</code><br />
<br />
You can put the name of a character/player in quotation marks, if the name contains spaces.<br />
<br />
Example: <code>/w "Galstaf, Sorcerer of Light" You didn't say you cast it, so you didn't, ok?!</code><br />
<br />
Example: <code>/w "Rob Smith" Where's the Mountain Dew?!</code><br />
<br />
<br />
'''Note:''' Whispering to a Character will send the message to all Players listed in the <code>controlled by</code> field, which may include the GM. This fact is often used to make an "in-character language" Character for Campaign setting languages like Elvish, Dwarven, Orcish, etc. The "Language-character" can then be whispered to for only Players who have Characters that understand that language.<br />
<br />
====Rolls to GM (/gmroll, /gr)====<br />
To whisper directly to the [[GM]], type <code>/w gm</code>. You can also perform a roll that only you and the GM can see, with <code>/gmroll 1d20+5</code>.<br />
<br />
Example: <code>/w gm I'm attacking the darkness!</code><br />
<br />
Example: <code>/gmroll 2d6+3</code><br />
<br />
<br />
At this time, only GM whispers are retained in the Chat Archive, and they are only shown to the GM.<br />
<br />
A [[player]] or the GM can whisper to themselves using the <code>/w</code> or <code>/w gm</code> commands where applicable.<br />
<br />
=== Emotes (/em)===<br />
<br />
To emote, type <code>/em</code> (or {{c|/me}}) and whatever action you want stated. Be advised that you will emote by whatever you are currently speaking as (player or character). Emotes are formatted as center aligned, bold, italicized and set in a brown font and highlight.<br />
<br />
<br />
'''Example:'''<br />
<br />
<pre>/em takes out one of his throwing daggers and brandishes it threateningly.</pre><br />
<br />
[[File:Chat-em.png]]<br />
<br />
{{ex}}<br />
<br />
<pre>/em swings their sword and does [[3d6+2]] damage.</pre><br />
<br />
[[File:Chat-em-inline.png]]<br />
<br />
===Out of Character (/ooc)===<br />
<br />
To state something while Out of Character (OOC) type <code>/ooc</code> or <code>/o</code> and whatever you wish to say out of character. OOC entries always appear as the player (e.g. "Riley D.") rather than the Character you have selected in the "Speaking As" drop-down (e.g. "Orrbain").<br />
<br />
<br />
'''Example:'''<br />
<br />
<pre>/ooc I could really use another Red Bull right now.</pre><br />
<br />
[[File:Chat-ooc.png]]<br />
<br />
===Escape Text (`)===<br />
<br />
If you put a back-tick <code>`</code> at the beginning of a command, it will not parse anything about it (inline rolls, variables, etc.) Instead it will just output your text directly. This might be useful for sharing macros with others while in-game.<br />
<br />
<pre>`&{template:default} {{attack=[[1d20]]}}</pre><br />
<br />
[[File:Chat-escape-text.png]]<br />
<br />
===Talk to Myself (/talktomyself)===<br />
<br />
To turn off your chat display for all others, including the [[GM]] and the chat archive recording, use <code>/talktomyself</code> or <code>/talktomyself on</code>. Use <code>/talktomyself</code> again or use <code>/talktomyself off</code> to disable.<br />
<br />
'''Note:''' the <code>/talktomyself</code> command and what you want to say must be on different lines and you cannot use it in the same macro as what you want to keep hidden. Recommendation is to have a separate macro to toggle the talktomyself state and then use your other macros that actually do what you want.<br />
<br />
'''Example:'''<br />
<pre><br />
/talktomyself<br />
This is my evil secret plan to steal the gold from my party!<br />
/em will steal from [[1d4]] party members!<br />
/talktomyself<br />
</pre><br />
<br />
[[File:Chat-talktomyself.png]]<br />
<br />
'''Note:''' [[API]] commands ('''[[Pro]]''' subscription feature) will not be executed when <code>/talktomyself</code> is on.<br />
<br />
'''See Also:''' [[API:Short_Community_Scripts#Whisper_Self|Whisper Self API snippet]] -- use {{c|!wself}} to whisper to self individual messages, without the need to toggle <code>/talktomyself</code> on/off.<br />
<br />
===Special Effects (/fx)===<br />
{{main|FX Tool}}<br />
The <code>/fx</code> command can be used to create visual effects. It has the following syntax:<br />
<br />
<pre>/fx &lt;Type&gt;-&lt;Color&gt; &lt;Source ID&gt; [&lt;Target ID&gt;]</pre><br />
<br />
* '''Type''' can be one of: beam, bomb, breath, bubbling, burn, burst, explode, glow, missile, nova, splatter<br />
* '''Color''' can be one of: acid, blood, charm, death, fire, frost, holy, magic, slime, smoke, water<br />
* '''Source ID''' is the id of a token which is the point of origin of an effect. (Required for all effects)<br />
* '''Target ID''' is the id of a token which is the point where the effect is focused. It is only required for directed effects (beam and breath) and will be ignored by area effects.<br />
<br />
<br />
Information about the default effects' types and colors, as well as instructions on how to build your own custom effects, can be found on the <span style="font-family:Pictos;">e</span> [[Fx Tool]] page.<br />
<br />
Special effect of type '''beam''' and '''breath''' can take both a Source ID and a Target ID. See the first two examples.<br />
<br />
All other special effects listed require only a Source ID. See the third example.<br />
<br />
'''Examples'''<br />
* A beam of acid:<br />
<pre><br />
/fx beam-acid @{target|Caster|token_id} @{target|Foe|token_id} <br />
</pre><br />
<br />
* Fire from a dragon:<br />
<pre><br />
/fx breath-fire @{target|Dragon|token_id} @{target|PC|token_id}<br />
</pre><br />
<br />
* Explosion of Fire (and all other types of effects):<br />
<pre><br />
/fx explode-fire @{target|token_id}<br />
</pre><br />
<br />
====Custom FX====<br />
The <code>/fx</code> command can also be used to invoke '''[[FX Tool#Custom FX Tool|Custom FX]]'''. For custom effects use the following syntax:<br />
<br />
<pre>/fx &lt;Custom Effect Name&gt; &lt;Source ID&gt; [&lt;Target ID&gt;]</pre><br />
<br />
* '''Custom Effect Name''' is whatever you typed in the '''Name''' field of the Edit FX dialog.<br />
* '''Source ID''' is the id of a token which is the point of origin of an effect.<br />
* '''Target ID''' is the id of a token which is the point where the effect is focused. It is only required for directed effects and will be ignored by area effects.<br />
<br />
== Chat Commands [[GM]] Only==<br />
{{Gm only tool}}<br />
<br />
====Descriptions (/desc)====<br />
<br />
Adding text following the <code>/desc</code> command will not be designated to have been spoken by anyone. This is for the use of the GM to describe something in a scene. Descriptions are formatted as center aligned, bold, italicized and set in a black font and light grey highlight.<br />
<br />
<br />
'''Example:'''<br />
<pre>/desc The old house begins to creak and moan...</pre><br />
<br />
[[File:Chat-desc.png]]<br />
<br />
====Speaking and Emoting as a Random NPC (/as, /emas)====<br />
<br />
A GM can speak or emote as an NPC that doesn't have a character entry made in the {{Journal}}-tab. To speak as non-situated character, a GM should type the command <code>/as</code>, followed by a space, then the character name in quotation marks and then with what the GM wishes the character to say.<br />
<br />
Example:<br />
<pre>/as "Sir Bearington" I'm going to eat you for breakfast.</pre><br />
<br />
[[File:Chat-as.png]]<br />
<br />
To emote, follow the same process as above but use the command <code>/emas</code>.<br />
<br />
'''Example:'''<br />
<pre>/emas "Sir Bearington" charges at you!</pre><br />
<br />
[[File:Chat-emas.png]]<br />
<br />
There is an [[API]] named '''[[Script:emas|emas]]''' which can grant [[players]] indirect access to this command, by using the <code>!emas</code>-command<br />
<br />
== Basic Formatting ==<br />
{{notebox|Because <code>/em</code> is already bold and italic, only the other Markdowns will make a difference.}}<br />
<br />
'''[[Markdown]]'''<br />
{{:Markdown}}<br />
<br />
== Doing math in the chat ==<br />
<br />
Sometimes you want to do simple math in your chat. For example posting the damage done by a weapon and subtracting the modifier. To do so you can simply put it into double square-brackets like those <code><nowiki>[[]]</nowiki></code>.<br />
<br />
For example writing a macro for subtracting a miscellaneous number from your strength, while your strength is 5 would look like this:<br />
<br />
<pre>/me is flexing her muscles which is very impressive since her strength is [[5-?{Modifier|0}]]</pre><br />
<br />
This will pop up a message where you put your modifier in which then will be subtracted from your base strength 5.<br />
<br />
<br />
<br />
<br />
== Pop-Out Chat ==<br />
[[File:Chat.png|right|300px]]<br />
You can now pop-out Text Chat to a new window. To do this, simply double click on the <span style="font-family:Pictos;">q</span> Chat-icon at the top of the right of your Virtual Tabletop.<br />
<br />
== Chat Archive ==<br />
{{:Chat Archive}}<br />
<br />
=API=<br />
{{apiboxRec}}{{pro only|section}}<br />
{{:Text Chat/API}}<br />
=[[Sidebar]]=<br />
The other tabs in the [[Sidebar]]:<br />
* {{Text Chat}}<br />
** [[Complete Guide to Macros & Rolls]]<br />
* {{Art Library}}<br />
* {{Journal}}<br />
** [[Character Sheets]]<br />
* {{Compendium}}<br />
* {{Jukebox}}<br />
* {{Collections}}<br />
** [[Macros]]<br />
** [[Playing Cards]]<br />
** [[Rollable Tables]]<br />
* {{My Settings}}<br />
** [[Advanced Shortcuts|Advanced Keyboard Shortcuts]]<br />
<br><br />
<br><br />
<br />
=Related Pages=<br />
* '''[[Complete Guide to Macros & Rolls]]'''<br />
** {{Text Chat}} - where the roll results appear, & info on the common chat commands<br />
** [[Dice Reference]] - Comprehensive list of how the Roll20 dice-rolling syntax works, and list the features available<br />
** [[Macros]] - How to create macros, and other info on how the Roll20 {{Text Chat}} works, like referencing stats on character sheets, roll queries, nesting macros & initiative<br />
*** [[Reusing Rolls]]<br />
** [[Roll Templates]] - a method of formatting roll results in the chat, with some extra functions<br />
** [[API]]''(Pro Only)'' - API commands can be used in the {{Text Chat}}<br />
<br> <br />
<br><br />
[[Category:Docs]]<br />
[[Category:Sidebar]]<br />
[[Category:Macros]]</div>1223200https://wiki.roll20.net/GMGM2023-09-23T12:26:32Z<p>1223200: /* Capabilities */</p>
<hr />
<div>{{revdate}}<br />
'''GM'''('''Game Masters''') are the ones who can control basically all aspect of a [[Campaign]] while in-game.[[File:Roll20-gm.png|right|thumbnail|500px| On the Campaign Main Page, Bob is shown to be a GM in the campaign by the blue "GM" shown on his icon]]<br />
<br />
The [[Creator]] of a game is essentially a GM, but have exclusive access to a number of settings for the [[Campaign]] only they can access.<br />
<br />
[https://gmhub.roll20.net/ GM Hub] is a resource hub for helping gamemasters.<br />
<br />
'''[[Players]]''' have much more limited options on what they can do, than the GM or Creator.<br />
<br />
=GM=<br />
<br />
A [[GM]] has access to the following:<br /><br />
<br />
==Capabilities==<br />
<br />
'''Within the VTT'''<br />
* Full access to all Page {{Layers}}<br />
* Create, Modify, and Delete [[Page Toolbar|Pages]]<br />
* Place images and tokens to the [[Tabletop]] from their personal {{Art Library}} (not the Creator's library)<br />
* Assign and edit [[Tokens|tokens]]<br />
** [[Token Lock|Lock]] tokens from moving<br />
* Create [[Journal|handouts & characters]], assign their view and edit permissions<br />
* Move the [[Page_Toolbar#Player_Ribbon|Player Ribbon]] to different [[Page Toolbar|Pages]]<br />
* Add, Remove, and Play music from the {{Jukebox}}<br />
* {{Text Chat}}<br />
** See GM Whispers and Rolls <br />
** Can hide messages''(since Dec 2022)''<br />
* Create [[Macros]] and [[Token Actions]]<br />
* Modify <span style="font-family:Pictos Custom;">r</span> [[Dynamic Lighting]] on a [[Page Toolbar|Page]] if the game's Creator is a Plus/Pro-subscriber<br />
* Access to all in-game options on the [[Sidebar]]'s {{My Settings}} Tab in the VTT, ''except'' the [[Transmogrifier]]<br />
<br /><br />
'''Outside the VTT'''<br />
* Invite Players (''anyone'' can share the unique join link to the game)<br />
* View and Edit [[API|API Scripts]] (Creator must be a {{Pro}} Subscriber)<br />
* Manage the game's private [[forum]], including sinking and deleting posts<br /><br />
<br /><br />
<br />
Older Guide: '''[[Getting Started GMs]]'''<br />
[[File:Game-promote-to-gm.png|right|thumbnail|700px|Promote someone to GM]]<br />
<br />
==Promote player to GM==<br />
The [[Creator]] or a [[GM]] can promote a Player to GM on the [[Game Settings]]-page. Hover your mouse over their icon, and select "Promote to GM". You should see that the player gets a blue "GM" on top of their icon.<br />
<br />
A game can have any number of GMs, and multiple people can be logged in as a GM at the same time.<br />
{{clear}}<br />
[[File:Launch-as-player-feb2022.png|thumb|right|500px|The '''"Launch as player instead"'''-button is highlighted in blue]]<br />
==As Player==<br />
A GM/Creator can make themselves a player in a game<br />
===Launch as Player===<br />
If you are on a campaign's main page, Using the {{button|Launch Game|pink}}-button you always enter a game as a GM. Below it there is the '''Launch as player instead'''-button.<br />
<br />
You can bookmark the "launch as player"-button by {{button|Right click}} on it and select "Bookmark Link".<br />
{| role="presentation" class="wikitable mw-collapsible mw-collapsed"<br />
| Old "join as player" trick<br />
|-<br />
| By default, you always enter a game as a GM, if you are on it's main page, and either have to do the above each time, or you can right-click the '''Rejoin as Player'''-button and bookmark it.<br />
<br />
You can also save the normal "enter game"-link as a bookmark, and add <code>/?desiredrole=player</code> to the end of the url.<br />
<br />
Result should be about: <pre style="overflow:auto;white-space:pre-wrap;">https://app.roll20.net/editor/setcampaign/111111/?desiredrole=player</pre><br />
<br />
Using the bookmark you can you can enter the game directly as a player, avoiding accidentally spoiling yourself something before you have gone to the button.<br />
|}<br />
===Rejoin as Player===<br />
If you're in-game, you can temporally demote yourself to a normal player, by going to {{My Settings}}-tab, scrolling down to the "Miscellaneous"-section, and pressing the {{button|Rejoin as Player|blue}}-button.<br />
<br />
[[File:Rejoin-as-player-feb2022.png|thumb|center|300px|Bottom of {{My Settings}}-tab]]<br />
==API==<br />
{{pro only|section}}{{apiboxRec}}<br />
{{:Player API}}<br />
<br />
=Creator=<br />
{{main|Creator}}<br />
<br />
The Creator of a game have all the abilities of a GM, in additions to some things that GMs can't do.<br />
<br />
=Related Pages=<br />
* [[Game Management]]<br />
** [[Game Settings Page|Game Settings]]<br />
** [[Player]]<br />
* [[Community FAQ]]<br />
* [[Subscription]]<br />
** [[Free]]<br />
** [[Plus]]<br />
** [[Pro]]<br />
* {{Compendium}}<br />
* [[Character Sheet]]<br />
<br><br />
<br><br />
[[Category:Docs]]<br />
[[Category:Game Management]]<br />
[[Category:API]]</div>1223200https://wiki.roll20.net/Popular_Feature_RequestsPopular Feature Requests2023-09-23T12:18:54Z<p>1223200: </p>
<hr />
<div><noinclude><br />
{{revdate}}<br />
</noinclude><br />
{{main|:Category:Unreleased/Highly Requested features}}<br />
Roll20 have a Suggestions [[Forum]], where people can vote & comment on suggestions, and Roll20 gives occasional updates on them, along with categorizing them so it's more clear what status they have.<br />
<br />
{{notebox|The {{blogs|improved-initiative-a-roll20-product-update/ Improved Initiative: A Roll20 Product Update}}(Feb 2022) & [https://blog.roll20.net/posts/tactfully-tackling-the-top-ten-list/Tactfully Tackling the Top Ten List](April 2022) blogposts mentions several of the popular requests, and most have new dev comments}}<br />
<br />
* See {{forum|1=category/385189/?orderby=popular Suggestions by Popularity}} on the forums<br />
* See [[:Category:Feature(Beta)]] for features under beta testing<br />
<br />
Check the threads for any updates by Roll20 Staff, this page might not be up-to-date. <br />
<br />
'''Some notable/popular Suggestions:''' (Updated Sept 2023)<br />
<br />
* '''[[Custom Compendium]]''' 1371 votes, Obstructed<br />
** Lots to do before Roll20 can start making it available to users, details on page<br />
<br />
* '''[[Page Folders|A better way to organize pages(like folders)]]''' 1191 votes, Queued<br />
** planned release in Oct 2023.{{source|https://app.roll20.net/forum/permalink/11611823/}}<br />
<br />
* '''[[Foreground Map Layer]]''' 1062 votes, Queued<br />
<br />
* '''{{forum|post/4664065/map-pins-linked-to-handouts Map Pins linked to Handouts}}''' 648 votes, Researching<br />
** [https://app.roll20.net/forum/permalink/11557851/ Shifted to "Researching"-phase in July 2023]<br />
** {{fpl|10716030/ Dev Response, Feb 2022}}<br />
** '''Partial Workaround : [[Map Pins]]'''<br />
<br />
* '''{{forum|post/1878391/folders-in-addition-to-tags-for-all-resource-management Folders in addition to Tags for ALL Resource Management}}''' 415 votes, researching<br />
** [https://app.roll20.net/forum/permalink/10880101/ dev comment, May 2022]<br />
<br />
* '''[https://app.roll20.net/forum/permalink/4922089/ GMRolls that are hidden even from the player that makes the roll.]''' 169 votes<br />
** Workarounds: [[Hidden Rolls]] <br />
<br />
* '''{{forum|post/1242365/print-character-sheets Print Character Sheets}}''' , Completed<br />
** Print option was added to {{5E}} char sheet [https://app.roll20.net/forum/permalink/11230347/ in Dec 2023], closing the thread<br />
** '''Partially implemented(May 2021)''' Roll20 have expanded the char sheet backend so sheet authors can implement a print-friendly version of the sheet using <code>@media print</code> CSS media query. More info on [[CSE#Print-Friendly]]<br />
<br />
'''Related:''' Check [[:Category:New features released by year]] for recently released features.<br />
<noinclude><br />
==Released ==<br />
* '''{{forum|post/1619233/allow-the-gm-to-delete-a-line-in-the-chat-text Allow the GM to delete a line in the chat text}}'''<br />
** GMs can hide any message in chat, right-click corner - [https://app.roll20.net/forum/permalink/11230347/ released December 2023]<br />
** Dev comment: [https://app.roll20.net/forum/permalink/11049970/ Aug 2022] Feature in QA.<br />
*** seems to be implemented as a hide/unhide message from players, and not as a permanent delete.<br />
** Dev Response [https://app.roll20.net/forum/permalink/10869011/ May 2022]:<br />
:::''"This feature has been on our radar but passed over in favor of other major features or updates, and poses some interesting technical and moderation-based issues. I think we’ve found a solution that will satisfy the needs in this thread and finally get this work out into the world, so I’m moving this thread’s status from Researching and into Queued."''<br />
<br />
* '''{{forum|post/1241899/hover-to-see-token-name-and-bars#post-9084299 Hover to see token name and bars}}''' 488 votes, DONE<br />
** [https://app.roll20.net/forum/permalink/11055291/ Released August 2022]<br />
<br />
[[Category:Unreleased/Highly Requested features]]<br />
</noinclude></div>1223200https://wiki.roll20.net/Popular_Feature_RequestsPopular Feature Requests2023-09-23T12:14:25Z<p>1223200: </p>
<hr />
<div><noinclude><br />
{{revdate}}<br />
</noinclude><br />
{{main|:Category:Unreleased/Highly Requested features}}<br />
Roll20 have a Suggestions [[Forum]], where people can vote & comment on suggestions, and Roll20 gives occasional updates on them, along with categorizing them so it's more clear what status they have.<br />
<br />
{{notebox|The {{blogs|improved-initiative-a-roll20-product-update/ Improved Initiative: A Roll20 Product Update}}(Feb 2022) & [https://blog.roll20.net/posts/tactfully-tackling-the-top-ten-list/Tactfully Tackling the Top Ten List](April 2022) blogposts mentions several of the popular requests, and most have new dev comments}}<br />
<br />
* See {{forum|1=category/385189/?orderby=popular Suggestions by Popularity}} on the forums<br />
* See [[:Category:Feature(Beta)]] for features under beta testing<br />
<br />
Check the threads for any updates by Roll20 Staff, this page might not be up-to-date. <br />
<br />
'''Some notable/popular Suggestions:''' (Updated Sept 2023)<br />
<br />
* '''[[Custom Compendium]]''' 1371 votes, Obstructed<br />
** Lots to do before Roll20 can start making it available to users, details on page<br />
<br />
* '''[[Page Folders|A better way to organize pages(like folders)]]''' 1191 votes, Queued<br />
** planned release in Oct 2023.{{source|https://app.roll20.net/forum/permalink/11611823/}}<br />
<br />
* '''[[Foreground Map Layer]]''' 1062 votes, Queued<br />
<br />
* '''{{forum|post/4664065/map-pins-linked-to-handouts Map Pins linked to Handouts}}''' 482 votes, Queued<br />
** {{fpl|10716030/ Dev Response, Feb 2022}}<br />
** '''Partial Workaround : [[Map Pins]]'''<br />
<br />
* '''{{forum|post/1878391/folders-in-addition-to-tags-for-all-resource-management Folders in addition to Tags for ALL Resource Management}}''' 415 votes, researching<br />
** [https://app.roll20.net/forum/permalink/10880101/ dev comment, May 2022]<br />
<br />
* '''[https://app.roll20.net/forum/permalink/4922089/ GMRolls that are hidden even from the player that makes the roll.]''' 169 votes<br />
** Workarounds: [[Hidden Rolls]] <br />
<br />
* '''{{forum|post/1242365/print-character-sheets Print Character Sheets}}''' , Closed<br />
** Print option was added to {{5E}} char sheet [https://app.roll20.net/forum/permalink/11230347/ in Dec 2023], closing the thread<br />
** '''Partially implemented(May 2021)''' Roll20 have expanded the char sheet backend so sheet authors can implement a print-friendly version of the sheet using <code>@media print</code> CSS media query. More info on [[CSE#Print-Friendly]]<br />
<br />
'''Related:''' Check [[:Category:New features released by year]] for recently released features.<br />
<noinclude><br />
==Released ==<br />
* '''{{forum|post/1619233/allow-the-gm-to-delete-a-line-in-the-chat-text Allow the GM to delete a line in the chat text}}'''<br />
** GMs can hide any message in chat, right-click corner - [https://app.roll20.net/forum/permalink/11230347/ released December 2023]<br />
** Dev comment: [https://app.roll20.net/forum/permalink/11049970/ Aug 2022] Feature in QA.<br />
*** seems to be implemented as a hide/unhide message from players, and not as a permanent delete.<br />
** Dev Response [https://app.roll20.net/forum/permalink/10869011/ May 2022]:<br />
:::''"This feature has been on our radar but passed over in favor of other major features or updates, and poses some interesting technical and moderation-based issues. I think we’ve found a solution that will satisfy the needs in this thread and finally get this work out into the world, so I’m moving this thread’s status from Researching and into Queued."''<br />
<br />
* '''{{forum|post/1241899/hover-to-see-token-name-and-bars#post-9084299 Hover to see token name and bars}}''' 488 votes, DONE<br />
** [https://app.roll20.net/forum/permalink/11055291/ Released August 2022]<br />
<br />
[[Category:Unreleased/Highly Requested features]]<br />
</noinclude></div>1223200https://wiki.roll20.net/Popular_Feature_RequestsPopular Feature Requests2023-09-23T12:14:08Z<p>1223200: moved Page Folders to own page, cleared out released features</p>
<hr />
<div><noinclude><br />
{{revdate}}<br />
</noinclude><br />
{{main|:Category:Unreleased/Highly Requested features}}<br />
Roll20 have a Suggestions [[Forum]], where people can vote & comment on suggestions, and Roll20 gives occasional updates on them, along with categorizing them so it's more clear what status they have.<br />
<br />
{{notebox|The {{blogs|improved-initiative-a-roll20-product-update/ Improved Initiative: A Roll20 Product Update}}(Feb 2022) & [https://blog.roll20.net/posts/tactfully-tackling-the-top-ten-list/Tactfully Tackling the Top Ten List](April 2022) blogposts mentions several of the popular requests, and most have new dev comments}}<br />
<br />
* See {{forum|1=category/385189/?orderby=popular Suggestions by Popularity}} on the forums<br />
* See [[:Category:Feature(Beta)]] for features under beta testing<br />
<br />
Check the threads for any updates by Roll20 Staff, this page might not be up-to-date. <br />
<br />
'''Some notable/popular Suggestions:''' (Updated Sept 2023)<br />
<br />
* '''[[Custom Compendium]]''' 1371 votes, Obstructed<br />
** Lots to do before Roll20 can start making it available to users, details on page<br />
<br />
* '''[[Page Folders|A better way to organize pages(like folders)]]''' 1191 votes, Queued<br />
** planned release in Oct 2023.{{source|https://app.roll20.net/forum/permalink/11611823/}}<br />
<br />
* '''[[Foreground Map Layer]]''' 1062 votes, Queued<br />
<br />
* '''{{forum|post/4664065/map-pins-linked-to-handouts Map Pins linked to Handouts}}''' 482 votes, Queued<br />
** {{fpl|10716030/ Dev Response, Feb 2022}}<br />
** '''Partial Workaround : [[Map Pins]]'''<br />
<br />
* '''{{forum|post/1878391/folders-in-addition-to-tags-for-all-resource-management Folders in addition to Tags for ALL Resource Management}}''' 415 votes, researching<br />
** [https://app.roll20.net/forum/permalink/10880101/ dev comment, May 2022]<br />
<br />
* '''[https://app.roll20.net/forum/permalink/4922089/ GMRolls that are hidden even from the player that makes the roll.]''' 169 votes<br />
** Workarounds: [[Hidden Rolls]] <br />
<br />
* '''{{forum|post/1242365/print-character-sheets Print Character Sheets}}''' , Closed<br />
** Print option was added to {{5E}} char sheet [https://app.roll20.net/forum/permalink/11230347/ in Dec 2023], closing the thread<br />
** '''Partially implemented(May 2021)''' Roll20 have expanded the char sheet backend so sheet authors can implement a print-friendly version of the sheet using <code>@media print</code> CSS media query. More info on [[CSE#Print-Friendly]]<br />
<br />
'''Related:''' Check [[:Category:New features released by year]] for recently released features.<br />
<noinclude><br />
==Released ===<br />
* '''{{forum|post/1619233/allow-the-gm-to-delete-a-line-in-the-chat-text Allow the GM to delete a line in the chat text}}'''<br />
** GMs can hide any message in chat, right-click corner - [https://app.roll20.net/forum/permalink/11230347/ released December 2023]<br />
** Dev comment: [https://app.roll20.net/forum/permalink/11049970/ Aug 2022] Feature in QA.<br />
*** seems to be implemented as a hide/unhide message from players, and not as a permanent delete.<br />
** Dev Response [https://app.roll20.net/forum/permalink/10869011/ May 2022]:<br />
:::''"This feature has been on our radar but passed over in favor of other major features or updates, and poses some interesting technical and moderation-based issues. I think we’ve found a solution that will satisfy the needs in this thread and finally get this work out into the world, so I’m moving this thread’s status from Researching and into Queued."''<br />
<br />
* '''{{forum|post/1241899/hover-to-see-token-name-and-bars#post-9084299 Hover to see token name and bars}}''' 488 votes, DONE<br />
** [https://app.roll20.net/forum/permalink/11055291/ Released August 2022]<br />
<br />
[[Category:Unreleased/Highly Requested features]]<br />
</noinclude></div>1223200https://wiki.roll20.net/Page_FoldersPage Folders2023-09-23T12:08:42Z<p>1223200: Created page with "{{revdate}} Option to organize pages/maps in folders is planned to release in Oct 2023.{{source|https://app.roll20.net/forum/permalink/11611823/}} * '''{{forum|post/1618045/a..."</p>
<hr />
<div>{{revdate}}<br />
Option to organize pages/maps in folders is planned to release in Oct 2023.{{source|https://app.roll20.net/forum/permalink/11611823/}}<br />
<br />
* '''{{forum|post/1618045/a-better-way-to-organize-pages A better way to organize pages(like folders)}}''' 1151 votes, Queued<br />
** Would greatly help organizing the [[Page Toolbar]] if we had folders.<br />
** [https://www.reddit.com/r/Roll20/comments/15b3dhf/folders_coming_this_summer_to_roll20/ Map folders are on the way this summer] - July 2023<br />
** Partial Workaround: You can declutter the page list by [[Page_Settings#Archive_Page|Archiving]] less used pages, and then restore them when needed.<br />
<br />
[[Category:Unreleased/Highly Requested features]]</div>1223200