Replacing fixed Bounty Reward Gold with Leveled Gold

Post » Tue Sep 22, 2015 9:09 am

Greetings,

I searched this forum and was surprised not to find an answer to my question. So I will start a new topic.

In short, I want to replace the fixed reward the player receives for completing one of the Bounty Quests with a leveled reward, drawn from one of the vanilla "QuestReward" leveled lists.

To that end, I created a custom version of BQScript, which is as follows:

Spoiler
,
Scriptname _RS07_BQScript extends Quest Conditional{Script on BQ quests, has common properties and functions.}Keyword Property BQActiveQuest AutoLeveledItem Property RewardItem AutoLocationAlias Property Alias_Location AutoLocationAlias Property Hold Autofunction RewardPlayer()	Game.GetPlayer().AddItem(RewardItem, 1, false)EndFunctionfunction PlayerChangedLocation()	if getStage() < 10		if Game.GetPlayer().IsInLocation(Alias_Location.GetLocation()) == False; 			debug.trace(self + " player is no longer in location and hasn't picked up quest, so shutting down quest so it can happen elsewhere.")			Hold.GetLocation().setKeywordData(BQActiveQuest, 0)			stop()				EndIf		EndIfEndFunction
,


The script compiles alright, and I am even able to select "LvlQuestReward01Small" (for example) from the drop-down list on the properties page. When I test things out in-game, however, the player does not receive any reward at all, even though Proventus (for example) says his "You've done us a fine service...Here is your reward." speech.

In case it matters, I am testing this by way of "coc riverwood" from the main menu screen, getting a bounty quest from Orgnar, "coc"-ing to the bandit cell, using "killall" to complete the objective, then "coc whiterundragonsreach" to get to Proventus and claim the reward.

Any ideas what's wrong?

Thanks in advance for your help!
User avatar
Brooke Turner
 
Posts: 3319
Joined: Wed Nov 01, 2006 11:13 am

Post » Tue Sep 22, 2015 3:02 pm

Step 1 would be to add a debug.notification to the RewardPlayer() function and see if that shows up so we know if the function is even firing at all.

Did you point the quest stage script fragment that calls it to your new script?

User avatar
Stephanie Valentine
 
Posts: 3281
Joined: Wed Jun 28, 2006 2:09 pm

Post » Tue Sep 22, 2015 10:37 am

Figured it out: kmyQuest also needed to be pointed to my custom script. Now it seems to be working as intended.

A noob mistake to be sure, but this is my first exposure to the quest system.

Anyway, thanks, Alexander!
User avatar
Jeff Tingler
 
Posts: 3609
Joined: Sat Oct 13, 2007 7:55 pm

Post » Tue Sep 22, 2015 4:46 am

Gotta start somewhere. :)

Good luck!

User avatar
Michelle davies
 
Posts: 3509
Joined: Wed Sep 27, 2006 3:59 am


Return to V - Skyrim