Skip to content
This repository was archived by the owner on Mar 6, 2023. It is now read-only.

File Formats

SlimeCubed edited this page Mar 8, 2021 · 3 revisions

File Formats

Resources

All mods can load their resources from a different location. By default they read from [Rain World]\Mods\SlugBase\[SlugcatName].

Scene Format

Each custom scene has its own folder in [Resources]\Scenes. Inside of a scene's folder, there must be a file named scene.json that describes how the scene's images are laid out. This file must contain a Scene Object.

Custom scenes with the same name as a vanilla scene (e.g. "SleepScreen") will override that scene when the character is enabled. In addition, the "SelectMenu" scene will appear on the slugcat select menu before starting a game. The "SelectMenuAscended" scene will replace the select scene if the slugcat has ascended. Any scene may be overridden by calling SlugBaseCharacter.OverrideNextScene before the scene is constructed.

Keys preceded by ? are optional. They may be accessed through the GetProperty method. Boolean properties that only have an effect when they are true are also called "tags".

Scene Object

{
    "images": [
		<Image Object: An image that the scene contains>,
		...
	],

	?"idledepths": [
		<number: A depth that the camera can focus on>,
		...
	]

	?"markx": <number: The x position of the mark of communication on the slugcat select screen>,
	?"marky": <number: The y position of the mark of communication on the slugcat select screen>,
	?"glowx": <number: The x position of the neuron glow on the slugcat select screen>,
	?"glowy": <number: The y position of the neuron glow on the slugcat select screen>,
	?"slugcatdepth": <number: The depth of the slugcat on the select screen, used for positioning the mark and glow>,
	?"selectmenux": <number: The x offset of this scene when it is shown on the select menu>,
	?"selectmenuy": <number: The y offset of this scene when it is shown on the select menu>
}

If "idledepths" is unspecified, then the depth of each image in the scene will be used.

Image Object

{
	"name": <string: The name of the asset this image uses>,
	"x": <number: the x position of the bottom left of this image>,
	"y": <number: The y position of the bottom left of this image>,
	"depth": <number: The depth of this image>,

	?"alpha": <number: This image's opacity from 0 to 1>,
	?"crisp": <bool: True to disable antialiasing for this image>,
	?"flatmode": <bool: True if this image should only appear in flat mode, and others should be hidden>,
	?"shader": <string: The name of the shader to use for this image>,

	?"mark": <boolean: True if this image only appears on the select screen when the player has the mark>,
	?"glow": <boolean: True if this image only appears on the select screen when the player has the glow>,

	?"fade": <number: The alpha to fade to when the map is opened on the shelter screen>

	?"alphakeys": [
		<number: The time of this keyframe from 0 to 1>,
		<number: The alpha value of this image at this keyframe>
	]
}

The "name" tag should be the name of an image asset in the same folder as scene.json, including the file extension. Setting a "depth" value of less than zero makes the image flat. Tagging "flatmode" on one image will hide all that do have the tag, if the user is using flatmode. It should be used in conjunction with a "depth" value of less than zero. The "crisp" tag is ignored for images with a "depth" value of less than zero. The "shader" value is first checked against the Menu.MenuDepthIllustration.MenuShader enum. If the image is flat, or no MenuShader exists with that name, then it is checked against all shaders. The "alphakeys" value is used only for slideshows. It is made up of pairs of times and alpha values. The image will linearly interpolate between keyframes.

Slideshow Format

Each custom slideshow has its own file in [Resources]\Slideshows. This file has the same name as the slideshow you want to add, with the extension ".json". This file must contain a Slideshow Object.

The "Intro" slideshow will be played immediately after starting a new game as this character. The "Outro" slideshow will be played instead of the ascension slideshow.

Slideshow Object

{
	"slides": [
		<Slide Object: One or more slides that make up the slideshow>
	],
	?"music": <string: The name of the music track to play during this slideshow>
}

The "music" value must be the name of a file from "Rain World\Assets\Futile\Resources\Music\Songs", without the file extension.

Slide Object

{
	"name": <string: The name of the scene to use for this slide>,
	?"fadein": <number: Fade in duration in seconds>,
	"duration": <number: Seconds between starting fading in and ending fading out>,
	?"fadeout": <number: Fade out duration in seconds>
	?"campath": [
		<number: An x position for the camera to glide to>,
		<number: A y position for the camera to glide to>,
		<number: A depth for the camera to focus on from 0 to 1, or -1 to disable blur>,
		...
	]
}

The "name" value is first checked for in the current custom character's resources. If it is not found, Menu.MenuScene.SceneID is checked. If it is still not found, an empty scene is used. A value of 0.75 will be used for "fadein" and "fadeout" if absent. If "campath" is absent then the camera will stay at the center of the image.

Clone this wiki locally