Rain World

Rain World

Not enough ratings
Guide to Entities in Den
By Some Potsyk
This guide is needed to show how the Entities In Den mod works and how to make your own complementary mods based on it.
   
Award
Favorite
Favorited
Unfavorite
Notes
Preparing tools

ready-made template can be downloaded here[github.com].
Creating a mod template
Open the game folder and find the mods folder
First you will need to go to the mods folder. If you have installed third-party mods on Rain World, you know where to go.

  • Open Steam → library

  • Right-click on the Rain World icon and select management → local files in the context menu

  • Then go to the following path in the game folder: Rain World\RainWorld_Data\StreamingAssets\mods


Creating a mod folder
This will be the folder in which all the content we create will be stored. The name of this folder has no effect.
  • Create a folder and give it any name
  • open this folder



Creating modinfo
In order for Rain World to see this folder and understand that this is a mod, we need to create modinfo.json inside it.
  • Create a text document
  • Change the file name and extension to modinfo.json
  • Open it and write the following:
    { "id": "modname", "name": "Mod Name", "version": "1.0.0", "authors": "Your Name", "description": "Add additional features for Entities In Den", "requirements": ["entitiesinden"], "requirements_names": ["Entities In Den"], "tags": [], "checksum_override_version": false }



Description of Variables
variable name
property
id
this is your mod id, try not to use spaces
name
name of your mod
version
this is the version of the mod, when you release a new version of your mod, the version remains the same, so you have to change the version manually each time
hide_version
if true, hides the mod version in the remix menu
authors
author's name
description
description of the mod
requirements
id of other mods that will be needed for this mod to work correctly. Steam will automatically warn you that dependencies will need to be installed for this mod to work. If you need to specify more mods, just list them separated by commas: ["entitiesinden","editedsleepscreens"]
requirements_names
The name of the mods that will be needed for this mod to work correctly
tags
tags that will be assigned to your mod. You can specify multiple tags

Creating a Thumbnail
To add a preview mod, just upload any image with a .png extension and call it thumbnail. Regular thumbnail size: 676x380

Adding new entities and editing existing ones
Preparing folders
In the folder we created, we must create two directories entitiesinden and illustrations/entitiesinden. The first will store json files with illustration settings, and the second will store sprites.
  • create a folder entitiesinden
  • create a folder illustrations
  • inside the illustrations folder create a folder entitiesinden


Adding custom sprites
To do this, drop any png into a folder in the directory we created: illustrations/entitiesinden


Adding new entities
To add an entity, you need to know its in-game name, which can be quite problematic. But you can use debugging from Entites In Den. To do this, you need to go to the remix menu and in the mod settings click on the "debug" checkbox. If this debugging is enabled, then after each hibernation it will create a txt file in the root folder of the game, which will store information about the entities located in the current shelter.


Editing the position of layers and other variables
  • In the created entitiesinden folder, create a text folder and give it the name of the entity we are interested in; if this is not an object, then we also need to add “- dead” if we want to display a corpse and “- alive” if we need to display an animal in a living state. Then we replace the .txt extension with .json

  • Open the file we created.

  • We edit for ourselves

Explanation of variables
variable name
variable type
property
spr
string
sprite name (no need to specify extension). Takes a sprite from the illustrations/entitiesinden folder with the name you specified in the variable. You can specify several.
pos
vector(x y)
horizontal and vertical position of the sprite. With zero values, it is completely displayed in the lower left corner of the screen. You can specify several.
index
integer
is responsible for the order of layers. If set to 0, it will be displayed on top of the slugcat sprite. You can specify several.
depth
float
depth. How much the sprite will deviate when moving the mouse. If set to 0, the deflection level will be the same as the slugcat sprite. You can specify several.
shader
string
shader that will be applied to the sprite. With the value "Basic" the base shader will be applied, with the value "Normal" the depth shader will be applied, BUT the sprite must have a ready-made depth map at the bottom of the sprite. You can specify several.
color
boolean
allows or does not allow the sprite to be colored with the entity's color. When true, the sprite is painted the color of the entity (not applicable to all entities). You can specify several.
layer
integer
adjusts the display of sprites with the same index. Sprites with a high value will be displayed on top of objects with the same index.
seg
integer
indicates how many sprites should be displayed. You can specify several.
opIcon
lstring
is responsible for displaying the icon in the settings menu of the Entities In Den mod. The name of the icon may not be obvious, so use a txt file with the names of all the icons in the pinned template.
opId
string
is responsible for the name of the checkbox variable in the settings menu of the Entities In Den mod.Use only lowercase letters of the Latin alphabet without spaces or other characters. If you do not adhere to this rule, it will crash the Entities In Den settings menu, and the name should not be repeated in other json files. It is best to use the entity name without spaces with a lowercase letter, and the prefix "-alive" or "-dead" also without spaces and without a dash.
opName
string
responsible for the name of the entity in the settings menu of the Entities In Den mod.
opColor
vector(r, g, b, a)
responsible for the color of the icon in the settings menu of the Entities In Den mod.
yel whi red gou art,riv spe sai wat
vector(x, y)
horizontal and vertical sprite position for a specific slugcat. With zero values, it is completely displayed in the lower left corner of the screen. You can specify several (use these variables when you need to slightly adjust the positions for certain slugcats without creating separate json files).

Example
To make it at least a little clear, I’ll show you with an example.
I want to add a rifle, for this I look for the in-game name through the enabled debug. It's called "jokeRifle". Now I go to the entitiesinden folder and create a txt file, name this file jokeRifle and change the extension to .json. Then I open the file and make the following entry there:

{ "layer":100, "opIcon":"Symbol_JokeRifle", "opId":"jokerifle", "opName":"Joke Rifle", "opColor":{"r":1,"g":0,"b":0,"a":0.65}, "seg":[2,1], "index":[-1,0,-2], "spr":["GUN","ammo","Heavy weapons guy"], "pos":[ {"x":670,"y":170}, {"x":720,"y":150}, {"x":800,"y":-50} ], "depth":[0,0,-1], "shader":["Basic","Basic","Basic"] }
In the seg I indicated that the rifle illustrations will be displayed in spirit modes, when there is one and when there are two rifles in the den. The first element is equal to 2, this means that when there is only one rifle, two sprites should be displayed (GUN, ammo) and the corresponding settings should be applied to them. The second element contains 1, which means that when there are two such objects, one sprite should be displayed. (If there are more similar entities than indicated in the seg, the game will simply display all sprites.)



Result




Setting up the display of entities for specific slugcats
For example I will use
The Slopeyed (SaltCat) mod made by Saltfornow.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3497823362


If changing positions via eyl, whi, red, gou, art, riv, spe, sai, wat is not enough or you need to edit the positions of sprites for custom slugcats, then you can create new json files that will automatically replace when the sleep screen of a certain slugcat is launched. For this to work, you just need to repeat the path to the folder with the sprites of the sleeping screen of the slugcat you need and create a folder entitiesinden there and upload the edited json files. (If you are a developer of a special slugcat, then you just need to create a folder entitiesinden in the folder where the sprites of the sleeping slugcat are stored).



Slugcat Index
All sprites in Entities In Den are placed relative to the slugcat sprite, for this reason it is very important for this mod to know the index of the slugcat sprite. Usually it is detected automatically, but for some custom slugcats it may not detect it correctly, in which case it must be specified manually. To do this, in the created folder you just need to create a text document and name it slugcatIndex