Jump to content

Control over custom prefab placement in RWG


Reytag

Recommended Posts

I am trying to better place custom and third party mod prefabs in their appropriate biomes and zones.

 

I was able to find out how to control the number of spawns of certain biomes but I have not found examples of how to control location or biome placent.

 

For example in my rwgmixer.xml I have the following:
<append xpath="/rwgmixer">

      <prefab_spawn_adjust partial_name="Svalbard_Seed_Vault" min_count="1" max_count="1" bias="10"/>

 </append>

 

Does anyone know how I would for example force that as a wilderness only spawn and also only in the snow biome?

 

Link to comment
Share on other sites

2 hours ago, Reytag said:

I am trying to better place custom and third party mod prefabs in their appropriate biomes and zones.

 

I was able to find out how to control the number of spawns of certain biomes but I have not found examples of how to control location or biome placent.

 

For example in my rwgmixer.xml I have the following:
<append xpath="/rwgmixer">

      <prefab_spawn_adjust partial_name="Svalbard_Seed_Vault" min_count="1" max_count="1" bias="10"/>

 </append>

 

Does anyone know how I would for example force that as a wilderness only spawn and also only in the snow biome?

 

Biome placement doesnt work in vanilla. 

editing the dll would be needed. 

Link to comment
Share on other sites

8 hours ago, Reytag said:

force that as a wilderness only

 

If you're willing to edit a POI's XML file, you can tag it for wilderness and remove any other district tags.

 

Like Stallion says, you can't force a biome without C# code.

Link to comment
Share on other sites

8 hours ago, zztong said:

 

If you're willing to edit a POI's XML file, you can tag it for wilderness and remove any other district tags.

 

Like Stallion says, you can't force a biome without C# code.

 

Thanks for the tip, I will look into how that is done, would get me at least one step further, 2 out of 3 isn't too bad.

Link to comment
Share on other sites

Where can one find a list of possible values for each property?

I have found interesting properties in the poi xml of both base game and third part poi's I am willing to explore but it's very inconsistent.

 

For example there is:

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

  <property name="AllowedTownships" value="" />

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

  <property name="Tags" value="" />

  <property name="AllowedBiomes" value="" />

 

My issue is for example if one wants a wilderness poi, so far I have examples where some people have wilderness in the "tags" section, others under "zoning", some in "allowedtownships".  It just seems very inconsistent and I also cannot find a source of all possible values for each header.  Makes learning how to do things properly difficult.  Is there an official source of material I am just not finding?

 

Link to comment
Share on other sites

24 minutes ago, Reytag said:

Where can one find a list of possible values for each property?

I have found interesting properties in the poi xml of both base game and third part poi's I am willing to explore but it's very inconsistent.

 

For example there is:

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

  <property name="AllowedTownships" value="" />

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

  <property name="Tags" value="" />

  <property name="AllowedBiomes" value="" />

 

My issue is for example if one wants a wilderness poi, so far I have examples where some people have wilderness in the "tags" section, others under "zoning", some in "allowedtownships".  It just seems very inconsistent and I also cannot find a source of all possible values for each header.  Makes learning how to do things properly difficult.  Is there an official source of material I am just not finding?

 

All of those don't work except Tags.

 

Just add wilderness to the tag and it will spawn in wilderness 

Link to comment
Share on other sites

5 minutes ago, stallionsden said:

All of those don't work except Tags.

 

Just add wilderness to the tag and it will spawn in wilderness 

 

Really, wow, and most of those properties apart from the allowedbiomes I got from the a21 base game poi xml's.

Thanks for the quick reply, I will start with the tag property and do some experimenting.

 

Link to comment
Share on other sites

29 minutes ago, Reytag said:

 

Really, wow, and most of those properties apart from the allowedbiomes I got from the a21 base game poi xml's.

Thanks for the quick reply, I will start with the tag property and do some experimenting.

 

yeh they been in the xmls for many alphas but havent worked since a19 

Link to comment
Share on other sites

2 hours ago, Reytag said:

Where can one find a list of possible values for each property?

 

The PrefabEditor, but as Stallion said, "Tags" is the only one of those 5 XML properties that is used with POI placement. Many of those are legacy tags that are still floating around but have no effect. The EditorGroups only helps searching for them in the PrefabEditor.

Link to comment
Share on other sites

  • 7 months later...

A bit of a necro, though this thread is not that old, but would it be fair to assume that if I deleted all of the mentioned property names (zoning, townships, editor groups, allowed biomes) from all PoI xmls or just commented them out, it would have no impact on the game? I mean they might not work for the purpose outlined by the OP but perhaps the game still needs them for some reason?

 

I'm asking because I'm messing around with the rwg and I'm trying to "align" different PoIs for the purpose of streamlining the comparison between different xmls and I've been pretty liberal with these properties. I'm trying to get factory_01 and 02 to spawn more often since the game seems to focus on _03 right now, to the point where there's 30 of them on a large map and only one of either 01 or 02. There's more problems there and some are tied to the DuplicateRepeatDistance property but I'm adjusting that too with some modest improvements. Still, lots of uncertainties about the rwg and PoIs property lists.

 

Edited by Blasphemous (see edit history)
Link to comment
Share on other sites

10 hours ago, Blasphemous said:

A bit of a necro, though this thread is not that old, but would it be fair to assume that if I deleted all of the mentioned property names (zoning, townships, editor groups, allowed biomes) from all PoI xmls or just commented them out, it would have no impact on the game? I mean they might not work for the purpose outlined by the OP but perhaps the game still needs them for some reason?

 

I'm asking because I'm messing around with the rwg and I'm trying to "align" different PoIs for the purpose of streamlining the comparison between different xmls and I've been pretty liberal with these properties. I'm trying to get factory_01 and 02 to spawn more often since the game seems to focus on _03 right now, to the point where there's 30 of them on a large map and only one of either 01 or 02. There's more problems there and some are tied to the DuplicateRepeatDistance property but I'm adjusting that too with some modest improvements. Still, lots of uncertainties about the rwg and PoIs property lists.

 

As they aren't used, removing them will not hurt anything.  However, if you edit the actual XML files, you will lose all of those edits whenever the game is updated or when you run the verify files option.  So up to you if you want to spend the time. 

 

As far as POI numbers go, the most common reason for some being seen more than others in towns is that you have fewer tiles that some can be on than others.  This is a combination of the size of the POI and the district(s) where it can be placed.  If the POI and districts are the same, you should see a pretty even distribution (assuming the duplicate and then distance parameters are also the same).  But Iin many cases, the size and districts aren't the same and this often affects how many of a given POI you can find.

 

Let's say that you have POI A and POI B.  If A can be on only the corner tile in the downtown district and B can be on the corner tile and straight tile of the downtown district (based on POI size), you will most likely see more of B.  By adding a custom straight downtown tile that supports A but not B, you will even those out.  Of course that is a simplified example and many things play a part in distribution but it would help. Keep in mind as well that often a tile supports more than one of a given POI size, so when is the number of tiles each POI can be on is the same, if one can be on 3 places on a time and the other only 1, there is a higher chance if getting the one that can be on 3 spaces.  So as I said, my example is simplified. 😁

 

You can also adjust the duplicate and theme distances (theme only if they are part of a theme).  For example the skyscrapers are set to only appear once every 10km, so most maps will only get one of each unless you change that.

Edited by Riamus (see edit history)
Link to comment
Share on other sites

9 hours ago, Blasphemous said:

if I deleted all of the mentioned property names (zoning, townships, editor groups, allowed biomes) from all PoI xmls or just commented them out, it would have no impact on the game?

 

Zoning with a value of "none" is quite common.

I believe EditorGroups is only used in the Prefab Editor.

AllowedBiomes has no effect on anything. It is a hold over from a different age. It can be removed.

 

9 hours ago, Blasphemous said:

I'm trying to get factory_01 and 02 to spawn more often since the game seems to focus on _03 right now, to the point where there's 30 of them on a large map and only one of either 01 or 02. There's more problems there and some are tied to the DuplicateRepeatDistance property but I'm adjusting that too with some modest improvements. Still, lots of uncertainties about the rwg and PoIs property lists.

 

Looking into this, I note:

 

factory_01 is 100x100 and tagged "industrial" and no DuplicateRepeatDistance setting

factory_02 is 100x100 and tagged "industrial" and no DuplicateRepeatDistance setting

factory_03 is 60x60 and tagged "industrial" and no DuplicateRepeatDistance setting

 

No DuplicateRepeatDistance setting means you get the default, which is 300 blocks, IIRC.

 

They all need industrial tiles. Those tiles can only appear in cities and towns, not country towns or western towns. That district has a spawn weight of 0.2, so you won't get a lot of them compared to some other districts.

 

The factory_01 and factory_02 POIs need a 100x100 marker on those tiles and factory_03 needs a 60x60 marker on those tiles.

 

Of the Vanilla Industrial Tiles:

 

rwg_tile_industrial_cap has 1 - 100x100 marker and no 60x60 markers.

rwg_tile_industrial_corner has neither 100x100 or 60x60 markers.

rwg_tile_industrial_intersection has no 100x100 markers and 1 60x60 marker.

rwg_tile_industrial_straight has neither 100x100 or 60x60 markers.

rwg_tile_industrial_t has no 100x100 markers and 1 60x60 marker.

 

So, factory_01 and factory_02 can ONLY appear on the rwg_tile_industrial_cap tile. A cap tile only has one road exit, so it can be kind of rare in the middle of a city or town.

 

But factory_03 can ONLY appear on rwg_tile_industrial_intersection and rwg_tile_industrial_t tiles, which are more commonly used in a city.

 

I think what you're fighting is RWG's selections for Tiles. You have very few options (I can only think of one option) for controlling Tiles (setting maxtiles and mintiles for a specific tile) and you're not going to want to do that with the Vanilla tiles, or you'll take away RWG's ability to make a sane settlement.

 

Your only viable option is to make your own industrial tile and make sure there's a 100x100 POI marker on it. You'll want to make a couple of worlds and see which of the industrial tiles RWG is preferring to use.

Link to comment
Share on other sites

Yeah, if those are only on caps, that makes sense. I didn't have the game in front of me to check.  But I remembered at last one factory being rare because of the role it could be on and a cap is definitely rare.  And you have 2 POI fighting for that position (and that is just between those two... Others may also be fighting for that position).

Link to comment
Share on other sites

I'm wondering now why the rwg only generates one rwg_tile_industrial_cap tile. There's plenty of room on my map for more, how do I increase the minimum number of these tiles? I tried with the rwgmixer.xml as follows:

 

    <streettile name="rwg_tile_industrial_cap">
        <property name="maxtiles" value="11"/>
        <property name="mintiles" value="9"/>
        <property name="maxdensity" value="2000"/>
    </streettile>

 

But it doesn't seem to have any effect. Perhaps that's not the way to do it and there can only be one streettile property in rwgmixer.

I guess I'll have to create my own tile and make it so that it's commonly generated within a city and only accepts PoIs 100x100.

I hope this fixes the issue where I get 30 skyscrapers_01 but only 1 or 0 hospitals and apartments_06.

The documentation of those xml properties is horrible or non-existent and what little there is, is incomplete and confusing.

Link to comment
Share on other sites

4 hours ago, Blasphemous said:

But it doesn't seem to have any effect.

 

If I'm not mistaken, it didn't have the effect you wanted. You influenced how it selects industrial cap tiles from each other, but it still only has 1 industrial cap tile to pick from so I think (speculation) that it had to ignore your setting. When there are is more than one tile of a particular type, I have seen settings like that influence generation.

 

4 hours ago, Blasphemous said:

I'm wondering now why the rwg only generates one rwg_tile_industrial_cap tile. There's plenty of room on my map for more, how do I increase the minimum number of these tiles?

 

This gets to how the RWG code works and I've not tried to dig into its detailed decisions. However, by generating lots of world I have come to believe RWG tends to avoid using CAP Tiles on the interior of a city because they really restrict the road network. If it used a lot of them there's be a chance you'd get a CAP connected to a CAP, resulting in a little road going nowhere.

 

I can think of some ways to get more caps:

 

(1) You could try making the industrial district bigger, giving RWG more chances to pick a Cap. If you go too big you'll start to get empty POI lots because RWG will have run out of POIs that meet its placement criteria. Or, you'll start getting lots of repeats just beyond 300 blocks away from each other.

 

(2) You could change the wrapping district for cities and towns to the Industrial district. Then those settlements will stop using the rural district for that job. RWG uses lots of Ts when wrapping, but I think it uses CAPS too.

 

(3) Edit RWG to include a new type of settlement called an "Industrial Park" and start with the "Western Town" definition. From memory, you can then make that town have around 5 Tiles and I think it will want to use 1 Intersection, 3 Caps, and 1 Straight in a "plus sign" shape. You can adjust the copied configuration to include a Gateway if you want a real road leading to the Industrial Park. Obviously you want it to use the industrial Tiles, which means you have to use its name or you can copy the Vanilla tiles into a new name. Each one of these settlements will count against the total number of settlements, but you can control the maximum number of these industrial parks it makes.

 

(4) You could generate larger maps, getting more settlements, thus more industrial districts and then more chances for industrial CAPS. You could edit RWG to give it more cities.

 

(5) You could use Teragon which has a different algorithm for placement and see if you get something closer to what you want.

Edited by zztong (see edit history)
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...