Jump to content

Modding:Wallpaper and flooring: Difference between revisions

From Stardew Valley Wiki
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)
 
imported>Sunbeam135
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 6: Line 6:
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|brick floor]].
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|brick floor]].


They have their data in <samp>Data/AdditionalWallpaperFlooring</samp>; their icon sprites in <samp>Maps/walls_and_floors</samp>, <samp>Maps/floors_2</samp>, or <samp>Maps/wallpapers_2</samp> by default; and their code in <samp>StardewValley.Objects.Wallpaper</samp>.
They have [[Modding:Items#Item types|item types]] <code>(WP)</code> and <code>(FL)</code> respectively (or <code>ItemRegistry.type_wallpaper</code> and <code>ItemRegistry.type_floorpaper</code> in C# code); their data in <samp>Data/AdditionalWallpaperFlooring</samp>; their icon sprites in <samp>Maps/walls_and_floors</samp>, <samp>Maps/floors_2</samp>, or <samp>Maps/wallpapers_2</samp> by default; and their code in <samp>StardewValley.Objects.Wallpaper</samp>.


==From [[Modding:Migrate to Stardew Valley 1.5.5]]==
==Data format==
You can also add new flooring/wallpaper options to the furniture catalogue by adding it to <samp>Data/AdditionalWallpaperFlooring</samp>. Each entry consists of an object with these fields:
The wallpaper and flooring data in <samp>Data/AdditionalWallpaperFlooring</samp> consists of a list of models, where each value is a model with the fields listed below.


{| class="wikitable"
{| class="wikitable"
Line 29: Line 29:
|}
|}


For example, this Content Patcher pack would add three new wallpapers to the game:
==Example==
{{#tag:syntaxhighlight|
For example, this [[Modding:Content Patcher|Content Patcher]] pack would add three new wallpapers to the game:
{
{{Content Patcher example|<nowiki>
    "Format": "{{Content Patcher version}}",
     "Changes": [
     "Changes": [
         // define wallpaper
         // define wallpaper
Line 39: Line 38:
             "Target": "Data/AdditionalWallpaperFlooring",
             "Target": "Data/AdditionalWallpaperFlooring",
             "Entries": {
             "Entries": {
                 "ExampleAuthor.CustomWallpapers": { // for technical reasons, you need to specify the ID here *and* in the "ID" field
                 "{{ModId}}_ExampleWallpapers": { // for technical reasons, you need to specify the ID here *and* in the "ID" field
                     "ID": "ExampleAuthor.CustomWallpapers",
                     "ID": "{{ModId}}_ExampleWallpapers",
                     "Texture": "Mods/ExampleAuthor.CustomWallpapers/Wallpapers",
                     "Texture": "Mods/{{ModId}}/Wallpapers",
                     "IsFlooring": false,
                     "IsFlooring": false,
                     "Count": 3
                     "Count": 3
Line 51: Line 50:
         {
         {
             "Action": "Load",
             "Action": "Load",
             "Target": "Mods/ExampleAuthor.CustomWallpapers/Wallpapers",
             "Target": "Mods/{{ModId}}/Wallpapers",
             "FromFile": "assets/wallpapers.png"
             "FromFile": "assets/wallpapers.png"
         }
         }
     ]
     ]
}|lang=javascript}}
</nowiki>}}
 
==From [[Modding:Migrate to Stardew Valley 1.6.9]]==
===[[Modding:Console commands|Debug command]] changes===
<ul>
<li>1.6.9 adds some new debug command:
{| class="wikitable"
|-
! command
! description
|-
| <samp>logWallAndFloorWarnings</samp>
| 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.
|}
</ul>


==See also==
==See also==
* The <samp>logWallAndFloorWarnings</samp> [[Modding:Console commands|console command]]
* [[Modding:Items]] for item data in general
* [[Modding:Items]] for item data in general


[[Category:Modding]]
[[Category:Modding]]
[[ru:Модификации:Обои и напольные покрытия]]
[[zh:模组:墙纸和地板]]

Latest revision as of 22:19, 12 January 2026

← 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 item types (WP) and (FL) respectively (or ItemRegistry.type_wallpaper and ItemRegistry.type_floorpaper in C# code); 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.

Data format

The wallpaper and flooring data in Data/AdditionalWallpaperFlooring consists of a list of models, where each value is a model with the fields listed below.

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.

Example

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": {
                "{{ModId}}_ExampleWallpapers": { // for technical reasons, you need to specify the ID here *and* in the "ID" field
                    "ID": "{{ModId}}_ExampleWallpapers",
                    "Texture": "Mods/{{ModId}}/Wallpapers",
                    "IsFlooring": false,
                    "Count": 3
                }
            }
        },

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

See also