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

[MetaScript Updates] Fetch and SelectManager get config to allow players to do more

1669137100
timmaugh
Pro
API Scripter
Why a Single Post Both of the threads for Fetch and SelectManager have closed, but since they are both getting this same update at the same time, I'll just share it here in a unified post. SelectManager SelectManager does 3 primary things: it restores the connection to the original player who initiated a series of messages if one of those messages goes to a mod script which then spawns its own message (restoring properties like selected tokens, the playerid, and the "who" message property for who initiated the message) it allows  you to iterate over selected tokens to perform repeated-but-individualized actions on/for/to them it allows you to provide token names or ids as a part of a {&select...} or {&inject...} syntax tag to allow you to virtually select tokens without having to actually click on them. This is helpful for speeding up your interaction with the VTT (reducing clicks), or for messages that employ targeting statements but which also need selected tokens (these normally do not coexist on the same message). In the scope of that third bullet point, non-gms were historically limited to selecting only tokens to which they already had access (i.e., they were designated in the "Controlled By" property of the token or represented character). With the new update (v1.0.10), GMs can set a script configuration to allow non-gms to use any token. See Syntax and Usage, below, for how to enable it in your game. Fetch Fetch allows the real-time, in-message retrieval of much more data than is typically exposed to players in the VTT, and it does it using syntax structures that are very close to Roll20 Galactic Standard: Roll20: @{selected|token_id} Fetch : @(selected|token_id) or @(selected.token_id) It allows access to more data, access to more data from more starting places (getting character data from a selected token, for instance), and it provides a the ability to set a default value (see the linked thread, above, for a fuller discussion of what it can do). Historically, non-GMs were limited to pulling data from characters for which they had controlling rights (tokens were not limited as token information is also not limited via Roll20 syntax constructions. No, really. Go try it.). With the new update (v2.0.0, non-beta release heading to the one-click), GMs can set a script configuration to allow non-GMs to pull data from any character. See Syntax and Usage, below, for how to enable it in your game. Syntax and Usage The property and syntax is virtually the same for both scripts, but the properties have to be enabled separately. These are optional settings for the scripts, and the settings for each script will operate independently of the other (e.g., you can enable SelectManager but not Fetch, if that's what you want). The property to enable is playerscanids (capitalization is irrelevant). Enable or disable it by prepending it with a + (enable) or - (disable), and including it on a script config line. FETCH USAGE ============================= !fetchconfig +playerscanids SELECTMANAGER USAGE ===================== !smconfig +playerscanids SelectManager has other properties that can be enabled/disabled. The playerscanids property can be set with these others in one pass, if you desire: !smconfig +playerid -playerscanids Reporting the Configuration Change You will get a confirmation from the configured script regarding the properties you have set: Reporting Current Configuration Run the script's config handle with no properties to view the current configuration of the script: FETCH CONFIG ====================== !fetchconfig SELECTMANAGER CONFIG ============== !smconfig Script Dependency This update introduces a dependency for each script to use the mod script Messenger (also in the 1-click merge pull request for 22 Nov 2022). Messenger is responsible for building the chat panels pictured, above. If you install Fetch or SelectManager manually, you will need to get Messenger, too. 
Hooray, thank you!