1.1.0 • Published 2 years ago

@rbxts/zirconium v1.1.0

Weekly downloads
83
License
ISC
Repository
github
Last release
2 years ago

What Zirconium is

  • Zirconium is a runtime scripting language for Roblox, for programmatic manipulation of Roblox games during runtime. Unlike other solutions this is not bound to any sort of command framework. It is inspired by Rust and TypeScript.
  • The scripts can be as simple as user commands, to more complex scripting systems like quest triggers.
  • Zirconium is sandboxed. You can only use functions that you explicitly provide. Each script runs in it's own environment.

Supported

  • Variables
    let x = 10; // basic declaration
    const x = 10; // constant (can not reassign)
  • If/Else

    // Shorthand if
    if value: print "Hello, World!"
    
    // Longhand if
    if value { // brackets are optional
        print "Hello, World!"
    }
    
    // If else
    if value {
        print "Value is true!"
    } else {
        print "Value is false!"
    }
  • For-In Statement

    // Iterate array/object - like for _, value in pairs(myArray)
    for value in myArray {
        print $value
    }
    
    // Iterate range (Print numbers 1 to 10), like for i = 1, 10 do
    for value in 1..10 {
        print $value
    }
  • Functions (both Zr and Luau)

    // Command calls
    test! // no arguments, exclaimation is because otherwise it's evaluated as the variable itself
    print "Hello, World!" 42 true // arguments
    
    // Script calls
    test() //  no arguments
    print("Hello, World!", 42, true) // arguments
    
    // Declaring and using user functions
    function example() {
        print "Hello from example!"
    }
    
    example!
  • Arrays (including indexing)

    let exampleArray = [1, 2, 3];
    let emptyArray = [];
    let arrayWithMixed = [1, "Hello!", true];
  • Objects (including property access)

    let exampleObject = {
        aNumber: 10,
        aBoolean: true,
        aString: "Hi there!"
    }
    let emptyObject = {}

Limitations

  • Stack limit: 256. This is intentionally small as you shouldn't be doing anything that complex with this.
1.1.0

2 years ago

1.1.0-beta.2

2 years ago

1.0.4

2 years ago

1.1.0-beta.1

2 years ago

1.1.0-beta.0

2 years ago

1.0.3

3 years ago

1.0.2-rc.0

3 years ago

1.0.1-rc.0

3 years ago

1.0.0-beta.6

3 years ago

1.0.0-beta.7

3 years ago

1.0.0-beta.5

3 years ago

1.0.0-beta.3

3 years ago

1.0.0-beta.4

3 years ago

1.0.0-beta.2

3 years ago

1.0.0-beta.1

3 years ago

1.0.0-alpha.4

4 years ago

1.0.0-alpha.3

4 years ago