This script simply removes all but specified cells' files on server startup, if enough time has passed since they were last visited. This allows creatures to spawn in a way most similar to single player OpenMW.
killReset.lua is a plugin for this script, that also decreases the killcounts for any creatures or NPCs killed in the cell. Add require("custom.CellReset.killReset") after CellReset = require("custom.CellReset.main") in your customScripts.lua to enable it.
Requires DataManager!
You can find the configuration file in server/data/custom/__config_CellReset.json.
excludedCellsis a list of cells you don't want to be reset at all. Keep in mind that the names are case sensitive. Can also add to this list by using/cellresetchat commandresetTimeis the amount of time that will have to pass until a cell is reset. Units are game hours or real time minutes (assumingtimeRateis at default 60), depending on theuseGameTimesetting.timeRatecan be used to cout real time in game hours. Should be equal to your timescale.useGameTimeswitches between game time and real time for cell reset purposes.commandstaffRankrequired to use the/cellresetcommandrankError,excludeMessageandincludeMessageallow to change messages shown by the/cellresetcommand
logCellTimewhether the script should log time passed for every cell on server startup.falseby default.
There are also custom events provided for other scripts to use:
CellReset_OnReset(cellDescription)called when a cell is being reset.CellReset_OnResetFinished(cellDescriptions)called after this script has finished processing cells, with a list of theircellDescriptions as an argument. Doesn't have a validator. If no cells were reset, the list will be empty.