The MC1253 is an IC that can play a firework show using 2 available scripting languages implemented into CraftBook. A simple one called Basic, which is good for quick single firework scripts. Or Fyrestone, which is a bit more involved, but ultimately better for larger scripts. Scripts go inside the /plugins/CraftBook/fireworks folder, and come in either .txt or .fwk file formats.
Basic files are .txt files.
Basic goes along the system of, wait:time in ticks, to wait a certain amount of ticks... and launch:x,y,z offset;duration (in seconds);shape;r,g,b colour;r,g,b fade
The launch paramater can have an extra ;trail or ;twinkle added to the end to give those effects.
Fyrestone files are .fwk files.
Fyrestone follows the lines of some very basic languages. It supports multiple effects per firework, and each firework can be launched multiple times.
The language is effect based, where you can add effects to a defined variable.
It is done like this:
To define a variable, or to add to a variable... Type:
After that, you enter all the effects you want in this format:
set.color 255,0,0 set.fade 255,0,0 set.shape burst set.trail set.twinkle
You do not need to include all of these, you can select whichever ones you want. However shape is required.
And to end off the construction, you type build <variableName>, signifying that effect is done. To add a second effect to the variable repeat the process.
Durations are not bound to variables, they are set seperately. To set a duration, type: duration <duration in seconds> The duration will be applied until it is changed again.
Locations are done the same way, location x,y,z
You can also wait a certain number of ticks using... wait <ticks>
You can have spaces between the lines to make it neater, and start lines with a # to make it a comment.
List of commands
|start||Name<string>||Starts building a new firework, the first parameter is the name.||start MyFirework|
|build||Name<string>||Finishes building a new firework and stores it, the first parameter is the name.||build MyFirework|
|set.color||R<decimal>,G<decimal>,B<decimal>||Sets the color of the firework. Multiple can be set for random colours.||set.color 255,0,0|
|set.fade||R<decimal>,G<decimal>,B<decimal>|| Sets the color of the firework.
set.trail: set.fade will set color for trail.
Multiple can be set for random colours.
|set.shape||Shape<string>|| Sets the shape of the firework.
Shape can be one of the following:
* sball - Small Ball
* lball - Large Ball
* star - Star
* creeper - Creeper Face
* burst - Burst Explosion.
|set.twinkle||None||Enables twinkles on the firework.||set.twinkle|
|set.trail||None||Enables trails on the firework.||set.trail|
|set.flicker||None||Enables flicker on the firework||set.flicker|
|duration||Time<floating point decimal>||Sets the time (in seconds) the firework takes to explode.||duration 1.5|
|location||X<decimal>,Y<decimal>,Z<decimal>||Sets the offset spawn point for the firework from the IC. This is not absolute coordinates, but an offset!||location 0,32,0|
|launch||Name<string>||Launches the specified firework.||launch MyFirework|
|wait||Ticks<decimal>||Waits for a specified amount of ticks.||wait 20|
|sound||SoundName<String> X<decimal>,Y<decimal>,Z<decimal> Volume<decimal> Pitch<decimal>||Plays a sound at an offset.||sound FUSE 0,0,0 2.0 1.0|
# Adding 2 effects to variable a start a set.color 255,255,255 set.type creeper set.flicker set.fade 255,0,0 build a start a set.color 0,255,0 set.type lball set.trail set.fade 0,0,255 build a # Launch a launch a # Launch a another 2 times in different locations location -1,2,3 launch a location 4,-2,7 launch a # Make another effect and launch it at the sign start b set.color 30,255,80 set.type burst set.trail set.fade 255,0,0 build b location 0,0,0 launch b
- Third line: The name of the script (Excluding .txt or .fwk)
- Fourth line: Nothing
- Start Show/Stop Show (Depending on on/off)
- Outputs high when the show is playing.