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

How do I play Simon in Roll20?

I am designing a puzzle that I see similar to Simon. Six square tokens I am thinking mutli sided with some sides being colored. I need a way to automate the flipping of these tokens. Example Flip token 1 to color 2 seconds later flip token 2 etc and then flip them back to the non color sides. I seem to recall there was an API that allowed you to do events like patrols of tokens that move on the map.. is there something that can achieve what I am looking for. (Pro account and on new version of roll20.)
1764695035
Gold
Forum Champion
Sounds like you are asking for 2 different Mods. TokenMod can flip the sides.  Waypoint Patrol is one for making tokens move around the map. Waypoint Patrol is not in the One-Click API Mods list, but it is a code snippit you can find on the Community Forums and copy-paste it into a New Script in your API panel. 
So I do not need them to move like on a patrol but what I do need is for 6 tokens to flip aka change sides in sequence. I did not know that was something token mod could do.
1764696781
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Token mod with Timmaugh's delay script from the meta toolbox should achieve what you want.
1764705222

Edited 1764705424
timmaugh
Forum Champion
API Scripter
I am, in fact, working on a package of commands to achieve this! (Although... mine spins them, currently... but that part could be converted to just flip them.) I have to work out one kink (to allow repeated selection of the same token), but here is a proof of concept: <a href="https://screenrec.com/share/ZWyvtsUKLB" rel="nofollow">https://screenrec.com/share/ZWyvtsUKLB</a>
1764950553
timmaugh
Forum Champion
API Scripter
OK, finally had a chance to write up my notes for how to pull this off. First, I should say that I built this interaction to be like the classic Simon game, where the puzzle presents a 1-length puzzle the player has to repeat, then it adds a second element, then a third, etc. If you'd rather prefer a simple, fixed-length puzzle, this can be modified/simplified to that quite easily. Here is a video of the game play. Note that after this video I thought about using a collective "Party" character that could field the chat panels requesting player interaction/guessing. That would keep the panels from polluting the GM chat output. The instructions of this are in the first comment on the video, which is repeated, below, for convenience: YouTube Demo of GamePlay Instructions This uses scripts to automate a classic memory game. In this version, I use the Metascript Toolbox, Assemble, and TokenMod scripts (both the Toolbox and Assemble require changes that will be available in the 1-click Script Repository after the merge happening early in the week of Dec 7-14). Note, since this makes use of classic attributes, it will not work in a Beacon-only game (e.g., using only the 2024 sheet). If you are running such a game and can add a non-Beacon sheet to your game, as well (e.g., the 2014 D&amp;D Sheet by Roll20), this will work. Once all the scripts are installed, here is the setup: ===== CONFIGURATION Run this command one time in your game to allow players to use IDs with SelectManager (part of the MetascriptToolbox): !smconfg +playerscanids ===== CREATE TOKENS AND CONFIGURE Though you can change the "Action" to be something else (flipping multi-sided tokens from side 1 to side 2, then reverting them), this demonstration uses tokens that have a Tint applied to them, and apply an Aura as part of the indication of which token is under focus. The Tint is important because it determines the Aura color. To make all of that work, add the number of tokens you require for your game; I used six. The tokens do not require a name. Tint each with a unique color. Finally, go to the 3-dots beside Aura 1's controls and change the settings to SELECT the "See" box and DESELECT the "Edit" box. Save the changes for each token. ===== CREATE CHARACTER AND GIVE PERMISSIONS I stored all of the commands on a single character that I named "SimonGame" (no space). If you use a different name, make sure you change the name in the subsequent command lines. Make sure you use a non-Beacon character sheet for this, since this will also be where the attributes will be written/read. Edit the character properties and add "All players" to the "Can Be Controlled" list. Your players DO NOT have to see this character in their journals; they only need controlling rights. ===== CREATE ATTRIBUTES On SimonGame, create two attributes and leave them blank. Name them: Targets Guess ===== CREATE ABILITIES Create the following abilities on SimonGame, and enter the associated command line text for each. Action !{{(^) &nbsp; !token-mod --set aura1_radius|1 aura1_color|@(selected.tint) scale|2u &nbsp; !token-mod --set aura1_radius| scale|1u {^&amp;delay .8} }} Start !assemble --group|SimonGame|Targets --target|@{target|Target 1|token_id} --report|no !set.SimonGame.GameData.count=1/set Add !assemble --mode|+ --group|SimonGame|Targets --unique|no --target|@{target|Next Tile|token_id} --report|no !set.SimonGame.GameData.count={&amp;math get.SimonGame.GameData.count + 1}/set RunSequence !forselected(^) %^(SimonGame|Action) {&amp;+select @{SimonGame|Targets} } {^\\&amp;delay {^&amp;math {&amp;i}*0.9 }} RequestGuess !assemble --group|SimonGame|Guess --count|=get.SimonGame.GameData.count/get --report|no --unique|no --who|all RunPlayerSequence !forselected(^) %^(SimonGame|Action) {&amp;+select @{SimonGame|Guess} } {^\\&amp;delay {^&amp;math {&amp;i}*0.9 }} GameData count=1 Evaluate !{&amp;if '@{SimonGame|Targets}' = '@{SimonGame|Guess}'}Correct.{&amp;else}Incorrect.{&amp;end} {&amp;simple} Menu /w gm &amp;{template:default} {{name=Simon Game}} {{=[Start](!&amp;#13;%&amp;lbrace;SimonGame|Start}) [Add](!&amp;#13;%&amp;lbrace;SimonGame|Add}) [Show](!&amp;#13;%&amp;lbrace;SimonGame|RunSequence}) [Request Guess](!&amp;#13;%&amp;lbrace;SimonGame|RequestGuess}) [Show Guess](!&amp;#13;%&amp;lbrace;SimonGame|RunPlayerSequence}) [Evaluate](!&amp;#13;%&amp;lbrace;SimonGame|Evaluate})}} There are ways to improve this. For instance, I used a default template for the menu. You could easily substitute in a different template or a script that would produce a menu, instead. Also, the Assemble script sends the "request player guess" message to "all", meaning that the panel appears in the GM screen, too. If you want, you could send this menu to a particular player, instead. That way, only that player will see the panel, and the GM chat is not polluted with extraneous output. Look for the "--who|all" argument in the Assemble commands, above, and change that to be a player's name: --who|Bob Alternatively, you could have a character (named "Party", for now), to which the players have controlling rights (again, they don't need to see it in the Journal). Then you could send the message to the "Party" character, and the GM wouldn't see it: --who|Party Also, I used a display of 0.8 seconds for the effect to show before reverting the token, and a corresponding delay of 0.9 seconds before the next token is highlighted. These values are in the Action, RunSequence, and RunPlayerSequence abilities. You can choose a longer/shorter duration, but make sure that the run-abilities have a slightly higher value than the length of the effect, since you won't want to confuse your players with 2 tokens being highlighted at the same time. Finally, as mentioned, you can change the Action to be something else entirely. For instance, to change a multi-sided token to its second side, then change it back after 0.8 seconds, your Action command line would be: !{{(^) &nbsp; !token-mod --set currentside|2 &nbsp; !token-mod --set currentside|1 {^&amp;delay .8} }}
This is exactly what I was looking for. Will see give this a try tonight when I have free time. The idea was to create a game of Simon Says for them to figure out as a simple puzzle at the door of my holiday BBEG's fortress.&nbsp;
1764953633

Edited 1764953662
timmaugh
Forum Champion
API Scripter
Excellent! Let me know how it goes! Also, make sure you get the new versions of Assemble and SelectManager from my repo, if you're going to do this before next week's merge. (So, get the MetascriptToolbox installed, then disable the SelectManager script... copy the code from the SelectManager link, and paste it into the code window, then name it "SelectManager-Temp" or something. After next week's merge, you delete this "Temp" version and re-enable the auto-installed version.)
The odds of them getting to&nbsp; Grivvench Gearbane, the Joythief of Midwinter 's front door before next week I think are slim to none. Am I better holding off until next week?
1764973991
timmaugh
Forum Champion
API Scripter
To save yourself the work of all the script management...? I'd say yes. Roll20 has been good about getting the merge done early in the week, so you should have plenty of time to set this up and work out the kinks.