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 "Script:Page Size"

From Roll20 Wiki

Jump to: navigation, search
(tagged as "discontinued API")
(redirect to Script Index, API no longer available)
 
Line 1: Line 1:
{{script overview
+
#Redirect[[API:Script Index]]
 +
<!-- Don't delete redirect, help center links to this page even though API have been removed
 +
[[Category:Discontinued API Scripts]] -->
 +
 
 +
script overview
 
|name=PageSize
 
|name=PageSize
 
|author={{user profile|503018|manveti}}
 
|author={{user profile|503018|manveti}}
 
|version=0.1
 
|version=0.1
|lastmodified=2015-06-10}}
+
|lastmodified=2015-06-10
  
 
'''PageSize''' allows the user to resize a page, choosing where to anchor the page's contents and whether to scale distances and/or sizes based on the ratio of the page's new size to its old size.
 
'''PageSize''' allows the user to resize a page, choosing where to anchor the page's contents and whether to scale distances and/or sizes based on the ratio of the page's new size to its old size.
Line 11: Line 15:
  
 
=== Syntax ===
 
=== Syntax ===
 +
<!-- suppress category
 
{{syntaxbox top|pagesize|formal=true}}
 
{{syntaxbox top|pagesize|formal=true}}
 
{{API command|pagesize}} {{API parameter|name=options|optional=true}} {{API parameter|name=X}} {{API parameter|name=Y}}<br>
 
{{API command|pagesize}} {{API parameter|name=options|optional=true}} {{API parameter|name=X}} {{API parameter|name=Y}}<br>
Line 52: Line 57:
 
   * stretch: As scale, but resizes contents as well as moving them.}}
 
   * stretch: As scale, but resizes contents as well as moving them.}}
 
{{param description bottom}}
 
{{param description bottom}}
 
+
-->
 
=== Examples ===
 
=== Examples ===
  
Line 72: Line 77:
 
=== Changelog ===
 
=== Changelog ===
 
{{changelog version|0.1|2015-06-10|* Initial release}}
 
{{changelog version|0.1|2015-06-10|* Initial release}}
[[Category:Discontinued API Scripts]]
 

Latest revision as of 19:59, 20 September 2021

  1. RedirectAPI:Script Index

script overview |name=PageSize |author=manveti |version=0.1 |lastmodified=2015-06-10

PageSize allows the user to resize a page, choosing where to anchor the page's contents and whether to scale distances and/or sizes based on the ratio of the page's new size to its old size.

It is recommended that this script be used in conjunction with the CommandShell module, which will improve output formatting and command discovery.


[edit] Syntax

[edit] Examples

!pagesize 10 12
Resizes the default page (see above) to 10 squares wide by 12 squares high
!pagesize -P x +2
Adds two columns on the right side of the page with the player ribbon
!pagesize -p -JpzPx2j_9piP09ceyOv y -1
Removes one row from the bottom of the specified page. Anything whose center is below the new bottom of the page will be moved up until it is fully inside the page.
!pagesize +1 +2 -a rc
Adds one column on the left and one row each on the top and bottom of the default page.
!pagesize x -3 -e crop
Removes the rightmost three columns from the default page, deleting anything which is no longer visible (items with even one pixel's worth of size within the visible area are left in place).
!pagesize +25 +25 -e scale
Adds 25 rows and columns to the default page. Assuming the page was 25x25 before this command was executed, everything on the page will have its coordinates doubled (note that, as each square of the old size represents a 2x2 grid of the new size, single-square tokens will end up at the center of 2x2 grids, rather than fully in any one square).
!pagesize +25 +25 -e stretch
As the previous example, but everything on the page will have its size doubled as well (effectively zooming in and doubling the grid density).

[edit] Changelog

v0.1 (2015-06-10)

  • Initial release