Skip to content

Adding Door Textures

Dan Volchek edited this page Apr 18, 2019 · 15 revisions

Better Doors

See the bottom of the page for an example content pack you can download to see how this actually works

Contents

Introduction

In order to add door textures that map modders can use in their maps you need to create a content pack for Better Doors.

If you're familiar with Content Patcher, this is almost exactly like that except the format of the content.json is different.

Making the content pack

  1. Make a generic empty content pack, using cat.betterdoors in the ContentPackFor field. You can edit the example manifest.json below.
  2. Create a content.json and paste the sample content.json below.
  3. Change content.json to do what you want (see the content.json format).
  4. Add a door images matching your content.json (see an example door image).

Sample manifest.json

Your manifest.json should look something like this

{
  "Name": "<Your Project Name>",
  "Author": "<your name>",
  "Version": "1.0.0",
  "Description": "<One or two sentences about the mod.>",
  "UniqueID": "<YourName.YourProjectName>",
  "MinimumApiVersion": "2.10.0",
  "UpdateKeys": [],
  "ContentPackFor": {
    "UniqueID": "cat.betterdoors",
    "MinimumVersion": "1.0.0"
  }
}

Change everything inside the <> (and remove the <> once you've changed it) but leave everything else as is. See https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Manifest for more info.

Sample content.json

Your content.json should look something like this:

{
  "Version": "1.0.0",
  "Doors": {
    "assets/coolDoors.png": [
      "coolDoor",
      "superCoolDoor"
    ],
    "assets/spookyDoors.png": [
      "spookyDoor"
    ],
    // add more of these here if you want/remove them/etc
  }
}

In this example, two doors are loaded from assets/coolDoors.png and one from assets/spookyDoors.png. You would need both of those images for it to work. You can put as many door images as you want in one file or separate them how you want.

content.json format

Leave the version as is and add an entry following the above format for every door you want to add. Here's how the each one works:

  • The key is the path to the image that has the doors.
  • The value is a comma separated list of door names. This is how the map modder will refer to your door. These should go left to right and then top to bottom.

Door images

The doors you draw have to follow the format of the door images in game. Here's what that looks like:

The animation is composed of four frames. Each frame is 3 tiles tall and 1 tile wide. Each tile needs to be 16x16 pixels. So each animation should be 64x48 pixels.

Example Content Pack

https://github.com/danvolchek/StardewMods/files/3091992/ExampleDoorPack.zip

Clone this wiki locally