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

Removing Traders from Random Gen

Zolokhan

New member
I found a mod that did this but it is out of date ... i made one but it is not working ... 

rwgmixer.xml : 

<set xpath="/rwgmixer/roadside/property[@name='spawn_trader']/@value">false</set>
     
<append xpath="/rwgmixer/township[@name='countrytown']">
        <property name="spawn_trader" value="false"/>
</append>

<append xpath="/rwgmixer/township[@name='town']">
        <property name="spawn_trader" value="false"/>
</append>

<append xpath="/rwgmixer/township[@name='city']">
        <property name="spawn_trader" value="false"/>
</append>

<append xpath="/rwgmixer/district[@name='wilderness']">
        <property name="spawn_trader" value="false"/>
</append>

<append xpath="/rwgmixer/district[@name='commercial']">
        <property name="spawn_trader" value="false"/>
</append>

<append xpath="/rwgmixer/district[@name='downtown']">
        <property name="spawn_trader" value="false"/>
</append>

<append xpath="/rwgmixer/district[@name='industrial']">
        <property name="spawn_trader" value="false"/>
</append>

<append xpath="/rwgmixer/district[@name='residential']">
        <property name="spawn_trader" value="false"/>
</append>

<append xpath="/rwgmixer/district[@name='countryresidential']">
        <property name="spawn_trader" value="false"/>
</append>

<append xpath="/rwgmixer/district[@name='rural']">
        <property name="spawn_trader" value="false"/>
</append>

<append xpath="/rwgmixer/district[@name='gateway']">
        <property name="spawn_trader" value="false"/>
</append>

I do not know why traders are still popping up. 

Thank you for any help

 
I have an alternative approach that might interest you. My modlet (ZZTong-Prefabs) comes with optional "dead" trader POIs that can be used to replace some or all of a world's traders. To do so, you edit the world's prefabs.xml file and change lines like this...

<decoration type="model" name="trader_joel" position="1985,34,-2656" rotation="3"/>




... to lines like this (note the addition of an 'x' to the name)...

Code:
<decoration type="model" name="trader_joelx" position="1985,34,-2656" rotation="3"/>
 
so that did not work but i tried this which is even easier ... 

<remove xpath="/rwgmixer/prefab_spawn_adjust[@tags='trader']"/>

<append xpath="/rwgmixer">
            <prefab_spawn_adjust tags="trader" max_count="0"/>
</append>

it just sets the max count of traders to 0 .... it was easier than i thought.  

 
maybe finally killed traders

<remove xpath="/rwgmixer/prefab_spawn_adjust[@tags='trader']"/>

<append xpath="/rwgmixer">
            <prefab_spawn_adjust tags="trader" bias="-100" max_count="0"/>
</append>

i need to make a few more random worlds but so far no traders.  

Please note : this is only playable because i made a mod that makes EVERYTHING craftable!

Zolokhan's mod - it also adds a @%$# ton of zombies to everywhere. 

 
Last edited by a moderator:
Zolokhan:

This is GREAT!!! I just generated an 8k map and no trader POIs 👍

FWIW (this might help a newbie like myself) but I dropped your code into /Mods/Zolokhan No Trader/Config/rwgmixer.xml and I got an error which took me a bit to figure out. The parser evidently wants a root element to encapsulate code so all I had to do was wrap <configs></configs> around it and boom worked like a charm. I think ignored code like comments and the xml version statement I sometimes see in mods can be outside a root encapsulation? Not sure.

 
I have to laugh at myself I just reached level 53 and it dawned on me that I haven't seen any roads connecting the towns. I'm thinking that maybe the world generator keys off of trader placements to build the roads? Not sure, but the option I was running with before was to generate the world and then go into world editor and manually delete the trader POIs.

 
I have to laugh at myself I just reached level 53 and it dawned on me that I haven't seen any roads connecting the towns. I'm thinking that maybe the world generator keys off of trader placements to build the roads? Not sure, but the option I was running with before was to generate the world and then go into world editor and manually delete the trader POIs.
The roads are not generated based on traders.  You using rwg map gen yeh

 
Last edited by a moderator:
I am using TFP vanilla generator. Here are the settings:

Code:
<MapInfo>
  <property name="Scale" value="1" />
  <property name="HeightMapSize" value="8192,8192" />
  <property name="Modes" value="Survival,SurvivalSP,SurvivalMP,Creative" />
  <property name="FixedWaterLevel" value="false" />
  <property name="RandomGeneratedWorld" value="true" />
  <property name="GameVersion" value="Alpha.21.1.16" />
  <property name="Generation.Seed" value="K" />
  <property name="Generation.Towns" value="Default" />
  <property name="Generation.Wilderness" value="Default" />
  <property name="Generation.Lakes" value="Default" />
  <property name="Generation.Rivers" value="Default" />
  <property name="Generation.Cracks" value="Few" />
  <property name="Generation.Craters" value="Few" />
  <property name="Generation.Plains" value="10" />
  <property name="Generation.Hills" value="4" />
  <property name="Generation.Mountains" value="2" />
  <property name="Generation.Snow" value="5" />
  <property name="Generation.Forest" value="5" />
  <property name="Generation.Desert" value="5" />
  <property name="Generation.Wasteland" value="5" />
</MapInfo>
 
Back
Top