xerxes40 Posted December 30, 2019 Share Posted December 30, 2019 Hi, I'm trying to do a quest where a player need to harvest x plants in x time. if he can't finish in time the plants should regrow.is there any way to do something like this ?if regrow not work maybe replace the old plants ? did search quite a lot but did not find something MFG Xerxes40 Link to comment Share on other sites More sharing options...
cumbrianlad Posted December 31, 2019 Share Posted December 31, 2019 Yes you could do this but it will need a script. Take a look at the way the Riften freeform quest for how to handle tracking how many ingredient items are collected for the herbalist's apprentice. I'm unsure about the respawning part, though. Items won't respawn until the cell resets and that includes respawning harvested plants with their original ones that can be taken. Even calling reset on the cell won't work until the player leaves, from what i know. I used that technique for an indoor garden in a cell but had to leave the cell to get the plants to respawn, which i did with an "OnCelldetach" event. You could look at the way Hearthfires handles making their player home plants respawn faster, but I'd guess that they just did a similar thing to me with my garden. In other words the player has to leave the cell. Be aware when writing scripts for papyrus fragments that require properties to be used, you must declare the property at the end of the quest main script after the last line. You need to do that and save that main quest script before trying to use the property in any stage fragment. if you don't, the quest gets stuck being unable to compile the fragment and won't let you add the property into the main quest script either, as it tries to recompile the fragment when you do. I'll have a think and see if I can get around the respawn issue. Edit. The riften quest for collecting ingredients has no time limit. You'll need to add a timer into the script or set a stage on it in your quest. You do this with a 'RequestForSingleUpdateGameTime(#)", where # is the length of time you allow the player to collect them all. Then you can use this to see if the player has completed the task in time. An example of a quest that uses this is the one at Kolbjorn Barrow on Solstheim, where ralis Sedaris sends messages to the player every few game days. The Riften Quest is 'FreeformRiften04' Link to comment Share on other sites More sharing options...
cumbrianlad Posted January 1, 2020 Share Posted January 1, 2020 As a workaround for the respawn issue, could you display a message when the player fails, the message would say "Leave and come back when you're ready to try again", or somesuch. When the player leaves the cell you can then use the method I mentioned above to respawn all of the plants. Not perfect but maybe OK? Oh and your quest will have to be set to 'Allow repeated stages', or else you can't reset the stage at this point to allow them to try again. Link to comment Share on other sites More sharing options...
xerxes40 Posted February 4, 2020 Author Share Posted February 4, 2020 heyi found a way to reset plantshttps://www.creationkit.com/fallout4/index.php?title=SetHarvested_-_ObjectReferencebut now i'm looking for a way to reset 50+ objects at queststage is there any easy way ? Link to comment Share on other sites More sharing options...
Recommended Posts