setSize: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 7: Line 7:
Sets the [[Size]] of a [[Token]].
Sets the [[Size]] of a [[Token]].


The valid sizes are:
The valid sizes for square grids are ('''Medium''' = 1 full cell):
* {{code|Fine}}
* {{code|Fine}}
* {{code|Diminutive}}
* {{code|Diminutive}}
Line 17: Line 17:
* {{code|Gargantuan}}
* {{code|Gargantuan}}
* {{code|Colossal}}
* {{code|Colossal}}
The valid sizes for hex grids are ('''Medium''' = 1 full cell):
* {{code|1/6}}
* {{code|1/4}}
* {{code|1/3}}
* {{code|1/2}}
* {{code|2/3}}
* {{code|Medium}}
* {{code|Large}}
* {{code|Huge}}
The valid sizes for gridless maps are:
* {{code|-11}}
* {{code|-10}}
* {{code|-9}}
* ...
* {{code|18}}
* {{code|19}}
* {{code|20}}
{{Clarify|It would be nice to include pictures that demonstrate how the grid cells are composed; at least for the hex grids.}}


|usage=
|usage=
Line 28: Line 48:
{{param|size|The [[Size]] to set the token to.}}
{{param|size|The [[Size]] to set the token to.}}
{{param|id|The token {{code|id}} of the token which has its [[Size]] set, defaults to the [[Current Token]].}}
{{param|id|The token {{code|id}} of the token which has its [[Size]] set, defaults to the [[Current Token]].}}
|examples=
* To set the size of the current token to {{code|Medium}}:
<source lang="mtmacro" line>
[h: setSize("Medium")]
</source>
* To set the size of the current token to whatever string is stored in the macro variable '''mySize''':
<source lang="mtmacro" line>
[h: mySize = "Large"]
[h: setSize(mySize)]
</source>


|also=
|also=

Revision as of 22:20, 13 April 2011

 This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.
 This article needs: Examples of usage.

setSize() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.3b48
Sets the Size of a Token.

The valid sizes for square grids are (Medium = 1 full cell):

  • Fine
  • Diminutive
  • Tiny
  • Small
  • Medium
  • Large
  • Huge
  • Gargantuan
  • Colossal

The valid sizes for hex grids are (Medium = 1 full cell):

  • 1/6
  • 1/4
  • 1/3
  • 1/2
  • 2/3
  • Medium
  • Large
  • Huge

The valid sizes for gridless maps are:

  • -11
  • -10
  • -9
  • ...
  • 18
  • 19
  • 20

Needs Clarification:
It would be nice to include pictures that demonstrate how the grid cells are composed; at least for the hex grids.

Usage

setSize(size)
setSize(size, id)

Parameters

  • size - The Size to set the token to.
  • id - The token id of the token which has its Size set, defaults to the Current Token.

Examples

* To set the size of the current token to Medium:
[h: setSize("Medium")]
  • To set the size of the current token to whatever string is stored in the macro variable mySize:
[h: mySize = "Large"]
[h: setSize(mySize)]

See Also

Version Changes

  • 1.3b51 - Added id parameter option.