yian Posted September 18, 2017 Share Posted September 18, 2017 (edited) Hello! I am in the process of creating a device that will provide you salt and flour automatically everyday. It needs to: 1) Give you 3 portions of salt and 3 portions of flour everyday.2) Will not give you additional salt or flour if they are already present in the machine. I think that if the container is set to respawn, whatever content was in the container will be rest so that is not a problem. However, I'm not quite sure how to set the respawn timer to a specific container. If it is not an easy task, I think I will just use the default respawn rate of a cell and triple the amount of the items. Please help, thank you! Edited September 18, 2017 by yian Link to comment Share on other sites More sharing options...
Evangela Posted September 18, 2017 Share Posted September 18, 2017 To keep things simple(and not use scripts) you can stick with the cell respawn rate. Also when it resets, all item quantities are reset to the amount that they were set to in the editor, so don't worry about left overs. Link to comment Share on other sites More sharing options...
yian Posted September 18, 2017 Author Share Posted September 18, 2017 (edited) Thanks. Where can I find the setting for cell respwan rate in CK? Sorry I am obviously very new to this. Edited September 18, 2017 by yian Link to comment Share on other sites More sharing options...
Evangela Posted September 22, 2017 Share Posted September 22, 2017 It's in the Game Settings. Game Play > Settings. iHoursToRespawnCelliHoursToRespawnCellCleared The first one is the hours any cell will be reset. The second one is the hours any cell that has been cleared(like dungeons) will be reset. Link to comment Share on other sites More sharing options...
JonathanOstrus Posted September 22, 2017 Share Posted September 22, 2017 It should be noted in case it wasn't obvious, that modifying the either of the 2 game settings variables affects ALL cells in the game. You can't get a per cell reset without using timers in scripts to force a reset. Link to comment Share on other sites More sharing options...
yian Posted September 25, 2017 Author Share Posted September 25, 2017 Thank you for your help guys! :) Link to comment Share on other sites More sharing options...
HeirOfTheSeptims Posted September 26, 2017 Share Posted September 26, 2017 Not sure if you are still looking for help on this, but the best way to do what you are looking to do is to make an activator, rather than a container. You can script the activator to add the items to your inventory once a day when activated, without messing around with respawn rates. Link to comment Share on other sites More sharing options...
DeltaAgent26 Posted November 11, 2017 Share Posted November 11, 2017 When making a custom chest, just put a tick mark next to "respawns" make sure the cell it's in, IS NOT a "no reset zone". done. Link to comment Share on other sites More sharing options...
yian Posted November 12, 2017 Author Share Posted November 12, 2017 It is a shame because the chest is in a home, which needs to be a no reset zone. Link to comment Share on other sites More sharing options...
cdcooley Posted November 13, 2017 Share Posted November 13, 2017 Then a simple script will work. Here's a script I had written for someone else who wanted an activator to give the player a reward item periodically but it puts the items directly in the player's inventory and has multiple options. ScriptName RewardWithTimeoutScript extends ObjectReference {Activating this object gives a reward only once per time period.} LeveledItem Property RewardList Auto {Required: A list of one or more items the player receives when activating this object.} float Property TimeoutHours Auto {Required: The amount of time, in game hours, before the player can get the reward again.} Message Property TimeoutMsg Auto {Optional: Message shown if player activates this object again during the timeout period.} bool Property AllowNormalActivationDuringTimeout Auto {Optional: Allow normal activation for furniture, containers, etc. during the timeout period.} Event OnInit() BlockActivation() EndEvent Event OnActivate(ObjectReference akActionRef) if akActionRef == Game.GetPlayer() ; do not allow other characters to get the reward! GoToState("TimeoutActive") if TimeoutHours > 0 RegisterForSingleUpdateGameTime(TimeoutHours) endif if RewardList akActionRef.AddItem(RewardList) endif endif EndEvent Event OnUpdateGameTime() GoToState("") EndEvent State TimeoutActive Event OnActivate(ObjectReference akActionRef) if TimeoutMsg TimeoutMsg.Show() endif if AllowNormalActivationDuringTimeout Activate(akActionRef, true) endif EndEvent EndState Here's the stripped down version that will put the items into the container and then open it. It still doesn't do quite what you wanted because if the player clicks on it or chooses to put other items in the container a full set of new items will still be added each day the player activates it. But the items only get added if the player actually opens the container each day. If the player skips a few days the container doesn't just keep accumulating more and more. ScriptName RewardInContainerWithTimeoutScript extends ObjectReference {Activating this object gives a reward only once per time period.} LeveledItem Property RewardList Auto {Required: A list of one or more items the player receives when activating this object.} float Property TimeoutHours = 24.0 Auto {Required: The amount of time, in game hours, before the player can get the reward again.} Event OnInit() BlockActivation() EndEvent Event OnActivate(ObjectReference akActionRef) if akActionRef == Game.GetPlayer() ; do not allow other characters to get the reward! GoToState("TimeoutActive") RegisterForSingleUpdateGameTime(TimeoutHours) AddItem(RewardList) Activate(akActionRef, true) endif EndEvent Event OnUpdateGameTime() GoToState("") EndEvent State TimeoutActive Event OnActivate(ObjectReference akActionRef) Activate(akActionRef, true) EndEvent EndState And finally here's one specific to your need for 3 salt and 3 flour per day. It won't take away extras if the player stashes extra salt, flour, or other items in the container but it only adds enough salt and flour to bring the total up to 3 if there is less. (I haven't actually tried to compile it so there might be small errors, but it should work.) ScriptName DailySaltAndFlourScript extends ObjectReference {Keep the container stocked with a minimum of 3 salt and 3 flour each day.} Ingredient Property SaltPile Auto Potion Property BYOHFoodFlour Auto Event OnInit() BlockActivation() EndEvent Event OnActivate(ObjectReference akActionRef) if akActionRef == Game.GetPlayer() ; do not allow other characters to get the reward! GoToState("TimeoutActive") RegisterForSingleUpdateGameTime(24.0) int n = 3 - GetItemCount(SaltPile) if n > 0 AddItem(SaltPile, n) endif n = 3 - GetItemCount(BYOHFoodFlour) if n > 0 AddItem(BYOHFoodFlour, n) endif Activate(akActionRef, true) endif EndEvent Event OnUpdateGameTime() GoToState("") EndEvent State TimeoutActive Event OnActivate(ObjectReference akActionRef) Activate(akActionRef, true) EndEvent EndState Link to comment Share on other sites More sharing options...
Recommended Posts