Modding Discussion A place to discuss map editing and other related stuff

Discussion in 'Mods' started by QuantumConcious, Apr 1, 2016.

  1. Allayna

    Allayna Phantasmal Quasar

    Hmm.... that would be a question for any placed building you walk into.... Not sure on this.
    I would guess that something in the code registers the door location on a building you place, and sets it as the exit point in the map properties.
     
    • peshdev

      peshdev Void-Bound Voyager

      Is adding a new building a hard problem? The Tractor Mod is the only I've found that adds a new building in the game but it's not one that warps the player.
       
        HopeWasHere likes this.
      • Allayna

        Allayna Phantasmal Quasar

        i know there have been a couple mods that added buildings with an interior, cant think of names, ill try to look em up
         
        • peshdev

          peshdev Void-Bound Voyager

          Not sure if this the right place to go for help, but I'm having trouble with a map I'm editing.

          What I did: I tried modifying the shed from this mod to have a basement like the greenhouse in this mod. I replaced the the Shed.xnb in Content/Maps with my xnb file and the game breaks. When I put the old one back, the game works again. I attached my log and put the error message in the spoiler.

          Does anyone know what I'm doing wrong?

          [21:34:43 TRACE game] loadLocationsTask failed with an exception
          [21:34:43 ERROR game] System.FormatException
          [21:34:43 TRACE game] Input string was not in a correct format.
          [21:34:43 TRACE game] at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
          at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
          at System.Convert.ToInt32(String value)
          at StardewValley.GameLocation.updateWarps() in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\Locations\GameLocation.cs:line 9265
          at StardewValley.GameLocation.loadObjects() in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\Locations\GameLocation.cs:line 9274
          at StardewValley.GameLocation..ctor(String mapPath, String name) in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\Locations\GameLocation.cs:line 597
          at StardewValley.Locations.DecoratableLocation..ctor(String mapPath, String name) in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\Locations\DecoratableLocation.cs:line 142
          at StardewValley.Shed..ctor(String m, String name) in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\Locations\Shed.cs:line 15
          at StardewValley.Buildings.Building.getIndoors(String nameOfIndoorsWithoutUnique) in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\Buildings\Building.cs:line 530
          at StardewValley.Buildings.Building.load() in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\Buildings\Building.cs:line 560
          at StardewValley.SaveGame.loadDataToLocations(List`1 gamelocations) in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\SaveGame.cs:line 1388
          at StardewValley.SaveGame.<>c.<getLoadEnumerator>b__55_3() in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\SaveGame.cs:line 1012
          at System.Threading.Tasks.Task.InnerInvoke()
          at System.Threading.Tasks.Task.Execute()
          [21:34:43 ERROR SMAPI] An error occured in the overridden update loop: System.FormatException: Input string was not in a correct format.
          at StardewValley.SaveGame.<getLoadEnumerator>d__55.MoveNext() in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\SaveGame.cs:line 0
          at StardewModdingAPI.Framework.SGame.Update(GameTime gameTime) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\SGame.cs:line 239
           

            Attached Files:

          • Allayna

            Allayna Phantasmal Quasar

            I can't decipher that error, but could i take a look at the map/s? I'm pretty good with warps
             
            • Allayna

              Allayna Phantasmal Quasar

              Info on the first post needs to be corrected if possible, this property needs to be on the 'back' layer, not building.
               
              • peshdev

                peshdev Void-Bound Voyager

                Thanks! Here's my xnb; the forum wouldn't let me attach it.
                 
                • Allayna

                  Allayna Phantasmal Quasar

                  Well, i found what was causing the crash, as usuall it was just one character out of place... In the map properties, you had 2 spaces in between on the of the numbers
                  like "1 2 Farm 3 4 5 6 Farm 7 8"
                  instead of "1 2 Farm 3 4 5 6 Farm 7 8"
                  extra space between the 4 and 5 broke the whole thing.

                  So, the map will load now, but the warp sends you to somewhere in between the two sections, I double checked the warps myself, not sure what's going wrong...
                  20180728104419_1.jpg
                   

                    Attached Files:

                  • MouseyPounds

                    MouseyPounds Phantasmal Quasar

                    Note for people making Farmhouse mods -- the new 1.3 functionality of being able to refill the Watering Can at the sink is done by an 'Action: kitchen' tile property on the building layer (and only for tile index 172.) It's a little weird because this is the same property used to bring up the cooking menu when right clicking, so the cooking menu can be brought up at the sink too. Code reference is StardewValley.Tools.WateringCan.DoFunction().
                     
                      Moragaine and HopeWasHere like this.
                    • purrowpet

                      purrowpet Orbital Explorer

                      Hi! I'm very new to modding. The only things I've done so far is to create some Content Packs and update some xnb mods to the Content Pack format. Then I decided I wanted to add a new map to the game. I have yet to add/edit or even look at any actual code yet, just edit a map file. Without spoiling exactly what I want my mod to do, it needs to be able to modify the farmhouse to look like this.

                      Attempted Layout.png

                      There is room left on the side for the spouse room. I also recognize that I would likely need to patch the Cellar as well, so the warp tiles don't send you into the middle of the house. The things I don't know (and couldn't find in a couple hours of researching) are:
                      • How does the game spawn in the cellar stairs, and can I modify this? If not, can/will it just spawn in the middle of the room there, or does it look for specific tiles and won't spawn at all unless it finds those tiles?
                      • How will furniture react to this, since I've moved all layers +10 tiles horizontally and vertically, both if you were upgrading from FarmHouse1 to FarmHouse2 and if you were already in FarmHouse2 (with or without cellar) when you load the game?
                      • Are there any obvious things here that I've changed which can't be changed? Nothing is in the same position it was before since the whole map was moved down and right. I figured this was okay because this was done between previous house upgrades.
                      • The map doesn't load and I get a series of about 7 errors (I can post the log a bit later if needed) when I patch in this map for FarmHouse2_marriage even when I recreated the spouse room as exactly as I could (including the NoFurniture tile), so I can't do much testing in-game until I figure out why it's doing this.
                      If I need to add/edit some files in order to change things like where the cellar spawns in or where it tries to put the spouse room, what files are they and where would I find them?

                      EDIT: I did some testing in a new game file, and the map loaded while not married. Of course, it spawned me in a wall, but that's a start. Furniture from the original house upgrade appeared to be in the coordinates that it would have normally been in after the second upgrade (I am assuming there is code somewhere telling furniture how many tiles to move between upgrades, and if I could change this to keep furniture in relatively proper positions, that would be great). The cellar also spawned in the wall of the kitchen, which I expected. This leads me to believe that the crash errors I was getting originally were the game trying to load in the spouse room tiles in occupied spaces, or being unable to find the spouse room tiles to replace because they aren't in the right position. Because of this, I think I just need to know where to find the code which tells the game where to spawn these things in, so I can change it and see if it works. Also, I changed the sleep tile and the tiles it spawned me on were not the bed tiles (which I copied over when I moved them, so nothing should have changed) so how do I get the game to spawn me in the correct position post-upgrade? The first upgrade moves the bed so it must be possible.
                       
                        Last edited: Aug 25, 2018
                      • Kuriiyo

                        Kuriiyo Scruffy Nerf-Herder

                        Edit: Nevermind
                         
                          Last edited: Aug 25, 2018
                        • mominthevalley

                          mominthevalley Void-Bound Voyager

                          It's like there's just something I can't grasp about map editing. It's the directory climbing issue that SMAPI gives. I have my custom tilesheet in the folder with the map, where it was as I created the map but for some reason SMAPI doesn't like that and still loads the default asset (in this case, the Railroad map). Any clue what I might be doing wrong?
                           
                          • purrowpet

                            purrowpet Orbital Explorer

                            I heard that you also need to add the tilesheet to the YAML file of the map, could that be the problem?
                             
                            • mominthevalley

                              mominthevalley Void-Bound Voyager

                              I still didn't really figure out why it was doing that, so I started over from the base map and redid my changes and the map seems to be working. Also, I think adding it to the .yaml applied to the old way of replacing map files. With Content Patcher you aren't using a map file in .xnb form, you're using it in .tbin form, so there's no need for a .yaml file. I think the game is just very picky and you have to be VERY careful when you're making the map that the .png for the tilesheet you are adding is in the same folder with your .tbin WHEN you add it. If you accidentally add it with a copy of that png in a different folder, SMAPI refuses to load it because the tbin is telling it the appropriate tilesheet is elsewhere on your computer. I believe no matter how careful I thought I was to do so, I still somehow messed up so the problem was human error. I just thought I was SO careful. So I threw up my hands and started over.

                              Now the problem I'm having is I'm trying to add a ladder to a cliff area but if I put the ladder in the back layer, my character can't even go up the ladder, but if I put the ladder in the buildings tile it can't go any further than the top of the ladder. I've set the tiles on the tilesheet as passable as well as the tiles on the map and the changes seem to have taken in Tiled, but nothing I do seems to change the actual in-game behavior. I know it can be done, because those ladders are used in other maps, even in another modded version of THIS map and other maps made by other modders.

                              Anyone know what to do?
                               
                              • mominthevalley

                                mominthevalley Void-Bound Voyager

                                never mind, I figured it out. There was apparently something in the buildings layer that even taking an eraser to it wouldn't fix. I used the "S" selection tool in that layer and deleted what was in the areas my character couldn't walk through and when I saved and tried again I could walk all the way up the ladder and walk around where I wanted to go. Maybe it was in the "object" part of the buildings layer. I don't know, but it's fine now.
                                 
                                • mominthevalley

                                  mominthevalley Void-Bound Voyager

                                  Has anyone ever figured out how to move your bed? The first farmhouse's bed position at the bottom of the room has always bothered me. I'm trying to do my own version of a kitchen in the first farmhouse and can't get the bed to work when I move it to another position. The tiledata is set in the object layer but it doesn't pop up the sleep choice menu when I walk over the spot.

                                  EDIT: It seems to work if I copy or (cut)/paste the tiles from the original spot but not if I set the tile properties myself. Quirky.
                                   
                                    Last edited: Sep 1, 2018
                                  • Moragaine

                                    Moragaine Subatomic Cosmonaut

                                    I'm having a problem with Tiled. I'm editting one of the farmhouse maps: resizing and laying down new tiles is working fine, but I cannot get edit tiledata/object properties and get it to stick. I save, close and reopen the map and the new objects are gone. I used the instructions on the wiki and even resorted to copy/pasting; I uninstalled/reinstalled Tiled; nothing works. Any suggestions would be appreciated.
                                     
                                    • BlueSkyes

                                      BlueSkyes Star Wrangler

                                      I think it is because the save button is broken in tIDE, so when you save it, it doesn't save. Instead it tricks the application that you made changes and doesn't need to verify if you saved or not when you close out of it. What I do is when I am finished with my map and want to save, I directly close the program, and a message pops up saying to save and exit. I click yes, and it should work.
                                       
                                      • Moragaine

                                        Moragaine Subatomic Cosmonaut

                                        Probably the simplest way to use an edited map is to load it with Content Patcher. The .tbin itself can be used without worrying about whether or not you can get it to repack.
                                         
                                        • HopeWasHere

                                          HopeWasHere Phantasmal Quasar

                                          I've got a problem with my farm map file. No matter what I try I can't get the mailbox to work. The icon is there, but I can't collect the mail. Would someone mind taking a look at this map and let me know what I'm doing wrong? I've been trying to get around not having a mailbox by using the computer mailbox in the custom farming redux, but it seems a lot of things are getting "lost in the mail"
                                           

                                            Attached Files:

                                          Share This Page