Jump to content

RWG - Multiple Districts in Township's outskirt_district Property


zztong
 Share

Recommended Posts

Currently, you can have one District identified in a Settlement's "outskirt_district" property:

 

<property name="outskirt_district" value="rural"/>

 

And, presently, townships of type "city" all come with rural Tiles that wrap around the outside. This can be pretty repetitive.

 

I've considered making a "bigcity" township with the outskirts being residential.

 

Then it occurred to me it would be cool if you could list more than one District in the "outskirt_district" property. (This is the suggestion. Allow this...)

 

<property name="outskirt_district" value="rural,residential"/>

 

Then, when RWG is generating the outskirts of a settlement, for each Tile to be placed it would first randomize a selection from the outskirts_district List, then determine which Tile from that Distict to use. In this way, the outter ring of Tiles for a city could be a mixture of both Rural and Residential Tiles.

 

BTW, I tried listing two. It results in a KeyNotFoundException, which makes sense. It is probably looking for a district named "rural,residential".

 

Another thing I tried was a District with this:

 

<property name="poi_required_tags_all" value="rural,residential"/>

 

The idea being that maybe the District would accept POIs of either tag. That attempt resulted in a NullReferenceException.

 

Edited by zztong (see edit history)
  • Like 1
Link to comment
Share on other sites

Never thought of this use case. Consider it done for A21.

 

if(outskirtDistrict.Contains(",")) {
	string[] districts = outskirtDistrict.Split(',');
	outskirtDistrict = districts[Rand.Instance.Range(0,districts.Length)];
}

 

Edited by Kinyajuu (see edit history)
  • Like 3
  • Thanks 4
Link to comment
Share on other sites

21 hours ago, Kinyajuu said:

Never thought of this use case. Consider it done for A21.

 

if(outskirtDistrict.Contains(",")) {
	string[] districts = outskirtDistrict.Split(',');
	outskirtDistrict = districts[Rand.Instance.Range(0,districts.Length)];
}

 

 

So would it select one District from the list to be the outskirt for the entire city or is this code run on a Tile by Tile basis?

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
 Share

×
×
  • Create New...