Jump to content

Traders - how best to config them to set real quests instead of treasure hunts that ruin the map near the lobby?


RAGE PVE

Recommended Posts

So were just trying to avoid the lobby areas getting destroyed by daft missions, we have 5 traders in the lobby (but all the same) and need to replace these to mix them up abit but also we need to switch the mission types up, is there a way to mod this or edit it at all to make it so they offer misssions in the city areas a little further away?  

7 Days to Die Screenshot 2022.06.18 - 22.22.41.28.png

Link to comment
Share on other sites

Never tried this myself, but you may be able to add another property to the fetch / clear quests:

 

From a T1 fetch quest:

 

        <objective type="RandomPOIGoto">
            <property name="phase" value="1"/>
            <property name="biome_filter_type" value="SameBiome" />
            <property name="biome_filter" value="burnt_forest" />
            <property name="nav_object" value="quest" />
        </objective>

 

From a T1 buried supplies quest:

 

        <objective type="RandomGotoNPC" phase="1">
            <property name="completion_distance" value="20"/>
            <property name="distance" value="350-600"/>
            <property name="nav_object" value="quest" />
        </objective>

 

Again, haven't tried this myself, but if you add the property distance line in the fetch / clear quests, it might limit it to only quest enabled POIs at a specific distance from the traders.

 

At the very least, something to try until someone with a better understanding the quest system comes along

Link to comment
Share on other sites

2 hours ago, RAGE PVE said:

So were just trying to avoid the lobby areas getting destroyed by daft missions, we have 5 traders in the lobby (but all the same) and need to replace these to mix them up abit...

 

Is the base structure for this POI created in the Editor or all done in World?

Link to comment
Share on other sites

2 hours ago, arramus said:

Is the base structure for this POI created in the Editor or all done in World?

It was created in Editor then ported into the World and is now live on our server.....we could go live pretty soon but this is kinda delaying things :S 

3 hours ago, BFT2020 said:

Never tried this myself, but you may be able to add another property to the fetch / clear quests:

 

From a T1 fetch quest:

 

        <objective type="RandomPOIGoto">
            <property name="phase" value="1"/>
            <property name="biome_filter_type" value="SameBiome" />
            <property name="biome_filter" value="burnt_forest" />
            <property name="nav_object" value="quest" />
        </objective>

 

From a T1 buried supplies quest:

 

        <objective type="RandomGotoNPC" phase="1">
            <property name="completion_distance" value="20"/>
            <property name="distance" value="350-600"/>
            <property name="nav_object" value="quest" />
        </objective>

 

Again, haven't tried this myself, but if you add the property distance line in the fetch / clear quests, it might limit it to only quest enabled POIs at a specific distance from the traders.

 

At the very least, something to try until someone with a better understanding the quest system comes along


That looks like something useful, which files are these in?  Thanks

I'm wondering if we copied a trader from a city that already offers quests and put him into our lobby if it would make a difference

Link to comment
Share on other sites

It is possible to change the trader type by editing who spawns on the trader spawn block by:

 

Look at the Trader Spawn Block and hold down the 'Left Shift + Left Alt + RMB' to bring up the Trader Entity Spawner selection menu to ensure all 5 are not falling back to the default Joel.

trader.thumb.jpg.64a8b332b4424a2a48093c6c1fbcdee5.jpg

 

Copying a trader from the city will not make any difference as they are just placemarkers that the POIs are measured from. Anything related to the trader quests are governed in the quests.xml file and any change will impact them all.

Link to comment
Share on other sites

As for the Buried Quests, if that's what you wanted to purge or limit. Go to Line 1733 in quests.xml

 

You can either totally remove Buried Quests by deleting everything from Line 1733 to 1969 or change the distance for the Tier 1 - 3 Buried Quest types within those lines. This will impact every single trader on the World. You can always test locally to see if removing these doesn't break anything depending on how hardcoded they are.

 

Alternatively, as suggested:

 

Changing the distance from

 

T1 and T2

<property name="distance" value="350-600"/>

 

T3

 <property name="distance" value="250-500"/>

 

to something like 1000-1500 will keep these far from the lobby and potentially deter players from wanting to do them in the first place.

Link to comment
Share on other sites

48 minutes ago, RAGE PVE said:

Thanks will check over this, is there a way to check if POIs have the T1 quests actually set at all?  All I know is we created a POI, he took a trader and somehow copied it 5x and then we ported to the server.  

If a POI has a trader and is properly set as a trader in the 'poi name.xml' with the requisite trader settings as we see in the trader POIs for Rekt, Jen, etc, T1 quests will be accessible. If the trader protection has not been set up appropriately, the POI will have no center of origin and all they will share is buried quests.

Link to comment
Share on other sites

15 hours ago, BFT2020 said:

Never tried this myself, but you may be able to add another property to the fetch / clear quests:

 

From a T1 fetch quest:

 

        <objective type="RandomPOIGoto">
            <property name="phase" value="1"/>
            <property name="biome_filter_type" value="SameBiome" />
            <property name="biome_filter" value="burnt_forest" />
            <property name="nav_object" value="quest" />
        </objective>

 

From a T1 buried supplies quest:

 

        <objective type="RandomGotoNPC" phase="1">
            <property name="completion_distance" value="20"/>
            <property name="distance" value="350-600"/>
            <property name="nav_object" value="quest" />
        </objective>

 

Again, haven't tried this myself, but if you add the property distance line in the fetch / clear quests, it might limit it to only quest enabled POIs at a specific distance from the traders.

 

At the very least, something to try until someone with a better understanding the quest system comes along

 

This won't work for the "RandomPOIGoto" objective - it doesn't support the "distance" property.

 

However, if you don't mind using a C# mod (so required by both server and client), then I recently made a new quest objective type in SCore. It's called "RandomTaggedPOIGotoSDX". As the name implies, it was originally used for going to POIs with a specific tag (in the "Tags" property of its XML). But I also added support for the "distance" property. It can take either the max distance as a single number, or the min and max distances separated by dashes. (The "dash" format is the same format buried supply quests use, as in the XML above.)

 

One other thing to keep in mind. The game does keep track of which POIs you've gone to, and which you haven't - but that list is per trader protection area, not per trader. If you have several traders in a protected area, they will share that same list. That's probably what you want, but I felt I should mention it.

 

It also means that if you don't have a trader protection area, the game won't allow your trader to give quests to POIs. You'll get nothing but buried supply quests.

 

(I know this because that new quest objective I wrote also doesn't require the trader protection area. A trader without one will still send you to POIs for quests, and not just give you buried treasure quests. In this situation there's no way to keep track of which POIs you've gone to already, but I figured it was better than nothing.)

Link to comment
Share on other sites

33 minutes ago, khzmusik said:

 

This won't work for the "RandomPOIGoto" objective - it doesn't support the "distance" property.

 

However, if you don't mind using a C# mod (so required by both server and client), then I recently made a new quest objective type in SCore. It's called "RandomTaggedPOIGotoSDX". As the name implies, it was originally used for going to POIs with a specific tag (in the "Tags" property of its XML). But I also added support for the "distance" property. It can take either the max distance as a single number, or the min and max distances separated by dashes. (The "dash" format is the same format buried supply quests use, as in the XML above.)

 

One other thing to keep in mind. The game does keep track of which POIs you've gone to, and which you haven't - but that list is per trader protection area, not per trader. If you have several traders in a protected area, they will share that same list. That's probably what you want, but I felt I should mention it.

 

It also means that if you don't have a trader protection area, the game won't allow your trader to give quests to POIs. You'll get nothing but buried supply quests.

 

(I know this because that new quest objective I wrote also doesn't require the trader protection area. A trader without one will still send you to POIs for quests, and not just give you buried treasure quests. In this situation there's no way to keep track of which POIs you've gone to already, but I figured it was better than nothing.)

How is best to check if a POI is actually protected correctly?  We're using ST tools but our dev had set the boundaries but the protection didn't work, he then applied a 'workaround' but perhaps this is also failing.

The process has been, POI has been created offline in the map we picked using editor then saved and imported onto a fresh wipe on the server map.  At the moment I've spawned traders without success, I also haven't had chance to learn how to spawn and save stuff to the world, my traders despawned for example when I teleported and came back.

Maybe we can remove the traders (how?) and then set the protection correctly and after this the traders will allocate properly?  If this doesn't work given whats been said above what would you recommend after that?  We can delete the lines of code, but I never like seeing code removed as there are lots of conflicts in existing servers at times.

 

Link to comment
Share on other sites

Here is our lobby XML

<?xml version="1.0" encoding="UTF-8"?>
<prefab>
  <property name="CopyAirBlocks" value="True" />
  <property name="ExcludeDistantPOIMesh" value="False" />
  <property name="ExcludePOICulling" value="False" />
  <property name="DistantPOIYOffset" value="0" />
  <property name="AllowTopSoilDecorations" value="False" />
  <property name="DifficultyTier" value="0" />
  <property name="ShowQuestClearCount" value="1" />
  <property name="TraderArea" value="False" />
  <property name="PrefabSize" value="102, 22, 81" />
  <property name="RotationToFaceNorth" value="2" />
  <property name="Zoning" value="none" />
  <property class="IndexedBlockOffsets">
    <property class="quest_wood">
      <property name="0" value="90, 3, 75" />
      <property name="1" value="98, 6, 76" />
    </property>
    <property class="quest_stone">
      <property name="0" value="92, 2, 25" />
      <property name="1" value="94, 2, 27" />
    </property>
    <property class="quest_feather">
      <property name="0" value="27, 2, 18" />
    </property>
    <property class="POILight">
      <property name="0" value="87, 2, 37" />
    </property>
    <property class="Trader">
      <property name="0" value="81, 3, 31" />
    </property>
    <property class="TraderOnOff">
      <property name="0" value="71, 5, 50" />
    </property>
  </property>
  <property class="Stats">
    <property name="TotalVertices" value="1984383" />
    <property name="TotalTriangles" value="1846575" />
    <property class="BlockEntities">
      <property name="Vertices" value="1612773" />
      <property name="Triangles" value="1618122" />
    </property>
    <property class="ChunkMeshes0">
      <property name="Vertices" value="266259" />
      <property name="Triangles" value="149769" />
    </property>
    <property class="ChunkMeshes1">
      <property name="Vertices" value="0" />
      <property name="Triangles" value="0" />
    </property>
    <property class="ChunkMeshes2">
      <property name="Vertices" value="72" />
      <property name="Triangles" value="36" />
    </property>
    <property class="ChunkMeshes3">
      <property name="Vertices" value="936" />
      <property name="Triangles" value="468" />
    </property>
    <property class="ChunkMeshes4">
      <property name="Vertices" value="1074" />
      <property name="Triangles" value="984" />
    </property>
    <property class="ChunkMeshes5">
      <property name="Vertices" value="79424" />
      <property name="Triangles" value="39712" />
    </property>
    <property class="ChunkMeshes6">
      <property name="Vertices" value="4" />
      <property name="Triangles" value="2" />
    </property>
    <property class="ChunkMeshes7">
      <property name="Vertices" value="22014" />
      <property name="Triangles" value="35368" />
    </property>
    <property class="ChunkMeshes8">
      <property name="Vertices" value="1827" />
      <property name="Triangles" value="2114" />
    </property>
    <property class="ChunkMeshes9">
      <property name="Vertices" value="0" />
      <property name="Triangles" value="0" />
    </property>
  </property>
</prefab>

and then a typical trader

 

<?xml version="1.0" encoding="UTF-8"?>

-<prefab>

<property value="True" name="CopyAirBlocks"/>

<property value="False" name="AllowTopSoilDecorations"/>

<property value="any" name="Zoning"/>

<property value="2" name="RotationToFaceNorth"/>

<property value="-1" name="YOffset"/>

<property value="city,town,rural,wilderness" name="AllowedTownships"/>

<property value="True" name="TraderArea"/>

<property value="20,0,20" name="TraderAreaProtect"/>

<property value="41, 27, 46" name="TraderAreaTeleportSize"/>

<property value="0, 0, 0" name="TraderAreaTeleportCenter"/>

<property value="False" name="ExcludeDistantPOIMesh"/>

<property value="0" name="DistantPOIYOffset"/>

<property value="settlements" name="EditorGroups"/>

<property value="trader" name="QuestTags"/>

<property value="1" name="DifficultyTier"/>

<property value="True" name="ExcludePOICulling"/>

<property value="1" name="ShowQuestClearCount"/>

<property value="gateway,trader" name="Tags"/>

<property value="trader" name="ThemeTags"/>

<property value="41, 27, 46" name="PrefabSize"/>


-<property class="Stats">

<property value="269870" name="TotalVertices"/>

<property value="274267" name="TotalTriangles"/>


-<property class="BlockEntities">

<property value="211047" name="Vertices"/>

<property value="233358" name="Triangles"/>

</property>


-<property class="ChunkMeshes0">

<property value="48730" name="Vertices"/>

<property value="29179" name="Triangles"/>

</property>


-<property class="ChunkMeshes1">

<property value="0" name="Vertices"/>

<property value="0" name="Triangles"/>

</property>


-<property class="ChunkMeshes2">

<property value="880" name="Vertices"/>

<property value="440" name="Triangles"/>

</property>


-<property class="ChunkMeshes3">

<property value="0" name="Vertices"/>

<property value="0" name="Triangles"/>

</property>


-<property class="ChunkMeshes4">

<property value="4217" name="Vertices"/>

<property value="3402" name="Triangles"/>

</property>


-<property class="ChunkMeshes5">

<property value="0" name="Vertices"/>

<property value="0" name="Triangles"/>

</property>


-<property class="ChunkMeshes6">

<property value="0" name="Vertices"/>

<property value="0" name="Triangles"/>

</property>


-<property class="ChunkMeshes7">

<property value="4996" name="Vertices"/>

<property value="7888" name="Triangles"/>

</property>


-<property class="ChunkMeshes8">

<property value="0" name="Vertices"/>

<property value="0" name="Triangles"/>

</property>


-<property class="ChunkMeshes9">

<property value="0" name="Vertices"/>

<property value="0" name="Triangles"/>

</property>

</property>


-<property class="IndexedBlockOffsets">


-<property class="POILight">

<property value="36, 5, 9" name="0"/>

<property value="36, 5, 13" name="1"/>

<property value="36, 9, 13" name="2"/>

<property value="36, 3, 22" name="3"/>

<property value="37, 5, 13" name="4"/>

<property value="39, 2, 18" name="5"/>

</property>


-<property class="TraderOnOff">

<property value="26, 1, 42" name="0"/>

<property value="34, 1, 42" name="1"/>

</property>


-<property class="Trader">

<property value="5, 2, 16" name="0"/>

</property>

</property>

</prefab>

I did notice some traders also had this set to <property value="clear" name="QuestTags"/>.......clear indicates the quest missions were looking for

Link to comment
Share on other sites

7 hours ago, RAGE PVE said:

I did notice some traders also had this set to <property value="clear" name="QuestTags"/>.......clear indicates the quest missions were looking for

 

Is it, or is it left over from when somebody copied XML from another POI that had a quest?

 

7 hours ago, RAGE PVE said:

<property name="TraderArea" value="False" />

 

Wouldn't you want this to be set to True?

 

10 hours ago, khzmusik said:

One other thing to keep in mind. The game does keep track of which POIs you've gone to, and which you haven't - but that list is per trader protection area, not per trader. If you have several traders in a protected area, they will share that same list. That's probably what you want, but I felt I should mention it.

 

It also means that if you don't have a trader protection area, the game won't allow your trader to give quests to POIs. You'll get nothing but buried supply quests.

 

So is the TraderAreaProtect value a location in the world? I was thinking it was a bounding box indicating how much area to protect.

 

<property value="20,0,20" name="TraderAreaProtect"/>

 

So is that "protect a 20x20 area" or protect an area centered at location 20,20 in the world?

Link to comment
Share on other sites

5 hours ago, zztong said:

 

Is it, or is it left over from when somebody copied XML from another POI that had a quest?

 

 

Wouldn't you want this to be set to True?

 

 

So is the TraderAreaProtect value a location in the world? I was thinking it was a bounding box indicating how much area to protect.

 

<property value="20,0,20" name="TraderAreaProtect"/>

 

So is that "protect a 20x20 area" or protect an area centered at location 20,20 in the world?


Hi thanks for the help, we managed to get it setup now, the spawning world ones they despawn but if we spawn into the world and restart the map etc they work fine, we don't know how to add ones that work full but we do know how to add more if say players want a personal trader and things but they would only getting buried quests but thats fine....thanks everyone big help as always! 

We just did some live testing and feedback is really going down well atm, if anyones interested in having a look then let me know....also keen to test mods and various things, we have a dev server available also should any of you modders want a semi live play ground!

Link to comment
Share on other sites

On 6/22/2022 at 8:34 AM, RAGE PVE said:


Hi thanks for the help, we managed to get it setup now, the spawning world ones they despawn but if we spawn into the world and restart the map etc they work fine, we don't know how to add ones that work full but we do know how to add more if say players want a personal trader and things but they would only getting buried quests but thats fine....thanks everyone big help as always! 

We just did some live testing and feedback is really going down well atm, if anyones interested in having a look then let me know....also keen to test mods and various things, we have a dev server available also should any of you modders want a semi live play ground!

Decent. The Dev Server setup will be very helpful where a mod is best stress tested with a party.

 

If you bundle up the trader, I'll take a look at it in the Editor and set up the 5 unique, appropriate tannoy speakers, and open/close signs if they're not already supported.

Link to comment
Share on other sites

12 hours ago, arramus said:

Decent. The Dev Server setup will be very helpful where a mod is best stress tested with a party.

 

If you bundle up the trader, I'll take a look at it in the Editor and set up the 5 unique, appropriate tannoy speakers, and open/close signs if they're not already supported.

That's brilliant!  

So basically I can set up a couple more servers that are mirrors of our main server and then you guys can setup mods and test then when you require players we just send them onto the server to test for future releases in the next season.

So, if were season 1 now then we can stop adding there and add to season 2 server and so on!

Heres our discord, feel free to have a looksie around and ofc ping me then we can look to get things setup more etc https://discord.gg/xpE4P3Qa

Also any other modders interested by all means also DM me thanks

Link to comment
Share on other sites

On 6/21/2022 at 2:28 PM, zztong said:

 

Is it, or is it left over from when somebody copied XML from another POI that had a quest?

 

 

Wouldn't you want this to be set to True?

 

 

So is the TraderAreaProtect value a location in the world? I was thinking it was a bounding box indicating how much area to protect.

 

<property value="20,0,20" name="TraderAreaProtect"/>

 

So is that "protect a 20x20 area" or protect an area centered at location 20,20 in the world?

 

Sorry, I meant to reply earlier.

 

I didn't realize that the "lobby" and trader POIs were different. I'm still not sure what the "lobby" is supposed to be. But for the trader POI, you do want "TraderProtection" set to "true". That should enable the ability to size the trader protection area in the POI editor, though you might have to also copy in an existing trader area and adjust it later. (I can't remember what I originally did with my A19 trader POI.)

 

The "QuestTags" values are what quests the POI accepts when it is used as a quest destination. If your POI is a trader, it shouldn't even have that property - you don't want anyone to be sent to a trader POI for a clear quest. The quests that can possibly be given by a trader have nothing to do with the prefab XML, they're defined in quests.xml.

 

As far as the trader protection area goes, I'm sure that "TraderAreaProtect" values are relative to the POI's origin. They're defined in the POI XML, and at that point the POI hasn't been placed into the world yet.

 

That's different than the trader area value that is used to keep track of used POIs. When representing what quest POIs have already been given by that trader, the trader area is represented as a 2D vector, and I'm pretty sure it represents the center of the trader protection bounds as they exist in the world.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...