Beanie Lib
A Library for my niche (But maybe useful) scripts
About this mod Author’s original text
Beanie Libby Libnits
Beanie libnits is a very basic library with a small amount of useful scripts. If for any reason you ever wanted to use them in your own projects, they are listed below along with how to set them up. They can easily be connected to JLL scripts.
NOTE: SCRIPTS ARE NOT SYNCED! Please use a JLL client sync script for them!
My discord is Beaniebe if you have any questions or suggestions, always open to help!
Trigger Counter / Text Counter Explanation
Trigger Counter
The trigger counter script reads how many times it has been triggered, and upon reaching a certain threshold set by the user, invokes a unity event. Using the array, you can set up multiple thresholds per script, so you can count and invoke events based on multiple instances of reaching a number. Normally it counts up by 1, but by using the Trigger Counter (int) you can specify how much to count up by. This can be used in situations such as having 3 different buttons that need to be pressed to open a door, or a scoring system. It also means you can have an interactive display that lights up depending on how many buttons have been pressed. Please note that if the button can be pressed multiple times, it would still count towards opening the door (even if the same one is pressed three times). You can add a whole array of integers in editor, allowing you to invoke different events when different counting numbers are reached.
The Text counter is identical, but it now accepts negative values for counting down, you can set a starting value, and it must be connected to a TMP text box to display its value.
Additionally, there is two events tied to the script that you can invoke. These are TurnOffCounter which disables the object from counting further, and ResetCounter which sets its counting back to zero. Additionally, there is a box for each of these if you want to trigger events when its turned off or reset.
EXAMPLES:
Having a configurable amount of buttons necessary to open a door, and having a light turn on to track the progress each time a button is hit.
Having to use something a configurable amount of times for the actual effect to trigger
Having something require several different criteria to activate
The below image is an example of how to set up the array. For integers 1 and 2, you would fill in what you want it to do (Play a sound, turn on a light, etc) meanwhile the third trigger could do something like activate a door animation. The final integer 3 trigger also activates the TurnOffCounter, which prevents it from counting up further.
Dynamic Tag-Based Texture Swapping Explanation
Dynamic Tag Texture Swapping
This script is relatively simple: Applying it on an object will bring up a list. In this list, for each entry you can set a material and then put in a corresponding LLL Moon tag. When a moon with this tag is present, the texture is automatically swapped to the corresponding material. This allows for interiors to easily swap visuals on a tag basis without having to copy entire rooms or models. Good for avoiding bloat in editor.
EXAMPLES:
Having a room change colors on a certain tag
Having rocks change color to match the biome the moon is in
Here is an example of how in deepcore mines, I use dynamic tags to swap textures. Each material is assigned a tag. The top material takes priority.
Signal Receiver and Signal Sender
Signal Receiver and Signal Sender
The signal sender and receiver are two very similar scripts that act as a whole. They are used to invoke unity events globally so long as the sender and receiver have a matching tag. To set up Signal Sender, give it a word in its Word ID text box. Then, when you want to send the message, activate it by using the Send Signal unity event. For the receiver, make sure its Word ID matches the Sender. When it receives the signal, it will preform whatever events are in its "OnSignalReceived" box. These scripts are sort of like a radio for invoking events. If you use a Signal Sender
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.
Install these first, or the mod will not work: