Getting Started
What is CommandStudio?
CommandStudio is a code editor with a compilation engine that translates code into command blocks.
These blocks are imported into Minecraft via a one-command.
CommandStudio also offers a lot of convenient tools that make writing commands a lot less simpler.
All these features are explained in this manual.
Commands
CommandStudio works with code, each line of this code represents a command. Once compiled, a one-command is generated. When imported in Minecraft, all the commands are executed.
Example
Command blocks
CommandStudio also can generate command blocks. The chain
keyword is used to specify to the compiler that the following lines represent a chain
of command blocks. This chain will be placed at the position specified with
its declaration.
Each line of a chain section represents a command block.
Example
Reference
Command block attributes
By default, all command blocks will be chained command blocks and will be in the always active mode. Inserting attributes at the beginning of a line will change the current command block attributes. Those attributes can be combined.
List of available attributes:
Attribute | Effect |
---|---|
i | Impulse command block |
r | Repeating command block |
c | Chain command block |
0 | Needs redstone |
1 | Always active |
? | Conditionnal |
! | Not unconditionnal |
Example
say I'm a chain command block and I'm conditional
say I'm a repeating command block and I'm always active
Orienting chains
A command block chain will be orientated in the direction that follows its position. If no direction is specified, the command block chain will be vertical (+y).
Example
Commands on multiple lines
If you write very long commands you might want to split them on multiple lines. You can do it by adding spaces at the beginning of lines you want to join.
By default, a space is inserted between joined lines. To avoid this behavior, start your line with a +.
Math operations
Operation placed between ( and ) will be evaluated. The parentheses will be replaced by the result of this operation. Supported operators are +, -, *, / and %.
say 67.25
say 447
It also is possible to perform operations on set of numbers (e. g. coordinates). To group numbers together, wrap them between two |.
summon 10 10 10 creeper
Variables
Variables allow us to save data and re-use them later. They are declared with the var keyword. A variable name begins by a $.
summon zombie 60 60 60
Procedures
A procedure will let you re-use one or more commands. You can define procedures using the def keyword. All procedures name must be preceded by a ^.
kill @e[type=Bat]
tp @p 50 37 70
Native procedures
CommandStudio comes with a set of predifined procedures. Those procedures allow you to perform special operations.
Available procedures
Auto /stats
You can tell the compiler to use the Minecraft command /stats on a certain command block. To do so, place the operator => in the line following the target command block. The syntax is the same as the original command.
You can even append an init value to set the score at importation time.
stats ~2 ~ ~ block set SuccessCount playerName objective
time query daytime
stats ~2 ~1 ~ block set QueryResult playerName objective
scoreboard players set playerName objective 0
Marker keyword
The marker keyword will tell the compiler to summon an entity at the position of the following command block. It is possible to summon more than one marker entity per block.
summon armor_stand ~2 ~ ~ {CustomName:"label",CustomNameVisible:1,NoGravity:1b}
Warning:
Marker entities are summoned at each importation. Consider placing a /kill at the top of your code which targets older marker entities, otherwise they will stack!
Inverting success
The invert keyword place a command block which its success is the opposite of the previous command block.
testforblock ~ ~-1 ~ command_block -1 {SuccessCount:0}
say there is no cow
Void keyword
The void keyword allows you to leave an empty space instead of a command block.
say ~2 ~2 ~
Nesting your code
Placing a : at the end of a command or a command block allows you to indent the following lines without merging them. It has no incidence on the final commands/command blocks, it is only here to help you organizing your code.
say You lost
kill @p[tag=lost]
say Thank you for playing
Escaping
You can prevent characters from being interpreted. To do it, insert a ` before it.
say $var
say http://www.youtube.com
def ok
Commenting
You can add comments to your file using the // syntax. Every characters following this symbol will be ignored. You can also use /* to begin a multi-line comment and */ to end it.
say goodbye
Including other files
You can import other files into a compiling file using the include keyword.
say Hello, world!
Example
Interface
Keyboard shortcuts
Available keyboard shortcuts:
Shortcut | Effect |
---|---|
Ctrl+Space | Trigger auto-completion |
Ctrl+Q | Compile |
Ctrl+S | Export project |
Ctrl+D | Select next occurence |
CommandStudio as a desktop application
If you are using Chrome you can create an app-like shortcut to open CommandStudio in its own window, just like a regular application. To do this, first go on CommandStudio. Click the menu button at the top-right corner of the Chrome window, then click "More tools", and select "Add to taskbar". Tick "Open as window" and then click "Add".
Using older versions
If you want to use an older version of CommmandStudio, you can download it on your computer from this page. Then extract the archive and open index.html.