-
-
Notifications
You must be signed in to change notification settings - Fork 1
Placeholders
The mod uses Scriban for placeholders. This library allows for simple and if you want complex placeholders, for example displaying a piece of text depending on whether u have more than 60 FPS or less.
It's better to show it off on an example:
{{ player.avatar?.title | utils.clean_string }}
Now this is more of a complex one, but here's how it works:
- The text is enclosed in {{ }}. This indicates to the parser that everything inside should be replaced.
- We want for it to display the avatar title, to do that we wrote:
player.avatar?.title. This accesses the Crate of the Avatar and gets it's title. The question mark indicates that the avatar might benull(non-existent). - Some avatars use Unity Rich Text, therefore we need to get rid of it as Discord cannot display it. To do that we use a utility provided by the mod:
utils.clean_string. This basically just removes all of the rich text
This should display the name of the avatar currently being used. This explanation might not be the best so I recommend looking at Scriban's documentation instead
By default, the mod provides a few properties, while also allowing for easier addition of new ones by other mods
This is accessible under the name player.
This property provides the avatar that the player is currently using. This value might be null
This property provides the spawnable that the player is holding in their left hand. This value might be null
This property provides the spawnable that the player is holding in their right hand. This value might be null
This property provides the current amount of health that the player has. Example: 93.75
This property provides the maximum amount of health that the player can have.
This property provides the percentage of health that the player has. (This DOES NOT add the percent symbol, it simply provides the numer).
This is accessible under the name ammo.
Parameters
- [type: string] type - the type of ammo
This method gets the amount of ammo that the player has of the provided type
This property provides the amount of light ammo that the player has
This property provides the amount of medium ammo that the player has
This property provides the amount of heavy ammo that the player has
This is accessible under the name game.
This property provides the level that the player is currently in. This value might be null
This property provides the name of the level that the player is currently in. This property respects the RemoveLevelNumbers setting. It is recommended to use this instead of level.title
This property provides the version of MelonLoader being used as a string
This property provides the current amount of frames per second
This property provides the name of the Operating System being used
This property provides the amount of Mod.io mods installed
This property provides the amount of Code mods (MelonLoader mods) installed
This is accessible under the name utils.
Parameters
- [type: string] barcode - the barcode of the pallet you want to get
This method returns the pallet with the provided barcode. Might be null
Parameters
- [type: string] str - the text you want to clean
This method returns a cleaned version of the provided text. By cleaned that means without any Unity Rich Text
This is accessible under the name fusion and is only available when LabFusion is installed. Please note that each property will return null if not connected to a lobby.
This property provides the username that you are using
This property provides the display name that you are using
This property provides the name of the lobby you are currently in
This property provides the ID of the lobby you are currently in
This property provides the name of the host of the lobby you are currently in
This property provides the level of permissions that you have. Possible values: GUEST, DEFAULT, OPERATOR, OWNER
This property provides the amount of players in the lobby you are in
This property provides the max amount of players that can be in the lobby you are in
This property provides the name of the Network Layer you are using. For example: Steam
This property provides the visibility of the lobby you are in. Possible values: Unknown, Public, Private, Friends Only, Locked
Crates hold the actual spawnable/avatar.
This property provides what kind of Crate is it. Available values: Spawnable, Avatar, Level, VFX
This is a unique identifier for the Crate, no other Crate can have the same one
This is the title of the Crate. This is intended to be shown in for example the Spawn Gun
This is the description of the Crate. This is intended to be shown in for example the Spawn Gun
Whether or not the Crate should be accessible to the player.
Whether or not the Crate can be unlocked by the player. (using the Gacha Machine)
This is a list of tags (strings/text). Tags are usually intended to mark their core functionality. For example NPCs usually have the tag NPC.
This is a list of Bone Tags. BoneTags provide references to things like the Player.
This is the Pallet that contains the crate.
Pallets contain the information about the mod, they also hold all of the crates
This is a unique identifier for the Pallet, no other Pallet can have the same one
This is the title of the Pallet. This is intended to be shown in for example the Spawn Gun
This is the description of the Pallet. This is intended to be shown in for example the Spawn Gun
This property has the author of the Pallet. This can be used to filter pallets by author in the Spawn Gun
Whether or not the Pallet should be accessible to the player.
Whether or not the Pallet can be unlocked by the player.
This is a list of tags (strings/text). Tags are usually intended to mark their core functionality. For example NPCs usually have the tag NPC.
This is the version of the Pallet.
This is the version of the MarrowSDK.
This is a list of Crates that the Pallet contains.
This is a list of ChangeLogs. The array contains a ChangeLog for each version, if provided by the mod creator.
This is a list of DataCards. DataCards contain music and ambience tracks and/or BoneTags (BoneTag = DataCard)
This is a list of dependencies.
A ChangeLog provides details about what was changed in a provided version
This is the title of the ChangeLog.
This is the version that the ChangeLog is for
This is the text. It contains the actual list of changes in the version, if provided by the mod creator
DataCard and BoneTag are basically the same. DataCards contain music and ambience tracks and/or BoneTags
This is a unique identifier for the DataCard, no other DataCard can have the same one
This is the title of the DataCard.
This is the description of the DataCard.
Whether or not the DataCard should be accessible to the player.
Whether or not the DataCard can be unlocked by the player.