ScriptCards v 3.0.20 is now on OneClick The most recent version of ScriptCards is now live on OneClick. The following is a summary of the changes since 3.0.16: - Updated handout creation and modification to process inline formatting for notes properties. - Exposes NUMERIC_VERSION for read by other scripts through the API_META object. This is a numeric representation of the version number that can be used for easy comparison by other scripts. The format is major version * 10000 + minor version * 100 + patch version. For example, version 3.0.19 would be represented as 300190. - Implements message queuing for processing multiple ScriptCard messages in rapid succession. This prevents the scripts from running simultaneously and causing issues with shared variables. Each message will be processed in the order received, and the next message won't start processing until the previous one has finished. - Added new setting: dontnotifyobservers . Defaults to 0. If set to 1, your script won't inform other APIs that are watching of token changes. - Added the ability to create (--!oh:NewHandoutID) and modify (--!h:ExistingHandoutID) handouts. When creating a handout, you can specify properties to set on the handout in the content section of the line, using the format PropertyName:Value. Separate multiple properties with | characters. If a value contains a | character, escape it with \\. (ex: name:My Handout|notes:"This is a note with a \\| character in it"). When modifying an existing handout, you can use the same format to specify properties to change on the handout. When creating handouts, the ID of the new handout will be returned in the string variable listed after the "oh:" in the tag. Creation Example: --!oh:HandoutID|name:"Modified Handout"|notes:"This is a handout note from ScriptCards" Update Example: --!h:[&HandoutID]|gmnotes:"This note was added after creation" - New Setting: titletextalign (default: center). This controls the text-align CSS property for title text. Note that this only applies to title text, not subtitle or body text. Valid values are any valid CSS text-align value, such as left, right, center, justify, etc. - New Setting: disablevariableexpansion (default: 0). When set to 1, variable expansion will be disabled for all variables. - Pointer variables are now included in stashed scripts when using the #reentrant option or --i statements. - Added new array function: abilities. Like attributes, this builds an array containing the object IDs of all abilities on a character. The syntax is: --~|array;abilities;ArrayName;CharacterID Where ArrayName is the name of the array to create and CharacterID is the ID of the character whose abilities you want to list. You can optionally include a filter parameter at the end to only include abilities that start with the filter text. - Added --P (pointer) commands. Currently supported are --Pread and --Pset. Both commands use the same syntax: --P[r or s]|[PointerName]::ObjectID::PropertyName Using "r" will look for an object with ID ObjectID and if found, will set the pointer variable PointerName to the value of the specified property on that object. Using "s" will set the specified property on the object to the value of the pointer variable. This is useful for transfering information that will get mangled by ScriptCard's normal parsing process, such as the content of an action on a character which might contain script cards code or other things that would be misinterpreted when read to/from a string variable. Example: !script {{ --Pr|TestPtr::@{selected|character_id}::name --Ps|TestPtr::@{target|token_id}::tooltip }} This (admittedly trivial) example reads the name of the selected character into a pointer variable called TestPtr, and then sets the tooltip of the targeted token to that name. Here is a more robust example that builds a menu of abilities to copy from one character to another: !script {{ --#reentrant|CopyAbilities-[&SendingPlayerID] --&id|@{selected|character_id} --&tid|@{target|character_id} --#title|Ability Copy --#leftsub|From [*[&id]:name] --#rightsub|To [*[&tid]:name] --+|[c][b]Click abilities to copy[/b][/c] --~dummy|array;abilities;ability_list;[&id] --%abils|foreach;ability_list --&Name|[*O:[&abils]:ability:name] --+|[c][rbutton][&Name]::COPY;[&abils][/rbutton][/c] --%| --+|[br] --+|[c][rbutton]COPY ALL ABILITIES::COPYALL[/rbutton][/c] --+|[br] --+|[c][b]Copying abilities may create duplicates that need to be manually cleaned up.[/b][/c] --X| --:COPY| --&Name|[*O:[&reentryval]:ability:name] --&Desc|[*O:[&reentryval]:ability:description] --&IsAction|[*O:[&reentryval]:ability:istokenaction] --Pread|ActionPointer::[&reentryval]::action --+|Name: [&Name], Desc: [&Desc], IsAction: [&IsAction] --!ob:NewID:[&tid]:[&Name]:[&isAction]|temp --Pset|ActionPointer::[&NewID]::action --+|Copied action [&Name] from [*[&id]:name] to [*[&tid]:name] --X| --:COPYALL| --%abils|foreach;ability_list --+Abil|[&abils], --&Name|[*O:[&abils]:ability:name] --&Desc|[*O:[&abils]:ability:description] --&IsAction|[*O:[&abils]:ability:istokenaction] --Pread|ActionPointer::[&abils]::action --+|Name: [&Name], Desc: [&Desc], IsAction: [&IsAction] --!ob:NewID:[&tid]:[&Name]:[&isAction]|temp --Pset|ActionPointer::[&NewID]::action --%| --X| }}