Allowed:
- //Comments
- Leading spaces
- Trailing spaces
- Blank lines

Not allowed:
- Tabs

Notes:
- Everything is case sensitive

================================================

[combination]	- start combined use script. Define 'target' in script!
[/combination]	- end combined use script
[creature]		- open creature attributes
[/creature]		- obvious
[namedscript]	- start named script
[/namedscript]	- end named script
[object]		- open object attributes
[/object]		- obvious
[properties]	- assign properties
[/properties]	- stop assigning properties
[spawn]			- start script executed when spawning in world (NOT inventory)
[/spawn]		- stop spawn script
[tile]			- open tile attributes
[/tile]			- obvious
[update]		- script to call at start of every turn
[/update]		- end script to call at start of every turn
[use]			- start non-combined use script
[/use]			- end non-combined use script

================================================

Properties:
cantpickup			- object cannot be picked up
directionalusage	- can be used on adjacent tiles
multiuse			- variable 'uses' is displayed before item name
solid				- object or tile can't be moved through

================================================

Script commands:

--Text macros--
Will only work with the icon special command.

$HELD$				- The sprite of the currently held item
$ONGROUND$			- The sprite of the item on the ground

--Special--
card "<sprite>"		- Defines what sprite to use for the action card for this use/combination
icon "<sprite>"		- Defines what sprite to use as icon on the action card
name "<name>"		- Defines name for named script
target "<name>"		- Defines target for combination script

--Conditions and jumps--
BEQ "<name>", "<int>", "<script>"				- Short for 'branchifequals'. We assembly now
BLT "<name>", "<int>", "<script>"				- Short for 'branchifless'. Also a kind of sandwich
BMT "<name>", "<int>", "<script>"				- Short for 'branchifmore'
BNE "<name>", "<int>", "<script>"				- Short for 'branchifnotequal'
branchifequals "<name>", "<int>", "<script>"	- Exec script/fail if named var is precisely int
branchifless "<name>", "<int>", "<script>"		- Exec script/fail if named var is less than int
branchifmore "<name>", "<int>", "<script>"		- Exec script/fail if named var is more than int
branchifnotequal "<name>", "<int>", "<script>"	- Exec script/fail if named var is NOT int
distancefromplayer "<int>", "<script>"			- Exec script/fail if not at least int tiles away from player
groundisfree "<script>"					- Exec script/fail if there's something on the ground under player
helditemis "<name>", "<script>"			- Exec script/fail if the held item ISN'T the named item
helditemisnot "<name>", "<script>"		- Exec script/fail if the held item is the named item
holdingitem "<script>"					- Exec script/fail if the player isn't holding any item
itemisheld	"<script>"					- The item must be held to use, otherwise it execs script/fails
itemnotheld "<script>"					- Exec script/fail if the player is holding the item
jump "<script>"							- Exec script or fail
nohelditem "<script>"					- Exec script/fail if player is holding any item
notdirectional "<script>"				- Exec script/fail if used on tile/object not under player
notnearedge "<script>"					- Exec script/fail if creature is near world edge
notsolid "<script>"						- Exec script/fail if target location is solid
notsummer "<script>"					- Exec script/fail if it's summer
notwinter "<script>"					- Exec script/fail if it's winter
objectonground "<script>"				- Exec script/fail if there's nothing on the ground under the player
objectnotproperty "<name>","<script>"	- Exec script/fail if there's an object with the named property at target location
objectwithproperty "<name>","<script>"	- Exec script/fail if there's not an object with the named property at target location
random "<float>", "<script>"			- If rand() > float, exec script/fail
targetgroundisfree "<script>"			- Exec script/fail if there's something on the ground at target position
targetobjectonground "<script>"			- Exec script/fail if there's nothing on the ground at target position
tilehasproperty "<name>","<script>"		- Exec script/fail if tile at target location does NOT have named property
tilenotproperty "<name>","<script>"		- Exec script/fail if tile at target location has named property

--Actions--
createheldobject "<name>"	- Create inventory item
createtile "<name>"			- Create (replace) a tile at target position
debug "<text">				- Prints debug text to screen
destroyheld					- Destroy whatever item is held by the player
destroyobjectonground		- Destroys the object at player's location
destroytarget				- Destroys the target object
destroythis					- Destroys the source object
groundspawn	"<name>"		- Spawn object at player's location
killself					- Makes a creature delete itself
moveawayfromplayer			- Moves a tile away from the player
movetarget					- Makes a creature move to target position, if possible
reducehunger "<int>"		- Restores your hunger bar by the specified amount
sound "<name>"				- Plays the specified sound effect
spawn "<name>"				- Create object at target position
spawncreature "<name>"		- Spawn creature at target position
targetnearby				- Changes target position to a random adjacent tile (hor, vert or diag)

--Variable manipulation--
decvar "<name>","<int>"		- Decreases var by int (or default one)
incvar "<name>","<int>"		- Adds int (or default one) to the named var
setvar "<name>","<int>"		- Sets the named var to value int

================================================

World generation:
(Objects will not spawn on occupied tiles.)

[spawn]							- Starts defining a spawn
[/spawn]						- Finish defining a spawn and execute it
accept "<name>"					- (in spawn) Allows spawn to occur on specified tile
basetile "<name>"				- Fills every tile of the world with this
min "<number>"					- (in spawn) Sets minimum number to spawn (inclusive)
max "<number>"					- (in spawn) Sets maximum number to spawn (inclusive)
outline "<name>"				- Places tiles around all instances of the specified tile. See other outline commands.
setoutlineexception "<name>"	- Which tiles not to replace using the outline command (beyond the one being outlined)
setoutlinetile "<name>"			- Which tile to place using the outline command
spreadtilesmin "<number>"		- Fill at least X tiles around the original spawn with the same tile
spreadtilesmax "<number>"		- Fill at most X tiles around the original spawn with the same tile
spawnobject "<name>"			- (in spawn) Sets object to spawn
worldsizex "<int>"				- Sets the width of the map
worldsizey "<int>"				- Sets the height of the map