SquidUtils scripting

SquidUtils will read and load all files ending with ".script" in "config/SquidUtils" as script files 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] [event arguments] action=[action] [action arguments]

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

The event arguments and the action arguments are space-separated lists of key-value pairs. The following event arguments are available:
 * 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 size=[value]
 * damage damageamount=[amount]
 * applyeffect effect=[potion ID]:[duration]:[level]
 * addexperience experience=[amount]
 * setsprinting
 * setinvisible
 * difficulty difficulty=[value]
 * cleareffects
 * placeblock blocktoplace=[block name]
 * setburning duration=[seconds]
 * setfoodlevel foodlevel=[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 3 seconds whenever they're healed between more than 5 HP: on heal minchance=3 maxchance=4 minhealth=5 action=setburning duration=3

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 modify property=(hardness|slipperiness|resistance|texture) value=[value] block=modid:blockname block modify property=drops action=[remove] item=[modid:itemname] block=modid:blockname block modify property=drops action=[add] item=[modid:itemname] minchance=[integer] maxchance=[integer] minamount=[integer] maxamount=[integer] block=[modid:blockname] block create type=(basic|glass) name=[name] block create type=meteor name=[name] meteortype=(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 modify item=[modid:itemname] property=(stacksize|maxdamage) value=[integer] item modify item=[modid:itemname] property=[tab] value=[tabname] item create type=[food] name=[name] bars=[integer] saturation=[integer] wolfs=[boolean] item create type=[food] name=[name] bars=[integer] saturation=[integer] wolfs=[boolean] potionid=[integer] duration=[integer] amplifier=[integer] chance=[decimal]

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=[name] command create type=info name=[name] description=[description] text=[text] command create type=web name=[name] description=[description] url=[URL] command create type=basic name=[name] description=[description] requiresop=(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, and is intended for use with the "on command" command.

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 type=info name=hello description=shows_a_Hello_World_message text=Hello_World!

tab
This command can be used to create new creative tabs.

Syntax: tab create name=[name] icon=[item to use as image] [list of items] The list of items is separated by blank spaces.

recipe
This command can be used to add furnace recipes, shapeless recipes with a single input item, and explosive recipes. Explosive recipes will create an explosion when the specified item is being thorwn, converting it to another item in the process.

Syntax: recipe create type=(shapeless|furnace) input=[item] output=[item] recipe create type=explosive input=[item] output=[item] size=[explosion size]