Skvindt Posted January 19, 2014 Share Posted January 19, 2014 Hello, I am currently making a mod where you can build a farm and earn money from it, as well as harvest crops every three days. The farm will have some customization to it, including the ability to specify which crop a plot of land can grow. That's the goal, at least. I'm just not sure if I can pull this part of the mod off. From what I understand, you cannot use the reset command on a harvestable crop such as a potato plant. So a workaround I thought of was using a container system. This would involve the script resetting a series of containers (27, maybe more) every 72 in-game hours. My question is, could a script that calls on so many objects to reset break over time? For instance, late in a save-game, could the script stop functioning? Also, I tried assigning a container to an x-marker and resetting the x-marker, but that did not work (unless I was using the wrong batch action option). Would an x-marker for this not work? Any insight into this would be appreciated, I'm still rather new to this. Link to comment Share on other sites More sharing options...
gulogulo Posted January 20, 2014 Share Posted January 20, 2014 My scripts administer hundreds of ObjectReferences. I dont see any problem as long as the script runs only from time to time. Link to comment Share on other sites More sharing options...
meh321 Posted January 20, 2014 Share Posted January 20, 2014 (edited) I have written scripts that are over 2000 lines long and they work fine from start to late game, it depends on how you write the script. If you are going to have more than a few hundred or even thousands of objects to iterate you can also try this papyrus library it's meant just for that - storing large amounts of data and iterating it fast. If you still have worries you can also try updating the objects in batches. You say one update cycle is 72 hours you can divide this update over that time instead of doing it all at once. Edited January 20, 2014 by meh321 Link to comment Share on other sites More sharing options...
Skvindt Posted January 27, 2014 Author Share Posted January 27, 2014 Thanks for the responses, and I apologize for the late reply. Good to know that a good number of references can be used in a script. I'm using about 60 references for this portion of the script, can't remember the exact number off the top of my head, so I guess that's not too bad. I went ahead and instead of having the items reset right at the 72 hour mark, they will reset upon selecting a menu option when the player is inside a cell (a farmhouse cellar); The option to reset the items only becoming available once 72 hours have passed. So hopefully this will prevent any issues. Based on your responses it shouldn't really be an issue anyway, but I just want to play it safe. Thanks again. Link to comment Share on other sites More sharing options...
Recommended Posts