-
Notifications
You must be signed in to change notification settings - Fork 9
Creating a Content Pack
A content pack for Dynamic Reflections (DR) allows mod authors to add reflective surfaces to modded furniture items.
Currently only furniture added via Dynamic Game Assets is supported.
-
Create a parent folder with the content pack's name.
-
Create and fill in
manifest.jsonas a content pack. -
Create a
Masksfolder, add it under the content pack's main folder.a. Place the mask images (PNG) under here.
-
Create a
mirrors.jsonunder the content pack's main folder.
It is highly recommended to utilize the SMAPI command dr_reload while building your Dynamic Reflections content pack. This allows for reloading your content pack while playing Stardew Valley, skipping the need to restart the game for every change you make.
A Dynamic Reflections content pack consists of the following structure:
[DR] Example Pack
├── manifest.json
│
├── Masks
│ ├── table_mirror_mask.png
│ │
│ ├── wall_mirror_mask.png
│ │
│ └── leaning_mirror_mask.png
└── mirrors.json
If this is your first time creating a content pack, it may be useful to read the Stardew Valley Wiki for creating a content pack.
The first step to making your content pack is to create a top level folder with the name of your content pack. For example: [DR] Example Pack.
After that, you'll want to create the manifest.json file under that folder. Detailed instructions can be found on the Stardew Valley Wiki. Additionally, you can check out the example manifest.json as a reference.
For example:
[DR] Example Pack
└── manifest.json
It is important to note that the manifest.json file must contain the following for it to be a content pack by Dynamic Reflections:
"ContentPackFor": {
"UniqueID": "PeacefulEnd.DynamicReflections",
"MinimumVersion": "USE.LATEST.VERSION"
}Note: Replace "MinimumVersion": "USE.LATEST.VERSION" with the latest version number of Dynamic Reflections found here.
To create a reflective surface on modded furniture, Dynamic Reflections makes use of texture masks to determine where to place the surfaces.
These texture masks can be any color, with the transparent part of the texture being used for areas that should not have a reflective surface. For example, from the Fashionable Mirrors pack:

This texture contains three "masks" (white rectangles) that will be used to determine where the mirrors shall be drawn.
The actual furniture texture texture can be seen below.

You will first need to create a Masks folder underneath your main content pack folder.
After creating the Masks folder, you'll want to add each mask image underneath it:
.
└── Masks
├── table_mirror_mask.png
│
├── wall_mirror_mask.png
│
└── leaning_mirror_mask.png
To add a mirror to your content pack, the framework requires a mirrors.json underneath your main content pack folder.
For example:
.
├── Masks
│ ├── table_mirror_mask.png
│ │
│ ├── wall_mirror_mask.png
│ │
│ └── leaning_mirror_mask.png
│
└── mirrors.json
The file mirrors.json determines the appearance and behavior for the reflective surface.
An overview of the required properties for mirrors.json:
| Property | Description | Default | |
|---|---|---|---|
FurnitureId |
Required | The ID of the modded furniture, which must match the required format of ModId/ItemId for Dynamic Game Assets. |
N/A |
MaskTexture |
Required | The file name (found under the Masks folder) of the mask to associated to this furniture. |
N/A |
Mirror |
Required | The mirror properties to use for this reflective surface. See this page for more details. |
N/A |
See the Mirror Properties page for details on the available properties for mirrors.
This is a simple mirrors.json, which adds a partially transparent reflection to the Leaning Mirror from the DGA Fashionable Mirrors pack.
The corresponding leaning_mirror_mask.png, which was given in the MaskTexture property:

The DGA furniture texture:

See the example pack for references on how to create mirrors for modded furniture.
This is a simple mirrors.json, which adds a partially transparent reflection to the Enchanted Mirror from the DGA Fashionable Mirrors pack. Note that the Enchanted Mirror has an animated texture by utilizing Dynamic Game Assets.
Animated textures can be masked by having the mask texture be the same size (width and height) as the actual furniture texture.
{
"FurnitureId": "PeacefulEnd.DGA.FashionableMirrors/Enchanted Mirror",
"MaskTexture": "enchanted_mirror_mask.png",
"Mirror": {
"Dimensions": {
"Width": 16,
"Height": 32
},
"ReflectionOverlay": {
"R": 255,
"G": 255,
"B": 255,
"A": 155
},
"ReflectionOffset": {
"X": 0,
"Y": 4
}
}
}The corresponding enchanted_mirror_mask.png, which was given in the MaskTexture property:

The DGA furniture texture:

Notice that the mask texture mimics the size and flow of the original animated texture.
{ "FurnitureId": "PeacefulEnd.DGA.FashionableMirrors/Leaning Mirror", "MaskTexture": "leaning_mirror_mask.png", "Mirror": { "Dimensions": { "Width": 32, "Height": 48 }, "ReflectionOverlay": { "R": 255, "G": 255, "B": 255, "A": 125 } } }