Jump to content

[LE] can't find script


Recommended Posts

Where is the script that controls the respawning of flora so that it doesn't occur while in the same cell as the player? There must be such a script but I don't see it attached to any flora so it must be attached to something else. Something must control this.

Link to comment
Share on other sites

Not so sure if there is a (papyrus) script at all, isn't the respawning of flora caused by the reset of a cell? In CK you can set a respawn flag which handles if the object respawns on cell reset. So i think it is a hardcoded game mechanic, rather than a (papyrus) script.

Link to comment
Share on other sites

I was looking because I found a puzzling problem with some custom flora I made. You can harvest it and the appearance changes to it's harvested appearance. After going away for 10 days if you return to the cell it is back in it's preharvest appearance and can be harvested again. But if you save after harvesting and returning and reload the save the flora goes back to its harvested appearance. Why saving and reloading would cause this I cannot understand at all so I wanted to look at how the vanilla flora worked.

 

I'm thinking I might have to replace all the flora with activators to make fake flora but want to make sure that they don't return to the pre-harvest appearance while the player is in the cell. Still playing around with scripts trying to find something that works.

Link to comment
Share on other sites

Flora does not have a scripted function and the object listen to the game's 'Hard Coded' timeline function, it's created this way to avoid excessive 'Save File' growth.


Imagine what would happen to your 'Save File', if you went from one city to the another and in the way you harvested every plant you see in your way... by the time you would have arrived to the other city you wouldn't be able to load a save anymore, not to mention all the space that all those harvested plants would occupy in your memory. So flora works with the simple logic of ON > OFF.

* Flora does not occupy space in 'Save Files' and memory.


You can see this with a simple experiment:

- Find an unharvested plant > make a save > now harvest the plant > now load the save you made before harvesting the plant.

You will see that although your save was made before the plant was harvested after loading the plant remains harveted.



@ greyday01

Yes you can fake it with a script, but it highly recommended to do it for a specific, targeted and limited number of plants for the reason i previously mentioned.


I hope it helps.

Link to comment
Share on other sites

In this forum thread https://forums.nexusmods.com/index.php?/topic/10012243-my-flora-mod-has-a-huge-problem/

you posted a link to your flora mod. The release was 2018.

 

1. May I ask you, what time did you find the mistake? your post: "if you save after harvesting and returning and reload the save the flora goes back to its harvested appearance."

It would be a good idea to explain the flora issue a bit more here.

 

2. There exists an script called "defaultFakeHarvestableScript" in vanilla Skyrim, but I think its a dummy only without any ingame action.

Edited by ReDragon2013
Link to comment
Share on other sites

I just found out on the same day I made that previous post. Previously I had only tested it by harvesting, waiting 10 days and seeing if they could be reharvested. Which worked just fine. I never saved after harvesting and then reloaded that save.

 

 

Flora does not have a scripted function and the object listen to the game's 'Hard Coded' timeline function, it's created this way to avoid excessive 'Save File' growth.
Imagine what would happen to your 'Save File', if you went from one city to the another and in the way you harvested every plant you see in your way... by the time you would have arrived to the other city you wouldn't be able to load a save anymore, not to mention all the space that all those harvested plants would occupy in your memory. So flora works with the simple logic of ON > OFF.
* Flora does not occupy space in 'Save Files' and memory.
You can see this with a simple experiment:
- Find an unharvested plant > make a save > now harvest the plant > now load the save you made before harvesting the plant.
You will see that although your save was made before the plant was harvested after loading the plant remains harveted.
@ greyday01
Yes you can fake it with a script, but it highly recommended to do it for a specific, targeted and limited number of plants for the reason i previously mentioned.
I hope it helps.

 

Thank you Maxarturo for your explanation. It seems the switch remains at the "harvested" setting even though after waiting and returning it looks and acts unharvested again, until you save at that point. Very confusing and I still don't know how to fix it. There aren't That many of those flora, Just in some displays. I think the save file won't take that much of a hit if I change them to activators but I would prefer to find some way to reset the switch. I tried disabling and deleting and then respawning as a newobject from the baseobject but for some reason the placement was off and they were imbedded in the table. Possibly because I had to place the new object before deleting the original and there might have been collision problems or some other cause. If you could suggest some ways to try fixing this I would be grateful.

Link to comment
Share on other sites

There is an SKSE or SKSE plugin function that can help you with this issue, "SetHarvested()" or something like that... i don't quite remember, it's been quite some time that i experimented with it.

What i do remember is that the function works but it fires after "OnCellDetach()/Attach()" or "OnUnload()?Load()" (but again... or something like that), it doesn't happens in real time.


Before start faking it you can give this SKSE function a try.


Sorry that i can't be much of a help by researching this further, but lately i spend every available free second i have on my own project, otherwise it will never be finish.... I come to this forum to offer assistance only on lunch breaks or before hitting the bed.


Have a nice week.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...