Question Trying to delete the signposts (interaction, sprite, collision)

Hithae

Newcomer
I'm a new modder. I found a mod on Nexusmods that simply shifted the signpost by the bus stop up one tile, and the author said it was very easy to do yourself, so I wanted to try it myself.

I've unpacked the files, gotten Tiled, and now I'm stuck. I played around a bit in Tiled but was only able to delete the TileData for the signpost (I guess making it non-interactable?), but I'd like to completely erase the signpost if possible, including its collision.

How do I do this? Can I somehow edit a spritesheet to replace the signpost with a clear image (making it transparent; invisible), or delete it altogether? I'm guessing the sprite just sits on top of the sprite for the ground, so deleting the signpost sprite shouldn't affect the terrain underneath it, right? If it would, I was thinking of replacing its sprite with a transparent image somehow.

Then there's the collision. I found some function in Tiled to highlight collision, but I couldn't figure out how to delete it.

Help is greatly appreciated. Maybe this could be the start of making more complex mods. Thank you in advance.
 
Last edited by a moderator:

mouse

Farmer
Editing pngs won't affect collision at all, because those are basically just the textures for the area, while the map handles the layout of all of the tiles. You'd normally only need to edit sprites if you were doing a recolor of some kind, since even adding custom tiles to a map should really be done with a new spritesheet instead of an edit of a vanilla one.

The TileData is on an object layer, while the sign tile is on a tile layer. I really recommend checking out the Maps page on the wiki, especially the section on basic concepts, which explains what the different layers are for. Clicking the visibility on and off for the different layers can help start getting an idea of what kinds of things are on them :) The top of the sign should be on the front layer, and the bottom of it on the Buildings layer. Since it's not overlapping with anything else, you should be able to just use the eraser tool in each spot (on the right layer) to remove the sign.

Collision in Stardew Valley is basically just "if it is on the Buildings layer, you cannot walk through it unless otherwise noted with a special property" hehe.
 

TimeForCrab

Greenhorn
I'm having a similar problem (so I hope you don't mind my asking here). I downloaded the same mod Hithae is referring to, and it works fine but my issue is with editing the map to remove a pesky rock along the lower fence line. I've read through the wiki and Tiled's user manual but I just can't seem to get rid of it. It's on the building layer, I can change the tile to look like grass, but I cannot seem to get rid of the collision. :(
 

Attachments

mouse

Farmer
You shouldn't be changing the tile to look like anything, but erasing it from the buildings layer altogether. Any tile on Buildings, even if it is completely invisible, is still "there" as far as the game is concerned. The grass is already present on the Back layer.
 

Hithae

Newcomer
Editing pngs won't affect collision at all, because those are basically just the textures for the area, while the map handles the layout of all of the tiles. You'd normally only need to edit sprites if you were doing a recolor of some kind, since even adding custom tiles to a map should really be done with a new spritesheet instead of an edit of a vanilla one.

The TileData is on an object layer, while the sign tile is on a tile layer. I really recommend checking out the Maps page on the wiki, especially the section on basic concepts, which explains what the different layers are for. Clicking the visibility on and off for the different layers can help start getting an idea of what kinds of things are on them :) The top of the sign should be on the front layer, and the bottom of it on the Buildings layer. Since it's not overlapping with anything else, you should be able to just use the eraser tool in each spot (on the right layer) to remove the sign.

Collision in Stardew Valley is basically just "if it is on the Buildings layer, you cannot walk through it unless otherwise noted with a special property" hehe.
Thanks for your thorough reply. I'll check it out. Sorry for getting back to you so late; I was expecting an email telling me someone replied, but never got one, so I assumed there were no replies.
 

Hithae

Newcomer
I think I was able to delete the signpost by the bus stop, but I have no idea how to use my edited map in the game. I guess I could use it as a CP mod? But I have no idea how to make a map mod for CP, mainly because I have no idea what to write in the .json files.
 

mouse

Farmer
Content Patcher is thoroughly documented! It does so many things that it can be overwhelming to look at the docs at first, but it includes many examples. Using CP, you don't technically need to open Tiled at all to remove tiles, because you can use EditMap's MapTiles to remove tiles at those coordinates, on that layer.

The example listed there for extending the farm path is nearly everything you'd need for removing a tile. The differences would be
  • targeting Maps/BusStop instead of the farm
  • changing the coordinates to match a tile of the sign post (bottom left of Tiled when hovering over a tile)
  • using Remove instead of SetIndex:

Code:
{
   "Format": "1.22.0",
   "Changes": [
      {
         "Action": "EditMap",
         "Target": "Maps/BusStop",
         "MapTiles": [
            {
               "Position": { "X": 72, "Y": 15 },
               "Layer": "Back",
               "Remove": true
            }
         ]
      },
   ]
}
You could also crop your new map down to those two tiles and merge the map piece in (still using EditMap), or just save the entire map and load the entire thing. I would definitely not do that if you plan on releasing it, or might download any other map replacers, because it would be incompatible with any other mod that replaces that map -- which makes sense for other mods that change up the whole thing, but would be way overkill to just remove the signpost, hehe.

For the manifest.json, those are explained with examples here. (One for CP would be the example on the right, for content packs.) You can copy this from another CP mod and just edit all the fields for your info, instead (along with removing any extra dependencies they might have had).

The simplest way to test your stuff in-game when you're starting out is often to download a mod that does something similar, then edit it to tailor to your liking, so you're not learning absolutely everything at the same time. That makes it harder to share publicly if you should want to do that later, though. SMAPI's JSON validator is extremely helpful, and has specific schemas for manifests and jsons for Content Patcher to make sure they're valid.

Last of all, you could also check out the iTile mod, whose main page description gif shows your exact use case :) I say last because even though it is certainly the more convenient option, once you are able to make basic CP mods, the world is your oyster. It is the absolute most dominant framework and has enabled all kinds of people to change the game how they'd want.
 
Top