Jump to content

Papyrus dilema: ObjectReference persistence or a million keywords?


FrankFamily

Recommended Posts

TLDR version:

 

If I need an activator handling a puzzle to point to 8 references, what's a better practice:

 

A) Have 8 forever persistent objectreference properties on it.

 

B) Make 8 keywords, 8 properties for the keywords, add those references to my activator as linked references and call GetLinkedRef(KeywordX) when i need to point to them on my script.

 

And second question:

 

If a quest stops running is persistence originated from it's objectreference properties lost or the objects stay persistent forever?

-----------------------------------------------

Full story:

 

I'm working on another artifact mod and as usual I want to include a custom maze/puzzle like the micro-chess i did for my paladin mod.

 

This micro-chess is handled from a quest that points to a bunch of objects references, tiles, pieces, markers, etc and therefore all of it it's persistant. Since they are properties they are essentially persistent forever as far as i know, which doesn't really hurt that much but it's better to avoid it whenever possible. The problem is how to avoid it?

 

So, i was looking at vanilla stuff and realized that all traps and puzzles have linked references with keywords when more than one is needed, so that within the script GetLinkedRef(Keyword) is called to get the reference needed without making it persistent.

 

But how to apply this when the thing handling everything is a quest, if the quest stops running i guess persistence is lost, is that right? If so then my micro-chess isn't all that problematic.

 

Now the current dilema, new puzzle. And i'm making this one handled through activators. And need it to point to 8 references more or less. It's better to make persistent properties or use GetLinkedRef(KeywordX)?

For the later i'd need to make 8 keywords, 8 properties for the keywords (or a keyword array to keep it cleaner?) and add the 8 linked references to my activators, is it worth it?

 

Or is it like magic effect conditions, that when you have to make way to many it's better to make a script for it instead?

Edited by FrankFamily
Link to comment
Share on other sites

If you fill an ObjectReference property it marks the referenced object as persistent and that status never changes no matter what you later do with the property.

 

For your 8 activators I would just create an array property for the group, let them be persistent, and get on with life. The overhead of the links and keywords would make it harder to implement and you would end up with a persistent set of keywords, extra data for the links, extra calls to find the activators, etc. So either way you go, you're still going to be using up memory and time and probably less of it with the simpler approach.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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