SquidUtils scripting

SquidUtils will read a script from "config/SquidUtils/script.txt" on startup. The commands in this script can be used to trigger certain reactions if an event occurs, or to fine-tweak certain aspects of the game.

General Syntax
Each command spans one line, the commands are terminated by a newline. The command and its arguments are generally separated by blank spaces. Refer to below for the synax on specific commands.

Lines starting with '#' are ignored as comments.

on
With this command you can trigger certain actions to happen if a certain condition is met.

Syntax: on [trigger] [argument]:[value];[argument]:[value];... [action] The event arguments are separated by ';' and are optional. There must be no spaces around ';' and ':'.

The following triggers are available:
 * entityjoin
 * hurt
 * smelt
 * craft
 * toss
 * heal
 * teleport
 * starve
 * achievement
 * hungerregen
 * interaction
 * explosion
 * command
 * chat

The following event arguments are available:
 * minamount:[amount]
 * maxamount:[amount]
 * minhealth:[value]
 * maxhealth:[value]
 * minarmor:[value]
 * maxarmor:[value]
 * minchance:[value] - The numerator of the chance
 * maxchance:[value] - The denominator of the chance
 * item:[item name]
 * entitytype:[entity type name]
 * chattrigger:[string]
 * commandname:[name]
 * hasperm:[permission]
 * missingperm:[permission]

The following actions with their respective arguments are available:
 * explode [strength]
 * damage [amount]
 * applyeffect [potion ID] [duration] [level]
 * addexperience [amount]
 * cancel
 * sprint
 * setinvisible
 * difficulty [value]
 * cleareffects
 * placeblock [block name]
 * burn [duration]
 * sethunger [value]

Other mods can add custom triggers, arguments and actions using SquidUtils' API.

Example: This will, with a chance of 3/4, light an entity on fire for 2 seconds whenever they're healed between 5 and 20 HP: on heal minchance:3;maxchance:4;minamount:5;maxamount:20 burn 40

block
This command allows modification of existing blocks' properties as well as creation of new blocks. If StarStones is installed, meteor blocks can also be created.

Syntax: block (hardness|slipperiness|resistance|texture) [value] block create (basic|glass) [name] block create meteor [name] (STONE|END|ICE|OBSIDIAN|HELL)

Textures can be provided by a resource pack, they have to be placed in "assets/SquidUtils/textures/blocks".

item
This command allows changing stack sizes and durabilities of items. Also, custom foods and items can be created.

Syntax: item (stacksize|maxdamage) [value] item create basic [name] item create food [name] [hunger points] [saturation] [can feed wolves: true|false] {always edible: true|false} {potion ID} {duration} {strength} {probability}

The last 5 parameters are optional. They allow making the food edible even when you're full, and allow it to inflict potion effects upon eating.

Textures can be provided by a resource pack, they have to be placed in "assets/SquidUtils/textures/items".

command
With this command you can disable chat commands or create new simple ones.

Syntax: command disable [name] command create info [name] [description] [text] command create web [name] [description] [URL] command create basic [name] [description] [needs operator permission: true|false] Description, text and URL must not contain spaces. Instead, '_' will be substituted for a blank space.

"info" will display the specified text.

"web" will download a text file from the URL and display its contents.

"basic" will do nothing.

Example: This command will create a "/hello" command that displays "Hello World!" when used. Typing "/help hello" will show "shows a Hello World message". command create info hello shows_a_Hello_World_message Hello_World!