Character Vault
Any Concept / Any System
Compendium
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Personal tools

Difference between revisions of "ID"

From Roll20 Wiki

Jump to: navigation, search
(Created page with "{{revdate}}{{stub}}{{dmbox}} ==Macros== * {{code|token_id}} - unique for each token. {{code|@{selected|token_id} }} ** If you copy& paste a token, the duplicate has a new...")
 
m
 
(One intermediate revision by one user not shown)
Line 2: Line 2:
  
 
==Macros==
 
==Macros==
* {{code|token_id}} - unique for each [[token]]. {{code|@{selected|token_id} }}
+
* '''{{code|token_id}}''' - unique for each [[token]]. <code>@{selected|token_id}</code>
 
** If you copy& paste a token, the duplicate has a new ID
 
** If you copy& paste a token, the duplicate has a new ID
 
** When you drag the [[Character#Default_Token|default token]] from your [[Character]] to the map, each of them will get a unique id
 
** When you drag the [[Character#Default_Token|default token]] from your [[Character]] to the map, each of them will get a unique id
* {{code|character_id}} - unique for each [[character]]. {{code|@{selected|character_id} }} (if [[Link Token|token linked to sheet]])
+
* '''{{code|character_id}}''' - unique for each [[Character]]. <code>@{selected|character_id}</code> (if [[Link Token|token linked to sheet]])
 
** [[RowID]] - unique ID for a specific row in a [[Repeating Section]]
 
** [[RowID]] - unique ID for a specific row in a [[Repeating Section]]
 
** [[RowIndex]]
 
** [[RowIndex]]
** [[BCS/Pseudo-attributes]]
+
** [[Pseudo-Attributes]]
  
 
'''Character & Token ID Lookup Macro''' by [[Andreas J.]]
 
'''Character & Token ID Lookup Macro''' by [[Andreas J.]]
 +
 +
::If token isn't [[Link Token|linked to a character]], it will give error on char id & name.
 +
 +
Char & Token:
 
<pre>&{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} }}</pre>
 
<pre>&{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} }}</pre>
 +
 +
Token Only:
 +
<pre>&{template:default} {{name=**Token ID**}} {{**Token Name**=@{selected|token_name} }} {{**Token ID**= @{selected|token_id} }}</pre>
 +
 
==API==
 
==API==
 
{{pro only|section}}
 
{{pro only|section}}
* '''[[API:Objects#Player|player id]]''' - global id for of a player in a game, but is different in each campaign.
+
* '''[[API:Objects#Player|playerid]]''' - unique, global id for each player in a game, but is different in each campaign.
 
* '''[[roll20id]]''' - unique id for each account, never changes.
 
* '''[[roll20id]]''' - unique id for each account, never changes.

Latest revision as of 13:31, 19 April 2022

[edit] Macros

Character & Token ID Lookup Macro by Andreas J.

If token isn't linked to a character, it will give error on char id & name.

Char & Token:

&{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} }}

Token Only:

&{template:default} {{name=**Token ID**}} {{**Token Name**=@{selected|token_name} }} {{**Token ID**= @{selected|token_id} }}

[edit] API

  • playerid - unique, global id for each player in a game, but is different in each campaign.
  • roll20id - unique id for each account, never changes.