Jump to content

Traders don't seem to pick random quests like they used to...

Recommended Posts

I have noticed this for quite some time, and don't know if it's something that started in Alpha 19 & 20, but whether you are playing vanilla or a modded game, the traders just don't randomize quests properly anymore. They seem stuck on giving the same quest pois over and over with little to no variance. Looking at the xml file there are many pois listed and yet trader gives and repeats the same quests over and over again. Tried doing all the quests, then having to wait a day for the list to reset, but these same quest pois come back again and again. This seems to not matter for vanilla, modded or random generated maps. Really with the amount of quests available you should never have to do the same location 2 x, it should just be really "lucky" or "unlucky" whether you get the same poi 2 x ever. If you go and clear a poi that never comes up you can even find the stash locations so I know these are legitimate quest pois. This issue seems to effect all tiers of questing. Is there just a general lack of T5 quests overall? I can see that being an obvious issue for T5 quests, but there are many, many, T1-T3 quests to choose from. Perhaps there is a mod out there that can improve on or even give some control - choice to the way it works?

Edited by talonofwindspeak
spelling and grammar (see edit history)
Link to comment
Share on other sites

Here is sample of script proposal. I am not a modder, coder or scripter of any way shape or form but this is what open chat suggested.


Great! Here's an outline of how you could write a script to modify the way Traders give quests in 7 Days to Die:

  1. Create a new folder in the "Mods" folder and name it something like "UniqueQuests".
  2. Create a new C# script file in this folder and name it something like "UniqueQuests.cs".
  3. Open the script file in your text editor or IDE.
  4. At the top of your script file, add a using directive to import the Unity engine's Random class:
cppCopy code
using UnityEngine;
  1. Define a static array of QuestTypes and QuestLocations that represents all the possible types of quests and locations that the Traders can offer:
scssCopy code
static QuestType[] questTypes = { QuestType.Clear, QuestType.Retrieve, QuestType.Fetch }; static QuestLocation[] questLocations = { QuestLocation.City, QuestLocation.Town, QuestLocation.Wasteland };
  1. Create a static field to keep track of the last offered quest type and location:
javaCopy code
static QuestType lastQuestType = QuestType.Clear; static QuestLocation lastQuestLocation = QuestLocation.City;
  1. Define a function that generates a random unique quest type and location:
csharpCopy code
static Quest GenerateUniqueQuest() { QuestType questType; QuestLocation questLocation; // Generate a new quest type that is different from the last offered quest type do { questType = questTypes[Random.Range(0, questTypes.Length)]; } while (questType == lastQuestType); // Generate a new quest location that is different from the last offered quest location do { questLocation = questLocations[Random.Range(0, questLocations.Length)]; } while (questLocation == lastQuestLocation); // Save the generated quest type and location as the last offered quest lastQuestType = questType; lastQuestLocation = questLocation; // Return the generated quest return new Quest(questType, questLocation); }
  1. In the Start() method of your script, find all the Traders in the game world and modify the way they give quests by calling the GenerateUniqueQuest() function:
scssCopy code
void Start() { // Find all the Traders in the game world Trader[] traders = FindObjectsOfType<Trader>(); // Modify the way the Traders give quests foreach (Trader trader in traders) { trader.questData.GenerateNewQuest = () => { return GenerateUniqueQuest(); }; } }
  1. Save your script file and launch the game.
  2. Enable the "UniqueQuests" mod in the game's Mod Manager.
  3. Start a new game or load an existing one and visit a Trader to see if the script is working.

This script modifies the way the Traders generate quests by ensuring that the same quest type and location are not offered more than once in a row. If you want to further refine the script, you could add more logic to ensure that the same quest type or location is not offered too frequently over a longer period of time.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...