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>Pathoschild
integrate & update content copied from migration pages
Line 8: Line 8:
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 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:
{{#tag:syntaxhighlight|<nowiki>
{
{
     "Format": "{{Content Patcher version}}",
     "Format": "</nowiki>{{Content Patcher version}}<nowiki>",
     "Changes": [
     "Changes": [
         // define wallpaper
         // define wallpaper
Line 39: Line 40:
             "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 52:
         {
         {
             "Action": "Load",
             "Action": "Load",
             "Target": "Mods/ExampleAuthor.CustomWallpapers/Wallpapers",
             "Target": "Mods/{{ModId}}/Wallpapers",
             "FromFile": "assets/wallpapers.png"
             "FromFile": "assets/wallpapers.png"
         }
         }
     ]
     ]
}|lang=javascript}}
}</nowiki>|lang=javascript}}
 
==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]]

Revision as of 01:00, 16 December 2024

← 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.

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