Jump to content

Understanding radiant quests, e.g. BQ01-04


Recommended Posts

I'm making a somewhat comprehensive mod that I'd like to apply to radiant quests, but I'm not quite clear how they operate.

When I look at BQ01, e.g., it seems like there are aliases for one location, one target, one letter. But if this is repeatable, how can you have more than one BQ01 letter with, say, assigned aliases from instance 1 attached to the first letter; and then the newly assigned aliases attached to the new letter (after completing first bounty). If there's only one alias for location, target, you can't have multiple bounty letters associated with BQ01, right ? So does the first one disappear ?

Obviously I'm missing something here--anyone understand how these work ?

Link to comment
Share on other sites

While a bounty quest is active, there will be no other instances of that bounty quest offered in any hold.  The current quest must be completed.  If the hold in question has multiple locations for that bounty type, it may be possible to get a second bounty quest of the same type.  Otherwise, it will not be possible to get the same bounty quest for the same location until the same bounty type has been completed for a different hold.

The letter itself contains placeholder text which gets filled with the appropriate alias data.  The text string that gets replaced with the alias data is to be considered more of a variable that holds the assigned value rather than something that has to re-acquire the data every time it is loaded.  And because the letter is created anew for each quest, every bounty letter is its own separate instance of the base object holding its own specified variable text.

End result, one can have in their inventory one bounty letter for an active quest to kill a bandit leader and multiple bounty letters for completed quests to kill bandit leaders.

Link to comment
Share on other sites

Posted (edited)
7 hours ago, IsharaMeradin said:

While a bounty quest is active, there will be no other instances of that bounty quest offered in any hold.  The current quest must be completed.  If the hold in question has multiple locations for that bounty type, it may be possible to get a second bounty quest of the same type.  Otherwise, it will not be possible to get the same bounty quest for the same location until the same bounty type has been completed for a different hold.

The letter itself contains placeholder text which gets filled with the appropriate alias data.  The text string that gets replaced with the alias data is to be considered more of a variable that holds the assigned value rather than something that has to re-acquire the data every time it is loaded.  And because the letter is created anew for each quest, every bounty letter is its own separate instance of the base object holding its own specified variable text.

End result, one can have in their inventory one bounty letter for an active quest to kill a bandit leader and multiple bounty letters for completed quests to kill bandit leaders.

Thank you for your time. I'm seeing that  you are indeed correct about multiple bounty letters (say from BQ01) each of which has distinct text reflecting what aliases were at the time. But I'm noticing that this is working for the vanilla aliases and not for one that I'm introducing (which adds info to the bounty letter BQ01 in this case). I note that the vanilla aliases pertinent to the letter (steward, jarl, hold) use match reference, whereas I'm using a 'specific reference'. To be clear, I'm using the SetName / ForceRefTo approach to filling that alias with my own text. The result I'm getting is the following:

Bounty letter 1: works normally with my text inserted into letter as it should

Bounty letter 2 (after completing 1): all vanilla text associated with aliases is updated to current quest. But Bounty Letter 1 suddenly contains my bounty letter 2 alias text instead of retaining (instantiating) what it originally had.

Sorry if this isn't clear.

Edited by csbx
Link to comment
Share on other sites

The difference then must be in the approach to filling the data.  I haven't had much experience in this aspect to be honest.  I just knew (where to look up) the basics of how the quest worked.  I would guess that you would need to try the same approach as was done originally.  Not sure how feasible that might be for compatibility purposes.

Link to comment
Share on other sites

Posted (edited)
23 hours ago, IsharaMeradin said:

The difference then must be in the approach to filling the data.  I haven't had much experience in this aspect to be honest.  I just knew (where to look up) the basics of how the quest worked.  I would guess that you would need to try the same approach as was done originally.  Not sure how feasible that might be for compatibility purposes.

It may well be that I need fixed objectrefs / baseobjects - ie. fixed in the sense that they possess a name that does not change over time. Do you think that it's unwise to proceed using a method that would require creating probably 300+ such objects - e.g. creating that many misc objects, dragging them into Cell AAAmarkers e.g. and then via script popping them into the alias of a quest one at a time as needed ? Each would have a name 250ish chars. Would that be taxing on an end-user's system in terms of memory etc. ? I just have no understanding of how in the scheme of a modded game this move would stack up.

Edited by csbx
Link to comment
Share on other sites

Probably unwise to do the approach you have described.  Not even sure that the name field alone would allow that many characters.

It finally dawned on me that the problem with your initial approach is that SetName (an SKSE function) applies to the base object and not to any one specific instance.  Thus when you change the name via SetName, you are changing it for all instances.  And that is why your first letter gets updated to the new data on the second letter.

This may be the case where the object itself needs to be edited.  Sometimes trying to do things so that they will be as compatible as possible also makes it more complicated and difficult to track down issues.

Link to comment
Share on other sites

I would not worry so much about the performance impact of creating 300 base objects and 300 references.  It will gum up some RAM (~100K-200K), but not enough to make a real impact.  I would worry about the tedium of filling that many records by hand.

You do need to deal with the name field size limit though.  SetName let's you use any string, but the text in the plugin has to fit a fixed sized records.

I agree however that you should look for a more moderate approach.  Does the player really need all 300 books at the same time.  Are they so precious that having them disappear after a while, keeping only the last 20 for example, would be unacceptable?

Link to comment
Share on other sites

23 hours ago, IsharaMeradin said:

Probably unwise to do the approach you have described.  Not even sure that the name field alone would allow that many characters.

It finally dawned on me that the problem with your initial approach is that SetName (an SKSE function) applies to the base object and not to any one specific instance.  Thus when you change the name via SetName, you are changing it for all instances.  And that is why your first letter gets updated to the new data on the second letter.

This may be the case where the object itself needs to be edited.  Sometimes trying to do things so that they will be as compatible as possible also makes it more complicated and difficult to track down issues.

 

14 hours ago, xkkmEl said:

I would not worry so much about the performance impact of creating 300 base objects and 300 references.  It will gum up some RAM (~100K-200K), but not enough to make a real impact.  I would worry about the tedium of filling that many records by hand.

You do need to deal with the name field size limit though.  SetName let's you use any string, but the text in the plugin has to fit a fixed sized records.

I agree however that you should look for a more moderate approach.  Does the player really need all 300 books at the same time.  Are they so precious that having them disappear after a while, keeping only the last 20 for example, would be unacceptable?

Just to fill out a little more precisely what I'm trying to do: The mod I'm working on has a few modules associated with it. The module I'm working on now is about bounty quests. I'm trying to expand the 'even better quest objectives' concept to these quests. I have a small text blurb associated with certain locations and a function that looks at that quest's aliases, produces the right text for the generated location alias and fills the alias in the note the player receives. As discussed above, the setname/forceRefTo works swimmingly for the first quest, then--as you both seem to grasp well--the second fails because it effectively resets the first letter's 'blurb' alias. The only method I see to solve this is one objRef per blurb, then fill the alias with that objRef, re-using as needed.

I'm not sure what a moderate approach would look like in this case. I'm just serving up one objRef at a time per bounty note--which don't appear in abundance, really.

Link to comment
Share on other sites

Your plan does work.  And I can't think of anything better if you want an indefinite number of books.

If you can think of a way to limit the number of books (like destroying or fading out older books to make room for the new), you'll end up with fewer objects to maintain.

Link to comment
Share on other sites

Posted (edited)
15 hours ago, xkkmEl said:

Your plan does work.  And I can't think of anything better if you want an indefinite number of books.

If you can think of a way to limit the number of books (like destroying or fading out older books to make room for the new), you'll end up with fewer objects to maintain.

I'm going to give it a go. It's all set up, but I'm really daft about the syntax so something is wrong.

I have: csbMagTextHolderAlias[QuestIndex].forceRefTo(MyFormlistWithMyObjRefs.GetAt(5) as objectreference)

But the alias doesn't fill. It's weird--if I debug.messagebox the 'MyFormlistWithMyObjRefs.GetAt(5) as ObjectReference" it indeed yields something like "objectReference <The Id number>".

I tried defining an objectreference property and dropping it in there and it worked just fine.

Am I not allowed to pull an obj.ref from a formlist like that ? I'm so confused why that isn't working.

Edited by csbx
Link to comment
Share on other sites

  • Recently Browsing   0 members

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