Data Types

jCoad does not really have data types, but putting arguments into the proper format for object functions, properties, and triggers is absolutely necessary for your code to work properly. Use this guide to understand how to enter arguments into your jCoad.

(type) 0/1

A binary digit, representing a boolean value. 1 represents “yes,” “on,” or “true,” while 0 represents “no,” “off,” or “false.”

(type) area

An area, represented by two integers separated by an “x.” Use the format mxn, where m and n are integers.

(type) depth

A depth string that indicates the depth of a sprite or animation drawn in the game. Depth strings consist of a base position and an optional offset.

  • map/map+n/map-n — Depth offset is relative to the base position on the map. n is the number of pixels in front of the object the player needs to be to appear in front of it.

  • void/void+n/void-n — Depth offset is relative to the void, or the map background.

  • fore/fore+n/fore-n — Depth offset is relative to just above the foreground, or always above the player.

  • back/back+n/back-n — Depth offset is relative to just above the background, or always behind the player.

  • bottom/bottom+n/bottom-n — Depth offset is relative to above the map, but behind the shadows.

The pixel offsets (+n or -n), especially when working with a depth other than map, are primarily used to place objects relative to one other.

Examples
map+16
void+5
fore-5
bottom+293
fore
back
(type) direction

A direction the player can face.

Options
up, down, left, right
(type) hex

A hexadecimal color in the format #[0-F]{6}.

Examples
#000000 => black
#FFFFFF => white
#F75D5D
#13A10E
(type) number

A string of numeric digits, such as 256 or -3.

(type) path

A path string that represents a string of tile movements. In their simplest form, path strings specify the number of tiles to move followed by the direction to move in (represented as a single character). For example, 3d represents moving 3 tiles down. Multiple moves can be strung together by separating them with commas. Add an asterisk on the end of the string to signify the path should repeat indefinitely. There are also a few special keywords that can be used as shortcuts for some common paths.

Examples
1u,3l,3d,2r => 1 up, 3 left, 3 down, 2 right
3u,3d* => 3 up, 3 down, repeat forever
circle => 1r,1d,1l,1u*
spin => 0r,0d,0l,0u*
twirl => spin once, ending on the direction currently facing
(type) percentage

An integer representing a percentage.

Examples
0 => 0%
50 => 50%
75 => 75%
100 => 100%
200 => 200%
(type) pokémon

A Pokémon Generation String.

(type) rgb

A color given in RGB (red-green-blue) format. Three RGB values separated by commas.

Examples
255,0,0 => Red
232,66,255 => Pink
(type) rgba

A color given in RGBA (red-green-blue-alpha) format. The format is [0-255,0-255,0-255,0-1]. Only the final number can be a floating-point value.

Examples
[255,0,0,1] => Red, 100% opacity
[255,0,0,0.5] => Red, 50% opacity
(type) short direction

Exactly like direction, but only using the first character.

Options
u, d, l, r
(type) skin

A special type of parameter used to identify overworld skins. For simple cases, skin names or Pokémon names work, but integer IDs can be more precise. Use negative numbers for and Dex IDs for Pokémon.

Examples
youngster => Sinnoh Youngster, ID = 29
257 => Unova Youngster
pikachu => Pikachu (Nintendo)
diagla;shiny => Shiny Dialga (Nintendo)
-100327 => Spinda (Nintendo)
-460119.001 => Mareep, Aristos form (Aristos)
(type) sprite sheet

A link to an internal sprite sheet (uploaded to Pokéngine) that you or another user owns. The format is user_id/sprite_sheet_name.png.

Examples
2654/sprites.png
1995/door.png
(type) string

A string of characters. Some characters may have special meaning for the function or trigger.

(type) tileset

A tileset identification string, which takes the format of !n, where n is the tileset ID. Basically just a number with an exclamation point in front of it.

(type) unit interval

A floating-point number between 0 and 1 (inclusive), such as 0, 0.125, 0.783, or 1. Usually used for representing percentages.

(type) yes/no

Two options representing a boolean choice: yes or no!