Template:Sprite/doc: Difference between revisions
Jump to navigation
Jump to search
m (Added Hailey and Cole's sprite pages to the list.) |
m (Added Nicole's sprite pages in the bullet list for this page, added text signifying that the pages in bullet points were character-specific sprites) |
||
Line 2: | Line 2: | ||
If a sprite is drawn for a one-off thing, you can use this template directly. Otherwise, it's better to create a separate template for the character, to reduce boilerplate. | If a sprite is drawn for a one-off thing, you can use this template directly. Otherwise, it's better to create a separate template for the character, to reduce boilerplate. | ||
A list of character-specific sprites can be found here: | |||
* [[Template:Sprite/Ian]] | * [[Template:Sprite/Ian]] | ||
* [[Template:Sprite/Paige]] | * [[Template:Sprite/Paige]] | ||
Line 9: | Line 9: | ||
* [[Template:Sprite/Hailey]] | * [[Template:Sprite/Hailey]] | ||
* [[Template:Sprite/Cole]] | * [[Template:Sprite/Cole]] | ||
* [[Template:Sprite/Nicole]] | |||
* [[Template:Sprite/NicoleB]] | |||
== Arguments == | == Arguments == |
Revision as of 11:41, 13 June 2023
Sprite is a template which draws a single sprite from a spritesheet.
If a sprite is drawn for a one-off thing, you can use this template directly. Otherwise, it's better to create a separate template for the character, to reduce boilerplate. A list of character-specific sprites can be found here:
- Template:Sprite/Ian
- Template:Sprite/Paige
- Template:Sprite/Janitor
- Template:Sprite/Logan
- Template:Sprite/Hailey
- Template:Sprite/Cole
- Template:Sprite/Nicole
- Template:Sprite/NicoleB
Arguments
Argument | Required? | Description |
---|---|---|
ratio | No | A scale factor to apply to the sprite. 1 = leave as is. |
sheetWidth | Yes | The width of the source spritesheet, in pixels. |
sheetHeight | Yes | The height of the source spritesheet, in pixels. |
noOfRows | Yes | Number of rows in the spritesheet |
noOfColumns | Yes | Number of columns in the spritesheet |
offsetX | No | If sprites are not centered in each "cell" of the spritesheet, you can use this value to adjust. Otherwise, leave at 0. |
offsetY | No | If sprites are not centered in each "cell" of the spritesheet, you can use this value to adjust. Otherwise, leave at 0. |
row | Yes | The index of the row to display. This is 1-indexed, so 1 is the first row. |
col | Yes | The index of the col to display. This is also 1-indexed. |
image | Yes | The image to use as the spritesheet. e.g. File:IanSpriteS.png
|
Examples
- I am some text after the sprite