Changes

Jump to navigation Jump to search
→‎For Content Patcher packs: + Custom floors/walls in today's 1.5.5 build
Line 318: Line 318:  
| The index of the spouse room within the map file, to allow multiple spouse rooms in the same file. Each spouse room is 6 tiles across by 9 tiles down, starting with index 0 in the top-left corner. You can have any number of rows and columns (the index will wrap at the end of the row), as long as they fit an integer number of spouse rooms.
 
| The index of the spouse room within the map file, to allow multiple spouse rooms in the same file. Each spouse room is 6 tiles across by 9 tiles down, starting with index 0 in the top-left corner. You can have any number of rows and columns (the index will wrap at the end of the row), as long as they fit an integer number of spouse rooms.
 
|}
 
|}
 +
 +
===Custom floors/walls===
 +
====In decoratable locations====
 +
You can now change the walls/floors for decoratable locations (like farmhouses, cabins, or sheds) for flooring/painting/wallpaper placement just by editing map/tile properties.
 +
 +
First, you can define distinct areas using two new map properties:
 +
 +
{| class="wikitable"
 +
|-
 +
! valid in
 +
! map property
 +
! usage
 +
|-
 +
| ''decoratable locations''
 +
| <tt>FloorIDs {{o|area}}+</tt><br /><tt>WallIDs {{o|area}}+</tt><br />
 +
| A comma-separated list of the distinct areas which have flooring or walls. The <tt>FloorIDs</tt> and <tt>WallIDs</tt> don't need to match. Each area has the form <code>{{t|area ID}} {{o|default flooring/wallpaper ID}}</code>, where:
 +
* <tt>{{t|area ID}}</tt> uniquely identifies the area or room.
 +
* <tt>{{o|default flooring/wallpaper ID}}</tt> (optional) sets the initial flooring/wallpaper ID if that area hasn't been customized by the player yet. This can be defined in three forms:
 +
** <code>{{t|index}}</code>: get the floor/wallpaper matching that index in the vanilla <tt>Maps/walls_and_floors</tt> tilesheet.
 +
** <code>{{t|tilesheet}}:{{t|index}}</code>: add <tt>Maps/{{t|tilesheet}}</tt> to the map, and match the index in that tilesheet.
 +
** <code>{{t|area ID}}</code>: inherit the default floor/wallpaper from the named area. For example, <tt>Hallway_Bedroom Bedroom</tt> applies the bedroom wallpaper to the hallway between the bedroom and living room when the farmhouse is first upgraded.
 +
** If omitted, the default will be flooring/wallpaper #0.
 +
 +
For example: <pre>FloorIDs: Kitchen 22, LivingRoom Bedroom, Hallway_Bedroom Bedroom, Bedroom
 +
WallIDs: LivingRoom, Hallway_Bedroom Bedroom, Bedroom</pre>
 +
 +
You don't need to add every area to the <tt>FloorIDs</tt>/<tt>WallIDs</tt> list; assigning a flooring/wall to an unlisted value will be handled correctly. You only really need to add an area to <tt>FloorIDs</tt>/<tt>WallIDs</tt> to set the default flooring/wallpaper value, or for cases where the order of the walls/floors is important (for backwards compatibility with code that sets wallpaper/flooring by an integer room index, as is the case with the floors/walls in the vanilla farmhouse).
 +
|}
 +
 +
Then you can add individual tiles to each area with two new tile properties:
 +
 +
{| class="wikitable"
 +
|-
 +
! layer
 +
! property
 +
! effect
 +
|-
 +
| <tt>Back</tt>
 +
| <tt>WallID {{t|area ID}}</tt><br /><tt>FloorID {{t|area ID}}</tt>
 +
| Adds this tile to the given floor/wall area. Each floor tile should have the <tt>FloorID</tt> property, but only the top edge of the wall should have <tt>WallID</tt>.
 +
|}
 +
 +
====In the furniture catalogue====
 +
You can also add new flooring/wallpaper options to the furniture catalogue by adding it to <tt>Data/AdditionalWallpaperFlooring</tt>. Each entry consists of an object with these fields:
 +
 +
{| class="wikitable"
 +
|-
 +
! field
 +
! description
 +
|-
 +
| <tt>ID</tt>
 +
| A unique ID value. This is not shown in-game.
 +
|-
 +
| <tt>Texture</tt>
 +
| The asset name which contains 32x32 (flooring) or 16x48 (wallpaper) sprites.
 +
|-
 +
| <tt>IsFlooring</tt>
 +
| Whether this is a flooring tilesheet; else it's a wallpaper tilesheet.
 +
|-
 +
| <tt>Count</tt>
 +
| The number of flooring or wallpaper sprites in the tilesheet.
 +
|}
 +
 +
For example, this Content Patcher pack would add three new wallpapers to the game:
 +
{{#tag:syntaxhighlight|
 +
{
 +
    "Format": "{{Content Patcher version}}",
 +
    "Changes": [
 +
        // define wallpaper
 +
        {
 +
            "Action": "EditData",
 +
            "Target": "Data/AdditionalWallpaperFlooring",
 +
            "Entries": {
 +
                "Pathoschild.CustomWallpapers": { // for technical reasons, you need to specify the ID here *and* in the "ID" field
 +
                    "ID": "Pathoschild.CustomWallpapers",
 +
                    "Texture": "Mods/Pathoschild.CustomWallpapers/Wallpapers",
 +
                    "IsFlooring": false,
 +
                    "Count": 3
 +
                }
 +
            }
 +
        },
 +
 +
        // load wallpaper tilesheet
 +
        {
 +
            "Action": "Load",
 +
            "Target": "Mods/Pathoschild.CustomWallpapers/Wallpapers",
 +
            "FromFile": "assets/wallpapers.png"
 +
        }
 +
    ]
 +
}|lang=javascript}}
    
===Map property changes===
 
===Map property changes===
translators
8,403

edits

Navigation menu