Jump to content

Wiseman303's Flora Fix [WIP]


wiseman303

Recommended Posts

I am making this post so discussion of this work in progress mod can move out of the thread for one of my other mods. First some background for any new people finding this thread:

 

I really like the idea behind the Flora Respawn Fix mod. Unfortunately the implementation has some problems.

 

Flora Respawn Fix works by registering the flora item for a timer update when it is harvested, then when the timer is reached a duplicate of the flora (in pristine unharvested state) is added and the original is deleted. There are several problems this causes, which range in severity from minor niggles to savegame bloat and potential crashes.

 

I have made a proof-of-concept for an alternative fix to the flora fix. It works by blocking activation on flora when it's loaded, so the regular harvest behavior is never triggered, then it fakes being harvested by playing a harvest animation and giving the player the appropriate item. There are several advantages to this system:

  • The normal reset behavior is used, so the flora only respawns behind the scenes as the cell loads and not when the player can see it.
  • No registering for events. The flora will be unloaded along with the rest of the cell when the player leaves, freeing up memory for other things.
  • Nothing is deleted. Scripts referring to the original object are safe.
  • No duplicates are created, so much less information is stored in the save game.

 

Unfortunately there is one drawback to this system. Flora that has been harvested before the mod was installed will continue to exhibit the respawn bug. To address this issue I have created a tool that removes all harvested flora references from a save game. Forcing all of them to reset to their default state.

 

Now that I'm done with that long explanation of what the mod is about, below is my current progress:

  • Save fixer tool is functional, although it is still command-line only and has very little error checking in place.
  • Script is finished. Supports perks that change harvest ammount. Objects can be set to be disabled when harvested, since some of their animations just made them invisible anyway. This will replace the coin purse script from my trap fixes mod, as well as add a visibly harvested state to some objects that didn't have one (such as hanging pheasants, rabbits and salmon.)
  • Template animation files created for the 3 kinds of harvestable meshes I've found. Tutorial for making compatibility patches using the templates is planned.
  • Harvest animations have been made for all meshes that need them in base game and official DLCs.
Edited by wiseman303
Link to comment
Share on other sites

@lofgren, Ah, I had forgotten the green thumb perk. A quick check shows it uses a built in function to modify the amount of ingredients gained from flora, which I assume relies on the default harvest behavior. I could have the script check for that perk and behave appropriately. Unfortunately support for mod-added perks that alter ingredients added would be harder to implement. Do you know of any such perks added by mods?

 

As for auto-harvest scripts, if they work by activating the flora via script it should still work the same.

Link to comment
Share on other sites

I know at least that SPERG and my own homebrew adds perks, and there is a popular mod that makes it so that you harvest the same number of blossoms as there are on perticular plants.

 

Maybe you could spawn a disabled duplicate of the plant and harvest that, then instantly delete it. Should result in approximately the same behavior but it will automatically support perks.

Link to comment
Share on other sites

Yes, I'll probably do something like that.

 

I'm not sure if a flora can actually be harvested while it's disabled, but I could always add it 10000 units below the ground instead.

 

EDIT: Just did a quick check with the console, and activating a thistle while it was disabled still harvested it.

Edited by wiseman303
Link to comment
Share on other sites

  • 3 months later...
  • 3 weeks later...

Any progress on this? Also, would this do anything to prevent the flora respawn problem in areas that do not respawn? (Where you harvest something, and it just never grows back.) How would this affect Hearthfire plantable plants?

 

Complete Alchemy and Cooking Overhaul by kryptopyr is up and running, and would benefit from this considerably.

 

Thank you for all of the hard work. :)

Link to comment
Share on other sites

Hi Wiseman303,

I sent you a message concerning this project. I'm not sure how often you check your messages, so I thought I'd mention it here. If you have time, would you mind taking a look at it?

Thank you so much for all your excellent mods, and I've really been looking forward to the release of this fix.

Link to comment
Share on other sites

Hi everyone. Sorry for the lack of updates. AFK life is to blame.

 

I'm getting a week off now and will be continuing work on this mod during that time. My plan is to have a public release and any major bugfix/compatibility releases done before I have to go back to work.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...