Jump to content

Modding:Wallpaper and flooring

From Stardew Valley Wiki
Revision as of 00:56, 16 December 2024 by imported>Pathoschild (create initial page; copy info from Modding:Migrate to Stardew Valley 1.5.5 (main author is Pathoschild with syntax fixes by Margotbean) and Modding:Migrate to Stardew Valley 1.6.9 (only author is Pathoschild))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

← Items

This page explains how the game stores and parses wallpaper and flooring-type item data. For items in general, see Modding:Items.

Overview

Wallpaper and flooring (or floorpaper) are items which can be applied to a decoratable location like a farmhouse or shed to visually change its floor or wall design. These are separate from placeable flooring items like brick floor.

They have their data in Data/AdditionalWallpaperFlooring; their icon sprites in Maps/walls_and_floors, Maps/floors_2, or Maps/wallpapers_2 by default; and their code in StardewValley.Objects.Wallpaper.

From Modding:Migrate to Stardew Valley 1.5.5

You can also add new flooring/wallpaper options to the furniture catalogue by adding it to Data/AdditionalWallpaperFlooring. Each entry consists of an object with these fields:

field description
ID A unique ID value. This is not shown in-game.
Texture The asset name which contains 32x32 pixel (flooring) or 16x48 pixel (wallpaper) sprites. The tilesheet must be 256 pixels wide, but can have any number of flooring/wallpaper rows.
IsFlooring Whether this is a flooring tilesheet; else it's a wallpaper tilesheet.
Count The number of flooring or wallpaper sprites in the tilesheet.

For example, this Content Patcher pack would add three new wallpapers to the game:

{
    "Format": "2.8.0",
    "Changes": [
        // define wallpaper
        {
            "Action": "EditData",
            "Target": "Data/AdditionalWallpaperFlooring",
            "Entries": {
                "ExampleAuthor.CustomWallpapers": { // for technical reasons, you need to specify the ID here *and* in the "ID" field
                    "ID": "ExampleAuthor.CustomWallpapers",
                    "Texture": "Mods/ExampleAuthor.CustomWallpapers/Wallpapers",
                    "IsFlooring": false,
                    "Count": 3
                }
            }
        },

        // load wallpaper tilesheet
        {
            "Action": "Load",
            "Target": "Mods/ExampleAuthor.CustomWallpapers/Wallpapers",
            "FromFile": "assets/wallpapers.png"
        }
    ]
}

From Modding:Migrate to Stardew Valley 1.6.9

Debug command changes

  • 1.6.9 adds some new debug command:
    command description
    logWallAndFloorWarnings Enable debug logs when applying wallpaper and flooring to a farmhouse (or other decoratable location) to help troubleshoot cases where they don't work with a custom map. You'd usually enable this before loading the save.

See also