Hi everyone, new modder here trying to make sense of things. I'm working on making a custom NPC mod and I'm adding their house to the existing Forest map using Tiled. I've placed the house on the island near the middle (currently using placeholder tiles) and removed all those red icons around the island from the "Paths" tileset hoping it would remove all the trees/bushes/foraging items. It seems to work on a new save, but when I load my old save the house is covered in the objects that were there before I placed my house down like so: I've tried playing around with code to get them removed when the player loads a save based on their tile coordinates. The following code works with removing the trees and foragables, but the bushes aren't removed for some reason: Code: private void OnSaveLoaded(object sender, SaveLoadedEventArgs args) { GameLocation forestLocation = Game1.getLocationFromName("Forest"); for (int i = 48; i <= 55; i++) { for (int j = 73; j <= 78; j++) { forestLocation.removeEverythingFromThisTile(i, j); } } } This is how it looks now: Any ideas how I can go about removing those bushes from the island?
The only thing I can tell you is to install Entoarax Framework or Reset Terrain Features and use that to clear the bushes. This is a common issue with using new mods on old files.
Iirc Entoarax Framework no longer has bushreset, Reset Terrain Features is the one to go for. This is a standard issue with installing map-changing mods on saves that aren't new; bushes are stubborn and you need Reset Terrain Features to fix it.
Thanks everyone for your help! Looking at the "world_bushreset" of Entorarax Framework helped. I'm now able to remove only those bushes in that area (and so maintaining the original bush layout of the user's save) by using the following line: Code: forestLocation.largeTerrainFeatures.Filter(a => !(a is Bush && a.tilePosition.X == i && a.tilePosition.Y == j));
Glad to hear! You may want to make a note when you finally release this mod since people are going to ask about this ALL the time.