Modding Help Removing bushes from edited map

Discussion in 'Mods' started by tnw, Jan 14, 2020.

  1. tnw

    tnw Space Hobo

    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.

    tiled house.PNG

    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:

    game trees.PNG

    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:

    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:

    game no trees.PNG

    Any ideas how I can go about removing those bushes from the island?
    • Melindee

      Melindee Zero Gravity Genie

      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.
      • Wingyl

        Wingyl Void-Bound Voyager

        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.
        • Allayna

          Allayna Pangalactic Porcupine

          Entorarax still have "world_bushreset" as far as I know
          • tnw

            tnw Space Hobo

            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:

            forestLocation.largeTerrainFeatures.Filter(a => !(a is Bush && a.tilePosition.X == i && a.tilePosition.Y == j));
            no bushes.PNG
            • Melindee

              Melindee Zero Gravity Genie

              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.

              Share This Page