Modding Guide Feed Back/Help Thread

Discussion in 'Mods' started by zipy199522, Mar 1, 2016.

  1. SgtPineapple1st

    SgtPineapple1st Subatomic Cosmonaut

    That is different... did you use Xnb_node to extract it?
     
    • SgtPineapple1st

      SgtPineapple1st Subatomic Cosmonaut

      SMAPI is actually being replaced by the Storm Api. I've already asked the guys working on it to make store modding possible.
       
      • ninjatulio

        ninjatulio Space Spelunker

        Yeah, I did. Well, I'll just wait for Storm API to get ready and make everything easier. But thanks!
         
        • WishMoe

          WishMoe Void-Bound Voyager

          I keep getting errors after modifying my "tinyFont" and "tinyFontBorder"...

          Additional information: The character 'Ä' (0x00c4) is not available in this SpriteFont. If applicable, adjust the font's start and end CharacterRegions to include this character.

          Do I have to edit all 6 fontfiles?
           
          • zipy199522

            zipy199522 Pangalactic Porcupine

            I'm not sure. I haven't gotten around to editing font files just yet. I'll for sure be doing as much work as possible to overhauling the guide this weekend with more content.
             
            • Axelius

              Axelius Tentacle Wrangler

              Was having the same problem, but eventually found the "correct" tilesheet in Content\Maps rather than Content\Tilesheet
               
                SgtPineapple1st likes this.
              • notjordy

                notjordy Space Hobo

                In the fishing section, you give an example of this: "129": "Anchovy/30/dart/1/16/600 2600/spring fall/both/682 .2/1/.25/.3/0"

                After "both", which is weather, there are 6 more values but 7 categories listed here: "turn_frequency/turnSpeed/turnIntensity/minSpeed/maxSpeed./speed change frequency/bobber difficulty"

                Which of those values, if any, correspond to the bobber difficulty aka the rarity?
                 
                • zipy199522

                  zipy199522 Pangalactic Porcupine

                  Ahh the last value is the rarity of the fish being caught. 0 means it's as common as any other fish, while if that number is higher, it means that you will have a harder time fishing it up.
                   
                  • notjordy

                    notjordy Space Hobo

                    Strange, super cucumbers have a 0 but I've spent an in game week fishing from 6-2am with no luck
                     
                    • zipy199522

                      zipy199522 Pangalactic Porcupine

                      That's pretty odd. I'll look int it more and see maybe if I misunderstood something.
                       
                      • notjordy

                        notjordy Space Hobo

                        Other than that, it does seem like it makes sense for all the other fish (anecdotally). Not sure why the super cucumber is any different
                         
                        • ShinKuroi

                          ShinKuroi Void-Bound Voyager

                          Edit: I'm an idiot. The problem I had, was that it duplicated the wave bank files, thus I had 710 and not 355. It works fine now.
                          You might want to add that to the document.

                          -> Doubleclick on Wave Bank (under Wave Banks), so that the entries appear in the right window.
                          -> Check the entires, 355 is fine. If it's more (most likely 710) the entires are doubled.
                          -> Delete all the entries that have a "2" behind the file name, e.g. 00000000 2
                          ->
                          Check again and make sure the first entry is 00000000 and the last 00000162
                          -> Only then build the project.

                          Check here for the more detailed version.

                          //Everything below can be ignored, just the problem I had.

                          First of all:
                          Thanks for the guide you are working on (and everybody who is contributing towards it).
                          I seem to have a small issue though.

                          I tried myself at sound editing and for the sake of simplicity, I tried to change the menu theme (14f, is it I think).

                          Now first of all, the program to (re-)build the Wave Bank.wxb always wanted to have the extracted .wav files in a "..../Nigg" folder, which seemed a bit odd, but I simply re-named the folder to Nigg and everything was fine.

                          The actual issue I currently have is, that after replacing the Wave Bank.wxb, Stardew Valley does not want to start anymore.
                          If I try to open it via SMAPI, it does show some errors and then terminates the program (doesn't matter if I start it with or without admin rights, if that's even relevant here).
                           
                            Last edited: Mar 16, 2016
                          • jaggededge19

                            jaggededge19 Void-Bound Voyager

                            Hello All

                            I'm new to modding and I have a question for everyone......your help is much appreciated. I have read the guide and have looked through all of the folders and files located in the content folder (I've unpacked everything already), but I can't seem to locate anything related to the commands for blackberries and salmonberries growing in the bushes during the spring and fall seasons respectively. I am trying to add a berry for summer and winter to enhance the foraging aspect of the game......trivial, but something I personally will enjoy. On top of this I would also need some help locating command codes for creating wines and jellies from these new fruits. I've had some success at modding with EU4 and CK2 but those are easy as I only needed to find the commands I wished to duplicate and copy the text line. I know that I will need to create new items (maybe as crops?) and with the guides available I believe that won't be a problem. Thanks in advance to anyone who can offer help and/or advice.
                             
                            • ConditionOfMan

                              ConditionOfMan Intergalactic Tourist

                              Does anyone have insights in to how the machines work? I am looking to be able to add an existing item to the egg processors accepted inputs, define the processing time, and indicate a new item that I created as the output. I've coded and made art for the output item already, just hung up on how to interact with the machine. Any help would be welcome.
                               
                              • zipy199522

                                zipy199522 Pangalactic Porcupine

                                From what I can tell thus far, all of the machines and how they work are hard coded, and can't be edited or added via XNB modding.
                                 
                                • zipy199522

                                  zipy199522 Pangalactic Porcupine

                                  Haven't found out how berries grow myself either. Maybe considering adding in small berry bushes as "crops" that regrow, much like strawberries? There is a section on the guide for how to mod in new crops.
                                   
                                  • ConditionOfMan

                                    ConditionOfMan Intergalactic Tourist

                                    After looking through all the XNBs, I am going to have to agree with that. Nuts.
                                     
                                    • hex0rcist

                                      hex0rcist Space Hobo

                                      Minor correction from browsing the source trying to find more information on this file specifically (and to be even more specific, what each index represents, given that there are a handful of ways information is stored in this file). The index you're referring to as the item type is actually one index further than what you've described here. Index 3 is the item type, and that negative number beside the text is a flag of some sort (ie: for fish, if it has a -4 it "flops" in the code.. but I haven't dug deep enough in to find out what "flopping" does). With that said, index 2 is a number that represents, most likely, more than one thing. From what I've seen, all I can say factually at the present moment is if the number is less than 0 (and most of them are -300) then it does not give a buff if consumed. A later index (depending on what was described earlier - different sets information for different item types) describes the buffs in this order: farming, fishing, mining, digging, luck, foraging, crafting, max stamina, magnetic radius, speed, defense. Interestingly not all the information in the objectInformation file is used at all (at least, according to ILSpy and DotPeek's 'find references' functionality), thus I was unable to fully document this file. However, this is what I'm currently showing in my excel file:

                                      [0] name,
                                      [1] sell price / experience modifier,
                                      [2] consumable flag (<= 0 = no buff),
                                      [3] itemType [FLAG*],
                                      [4] Description,
                                      [5] Extra information (food/drink/requirements for fishing, location + drop rates, etc),
                                      [6] Stat modifiers / buffs to display / pointer to object / setting Dwarf to location,
                                      [7] duration of buffs

                                      The flags I've found thus far are:
                                      -1 Greens
                                      -2 Gems
                                      -3 Vegetables
                                      -4 Flopping fish
                                      -5 Eggs
                                      -6 Milk
                                      -7 Cooking recipe (else it's a crafting recipe)
                                      -18 Animal product other than milk and eggs (wool, duck feather, rabbit's foot)
                                      -75 Vegetables (Note: I know this is repeated.. different itemTypes I'd assume, in fact, there are no -3s in my objects file)
                                      -79 Fruits
                                      -80 Flowers


                                      With that information, some of the other flags might be obvious but again, what I have is from code and not assumption (ie: for -15, you could probably say "blacksmithing stuff"). Also, this information is accurate for everything that is not a ring. Rings are: [0] - name, [1] desc, [2] - price, [3] "Ring"

                                      Edit: I've thrown together a quick and dirty (C#) psuedocode example showing how to differentiate the various formats used. It was a bit long, which is why I didn't post it here. If you're interested in using it (building onto it, etc) feel free: http://pastebin.com/7W43aC6w
                                       
                                        Last edited: May 29, 2016
                                      • hex0rcist

                                        hex0rcist Space Hobo

                                        Submitting another comment because this isn't in reply to SgtPineapple1st, and it's just some general formatting comments regarding the google doc. I'm not using it because I'm digging through the files myself, but I did take a look at it and.. it's a bit difficult to read some of the yaml format explanations. For example, if you look at the mentioned format for fish:

                                        Code:
                                        “Key_Id” : “FishName/chance to dart/darting randomness/darting intensity/darting_duration/start time to find/end time to find/season(s) to find in/weather to find in/turn_frequency/turnSpeed/turnIntensity/minSpeed/maxSpeed./speed change frequency/bobber difficulty
                                        And compare it to a line from the fish yaml...

                                        Code:
                                        147: "Herring/25/dart/8/20/600 2600/spring winter/both/685 .2/1/.45/.1/0" #!String
                                        You might notice that the number of delimited fields doesn't match. The format explanation has 16 tokens. The yaml file has 13. So there are 3 fields in this line from the game that, without quite a bit of guesswork, I wouldn't be able to tell what they are. The issue arises out of the format example using the same delimiter for values which are delimited with a different delimiter in the yaml ('/' vs '/' and ' '). A recommendation might be to use a comma as the delimiter where a space is in the yaml, for example:

                                        Code:
                                        "Key_Id" : "FishName/chance to dart/darting randomness/darting intensity/darting duration/start time, end time/season(s)/weather/turn frequency, turn speed/turn intensity/min speed/max speed/bobber difficulty
                                        This makes the number of fields the same (13 for each), and explains multiple values in the same field. So now, when I look at a fish's 9th field, I know that the next delimited field in the yaml is going to be the turn intensity no matter how many fields are in that 9th field. (Note: I'm guessing on the combination of turn frequency and speed.. I haven't dug into this file so I can't say for sure).

                                        Also, the 685 in the Herring example above looks like the object id for bait.. I'm not sure if that's been looked into, but it might be something to consider.

                                        Edit: After digging into the source for a bit, I'm fairly confident that most of the data in the Fish.xnb file can be ignored. The information found in the Fish.cs file seems to be for a much more robust fishing mechanic than what is currently being utilized (ie: the fish have pi-based rotation). That, along with a few other discrepancies (ie: converting stringarray[2] to an int, when stringarray[2] in the xnb returns a value such as "floater", "dart", etc, and not an integer) caused me to look elsewhere for answers. I turned to Tools\FishingRod.cs and found those answers. FishingRod.cs pointed me to GameLocations.cs, where I found that some of the values in the Fish.xnb are used, but most of them are ignored. The object goes through some sanity checks, then is returned to FishingRod.cs (line 264), to go through some more checks, so on and so forth. Never is a new instance of Fish created.. but a new Object(), with some fish information, is. This is only after a quick glance of code that is starting to hurt my brain (yay decompiling!) .. but it's really looking like it doesn't matter what some of those values are.


                                        Edit: Yeah, I don't recommend using this guide as a factual documentation. Many fields are inaccurate or incomplete. Take for example the Bundle field. This guide says the tokens are:

                                        [0] - Bundle Name
                                        accurate

                                        [1] - String (BO/O/R)
                                        incomplete, and the BO/O/R tells what kind of item it is (BigObject, Object, Ring)

                                        [2] - Rewards list (object id/amount)
                                        inaccurate for [2], accurate for the completion of [1]

                                        [3] - Bundle componenets (Object_ID/amount_needed/componenet filled?)
                                        inaccurate for [3], somewhat accurate for [2], "component filled" is actually the quality required

                                        [4] - Area to bundle to
                                        Not sure what the writer was thinking of with this, but [3] (since we're 1 index off because of [2]), is an unknown number to me.. but it's not an area for the bundle. The key in this keyvaluepair tells where the bundle goes (ie: Pantry) .. and Pantry bundles have 0-6 (missing '5').. and since 6 isn't a location.. well, you get the idea. I'm not sure how the author missed that at all.

                                        [5] - Completely missing.
                                        This would actually be [4], given the reason mentioned above. This value dictates how many items must be placed for the bundle to be complete.

                                        Here's what I have:

                                        Key - Area + indexer
                                        [0] - Bundle name
                                        [1] - Reward (Item type identifier, item id, quantity -- O - Object, BO - BigCraftable, R - Ring )
                                        [2] - Requirement list (ItemID, Quantity, Quality)
                                        [3] - unknown integer 0-6 (can be repeated per area, can be missing one in the continuation)
                                        [4] - Number of items needed to complete bundle (if empty, all are required)


                                        I think the reason I'm noticing a lot of this stuff is because I'm splitting the data in excel (text t columns with '/' as the delimiter), then formatting it as a table. This allows me to filter, sort, etc. I'd recommend everyone do it that way to make life quite a bit easier.
                                         
                                          Last edited: Jun 1, 2016
                                        • zipy199522

                                          zipy199522 Pangalactic Porcupine

                                          Hey there, I've been reading through some of what you've posted here, and I'll say outright that it looks 100% better than some of the garbage that I put up on the "guide" ages ago when this game came out. The stuff you put here is much much cleaner and makes way more sense to me, so fantastic work on that!

                                          I guess since this thread was dug up quite some ways I'll post upon the status of the guide.

                                          It's honnestly been about 2 months since I've even touched/looked at the guide and while the original goal was to have it finished by the end of March, life had a funny way of getting me to be busier than I had anticipated. I also found a large amount of interest in making mods for SMAPI which had a bunch more utility features than content features to build upon, so I was quickly drawn in and has consumed most of my time since.

                                          However, I've reached a point with my modding "career/hobby/whatever" where I've now have published a satisfactory amount of work and that I believe that It's time to work my way backward to publish/polish all of my mods (minus some from like Storm since it died out awhile back) to make sure that the rest of my work is quality. I've had a massive list of requests that I haven't been able to get to and in the process of all of that I forgot my original reason I was doing most of that, and it was all due to the guide. The guide was the original reference used in making atleast a handful of the early Stardew Valley mods and even I toyed around with some of the information once I dug it up, however what I did post on the guide was VERY CRUDE and needed lots of refinement and sources to be checked. I always told myself that I would come back to this one day to polish it up/finish it and I believe that that day is soon.

                                          My goal right now is to publish the remainder of my mods that I've posted here on Nexus so that more people may have access to them, and then I'm going to get started on finishing off the guide once and for all. Wither or not I'll continue to do the live stream will be seen, but for right now the priority is there because it needs to be finished.

                                          Thanks again everyone who used this guide up to this point, and sorry it's taken me so long to finish this. I'll make sure that I'll put in the time to make sure that it is quality by the time I am finished.
                                           
                                            taintedwheat likes this.

                                          Share This Page