Converting to ByteSkript
A short guide for converting code from SkriptLang's original Skript to the language format used by ByteSkript. This also contains a list of the major differences between the two.
While an effort has been made to maintain some (superficial) parity, ByteSkript's language implementation is not compatible with SkriptLang's version (original Skript.)
Some of these differences are changes to the appearance or format of the Skript language. Others are functional changes to the behaviour of certain elements.
The main differences (and how to convert to ByteSkript's format) are listed on this page.
Triggers
Description
All code-containing elements require a trigger:
section in ByteSkript. This includes events, functions, etc.
All of the runnable code goes inside this trigger:
entry.
Comparison
Change Reason
ByteSkript supports other entries in these members, as well as the runnable trigger.
For example, the function supports a verify:
entry for start-up testing.
Minecraft Syntax
Description
Unlike original Skript, ByteSkript is not a Minecraft/Bukkit domain-specific language.
ByteSkript provides no Minecraft-related syntax. ByteSkript is not a Bukkit server plug-in.
Third-party language libraries or modified versions may offer Minecraft support.
Change Reason
ByteSkript's design philosophy is to be a simple, serviceable scripting language for the Java Virtual Machine.
Variables
Description
ByteSkript's regular {var}
variables are local to the current trigger. This is comparable to original Skript's {_local}
variables.
ByteSkript's variables are strictly-named and do not support inputs in their names.
ByteSkript has multiple variable types with special use-cases.
Comparison
Change Reason
Original Skript's variables were not easily-applicable to the JVM environment, and would have made ByteSkript significantly slower than other JVM languages.
ByteSkript still supports a similar form with {!var}
global variables.
See the variables page for examples.
Lists
Description
ByteSkript does not support original Skript's {list::*}
variables. Instead, regular variables can be set to list objects.
Comparison
Change Reason
Original Skript's list variables were not easily-applicable to the JVM environment, and would have made ByteSkript significantly slower than other JVM languages.
Some beginners found the nested list/map structure of original Skript unnecessarily confusing, and ByteSkript's more explicit version should make this clearer.
Loops
Description
ByteSkript has a slightly different loop syntax that is designed to be clearer and simpler to use.
Comparison
Change Reason
This was changed along with lists to be clearer and easier to understand for beginners.
Function Declarations/Calls
Description
ByteSkript has some minor changes to function declarations and calls.
Comparison
Change Reason
Part of making ByteSkript's language stricter and more regular meant making sure every line was explicitly an effect, and not an expression. This meant the myFunction()
dual effect/expression from original Skript had to be altered.
The run %Executable%
effect is also used for running other things such as lambdas, dynamic functions and background tasks.
Last updated