• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Cant give items as quest rewards anymore

JoeSloeMoe

Refugee
The following line at the end of a quest throws errors:
<reward type="Item" id="ammo44MagnumBulletAP" value="300"/>

I can no longer give items as rewards for quests. LootItems doesn't work either.
Are there any notes on this change, how do I give items now?
Cheers
edit to add that this is any quest I give the player in code, not through the Trader.
 
Last edited:
Have you tried adding some additional variables to the line to see if it works like the ones in the challenges awards?

<reward type="Item" id="ammoBundleJunkTurretAP" ischosen="true" isfixed="true" value="5"/>
 
Yes,I tried it. The isChosen is a trader var (where the trader offers options to choose from. )
From what I can tell, and I'm open to correction, but the devs have set it so that only a Trader can give a reward item from a quest. It follows the trend of forcing the trader as an interface for a large percentage of game functionality. The current code appears to be looking for a trader id, but because the quest was not given by a trader the trader pointer is null. So we get a wall of runtime errors (we dont seem to use catch{} blocks in our code for runtime errors anymore - whatever)

I have created a workaround - its not pretty but thats the norm for 7DTD xml coding. What I do now is have a background buff listening on a number of vars. The quest to visit the trader (thats the result of the challenge completion), now sets a var specific to that challenge. The background buff picks up the change for that var, then fires an event that drops the reward in the players inventory for that challenge.

cheers
 
Back
Top