Modding Help Changing Willy's schedule [help]

Discussion in 'Mods' started by Karmylla, Feb 23, 2017.

  1. Karmylla

    Karmylla Space Kumquat

    Hello everyone!

    I wanted to change Willy's schedule but I can't seem to make him change his original location. Maybe it's hardcoded somewhere?
    Below is the log, for those who would like to help.
    Thank you!

    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>
        rain: "GOTO winter" #!String
        spring_9: "610 Beach 38 36 2 dick_fish/850 FishShop 5 13 2 \"I have a doctor's appointment today, so if you need to buy anything you'd better hurry.\"/1010 Hospital 12 14 0 \"Eh, I got a fish hook stuck in my thumb... the Doctor's gonna cut it out.\"/1330 Hospital 4 6 1 \"Yowch! That hurt, Doc!$s\"/1600 Saloon 17 22 2 \"I need a little warm-me-up to be ready for another cold night on the ocean.$h\"/2320 FishShop 4 13 2" #!String
        winter: "610 Beach 38 36 2 dick_fish/850 FishShop 5 13 2/1700 Saloon 17 22 2 \"I need a little warm-me-up to be ready for another cold night on the ocean.$h\"/2320 FishShop 4 13 2" #!String
        Sat: "610 Forest 91 40 2 dick_fish/1400 Town 59 100 2 dick_fish/1900 Saloon 17 22 2 \"Ah... Nothing's better than kicking back with a cold one after a relaxing day fishing.$h\"/2300 FishShop 5 13 2" #!String
        Fri: "610 Beach 38 36 2 dick_fish/850 FishShop 5 13 2/1700 Saloon 17 22 2 \"Handling salty fish all day makes me real thirsty.\"/2320 FishShop 4 13 2" #!String
        spring: "610 Beach 38 36 2 dick_fish/850 FishShop 5 13 2/1700 Beach 25 36 2 dick_fish/2200 FishShop 4 13 2" #!String
     
    • jpsimonetti

      jpsimonetti Void-Bound Voyager

      There is a lot of weird behavior in schedule formatting that I discovered while making 24-hour shops. This is the line I use for Willy, with all other days saying GOTO Spring

      Code:
      spring: "610 FishShop 5 4 2 \"I am being forced to stand here all day because I can't behave myself and stay where I belong.$h\"/2350 FishShop 5 4 2" #!String
      I didn't have any issue with him. Now, Robin, she was a nightmare and I finally found out how to solve her quirks. The trick was to not assign her anything before 610, and make sure she had at least 2 events in her daily schedule. That got her to the counter in the morning (doors also unlocked at 6am, hence the early time).
      Code:
       spring: "610 ScienceHouse 8 18 2/2100 ScienceHouse 8 18 2" #!String 
      I spent a couple of days troubleshooting this just to get all the shopkeepers to their counters all day. It was really weird how some of these quirks (like Robin's) didn't exist for other people like Clint or Pierre.

      Pierre:
      Code:
          spring: "600 SeedShop 4 17 2" #!String 
      Clint:
      Code:
          spring: "600 Blacksmith 3 13 2" #!String 
      ..... this is the full code for Willy in case you want it for reference. It definitely parks him at his counter from the time you get to him, to the time you pass out. It's dirty on purpose because I didn't want to touch anything to clean it up once it was functioning since these schedules were so insanely flaky.
      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>
          rain: "GOTO spring" #!String
          spring_9: "GOTO spring" #!String
          fall_18: "GOTO spring" #!String
          summer_18: "GOTO spring" #!String
          winter_16: "GOTO spring" #!String
          winter_18: "GOTO spring" #!String
          Tue: "GOTO spring" #!String
          Mon: "GOTO spring" #!String
          Wed: "GOTO spring" #!String
          Thu: "GOTO spring" #!String
          Fri: "GOTO spring" #!String
          Sat: "GOTO spring" #!String
          Sun: "GOTO spring" #!String
          spring: "600 FishShop 5 4 2 \"I am being forced to stand here all day because I can't behave myself and stay where I belong.$h\"/2350 FishShop 5 4 2" #!String
         
      
       
        Androxilogin likes this.
      • Karmylla

        Karmylla Space Kumquat

        @jpsimonetti
        "I am being forced to stand here all day because I can't behave myself and stay where I belong.$h\"
        Ahahahahah, that's just delightful xD

        The thing is, I don't want him JUST at his counter, I want to add more depth to his character!
        What might be an issue as well is the fact that I amplified the Fish Shop map, so the counter location is not the same as in the vanilla map (from 5 4 to 5 13). Might that be the cause?
        I'll try adding a code previous to all others ("610 FishShop 1 5 3), which will force him - hopefully - to be in his bed location. I'll test it and come back here to update you about it!
        Thank you for the help!

        UPDATE1: Blurgh, it didn't work... His spawn has to be hardcoded somewhere...

        UPDATE2: Tried tinkering with the "NPCDispositions.xnb" with no results... Willy is stuck in 5 4 hell...

        UPDATE3: Adding paths on the "FishShop.xnb" map doesn't help out...
         
          Last edited: Feb 26, 2017
        • Karmylla

          Karmylla Space Kumquat

          Bump.
          Sorry guys, the issue persists. What can I do to change Willy's original location???
           
          • Karmylla

            Karmylla Space Kumquat

            Bump.
            Is there nothing I can do?
             
            • MysticTempest

              MysticTempest Spaceman Spiff

              Hey Karmylla,

              I've never done any kind of map schedule editing. But, I do a lot of savefile editing/fixing for people.
              And, one thing to note is that each NPC has a default location saved in the savefile. It's created once, at the very beginning of a new game; and seems to be a hardcoded default.

              That being said; you can always manually edit the savefile after the game creates your new character. Your change persists even across saving; as the game doesn't appear to do any error checking.
              So, I can glitch Willy to forever stay inside Pam's trailer next to her, or keep him in his shop, but stick him in the wall; since it breaks his pathing.
              Or through some further editing, glitch him into being a spouse. He'll then use the generic marriage dialogue, and spouse pathing around your home; acting like a regular spouse.

              So you could probably test out your schedule change mod by manually editing your save.
              But, as for implementing a new default location as part of the mod; you'd likely need SMAPI.
               
                Karmylla likes this.
              • Karmylla

                Karmylla Space Kumquat

                @MysticTempest thank you for replying, I'll probably be forced to make a SMAPI with all the changes I want to make to Willy's schedule Q.Q
                 
                • sallychan

                  sallychan Space Penguin Leader

                  Ah, I'm having the same problem with some mods I'm working on. :(

                  Is there some kind of reference to look at for altering NPC Schedules VIA SMAPI? I've tried looking and can't find anything about that specifically...

                  Best of luck!
                   
                    Karmylla likes this.
                  • Karmylla

                    Karmylla Space Kumquat

                    We're having the same issue @sallychan I just don't know where to start! If I find anything, I'll be sure to tell you!
                     
                      sallychan likes this.
                    • Karmylla

                      Karmylla Space Kumquat

                      I'm going to make a little bump again, after such a long time, because I am almost finished with my mod, I just need to figure out how to change Willy's original position in order to upgrade the FishShop map. I mean, I think that is all I need to do, and that is hard enough already :\

                      But, in case the only solution IS the save file editing - and not any of the other files included in the game - how exactly would I edit that?
                      I've checked the code, and this is what I got from it, what I think is relevant to edit:
                      Code:
                      <GameLocation><characters><NPC><name>Willy</name><isEmoting>false</isEmoting><isCharging>false</isCharging><willDestroyObjectsUnderfoot>true</willDestroyObjectsUnderfoot><isGlowing>false</isGlowing><coloredBorder>false</coloredBorder><flip>false</flip><drawOnTop>false</drawOnTop><faceTowardFarmer>false</faceTowardFarmer><faceAwayFromFarmer>false</faceAwayFromFarmer><ignoreMovementAnimation>false</ignoreMovementAnimation><scale>1</scale><timeBeforeAIMovementAgain>0</timeBeforeAIMovementAgain><glowingTransparency>0</glowingTransparency><glowRate>0</glowRate><Position><X>320</X><Y>256</Y></Position><Speed>2</Speed><IsEmoting>false</IsEmoting><CurrentEmote>20</CurrentEmote><defaultMap>FishShop</defaultMap><loveInterest>null</loveInterest><birthday_Season>summer</birthday_Season><age>0</age><manners>0</manners><socialAnxiety>0</socialAnxiety><optimism>0</optimism><gender>0</gender><id>4</id><homeRegion>2</homeRegion><daysUntilBirthing>-1</daysUntilBirthing><daysAfterLastBirth>-1</daysAfterLastBirth><birthday_Day>24</birthday_Day><moveTowardPlayerThreshold>0</moveTowardPlayerThreshold><isInvisible>false</isInvisible><followSchedule>true</followSchedule><datable>false</datable><datingFarmer>false</datingFarmer><divorcedFromFarmer>false</divorcedFromFarmer><daysMarried>0</daysMarried><DefaultFacingDirection>0</DefaultFacingDirection><DefaultMap>FishShop</DefaultMap><DefaultPosition><X>320</X><Y>256</Y></DefaultPosition><IsWalkingInSquare>false</IsWalkingInSquare><IsWalkingTowardPlayer>false</IsWalkingTowardPlayer></NPC></characters><objects /><largeTerrainFeatures /><terrainFeatures /><debris /><name>FishShop</name><waterColor><R>65</R><G>40</G><B>127</B><A>127</A><PackedValue>2139039809</PackedValue></waterColor><isFarm>false</isFarm><isOutdoors>false</isOutdoors><isStructure>false</isStructure><ignoreDebrisWeather>false</ignoreDebrisWeather><ignoreOutdoorLighting>false</ignoreOutdoorLighting><ignoreLights>false</ignoreLights><treatAsOutdoors>false</treatAsOutdoors><numberOfSpawnedObjectsOnMap>0</numberOfSpawnedObjectsOnMap></GameLocation>
                      The position is shown as <Position><X>320</X><Y>256</Y></Position> which in tIDE would correlate to the original 5 4 position, I think. How would I edit <X> and <Y> to make Willy's position 1 5?
                      And also, is it possible to make a SMAPI mod that would change the NPC's schedules without having to change the save files?

                      Sorry about bothering you guys again with this, but I would really like to get this thing to work...!
                       
                      • Entoarox

                        Entoarox Oxygen Tank

                        Change position: requires savegame editing or SMAPI, I'd recommend the second
                        SMAPI for schedules: Quite possible, and recommended!
                         
                          Karmylla likes this.
                        • Karmylla

                          Karmylla Space Kumquat

                          @Entoarox you just want to give me more work xD
                          Guess I'll really have to do it, uffff
                           
                          • MysticTempest

                            MysticTempest Spaceman Spiff

                            And, just to chime in on the save editing side in case it helps with testing purposes until you get the SMAPI side built out. All you need to do is divide the X,Y coordinates from the save by 64; to find the tIDE simple locations.
                            Or, reverse the process, obviously, and multiply those simple coordinates by 64 to find the positional coordinates used in the save.

                            Oh, but you'd want to edit the "<DefaultPosition><X>320</X><Y>256</Y></DefaultPosition>"
                            That's the one the game uses at the start of the day(and new games) to generate the NPCs location, and the one that persists across saving.
                             

                            Share This Page