RELEASED [SMAPI 0.39+] DailyFriendshipIncreaser

Discussion in 'Gameplay Mechanics' started by nays4, Mar 23, 2016.

  1. Nurio

    Nurio Cosmic Narwhal

    There's no point beyond wanting to have Friendship grow passively over time, even if you don't do anything, simply for being a neighbor
     
    • Mucchan

      Mucchan Tentacle Wrangler

      Here's my understanding of the mod after running it through a decompiler:
      - The decay parameter is basically a flag to enable or disable the mod. If you set it to true then the mod will not not do anything with the values you have set in the other 2 parameters. I don't think the parameter should be called decay since the decay effect will be on regardless
      - The day change event seems to trigger at the start of the day instead of the end of the day from what I've seen which renders the talkIncrease useless since the talk flag for each NPC is still false at the start of the day
      - If you want to counter the daily decay, then you have to put

      {
      "decay": false,
      "baseIncrease": 2,
      "talkIncrease": 0
      }
       
      • Anderson Yagami

        Anderson Yagami Void-Bound Voyager

        so , this mod is working properly? because i see many comments about decreasing friendship even with no decay activated...
         
        • Nurio

          Nurio Cosmic Narwhal

          What... So this doesn't even work for what I want? (The relationship increasing (more) by talking to them every day) Dang, that's bad. Is a fix for this easy, do you think?
           
          • Spazbane

            Spazbane Void-Bound Voyager

            I tried that but that simply gives +2 to everyone... It seems that "baseIncrease" applies to everyone regaardless of whether you speak to them, while talkIncrease does nothing...?
             
            • Tyrindor

              Tyrindor Space Kumquat

              I tested with social menu, which gives exact rep numbers.

              - false, 0, 0 results in the same as default game. So the first setting is broken, there is decay no matter what.
              - false, 2, 0 results in no decay however you'll get 22 points (2 more than default game) for anyone you talked to that day.

              Basically, if you don't want it to be "cheaty", then don't install the mod because it's not possible to remove decay and leave all other default mechanics untouched.

              However, 2 extra points for talking to someone the first time every day is only a 10% increase for talking. For reference, 10 hearts is 2500 points and a loved birthday gift is 750 points. If you talked to someone every day, that extra 2 points would take 125 game days to get ONE heart. Probably not noticeable.
               
                Last edited: Apr 4, 2016
                Anderson Yagami likes this.
              • Anderson Yagami

                Anderson Yagami Void-Bound Voyager

                Okay , thanks for the explanations , very clear ! :up:
                 
                • Yunix

                  Yunix Big Damn Hero

                  Thats so strange that so many have problems with it. For me it works perfect on "false, 0, 0". I have no points loss at all.
                   
                  • Jigain

                    Jigain Phantasmal Quasar

                    Correct me if I'm wrong, but if that's the case, wouldn't [false, 2, -2] then be as close to "true no decay" as possible? Or does the mod not accept a negative integer?
                     
                    • Tyrindor

                      Tyrindor Space Kumquat

                      Never tested, assumed it wouldn't work
                       
                      • Jigain

                        Jigain Phantasmal Quasar

                        I don't have the mod myself (yet; it may change in the coming days), but from what I remember of programming from well over a decade ago, nearly all general programming languages accept a negative integer for addition, so in theory it should work. Unless it's been scripted specifically not to allow a negative integer.
                         
                        • Mucchan

                          Mucchan Tentacle Wrangler

                          From what I can see the mod is using the DayOfMonthChanged event and it's triggered at the start of the day instead of the end of the day which renders the talkIncrease moot since the flag which indicates whether you've talked to a NPC is always false at the time the mod is triggered.

                          Looking at the SMAPI source code, there's another event called OnNewDay which seems to be a more appropriate event to use for this mod instead of DayOfMonthChanged based on the comment on the SMAPI source code.
                           
                            Jigain likes this.
                          • Nurio

                            Nurio Cosmic Narwhal

                            Is the OP still alive? If not, perhaps someone else could make this (seemingly) relatively easy fix?
                             
                            • Jigain

                              Jigain Phantasmal Quasar

                              All right, thank you for clearing that up for me.
                              Seeing as how the author hasn't been on the forums for nearly two weeks, I don't think anyone will complain if someone else makes a quick patch for the mod. I'd do it myself, but... like I mentioned I haven't coded for a decade, and quite frankly I don't have the time to get back into it.
                               
                              • Mucchan

                                Mucchan Tentacle Wrangler

                                I could probably do it since I'm already using a modified version of this mod anyway.
                                 
                                  Nurio likes this.
                                • Nurio

                                  Nurio Cosmic Narwhal

                                  Please do!
                                   
                                  • Mucchan

                                    Mucchan Tentacle Wrangler

                                    Alright, here's my modified version of the mod. I've modified the structure of the config.json file and the default one that is initially generated now looks like this:

                                    {
                                    "enabled": true,
                                    "individualConfigs": [
                                    {
                                    "name": "Default",
                                    "baseIncrease": 2,
                                    "talkIncrease": 0,
                                    "max": 2500
                                    }
                                    ]
                                    }

                                    enabled is used to enable or disable the mod. If this is false, then the normal decay mechanism takes effect regardless of all your other configuration.
                                    individualConfigs contains a collection of different configuration values for different characters. Any character not defined will use values from the collection which has the name set as "Default" as shown above. This means you must at least have the default collection specified as per the example above.
                                    name is the name of the NPC (case sensitive).
                                    baseIncrease is the amount of friendship points that will be added at the end of the day if you haven' talked to that NPC that day.
                                    talkIncrease is the amount of friendship points that will be added at the end of the day if you talked to that NPC that day.
                                    max is the maximum value of friendship points that can be accumulated for that particular NPC i.e. the cap.

                                    I can't quite test the effect of this mod if you're married since I don't have a save with a married character. Setting the max parameter to 2500 for everyone might cap your spouse to 10 hearts, in which case you might have to specify something like this as your config:

                                    {
                                    "enabled": true,
                                    "individualConfigs": [
                                    {
                                    "name": "Abigail",
                                    "baseIncrease": 2,
                                    "talkIncrease": 0,
                                    "max": 3300
                                    },
                                    {
                                    "name": "Default",
                                    "baseIncrease": 2,
                                    "talkIncrease": 0,
                                    "max": 2500
                                    }
                                    ]
                                    }

                                    I hope the instructions are clear enough. Please let me know if any problem arises.

                                    EDIT: The indentation of the sample config doesn't show up so I'm attaching the sample JSON file along with this post.
                                     

                                      Attached Files:

                                      Last edited: Apr 7, 2016
                                      Gyre, just-sora, bugmenever and 5 others like this.
                                    • Nekodamashi

                                      Nekodamashi Void-Bound Voyager

                                      Thank you very much for sharing this Mucchan :3
                                       
                                      • Nurio

                                        Nurio Cosmic Narwhal

                                        Quick question... You say talkIncrease is the amount of friendship points that will be added at the end of a day if you've talked to that NPC. But is that on top of the 20 that gets added by the vanilla game or is it instead of the 20?
                                         
                                        • Mucchan

                                          Mucchan Tentacle Wrangler

                                          It is on top of the 20 which is added by the game. The game adds the 20 immediately after you talk to the NPC.
                                           
                                            Nurio likes this.

                                          Share This Page