Tractor Mod

Tractor Mod

130k Downloads

[Content Patcher] Image not correctly edited

Territorys opened this issue · 1 comments

commented

I found, probably, a little bug. The door’s image wasn’t correctly edited.

For better proof I've taken the original image of the three doors and I've colored each opening phase with white, red, blue, and green.

Original image:
doors - original
Edited image:
doors

As you can see from the 3 gif below, all of the 3 doors at the start aren’t completely blank as they should be, but there are residues of the original image.

I have tried with "PatchMode": "Replace" and "PatchMode": "Overlay" but the results don't change.
Down below, I put the list of the mod loaded to make the example above and the content of my 3 json.

Game and Mods versions:

Stardew Valley 1.4.5
SMAPI 3.6.2
Content Patcher 1.17.1
Save Backup 3.6.2
Test Mood for ContentPatcher 0.1.0

My mod files:

  • manifest.json
{
    "Name": "Test Mood for ContentPatcher",
    "Author": "Territory91",
    "Description": "It's a test mod for ContentPatcher",
    "Version": "0.1",
    "MinimumApiVersion": "3.2.0",
    "UniqueID": "territory.modtest",
    "ContentPackFor": {
        "UniqueID": "Pathoschild.ContentPatcher",
        "MinimumVersion": "1.12.0"
    }
}
  • content.json
{
     "Format": "1.17.0",
     "ConfigSchema": {
         "TerrytoryDoorsEnabled": {
             "AllowValues": "true, false",
             "Default": "true"
         }
     },
     "Changes": [{
         "Action": "EditImage",
         "Target": "LooseSprites/Cursors",
         "FromFile": "tilesheetassets/doors.png",
         "PatchMode": "Replace",
         "FromArea": { "X": 0, "Y": 0, "Width": 180, "Height": 47 },
         "ToArea": { "X": 512, "Y": 145, "Width": 180, "Height": 47 },
         "When": { "TerrytoryDoorsEnabled": "true"}
     }]
 }
  • config.json
{ "TerrytoryDoorsEnabled": "true" }

Zip of my example mod.
[CP] TestMood.zip

commented

Hi! The issue is that doors have two parts:

  • The opening sprites in LooseSprites\Cursors, which you edited:

  • And the fully-closed sprites defined by the Doors map property, which in this case is set to these sprites in the Maps/townInterior tilesheet:

A quick test shows that editing both places does work:

image