Alright, that was very helpful - I compiled my modified CompanionsRadiantQuest script into a .pex, but it seems that Skyrim refuses to run it. I always get 100 gold for radiant quests, when my script should reward 300-500 gold depending on level.
Here is the original - compare all references to the property "RewardAmount":
Spoiler Scriptname CompanionsRadiantQuest extends Quest Conditional
Quest Property ParentQuest auto
ReferenceAlias Property Questgiver auto
ReferenceAlias Property MapMarker auto
bool Property IsRegistered = false auto
bool Property QuestgiverComesAlong = false auto conditional
bool Property IsActive = false auto conditional
bool Property IsAccepted = false auto conditional
bool Property WasRejected = false auto conditional
int Property RewardAmount = 100 auto
bool Property Succeeded = false auto
bool Property Premature = false auto
; called when quest is first setup, but before player has accepted it
Function Setup()
; default properties are supposed to handle most of these, but just in case....
; IsRegistered = false
; QuestgiverComesAlong = false
; IsActive = false
; IsAccepted = false
; WasRejected = false
; Succeeded = false
; Premature = false
int level = Game.GetPlayer().GetLevel()
if (level < 10)
RewardAmount = 100
elseif (level < 20)
RewardAmount = 150
elseif (level < 20)
RewardAmount = 200
elseif (level < 20)
RewardAmount = 250
else
RewardAmount = 300
endif
(ParentQuest as CompanionsHousekeepingScript).RegisterRadiantQuest(self)
SetStage(1)
EndFunction
; 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
; when player turns down the quest
Function Rejected()
; Debug.Trace("CRQ: Rejecting " + self + ".")
WasRejected = True
EndFunction
; when player has finished quest, but not yet collected reward
Function Finished(bool _succeeded = true, bool _finished = true)
; Debug.Trace("CRQ: Finishing " + self + "; succeeded? " + _succeeded)
Succeeded = _succeeded
(ParentQuest as CompanionsHousekeepingScript).RadiantQuestFinished = _finished
EndFunction
; when the quest is shutting down
Function Cleanup()
if (!Premature)
(ParentQuest as CompanionsHousekeepingScript).CompleteRadiantQuest(self)
endif
EndFunction
; for when the player kills someone before they accepted the quest, etc
Function PrematureShutdown()
; Debug.Trace("CRQ: Shutting down " + self + "prematurely...")
IsAccepted = false
Premature = true
(ParentQuest as CompanionsHousekeepingScript).CycleRadiantQuests()
Cleanup()
EndFunction
Here is my modified quest script:
Spoiler Scriptname CompanionsRadiantQuest extends Quest Conditional
Quest Property ParentQuest auto
ReferenceAlias Property Questgiver auto
ReferenceAlias Property MapMarker auto
bool Property IsRegistered = false auto
bool Property QuestgiverComesAlong = false auto conditional
bool Property IsActive = false auto conditional
bool Property IsAccepted = false auto conditional
bool Property WasRejected = false auto conditional
int Property RewardAmount = 300 auto
bool Property Succeeded = false auto
bool Property Premature = false auto
; called when quest is first setup, but before player has accepted it
Function Setup()
; default properties are supposed to handle most of these, but just in case....
; IsRegistered = false
; QuestgiverComesAlong = false
; IsActive = false
; IsAccepted = false
; WasRejected = false
; Succeeded = false
; Premature = false
int level = Game.GetPlayer().GetLevel()
if (level < 10)
RewardAmount = 300
elseif (level < 20)
RewardAmount = 350
elseif (level < 30)
RewardAmount = 400
elseif (level < 40)
RewardAmount = 450
else
RewardAmount = 500
endif
(ParentQuest as CompanionsHousekeepingScript).RegisterRadiantQuest(self)
SetStage(1)
EndFunction
; 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
; when player turns down the quest
Function Rejected()
; Debug.Trace("CRQ: Rejecting " + self + ".")
WasRejected = True
EndFunction
; when player has finished quest, but not yet collected reward
Function Finished(bool _succeeded = true, bool _finished = true)
; Debug.Trace("CRQ: Finishing " + self + "; succeeded? " + _succeeded)
Succeeded = _succeeded
(ParentQuest as CompanionsHousekeepingScript).RadiantQuestFinished = _finished
EndFunction
; when the quest is shutting down
Function Cleanup()
if (!Premature)
(ParentQuest as CompanionsHousekeepingScript).CompleteRadiantQuest(self)
endif
EndFunction
; for when the player kills someone before they accepted the quest, etc
Function PrematureShutdown()
; Debug.Trace("CRQ: Shutting down " + self + "prematurely...")
IsAccepted = false
Premature = true
(ParentQuest as CompanionsHousekeepingScript).CycleRadiantQuests()
Cleanup()
EndFunction
I've tried loading games well before I've even met the companions outside of Whiterun, but to no avail. If I can get the script to run, I think I'll be good to go - it may seem like a simple mod, but the second part to this mod will be to add Leveled item rewards to Companion quests, and I have that script already written from another mod.
I really appreciate the help - those who will help me figure this out will be included in the credits for this mod for scripting assistance when it's released.