Programming Mod

If you liked this item, please rate it up on Steam Workshop page.

Author: AleMor4les

Last revision: 10 Feb, 2025 at 00:29 UTC

File size: 1.15 MB

On Steam Workshop

Description:

Adds programming with Miniscript, a simplistic programming language.

BEFORE YOU TRY

The user manual has most (if not all) of the info you need to understand miniscript
https://miniscript.org/files/MiniScript-Manual.pdf

Theres a miniscript discord server incase youre having trouble
https://discord.gg/6KPXbh3y

This has some example programs for you to try and get a feel on how it works
https://steamcommunity.com/sharedfiles/filedetails/?id=3421315017

GAME INTRINSICS

Apart from running programs, you can also interact with the game in various ways
Here are all of the game intrinsics that have been added to this mod

List signalIn()

Returns a List of all signals since execution in order of newest to oldest

Void signalOut(Number channel)

Outputs a signal to the given channel (0 to 65535)

Void notify(Value any)

Prints any given input to notification area (aka the bottom-right corner)

Void draw(Number pos, String color = "#FFFFFFFF", Bool show = true)

Sets a pixel specified by "pos" (a value 0 to 65535, starting from pixel in the bottom left corner to top right corner) to a color value specified by "color" (in HTML format, A is optional). "show" specifies whether to update the screen on the next frame or not

Value store(Value any)

Stores a Bool, Number, or String into this module’s memory, this value will be saved between execution instances, meaning you store and access information from a save-loaded module

List touch()

Returns a List with the position of the pixel when a key is pressed, and the keys currently being pressed
For a list of keycodes, refer to unity’s keycode docs[docs.unity3d.com]

List image(Number index)

Returns a 2d Matrix (Lists in a List) corresponding to each pixel color in an image specified to the module as an image file. "index" specifies the image to use
the image Matrix is in [x][y] format, meaning indexer 1 gets the x position and indexer 2 gets the y position

String color(Number r, Number g, Number b, Number a = 255)

More of an utility than game intrinsic
Turns given RGB/RGBA values into HTML string

String input(String print)

Awaits an user input, then returns it as a string. "print" can be left blank or prints a string to screen until user input

CUSTOMIZED INTRINSICS

Intrinsics that have been modified in a way to fit the game

Void print(Value any)

Prints a given input to the module’s print screen

Void wait(Number seconds = 1)

Waits a given amount of time in real time seconds

Void yield()

Waits 0.02 seconds in physics time, or 1 tick from unity’s FixedUpdate()[docs.unity3d.com]

CONTEXT MENU

More info about the context menu actions apart from their written descriptions

Set program

Any text file is allowed, as long as it has miniscript code

Set program data

Can be anything, except null
You can retrieve this value with the "store" function

Add image

Can be any size, there had been some issues with certain files but i think its been fixed. If you encounter any image issues please write a comment

Clear images

Clears images 🤯

Run on spawn / Run on button press

Specifies whether the module can run when its spawned, or executed by pressing the button

Lock program

Locks this program with its current images and code, so you can save it and share it with other people