File information

Last updated

Original upload

Created by

RTGOAT

Uploaded by

RTGOAT

Virus scan

Safe to use

1043 comments

  1. RTGOAT
    RTGOAT
    • member
    • 36 kudos
    Locked
    Sticky
    Longevity v2.1.5:

    -Compatibility release for SDV v1.6.10.
  2. NerfemTudo
    NerfemTudo
    • member
    • 0 kudos
    Hi, the mod works on Android with the exception of the data menu, that once opened with a virtual keyboard you can't close it, it would be nice if the menu closed once you clicked/touched outside of it.
    1. RTGOAT
      RTGOAT
      • member
      • 36 kudos
      Are you unable to use the virtual keyboard to select the same key that was used to open the menu?
      I'm not familiar with the Android version of SDV, and I also don't test or have an Android environment to work with.
    2. NerfemTudo
      NerfemTudo
      • member
      • 0 kudos
      Yeah, you can´t use the virtual keyboard, once you open a new window the virtual keyboard closes
      If there was a close button on the window it could also work
    3. RTGOAT
      RTGOAT
      • member
      • 36 kudos
      I'll see what I can do for next patch to add a button to close the menu.
      Next patch won't be until sometime April most likely.
  3. LordGracous
    LordGracous
    • supporter
    • 0 kudos
    Hi! What profit margin would you recommend for two players using this mod – normal or something lower, like 50% or 25%?
    1. RTGOAT
      RTGOAT
      • member
      • 36 kudos
      Longevity is balanced/designed for the original game pricing (100% margin) and for single player.
      For multiplayer, its really up to you.

      Personally, I don't use SDV's profit margin setting.
      I can get the same outcome with more control by adjusting Longevity's mod configuration values.
  4. bbs3591
    bbs3591
    • member
    • 0 kudos
    Will there be a Chinese translation in the future?
    1. RTGOAT
      RTGOAT
      • member
      • 36 kudos
      Translations are done by anyone in the community able and willing to translate.
      I work with translation requests in Discord.
  5. Hiname
    Hiname
    • member
    • 3 kudos
    Hello!

    Just dropped by to let you know, there is something not right here. When using Alchemistry there seems to be an issue with the Dehydrator, as all their crops and forage put into it come out with no value.
    Had to spend a while to sort out mods to find the culprit.. this one, for some reason. Which feels supremely weird since this one doesn't even seem to touch the Dehydrator?

    Just thought I'd let you know there may some weirdness going on that I cannot explain.
    1. RTGOAT
      RTGOAT
      • member
      • 36 kudos
      Hmm,

      I think I would need some specific examples.
      That mod seems to all a lot of custom items/functionality.

      Longevity only manipulates item prices.
      If these custom items weren't recognized, they would either be skipped or have unexpected price values.

      It shouldn't create null item/object if that is what you're describing.
    2. Hiname
      Hiname
      • member
      • 3 kudos
    3. RTGOAT
      RTGOAT
      • member
      • 36 kudos
      Looks like those images are no longer available.
      I just get rerouted to Imgur's homepage.
    4. Hiname
      Hiname
      • member
      • 3 kudos
      How odd.. imgur being annoying again.
      Well, take two.

      And one.
      And two.
      And three.
    5. RTGOAT
      RTGOAT
      • member
      • 36 kudos
      Do any of the new mushrooms work, or is it all of them?

      When Longevity prices a prefixed artisan good, it needs to pull the base name to retrieve the input item's base price.
      If none of the mushrooms work, I'd have to look into where there is a mod conflict.

      If some of the modded mushrooms work, then there is likely an issue with how they're named vs what Longevity is expecting.
    6. halfrobo
      halfrobo
      • premium
      • 0 kudos
      Hi, sorry to necro a conversation from a couple months back, but I also ran into this  problem and did some resesarch to answer the question about what's affected.

      Alchemistry introduces

      • 12 new crops
      • 15 new mushrooms (which can be foraged or grown)
      • 2 flowers and 3 fruit which can be foraged from bushes
      • 5 other foraged items

      All of the crops and mushrooms, one of the bush fruit, and one of the other foraged items can be dried in the dehydrator, in a recipe that uses 3 of the original item to make a Dried [Item Name] which is supposed to sell for 1.5x  the original price, according to the modder's spreadsheet. This works with only Alchemistry installed.

      However, with Longevity installed, the prices drop to 0 and other effects (health and energy from eating them) are all removed.

      This is also the case with artisan goods made with Alchemistry's new machines, the Tincture Bin and the Mortar and Pestle. They're supposed to become [Item Name] Tincture and [Item Name] Powder with a price change. These also drop to 0 price and no effects.

      Interestingly, this only affects artisan goods that have the original item name in the new name, like Dried [Item Name].
      The Mortar and Pestle machine can be used to turn some of the miscellaneous foraged items into new items called Lye or Bone Dust, and those new items are unaffected. Same is true for the other three or four machines that Alchemistry introduces, since none of the recipes from those machines produce items with the Dried [Item Name] or [Item Name] Tincture format.

      So there might be something going on with the base name and the new name, since only those are affected.
    7. halfrobo
      halfrobo
      • premium
      • 0 kudos
      A little more on this incompatibility, reported by the mod author of Longevity (Morghoula):
      All artisan goods from Alchemistry get their final prices via ingredients being processed through their respective machines - they do not actually have a base price (so for example, if you cheat in a Tincture, it will have a 0g value).

      I have no idea how Longevity works, but my suspicion is that if it bases its price changes by looking at the actual base value of an item, this will cause an issue with prices.

      This is something that the author of Longevity would need to look on their end.

      I guess this probably explains it? The prefixed items from Alchemistry have a base price of 0g and get prices from being processed through the Dehydrator, or the two new Alchemsitry machines (Tincture Bin, Mortar and Pestle). So Longevity is probably trying to adjust a 0g price and then destroys the price set by Longevity's artisan process.
    8. RTGOAT
      RTGOAT
      • member
      • 36 kudos
      @halfrobo
      Thanks for the really solid and detailed write up.

      Morghoula is mostly correct in their assumption on the issue.


      Those results are mostly to be expected as Longevity doesn't know that a "Blueberry Tincture" is a prefixed good.
      It will search the objectinfo data for a "Blueberry Tincture" which shouldn't exist.

      If Longevity is unable to find an item's object data (which should happen with a modded prefixed good), it would ignore pricing the item.
      Since this seems to not be happening, I can look into it.


      Otherwise, I provide definitions for the rules that vanilla machines use so Longevity can appropriately price items like wine or juice.
      Without a definition for tinctures, there is no way for Longevity to know how it should price those items.

      Longevity is compatible with modded items that are variations of existing vanilla items.
      For example, a watermelon would just be a variation of a fruit. It could be made into watermelon wine and behave the same as any other fruit.
    9. RTGOAT
      RTGOAT
      • member
      • 36 kudos
      I'm more active on the Longevity discord if you want more technical details/faster response times:
      Invite link: https://discord.gg/KrEtSxjX82

      I did some quick digging and I think I understand the problem.
      My current recommendation would be to add key words to the price exemptions text box in the Longevity configuration options.

      Adding Tinctures/Powders/ETC should prevent Longevity from making price adjustments.
      I still have a bit more to look into as I'm not entirely familiar on the structure for machines.
    10. lusjanochka
      lusjanochka
      • supporter
      • 5 kudos
      For those interested, I edited Alchemistry's item files in Data/Items/Crafting to add context tags to all the artisan goods Alchemistry adds, and this fixed all issues for me. Experimenal, as i do not know all possible context tags. These were my solution:
      Tincture - "alcohol_item"
      Powder - "medicine_item"
      Elixier - "potion_item"
      Dried items - "dried_flower_item"

      Edit: took me less than 10 minutes including researching context tags. 
    11. RTGOAT
      RTGOAT
      • member
      • 36 kudos
      Thanks for sharing!
      This is in line with what I was mentioning before.

      I don't know if the author of Alchemistry would include that context, or change the structure of their item definitions.
      If not, at least there is a fairly simple way to overcome it as you provided!
  6. nervmichnicht1
    nervmichnicht1
    • member
    • 0 kudos
    Hi, I love the idea of dynamic pricing, however it does not seem to work properly with Wildflour's Atelier Goods. If Dynamic Pricing is activated the crafted items from this mod sell at a ridiculously low value, often less than the base ingredients required. I really want to leave Dynamic Pricing enabled but that would make all of Wildflour's items rather worthless. Is there a way to fix this or to exclude WAGs items from Dynamic Pricing?
    1. RTGOAT
      RTGOAT
      • member
      • 36 kudos
      Longevity normally would ignore any modded item that isn't specifically defined in the objectdata list.
      (Ex: blueberry is a standalone item; blueberry jelly is a variant of jelly and is not specifically defined)

      But If I recall correctly, Wildflour specifically defines each variant of its own artisan goods.
      Longevity finds and uses the base price set for that definition causing unexpected prices issues.


      You can manually exempt items by putting keywords in the price exemptions text box in the Longevity mod configuration.
      (There should be hoverinfo that specifies how to format it; should be fairly easy to do)

      Let me know if you have issues!
  7. bheathrow
    bheathrow
    • supporter
    • 0 kudos
    Granted I'm using Serfdom with Longevity for crushing tax debt but it is a divide by zero error. Great mod otherwise still chugs along too. Also, only one beehive on the farm.:

    [Longevity] This mod failed in the GameLoop.DayStarted event. Technical details:
    DivideByZeroException: Attempted to divide by zero.
       at Honey.SetHoneyRatio() in C:\Utility\RT-Longevity\!Longevity - Main\Main\Module\Honey.cs:line 90
       at Main.AfterDayStarted(Object sender, EventArgs e) in C:\Utility\RT-Longevity\!Longevity - Main\Main\Main.cs:line 144
       at StardewModdingAPI.Framework.Events.ManagedEvent`1.Raise(TEventArgs args) in /home/pathoschild/git/SMAPI/src/SMAPI/Framework/Events/ManagedEvent.cs:line 101
    1. RTGOAT
      RTGOAT
      • member
      • 36 kudos
      I've seen this error reported a number of times.
      I haven't been able to isolate how it occurs.

      Is this in multiplayer? Is it the host or non-host players that get it?

      As far as I understand, it doesn't seem to have any adverse affect in the cases where its been reported.
    2. bheathrow
      bheathrow
      • supporter
      • 0 kudos
      Just playing single player, so far with just one beehive attached (via automate mod) to a keg and preserves maker. Yeah I haven't noticed anything weird like missing honey, justthe SMAPI error. Great mod though - thanks for the hard work (It feels weird thanking someone for taxes)!
    3. RTGOAT
      RTGOAT
      • member
      • 36 kudos
      Thanks for the report!

      I'll see what I can do to dig deep on what might be causing the issue.
      My biggest worry would be an issue with loading data from the Longevity data file.

      If that were happening, you would notice systems like DR not working, so hopefully thats not the issue.
  8. RydelTheOtter
    RydelTheOtter
    • premium
    • 2 kudos
    Currently it seems the list of machines and tax rates for capital and water taxes are hard-coded. Any chance those could get moved out to a json file so users could put in support for machines from other mods they are using?
    This would allow modded machines to be supported without needing you to implement each mod individually.
    1. RTGOAT
      RTGOAT
      • member
      • 36 kudos
      You are correct.
      Definitely not a bad idea and something that I had considered when reworking Longevity for 2.0.
      (Along with other hard-coded data)

      It was just low priority relative to a list of other requests.

      I'm not actively developing new features for Longevity currently, but its something I might revisit later on.
  9. Inkriel
    Inkriel
    • member
    • 0 kudos
    Hi so after playing with this mod for a few days, I wanted to say it's been really great! I like the added challenge of having to be more mindful of how I spend my money and what crops to grow. The early game can be especially brutal especially on energy and money, which I really like.

    I wanted to ask though, are there any plans to make how often the dynamic price changes configurable? The dynamic pricing is exactly something I've been looking for in my game, but I feel that the price fluctuation happening every day starts to feel like playing the stock market a bit haha. I'd prefer if I could configure it to something like changing every week. In the meantime, I've adjusted the base influences down to 0 and the random influences down a bit to keep it from going too wild while still having it fluctuate for some dynamic, but figured I'd give my input on it and ask if it's something you've thought about.

    I also feel that it could be nice to be able to configure the thresholds of the diminishing return brackets as well. Like how many of something needs to be sold before it starts taking effect. But I think it's overall fine as it is, just another thought I had.

    Either way, I appreciate your work! It's been a great addition to my overall experience.
    1. RTGOAT
      RTGOAT
      • member
      • 36 kudos
      Glad you're enjoying it!

      Random influence, by design, is more often to give a negative value rather than a positive one.
      This is so that on any given season, you have a couple of opportunities to maximize your profits for a crop.
      (To incentivize planning and holding... as well as diversifying crops)

      On average, a specific crop would have 9 positive days and 19 negative days in a season.
      With a longer interval, you would increase the likelihood of not getting a positive day for any specific crop in its season.

      Of course, many players don't enjoy this play-style as much.
      In that case, my recommendation would be to disable random influence.

      All other price impacts are immediate upon their condition (DR, Relational Influence, Skill Influence, etc)



      As for DR, I've considered a configuration to adjust the DR thresholds; its certainly not a bad idea.
      Others have pushed the idea of different DR thresholds based on items types.

      I'm not sure if I would make adjustments to it, or the current customization of it.
      Over the last 8 years, DR has been the least changed and most consistently balanced part of Longevity IMO.


      Thanks for feedback!
      Feel free to ask anything, anytime :)
  10. Gojitagg
    Gojitagg
    • member
    • 1 kudos
    Got this red text while playing in local co-op split-screen:
    [Longevity] This mod failed in the GameLoop.SaveLoaded event. Technical details:
    ArgumentNullException: Value cannot be null. (Parameter 'path1')
    at System.IO.Path.Combine(String path1, String path2)
    at SaveData.Load() in C:\Utility\RT-Longevity\!Longevity - Main\Main\Data\SaveData.cs:line 35
    at StardewModdingAPI.Framework.Events.ManagedEvent`1[[StardewModdingAPI.Events.TimeChangedEventArgs, StardewModdingAPI, Version=4.1.6.0, Culture=neutral, PublicKeyToken=null]].Raise_PatchedBy<SinZ.Profiler>(ManagedEvent`1 this, TimeChangedEventArgs args)
    1. RTGOAT
      RTGOAT
      • member
      • 36 kudos
      SDV has local co-op for PC?

      Interesting :o
      Is this error coming from player 1 or 2? (Or do players share 1 SMAPI console?)

      The 'path1' parameter is defined by SMAPI (its the folder path to the currently loaded save game).
      If its null, the variable isn't being initialized before a call to load Longevity's save data happens.

      I'm not sure how that would happen since the initialization happens right before the call.
      I would need to understand more on how the local co-op works before narrowing down what might cause the issue.


      Are there any noticeable issues happening in-game besides the error?
      Does the error only happen once on load or does it endlessly spam?
    2. Gojitagg
      Gojitagg
      • member
      • 1 kudos
      Yes, it has local co-op for PC for a year or two now. I am not sure, I random alt+tab to check the log for another mod I saw it. Maybe as soon as P2 joining in, the error arise I think?

      - I am not sure, cause when I saw that I was testing out another mod.
      - Only show up once, not spamming.
    3. RTGOAT
      RTGOAT
      • member
      • 36 kudos
      The path is constructed from properties defined by SMAPI.

      If it only occurs once and you've not experienced any issues with Longevity save data (unexpected diminishing returns, or other price balancing);
      Then it can probably be ignored.
    4. Inkriel
      Inkriel
      • member
      • 0 kudos
      Hi, just wanted to add to this because their error is almost the exact same one my partner is getting. But we're not playing "Local Co-Op" as in split screen on one PC. We are playing on the same network, using two different devices, and I invited her via Steam, not via LAN. I'm hosting the farm and not getting this error, only she is. It seems to generate the error each in-game day around when it saves. So it doesn't spam it, but it generates multiple times. And the first time she got the error, it kicked her from the game. I've been trying to recreate her getting kicked, but with no luck. So I'm thinking it might actually be unrelated, but I'm not completely sure. When it kicked her, it spit her back out to the menu saying "The server connection was closed."

      Just wanted to bring it to your attention though, just in case it continues to cause issues for others as well. In case it's important, her error message was like this.[Longevity] This mod failed in the GameLoop.SaveLoaded event. Technical details:
      ArgumentNullException: Value cannot be null. (Parameter 'path1')
         at System.IO.Path.Combine(String path1, String path2)
         at SaveData.Load() in C:\Utility\RT-Longevity\!Longevity - Main\Main\Data\SaveData.cs:line 35
         at StardewModdingAPI.Framework.Events.ManagedEvent`1.Raise(TEventArgs args) in /home/pathoschild/git/SMAPI/src/SMAPI/Framework/Events/ManagedEvent.cs:line 101

      The only variation in hers being the last line, but otherwise the same. Thanks for the mod, though, we're gonna keep playing with it and hopefully it doesn't mess us up too bad haha.
    5. RTGOAT
      RTGOAT
      • member
      • 36 kudos
      Thanks for the extra info!
      It should be unrelated to the one off disconnect.


      The error is related to the Longevity save data which is a text file stored in the current game's save folder.
      I suspect that non-host users may have a different reference to current game's save which is stored by the host.

      This file is used for Taxes and DR mostly.
      I don't test Longevity for Multiplayer so I'm not sure how those systems work from a technical side.


      Since taxes should only be run by the host (to prevent being taxed multiple times), it shouldn't be much of an issue.
      Let me know if you have issues/major discrepancies with item prices/DR.
    6. Inkriel
      Inkriel
      • member
      • 0 kudos
      So should my partner not have Longevity installed/enabled in the first place? Or should she simply untick the Taxes, Subsidized Crops, etc etc boxes in the config menu?

      Thus far, the only issue we've noticed is that when it decides on the subsidized crop type, it'll give her one, and then when she plants the seeds of that crop, the chosen type will disappear from the Longevity menu that shows what the subsidized crop type is supposed to be. It'll be listed as "Current Subsidized Crop Ratio ( ): 0%" wherein it'll just be blank between the parentheses.

      That being said, if she's not meant to have that enabled for herself in the first place, then I imagine she can just turn it off and avoid those issues altogether, since everything seems to work just fine for me.
    7. RTGOAT
      RTGOAT
      • member
      • 36 kudos
      You'll want all players to be running Longevity.

      Taxes should be disabled for all players but the host.
      Subsidized crops are specific to taxes so that could be disabled for non-host players as well.

      I'm not sure what the best configuration would be, and if that would resolve any/all issues.
  11. RydelTheOtter
    RydelTheOtter
    • premium
    • 2 kudos
    I've noticed it's possible to have subsidized crop on separate from taxes. Does this do anything if taxes are disabled? (I'm using the Serfdom tax mod, which integrates with Walk of Life's new professions)
    1. RTGOAT
      RTGOAT
      • member
      • 36 kudos
      Nope.

      It would still calculate if you're subsidized and track the tax reduction.
      But since you're not using Longevity tax, it would have no effect.