Custom Spouse Rooms

Custom Spouse Rooms

1.4k Downloads

This mod serves as a framework to allow spouse room customization.

With it, you can customize where a specific character's spouse room is shown, what walls surround it, and where a spouse will stand inside of it.

It also enables multiple spouse rooms for the Free Love mod. Without any additional data, it will show multiple spouse rooms in a row starting where the vanilla spouse room would show up. You can change the order of the spouse rooms in the config file.


To create custom spouse room data, you will need to create a content pack for this mod.


Content Packs

Example manifest.json:

{<br />  "Name": "Emily's Custom Spouse Room Content Pack",<br /><br />  "Author": "aedenthorn",<br /><br />  "Version": "0.1.0",<br /><br />  "Description": "",<br />  <br />  "UniqueID": "aedenthorn.EmilyRoomCSR",<br /><br />  "MinimumApiVersion": "3.12.0",
<br />  "UpdateKeys": [ "" ],
<br />  "ContentPackFor": {
<br />    "UniqueID": "aedenthorn.CustomSpouseRooms",
<br />    "MinimumVersion": "0.1.0"
  },
  "Dependencies": [<br />  {<br />      "UniqueID": "aedenthorn.CustomSpouseRooms",<br />      <br />      "IsRequired": true<br />  }]
}



Example content.json:

{
<br />    "data": [
<br />        {
<br />            "name": "Emily",
<br />            "upgradeLevel": 1,
<br />            "startPos": {
<br />                "X": 0,
<br />                "Y": 0
<br />            },
<br />            "spousePosOffset": {
<br />                "X": 3,
<br />                "Y": 5
<br />            },
<br />            "shellType": "custom_spouse_room_closed_left",
<br />            "templateName": "Penny"
<br />        }
<br />    ]
<br />}


This example puts Emily's spouse room where the kitchen would be in the level one upgraded farmhouse.

Possible fields:


  • name: the name of the NPC or player spouse
  • upgradeLevel: the farmhouse's upgrade level to apply these settings to (set to -1 to use for all upgrade levels)
  • templateName: the name of the spouse whose spouse room layout you want to use for this spouse (omit to use the spouse's own layout)
  • startPos: the top left corner position of the room's shell on the map
  • shellType: the name of the map file in the game's Maps folder to use for the room's shell (see below)
  • spousePosOffset: the position of the spouse in the spouse room as an offset from startPos
  • islandFarmHouse: if set to true, use this setup for the island farm house rather than the main farm house (doesn't move the spouse).



Template Names

You can input the name of any NPC in Data/SpouseRooms to use their spouse room for the named spouse. Modded NPCs must have their spouse room added via this method.


Shell Types

The mod comes with four shell types, i.e. map overrides that form the walls and floors around the spouse room area:


  • custom_spouse_room_closed_left - for the left side of the map, with a wall on the left side
  • custom_spouse_room_closed_right - for the right side of the map, with a wall on the right side
  • custom_spouse_room_open_left - for the left side of the map, with no wall on either side
  • custom_spouse_room_open_right - for the right side of the map, with no wall on either side


To create your own shell, edit one of the mod's tmx files using Tiled (the size should stay the same for now) and add it to the game's Maps folder using Content Patcher, then use the file's name in the above content.json file.


Custom NPC Spouse Rooms

Custom NPC spouses must use the new Content Patcher method of adding spouse rooms. TMXL loaded spouse rooms will not work. For more information on creating a Content Patcher spouse room, see the documentation here:

https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.5.5#Custom_spouse_rooms


This mod is a work in progress; there are probably bugs but if they are only visual they should be understood as art.


Technical

Requires SMAPI, uses Harmony.

Compatible with Mod Updater for automatic updates.

Code is at https://github.com/aedenthorn/StardewValleyMods.

If you want to complain or ask for help or help me test my mods, you can visit my Discord server.

A list of all my mods for Stardew Valley is available at https://www.curseforge.com/members/erinthe