You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+47Lines changed: 47 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,53 @@ For clarity: SkriptLang's Skript implementation will be referred to as 'original
37
37
38
38
Skript is designed to be beginner-friendly. Ideally, a user with no experience should be able to read Skript code and understand its function. All instructions are written in basic English, avoiding niche programming terms and symbols wherever possible.
39
39
40
+
## Using ByteSkript
41
+
42
+
ByteSkript provides **three** different executable Jar files for different purposes.
43
+
44
+
Running these for the first time will create special folders in the run directory.
|`skript/`| <p>This is where you can write your script files, with the extension <code>.bsk</code>.<br>All <code>.bsk</code> files in this directory and its subfolders will be compiled/loaded.</p> |
49
+
|`resources/`| <p>This is where you can put non-script files that you need in your output jar.<br>This is only used by the jar builder.</p> |
50
+
|`compiled/`| <p>If you are compiling your scripts to <code>.class</code> or <code>.jar</code> files, the output will go here.<br>This folder is never emptied, so make sure to delete any old versions before re-compiling.</p> |
51
+
52
+
### SkriptLoader
53
+
54
+
This is the simplest resource, used for loading (and running) user-created script files.
55
+
56
+
Raw script files can be written and placed in the `skript/` folder. All scripts will be loaded internally, but no classes or jar files will be written.
57
+
58
+
The `on [script] load` event will be triggered for each script as an entry point.
59
+
60
+
{% hint style="success" %}
61
+
The ByteSkript compilers, language specification and compile-time API are available in this resource, so advanced scripts may use dynamic loading to load extra skript code written at runtime!
62
+
{% endhint %}
63
+
64
+
### SkriptClassCompiler
65
+
66
+
This resource is used for generating compiled JVM `.class` files for each script in the `skript/` folder. The classes produced by this are not directly executable, but may be useful for sharing and special loading.
67
+
68
+
The compiled scripts will **not** be loaded or run.
69
+
70
+
### SkriptJarBuilder
71
+
72
+
This resource builds an executable jar containing all of the user-created scripts, resources and the ByteSkript runtime (`skript` namespace and functions.)
73
+
74
+
\
75
+
This output jar can be run with `java -jar JarName.jar` and is distributable - it does not need anything as a dependency.
76
+
77
+
When executing this jar, all scripts will be loaded and the `on [script] load` event will be triggered for each script as an entry point.
78
+
79
+
{% hint style="danger" %}
80
+
The ByteSkript standard compiler and compile-time API are **not** added to the output jar.
81
+
{% endhint %}
82
+
83
+
{% hint style="success" %}
84
+
The dynamic function on-the-fly compiler **is** available in this jar, so dynamic function calls are available.
85
+
{% endhint %}
86
+
40
87
## Language Libraries
41
88
42
89
Due to its fixed nature, the Skript language has always relied on third-party add-ons to add new syntax and functionality for specific areas.
0 commit comments