Modding Discussion Modding Guides and General Modding Discussion--REDUX

Discussion in 'Mods' started by cantorsdust, Mar 10, 2016.

Thread Status:
Not open for further replies.
  1. BlankSlater

    BlankSlater Space Penguin Leader

    what is ALL?
     
    • Entoarox

      Entoarox Oxygen Tank

      BlankSlater likes this.
    • Celyia

      Celyia Scruffy Nerf-Herder

      I've been reading up about dialogue modding, but I haven't actually found a response to this question yet: is there a way to add a random factor to chats so we can create NPCs that feel a bit more immersive?

      For instance (and I'm using $o as a placeholder for an 'or' command):

      Tue: "This is response A."#$o#"This is response B."

      So on Tuesday, the NPC will randomly either say either response A or B.
       
      • Shay94

        Shay94 Space Hobo

        So hey, I just unlocked the mines and entered it when suddenly, this happened.Any ideas on what caused it and what do I do to fix it?
         

          Attached Files:

        • Entoarox

          Entoarox Oxygen Tank

          Unfortunately not possible atm, we cant (yet) hook into the NPC behaviours on the level required for that.
           
            GameHo likes this.
          • BlankSlater

            BlankSlater Space Penguin Leader

            I want to add new monsters and a new dungeon to the game. How should I go about learning to do this?
             
            • Entoarox

              Entoarox Oxygen Tank

              Creating a custom dungeon might not be possible atm, you see, as far as the game cares, the skull dungeon and the mine are the exact same thing, the skull dungeon is just at lvls 120+
              And since there is no depth limit to the skull dung, you'd have to create a whole new dungeon system from scratch in order to add your own dungeon.
              Nobody has yet made any attempts of modding in that direction, so you would be running blind.

              Monsters will likely be even harder, because of how interlocked the code for Character's is....
               
              • BlankSlater

                BlankSlater Space Penguin Leader

                ouch. what about just a new map? like the secret forest that has slimes in it. only a place full of bats
                 
                • Entoarox

                  Entoarox Oxygen Tank

                  You'd need SMAPI to do it, but yes, it would be possible to do it :)
                   
                  • BlankSlater

                    BlankSlater Space Penguin Leader

                    any guides on how to do it? I haven't the faintest where to start
                     
                    • Celyia

                      Celyia Scruffy Nerf-Herder

                      I had the sneaking suspicion. Hey, thanks for being cool enough to answer all this stuff. It's totally appreciated. :)
                       
                      • Entoarox

                        Entoarox Oxygen Tank

                        I would suggest learning C# if you dont know it already and looking at pre-existing SMAPI mods to get started.
                         
                          BlankSlater likes this.
                        • asehastly

                          asehastly Master Chief

                          so, I'm trying to understand the lighting for maps. does anyone know where I could read some guides for it???
                          Thanks :up:
                           
                            BlankSlater likes this.
                          • BlankSlater

                            BlankSlater Space Penguin Leader

                            any you know of that are commented and not spaghetti code?
                             
                            • Entoarox

                              Entoarox Oxygen Tank

                              I am afraid not, mainly because the only ones I know of in detail are some of the more complex ones :p

                              Might I suggest having a look at the SMAPI events section, it should help you get a hand at what you all can do with SMAPI :)
                               
                              • GBDetective

                                GBDetective Void-Bound Voyager

                                edit: Turns out he uses the funLeave dialogue everyday he needs to path out of the house, so that part works as intended I guess! Other questions still stand:
                                1) What are the key values 11_6 and 25_6 in Sebastian's schedule file referring to?
                                and
                                2) Where can I find the general spouse behavior/schedule? The one they all follow after marriage, not their personal schedule.

                                ---

                                New to modding here. I'm following the XNB Modding guide by Alpha_Omegasis on how to change NPC schedules, but I have a couple questions.

                                My initial goal was simple: Make Sebastian (after marriage) continue his original Saturday schedule hanging out with Sam. All I had to do was duplicate his "Sat:" schedule and change the key value to "marriage_Sat:" instead. And it worked perfectly.

                                This is the original code:

                                Code:
                                xnbData:
                                    target: "w"
                                    compressed: true
                                    hiDef: true
                                    readerData:
                                        -
                                            type: "Microsoft.Xna.Framework.Content.DictionaryReader`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"
                                            version: 0
                                
                                        -
                                            type: "Microsoft.Xna.Framework.Content.StringReader"
                                            version: 0
                                
                                
                                    numSharedResources: 0
                                
                                content:  #!Dictionary<String,String>
                                    11: "1000 SebastianRoom 9 4 3 sebastian_computer/1200 SebastianRoom 6 5 3/1710 ScienceHouse 27 9 0/1800 SebastianRoom 9 4 3 sebastian_computer/2130 SebastianRoom 11 9 1" #!String
                                    15: "GOTO 11" #!String
                                    rain: "1030 Beach 12 39 2 \"The ocean is best enjoyed alone... don't you think?\"/1700 SebastianRoom 11 9 1" #!String
                                    rain2: "1030 SebastianRoom 9 4 3 sebastian_computer/1500 Saloon 43 20 3/2110 SebastianRoom 11 9 1" #!String
                                    marriage_Mon: "830 Mountain 58 35 1 \"Standing at this spot really makes me want a smoke... but I'm determined to quit now.\"/1300 ScienceHouse 6 20 0 \"Mom's face lit up when I walked in. She deserves to be happy.$7\"/1700 BusStop -1 23 3" #!String
                                    marriage_Fri: "830 Beach 12 39 2 \"I'm going to hang out with my old friends tonight. I'll be home later.\"/1500 Saloon 42 21 3 \"My skills haven't declined... Sam's still just as easy to beat.$h\"/2110 BusStop -1 23 3" #!String
                                    fall: "1030 SebastianRoom 9 4 3 sebastian_computer/1200 Mountain 57 33 1/1400 Mountain 64 14 2/1500 Mountain 42 13 1 sebastian_smoking/1600 ScienceHouse 27 9 0/1730 SebastianRoom 9 4 3 sebastian_computer/2130 SebastianRoom 11 9 1" #!String
                                    summer_4: "900 SebastianRoom 10 7 1 \"Dammit... I almost forgot. I have to go see Doctor Harvey today.\"/1000 Hospital 15 16 3 sebastian_cardsLeft/1330 Hospital 4 6 1 \"What are you doing in here? I could've been naked!$a\"/1600 SebastianRoom 11 9 1" #!String
                                    11_6: "GOTO spring" #!String
                                    25_6: "GOTO spring" #!String
                                    Sat: "900 Town 18 95 0/1230 SamHouse 19 18 0 sebastian_keyboard_up/1500 SamHouse 17 14 0/1800 Town 10 94 1 sebastian_smoking/1930 SebastianRoom 11 9 1" #!String
                                    Thu: "1030 SebastianRoom 9 4 3 sebastian_computer/1400 Railroad 32 47 1 sebastian_smoking/1800 Railroad 64 45 3/1930 Railroad 5 45 1/2130 SebastianRoom 11 9 1" #!String
                                    Fri: "1030 SebastianRoom 9 4 3 sebastian_computer/1500 Saloon 42 21 3 \"Should I let Sam win for once? ...nah.$h\"/2110 SebastianRoom 11 9 1" #!String
                                    spring: "1030 SebastianRoom 9 4 3 sebastian_computer/1500 ScienceHouse 27 9 0/1530 SebastianRoom 9 4 3 sebastian_computer/1830 Mountain 58 35 1 sebastian_smoking/2130 SebastianRoom 11 9 1" #!String
                                    default: "GOTO spring" #!String

                                (Also, what are the key values 11_6 and 25_6 referring to?)

                                I added this line for Saturdays when married:
                                Code:
                                marriage_Sat: "1030 Town 18 95 0 \"I'm going to hang out with Sam today. I'll see you later tonight.\"/1230 SamHouse 19 18 0 sebastian_keyboard_up \"You came to hear me play? That's sweet.$7\"/1500 SamHouse 17 14 0/1800 Town 10 94 1/1940 BusStop -1 23 3" #!String
                                And that causes him to follow the same schedule he used to on Saturdays (except he goes to the bus stop map and not his mom's house). As well as:

                                When he's on the Town map in the watching-Sam-play-a-cellphone-game coordinates, if you talk to Sebastian he'll say-
                                [​IMG]


                                And if you talk to him at the keyboard in Sam's house-
                                [​IMG]


                                But in the farm house, after 6:00am but before he leaves at 10:30am, he seems to always use one of his lines in \Content\Characters\Dialogue\MarriageDialogueSebastian.xnb:
                                Code:
                                funLeave_Sebastian: "I'm going to take a walk today. I need some time to myself. I'll see you in the evening." #!String
                                
                                [​IMG]

                                Which sounds weird since he proceeds to hang out with Sam all day. :V

                                But he does it by default when he goes out on Monday and Friday when you're married as well. Monday makes sense. Friday... he spends most of the afternoon and evening with Sam and Abigail too. Oh well, I guess I can live with that.

                                Though, when I try to talk to him after he gets home on Monday, Friday, and Saturday he doesn't always say funReturn_Sebastian:
                                Code:
                                funReturn_Sebastian: "My day was fine, nothing much to tell you about. Why don't you tell me about yours?" #!String
                                I got him to say it Monday night, but the subsequent Friday and Saturday talking to him at night in the house just makes that sound of a dialogue window closing without any actual dialogue. I assume that's a base game bug, since it happened on Friday too?

                                (Also, by default in my game (premarriage) Sebastian would only use his regular standing sprite facing north in front of the keyboard at Sam's house. It seems the original Saturday schedule in \Content\schedules\Sebastian.xnb tries to reference a specific animation "sebastian_keyboard_up" from the \Content\Data\animationDescriptions.xnb but fails to do so. ...Because "sebastian_keyboard_up" doesn't exist. So I just added a line to the animationDescriptions.xnb of what I imagine "sebastian_keyboard_up" was supposed to be defined as:
                                Code:
                                sebastian_keyboard_up: "41/41/41" #!String
                                -Which is basically, use the sprite on the sheet that has him facing north and his elbows are bent like he's playing a keyboard. :V Not a huge fix, but it's there.)

                                Finally, where can I find the general spouse behavior/schedule? I'm specifically looking for the schedule of what days they stay inside the house and what days they stand out on the porch? I want to make sure I don't overwrite something cool in the original.
                                 
                                  Last edited: May 3, 2016
                                  BlankSlater likes this.
                                • bo39

                                  bo39 Void-Bound Voyager

                                  has any one figured out away to make mods using java i only learned java in my high school comp sci courses and my teacher wont help me learn visual studio becasue it was created by Microsoft and i quote "Microsoft is the devil" and help
                                   
                                  • Entoarox

                                    Entoarox Oxygen Tank

                                    I am afraid that all mods have to be written in C# due to the modding API not being setup to do abstraction for other languages.
                                     
                                    • ClxS

                                      ClxS Pangalactic Porcupine

                                      As a programmer working in the industry, I have to say your teacher is doing you a disservice. It's really a shame such silly attitudes are present in those responsible for educating others.
                                      I'd recommend learning C# in your own time. It's not too difficult and there's a lot of support out there for it. Once you start getting more experienced in one language you'll find it's way easier to pick up another one no problem.

                                      Visual Studio Community Edition is free and available here: https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx, it works perfectly fine and it's the version I use from home too. Give it a try. A lot of IDEs borrow their style from VS, and VS borrowed a lot of it's features from other IDEs, so it might be pretty similar to whatever Java IDE you're using.

                                      I don't plan on adding Java support to Farmhand/SMAPI. I'm considering adding support for additional languages like Lua in the future, but that's a long, long way away.
                                       
                                        Last edited: May 8, 2016
                                        bo39 and taintedwheat like this.
                                      • Entoarox

                                        Entoarox Oxygen Tank

                                        LUA would be nice for those of us who arent familiar with compiled languages to work with :)
                                         
                                        Thread Status:
                                        Not open for further replies.

                                        Share This Page