-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This Wiki will cover the basics of BSL
BSL is a scripting language created for modders to allow people who may have little to no experience coding C# create fully realized animated blocks. This guide will familiarize and teach you how to use the scripting to its fullest
This guide will use very basic programming terms, if you have never programmed anything before it would be best to understand the meaning of these terms.
INT:
- INT or integer is a whole number {0, 1, 2, 3}
FLOAT:
- FLOAT is a Rational number {-2.5, 0.0, 1.2, 4.4}
- When a method requires a float the number MUST have a decimal place in it
STRING:
- STRING is a block of text surrounded by " "
- Declaring a string is as simple as "Example String"
BOOL:
- BOOL is True or False
VECTOR:
- VECTOR is a 3D point that can represent movement or axis
- Format is [x, y, z] it can consist of INTs or FLOATs { [1, 2, 1.2], [0, 1, 0], [1.1, 2, 0.1] }
FUNCTION:
- Used to describe a certain set of instructions
KEYWORD:
- A keyword exactly how it sounds. A key word, aka a special word
- Keywords MUST be alphanumeric and have no spaces { a-z _ }
The Body: Whenever I refer to "the body" of something I am referring to something contained usually inside two curly brackets, such as { }
This is not a guide on how to create modded blocks, so from here forth I will assume you have a working block mod.
To get started all your animation scripts will be located in the Data/Animations folder.
If you have mod that only needs one block animated then in the Animations folder create a file called Main.bsl, this is all you will need to start.
If you have a mod that need multiple blocks animated then in the Animations folder create a file called Main.info, this file will contain the paths to the other scripts. see example below
Data/Animation/
- main.info
- block1.bsl
- block2.bsl
main.info
Animation block1 Animation block2
See example mod for file layout
- first subscribe to [Animated-Cockpits] and let steam download it
- then navigate to folder 'C:\Program Files (x86)\Steam\steamapps\workshop\content\244850\2900331965\Data\Animation' (or wherever you have steam installed to)