setSize: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (cleaned up tables) |
||
Line 25: | Line 25: | ||
<table class="wikitable" border="1" style="border-collapse: collapse"> | <table class="wikitable" border="1" style="border-collapse: collapse"> | ||
<tr style="background-color:#e0ddd5"><th>Square Grid</th><th>Scale</th></tr> | <tr style="background-color:#e0ddd5"><th>Square Grid</th><th>Scale</th></tr> | ||
<tr><td>{{code|Fine}}<td>0.5 | <tr><td>{{code|Fine}}<td>0.5</td></tr> | ||
<tr><td>{{code|Diminutive}}<td>0.5 | <tr><td>{{code|Diminutive}}<td>0.5</td></tr> | ||
<tr><td>{{code|Tiny}}<td>0.5 | <tr><td>{{code|Tiny}}<td>0.5</td></tr> | ||
<tr><td>{{code|Small}}<td>0.75 | <tr><td>{{code|Small}}<td>0.75</td></tr> | ||
<tr><td>{{code|Medium}}<td>1.0 | <tr><td>{{code|Medium}}<td>1.0</td></tr> | ||
<tr><td>{{code|Large}}<td>1.0 (2x2) | <tr><td>{{code|Large}}<td>1.0 (2x2)</td></tr> | ||
<tr><td>{{code|Huge}}<td>1.0 (3x3) | <tr><td>{{code|Huge}}<td>1.0 (3x3)</td></tr> | ||
<tr><td>{{code|Gargantuan}}<td>1.0 (4x4) | <tr><td>{{code|Gargantuan}}<td>1.0 (4x4)</td></tr> | ||
<tr><td>{{code|Colossal}}<td>1.0 (6x6) | <tr><td>{{code|Colossal}}<td>1.0 (6x6)</td></tr> | ||
</table> | </table> | ||
<table class="wikitable" border="1" style="border-collapse: collapse; margin-top: 1em"> | <table class="wikitable" border="1" style="border-collapse: collapse; margin-top: 1em"> | ||
<tr style="background-color:#e0ddd5"> | <tr style="background-color:#e0ddd5"><th>Gridless</th><th>Scale</th><th>Gridless</th><th>Scale</th><th>Gridless</th><th>Scale</th></tr> | ||
<th>Gridless</th><th>Scale</th> | <tr><td>{{code|-11}} <td>0.086 </td><td>{{code|0}} </td><td>1.0 </td><td>{{code|11}} <td>7.43</td></tr> | ||
<th>Gridless</th><th>Scale</th> | <tr><td>{{code|-10}} <td>0.107 </td><td>{{code|1}} </td><td>1.2 </td><td>{{code|12}} <td>8.916</td></tr> | ||
<th>Gridless</th><th>Scale</th></tr> | <tr><td>{{code|-9}} <td>0.134 </td><td>{{code|2}} </td><td>1.44 </td><td>{{code|13}} <td>10.699</td></tr> | ||
<tr><td>{{code|-11}} <td>0.086 <td>{{code|0}} <td>1.0 <td>{{code|11}} <td>7.43 | <tr><td>{{code|-8}} <td>0.168 </td><td>{{code|3}} </td><td>1.728 </td><td>{{code|14}} <td>12.839</td></tr> | ||
<tr><td>{{code|-10}} <td>0.107 <td>{{code|1}} <td>1.2 <td>{{code|12}} <td>8.916 | <tr><td>{{code|-7}} <td>0.21 </td><td>{{code|4}} </td><td>2.074 </td><td>{{code|15}} <td>15.407</td></tr> | ||
<tr><td>{{code|-9}} <td>0.134 <td>{{code|2}} <td>1.44 <td>{{code|13}} <td>10.699 | <tr><td>{{code|-6}} <td>0.262 </td><td>{{code|5}} </td><td>2.488 </td><td>{{code|16}} <td>18.488</td></tr> | ||
<tr><td>{{code|-8}} <td>0.168 <td>{{code|3}} <td>1.728 <td>{{code|14}} <td>12.839 | <tr><td>{{code|-5}} <td>0.328 </td><td>{{code|6}} </td><td>2.986 </td><td>{{code|17}} <td>22.186</td></tr> | ||
<tr><td>{{code|-7}} <td>0.21 <td>{{code|4}} <td>2.074 <td>{{code|15}} <td>15.407 | <tr><td>{{code|-4}} <td>0.41 </td><td>{{code|7}} </td><td>3.583 </td><td>{{code|18}} <td>26.623</td></tr> | ||
<tr><td>{{code|-6}} <td>0.262 <td>{{code|5}} <td>2.488 <td>{{code|16}} <td>18.488 | <tr><td>{{code|-3}} <td>0.512 </td><td>{{code|8}} </td><td>4.3 </td><td>{{code|19}} <td>31.948</td></tr> | ||
<tr><td>{{code|-5}} <td>0.328 <td>{{code|6}} <td>2.986 <td>{{code|17}} <td>22.186 | <tr><td>{{code|-2}} <td>0.64 </td><td>{{code|9}} </td><td>5.16 </td><td>{{code|20}} <td>38.338</td></tr> | ||
<tr><td>{{code|-4}} <td>0.41 <td>{{code|7}} <td>3.583 <td>{{code|18}} <td>26.623 | <tr><td>{{code|-1}} <td>0.8 </td><td>{{code|10}} </td><td>6.192</td><td colspan="2"></td></tr> | ||
<tr><td>{{code|-3}} <td>0.512 <td>{{code|8}} <td>4.3 <td>{{code|19}} <td>31.948 | |||
<tr><td>{{code|-2}} <td>0.64 <td>{{code|9}} <td>5.16 <td>{{code|20}} <td>38.338 | |||
<tr><td>{{code|-1}} <td>0.8 <td>{{code|10}} <td>6.192<td colspan="2"> | |||
</table> | </table> | ||
Revision as of 04:43, 27 February 2019
setSize() Function
Note: This function can only be used in a Trusted Macro
• Introduced in version 1.3b48
Sets the Size of a Token.
Grid Sizes and Scales
The valid sizes for each type of grid are documented below, where Medium is always 1 full grid cell. The Scale is a multiplier for the size of the image after configuring it to fit within the stated footprint. For example, the Huge
size on a square grid occupies a 3x3 cell area and the image is scaled (1.0) to exactly fit that area. But the Large
size on a hex grid is 3 hexes scaled down 10% (0.9) so as to keep the image slightly within the border of the 3 cells.
Hex Grid | Scale |
---|---|
1/6 | 0.408 |
1/4 | 0.5 |
1/3 | 0.577 |
1/2 | 0.707 |
2/3 | 0.816 |
Medium | 1.0 |
Large | 0.9 (3 cells) |
Huge | 1.0 (6 cells) |
Humongous | 1.0 (19 cells) |
Square Grid | Scale |
---|---|
Fine | 0.5 |
Diminutive | 0.5 |
Tiny | 0.5 |
Small | 0.75 |
Medium | 1.0 |
Large | 1.0 (2x2) |
Huge | 1.0 (3x3) |
Gargantuan | 1.0 (4x4) |
Colossal | 1.0 (6x6) |
Gridless | Scale | Gridless | Scale | Gridless | Scale |
---|---|---|---|---|---|
-11 | 0.086 | 0 | 1.0 | 11 | 7.43 |
-10 | 0.107 | 1 | 1.2 | 12 | 8.916 |
-9 | 0.134 | 2 | 1.44 | 13 | 10.699 |
-8 | 0.168 | 3 | 1.728 | 14 | 12.839 |
-7 | 0.21 | 4 | 2.074 | 15 | 15.407 |
-6 | 0.262 | 5 | 2.488 | 16 | 18.488 |
-5 | 0.328 | 6 | 2.986 | 17 | 22.186 |
-4 | 0.41 | 7 | 3.583 | 18 | 26.623 |
-3 | 0.512 | 8 | 4.3 | 19 | 31.948 |
-2 | 0.64 | 9 | 5.16 | 20 | 38.338 |
-1 | 0.8 | 10 | 6.192 |
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 tokenid
of the token which has its Size set, defaults to the Current Token.
- Note that if the token is in 'Free size' or 'Native size' you will get an error when you use 'setSize' on the 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.