Modify Reset Time on Tree* and Flora* Harvestables

Post » Mon Nov 19, 2012 7:22 am

Hi, I realize I may be asking a loaded question here, but, I'm making an alchemy garden in my custom player home cell. How can I force all of my harvestable ingredients to respawn faster than the default? Ideally I'd like to make everything reset about 1 game day after it has been harvested.

From what I've read so far, this can be complicated due to
A) the fact that harvestables are split between activators, Tree* objects, and Flora* objects (and container objects, like beehives), which vary in their configurability/scriptability
and B ) these types of objects are (apparently?) not affected by a cell's reset time, or so http://www.creationkit.com/Cell_Reset would have me believe.

First off, as a new modder I don't fully understand cell reset time. Apparently it can vary from "No Reset" to "Configurable Reset", and such... I think.

- How can one modify the cell reset time of a custom interior cell?
- What in my garden, if anything, should I expect to respawn when a cell resets?
- And just to be super ultra sure, a cell reset isn't going to affect my standard PlayerHouseChest objects right?

Thanks for any info,
== Roachy
User avatar
Saul C
 
Posts: 3405
Joined: Wed Oct 17, 2007 12:41 pm

Post » Mon Nov 19, 2012 2:17 am

SKSE made a function (or two) for someone else who was playing with Flora ...

... maybe it will help you?

http://www.creationkit.com/IsHarvested_-_ObjectReference


This may be better than / help with your cell reset?




And whether a chest respawns is a setting on that chest (container) I believe. Although some objects - depending on what they are and how they are added to such respawnable containers - are not removed on reset (I think!)
User avatar
Damian Parsons
 
Posts: 3375
Joined: Wed Nov 07, 2007 6:48 am

Post » Mon Nov 19, 2012 1:15 am

Yeah, I was just reading the thread where they were discussing the new SKSE addition. However, my mod is just a player house, and I really don't want to go adding an SKSE dependency.
User avatar
Jack Bryan
 
Posts: 3449
Joined: Wed May 16, 2007 2:31 am

Post » Sun Nov 18, 2012 8:02 pm

If you want info on the plants and respawning, as far as I know that's the only way.

Lots of mods use SKSE functions, so if you are planning to publish your mod I wouldn't worry too much ... most people will have it and those that don't can easily get it (you just note that your mod requires SKSE, so people know). If the mod is just for personal use then there's no dramas with SKSE at all, just get it installed, it has lots of useful functions and does no harm if it is not in use

:)
User avatar
Sheeva
 
Posts: 3353
Joined: Sat Nov 11, 2006 2:46 am

Post » Sun Nov 18, 2012 10:20 pm

Don't get me wrong, SKSE is great and I use it personally, but I'm trying to make my mod as vanilla and accessible as possible. If it's down to leaving the respawn times alone vs. SKSE dependency, I'll drop the idea.
User avatar
Soph
 
Posts: 3499
Joined: Fri Oct 13, 2006 8:24 am

Post » Mon Nov 19, 2012 5:15 am

If the object is an activator, it can be reset through its script. The only things that can't be reset with vanilla scripting is the trees and flora. In their case, the entire cell has to be reset. There is only "Reset" and "No Reset", changing the reset time will affect every cell since it depends on a single variable. If you set that to say, 3 days, everything everywhere will reset every 3 days (except cells marked with No Reset which never reset). I don't know what exactly is safe as far as resetting a player home. I just know that Beth set all purchasable player houses to "No Reset" and I'm guessing there's a good reason. Containers forms and refs have reset/respawn flags that can be unchecked, but I'm not sure how stuff that was manually placed in the cell would fare (objects placed on shelves and what not).

If you setup SKSE as a dependency, the mod won't fail to load if it's not present, it will just complain in the log files that the SKSE functions were not found. You can set up a small quest script like this (give the SKSE quest a higher priority than any other of your quest scripts that uses SKSE):
Scriptname SKSEQuestScript extends Quest{SKSE Quest Script}GlobalVariable Property SKSEVersionGlobal AutoEvent OnInit()	SKSEVersionGlobal.SetValue(-1.0)		If (SKSE.GetVersion() > 0) ; logged error if not found		SKSEVersionGlobal.SetValue(SKSE.GetVersion() + SKSE.GetVersionMinor() * 0.01 + SKSE.GetVersionBeta() * 0.0001)	EndIfEndEvent
That way, there will only be 1 error logged per game load, that it could not find "SKSE.GetVersion()". Then just check your "SKSEVersionGlobal" from other scripts that need SKSE.

Scriptname SomeOtherScript extends WhateverGlobalVariable Property SKSEVersionGlobal AutoFunction DoStuff()	If (SKSEVersionGlobal.GetValue() < 1.0509)		; They do not have SKSE or it is out of date, run vanilla code	Else		; They have SKSE, run some SKSE code	EndIfEndFunction
"1.0509" (1st version with papyrus support) will have to be changed to the new version of SKSE that will have "SetHarvested()".
User avatar
Sabrina garzotto
 
Posts: 3384
Joined: Fri Dec 29, 2006 4:58 pm

Post » Mon Nov 19, 2012 1:59 am

Cool, thanks Ez0n3.
User avatar
Nick Tyler
 
Posts: 3437
Joined: Thu Aug 30, 2007 8:57 am


Return to V - Skyrim