Jump to content

Need help re: vanilla radiant quests


Recommended Posts

Well, my lame little mod is chugging away having made some great progress in the last month or so. But I'm stuck at the following problem:

My mod is looking at some radiant quests, but some of them are structured in ways I can't decipher. E.g. In the bounty quests BQ01-BQ04, the map marker is added to the map via quest stage 10. Easy.

But in looking at, e.g. CR06 (stolen heirloom) and several other similar quests, I can't see where in the code this occurs--though I know that it does add a marker to the map.

I was thinking it was some kind of parent quest script but I just don't see it after an hour of investigation.

Could someone take a quick spin through CR06 and see where this is occurring ?

Link to comment
Share on other sites

It is done via script.  I don't see where the function is initially called.  Bethesda developer comments state that the function is called when the quest is accepted.  If we just go with that, then the local quest script calls the overarching companion radiant quest script which is where the map marker actually gets added to the map.

CR06QuestScript

Function Accepted()
	BossChest.GetReference().GetParentCell().Reset()
	BossChest.GetReference().AddItem(Gewgaw.GetReference())
	parent.Accepted()
EndFunction

CompanionsRadiantQuest

; called when player accepts quest
Function Accepted()
; 	Debug.Trace("CRQ: Accepting " + self + ".")
	(ParentQuest as CompanionsHousekeepingScript).AcceptRadiantQuest(Questgiver.GetActorReference(), QuestgiverComesAlong)
	if ( (MapMarker != None) && (MapMarker.GetReference() != None) )
		MapMarker.GetReference().AddToMap()
	endif
	IsAccepted = True 
	SetStage(10)
EndFunction

 

Link to comment
Share on other sites

13 minutes ago, IsharaMeradin said:

It is done via script.  I don't see where the function is initially called.  Bethesda developer comments state that the function is called when the quest is accepted.  If we just go with that, then the local quest script calls the overarching companion radiant quest script which is where the map marker actually gets added to the map.

CR06QuestScript

Function Accepted()
	BossChest.GetReference().GetParentCell().Reset()
	BossChest.GetReference().AddItem(Gewgaw.GetReference())
	parent.Accepted()
EndFunction

CompanionsRadiantQuest

; called when player accepts quest
Function Accepted()
; 	Debug.Trace("CRQ: Accepting " + self + ".")
	(ParentQuest as CompanionsHousekeepingScript).AcceptRadiantQuest(Questgiver.GetActorReference(), QuestgiverComesAlong)
	if ( (MapMarker != None) && (MapMarker.GetReference() != None) )
		MapMarker.GetReference().AddToMap()
	endif
	IsAccepted = True 
	SetStage(10)
EndFunction

 

Wow - thanks a lot--that's definitely it. But I'm confused about your method of finding that. My process was to see that 'Parent.Accepted()' was called and then to look for the Parent quest. I thought it was C00 based on the quest property on that script. But I don't see anything there. Where is this script ? You probably knew where to look--how !?

Link to comment
Share on other sites

Posted (edited)
19 minutes ago, IsharaMeradin said:

Parent in a special pre-defined variable within the Papyrus system.  It always refers to the script that the current one extends.  In this case CR06QuestScript extended CompanionsRadiantQuest.

How do I find this in the Creation Kit ? I look for that as a quest name, but there is none. If it's attached to another quest, how do I find that quest ? This may seem really obvious, but I'm afraid it really isn't obvious to me. There is no script by that name attached to CR06. I must be missing something obvious.

Edited by csbx
Link to comment
Share on other sites

This information was not found in the Creation Kit.  I did look at the CRO6 quest in xEdit and saw the scripts that were attached to the quest.  I then looked those up in File Explorer and opened them with Sublime Text.  When I saw that CR06QuestScript was calling a function on its parent script, I looked to the ScriptName declaration to see what script was being extended. I then found that script and opened it up.  I looked for the function that was called there and found where the map marker was being added to the map.

Perhaps this will be informative: https://ck.uesp.net/wiki/Extending_Scripts_(Papyrus)

Link to comment
Share on other sites

On 4/13/2024 at 9:23 PM, IsharaMeradin said:

This information was not found in the Creation Kit.  I did look at the CRO6 quest in xEdit and saw the scripts that were attached to the quest.  I then looked those up in File Explorer and opened them with Sublime Text.  When I saw that CR06QuestScript was calling a function on its parent script, I looked to the ScriptName declaration to see what script was being extended. I then found that script and opened it up.  I looked for the function that was called there and found where the map marker was being added to the map.

Perhaps this will be informative: https://ck.uesp.net/wiki/Extending_Scripts_(Papyrus)

Superb and fulsome answer. I had no idea there were scripts (other than meta function scripts e.g. math) being used like this so this was educational for many reasons. Thanks a lot !

Link to comment
Share on other sites

  • Recently Browsing   0 members

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