RWG City District - Grid

Not sure if there is a way to force that side of the airport POI to always connect to a road like how may traders are on the corner of an intersection.  It's not ideal, but if it was always on the outskirts of a city like a trader, it could be possible.


If you were to work on a Gateway Tile you could predict road connections, but not necessarily the path the roads take leading away from it. The problem will be that each Settlement uses the same Gateway Tile, so even the Western Town will have a copy of your airport.

 
I suspect an airport would probably need to be 3x2, but its the grid concept that matters, probably not any potential limits on max dimensions.


zztong, I took your city grid code and expanded it to what I believe my airport on my map, Navezgane Regional Airport, would look like as a 10x12 Grid.

Here is my airport depicted as a grid:

image.png

And here is the XML code:

<rwgmixer>

<!-- RWG City District Grid
Original Code Author: zztong, 22 August 2022
Modified: AH64_Jimbo, 14 March 2023
used original 2x2 Grid code to expand to a 10x12 Grid for
the airport found on map Navezgane Regional Airport -->

<!-- Defines an Airport as a City District of type "Grid" -->

<district name="airport" type="grid">
<property name="district_spawn_weight" value="0.2"/>
<property name="district_required_township" value="city"/>
<property name="district_preview_color" value="0.5,0.5,0.1"/>
<property name="poi_required_tags_all" value="airport"/>
<property name="grid" value="airport"/>
</district>

<!-- Defines an Airport Grid as 10x12 Tiles -->
<grid name="airport">
<!-- First Row, Row 0 -->
<row id="0">
<column id="6">
<property name="tile" value="rwg_tile_airport_runway_17" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="7">
<property name="tile" value="rwg_tile_airport_taxiway_corner" />
<property name="RotationToFaceNorth" value="1" />
<property name="exits" value="" />
</column>
<column id="8">
<property name="tile" value="rwg_tile_rural_corner" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="1,2" />
</column>
<column id="9">
<property name="tile" value="rwg_tile_rural_straight" />
<property name="RotationToFaceNorth" value="3" />
<property name="exits" value="1,3" />
</column>
<column id="10">
<property name="tile" value="rwg_tile_rural_t_02" />
<property name="RotationToFaceNorth" value="3" />
<property name="exits" value="1,2,3" />
</column>
<column id="11">
<property name="tile" value="rwg_tile_gateway_cap" />
<property name="RotationToFaceNorth" value="3" />
<property name="exits" value="3" />
</column>
</row>
<!-- Second Row, Row 1 -->
<row id="1">
<column id="6">
<property name="tile" value="rwg_tile_runway_segment" />
<property name="RotationToFaceNorth" value="0" />
<property name="exits" value="" />
</column>
<column id="7">
<property name="tile" value="rwg_tile_airport_tarmac_corner" />
<property name="RotationToFaceNorth" value="3" />
<property name="exits" value="" />
</column>
<column id="8">
<property name="tile" value="rwg_tile_hangars_cap_01" />
<property name="RotationToFaceNorth" value="0" />
<property name="exits" value="" />
</column>
<column id="9">
<property name="tile" value="rwg_tile_airport_tarmac_corner" />
<property name="RotationToFaceNorth" value="0" />
<property name="exits" value="" />
</column>
<column id="10">
<property name="tile" value="rwg_tile_commercial_straight" />
<property name="RotationToFaceNorth" value="0" />
<property name="exits" value="" />
</column>
</row>
<!-- Thrid Row, Row 2 -->
<row id="2">
<column id="6">
<property name="tile" value="rwg_tile_runway_segment" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="7">
<property name="tile" value="rwg_tile_tarmac_edge" />
<property name="RotationToFaceNorth" value="3" />
<property name="exits" value="" />
</column>
<column id="8">
<property name="tile" value="rwg_tile_airport_tarmac_01R" />
<property name="RotationToFaceNorth" value="1" />
<property name="exits" value="" />
</column>
<column id="9">
<property name="tile" value="rwg_tile_hangars_cap_01" />
<property name="RotationToFaceNorth" value="1" />
<property name="exits" value="1" />
</column>
<column id="10">
<property name="tile" value="rwg_tile_commercial_t" />
<property name="RotationToFaceNorth" value="0" />
<property name="exits" value="0,2,3" />
</column>
</row>
<!-- Fourth Row, Row 3 -->
<row id="3">
<column id="6">
<property name="tile" value="rwg_tile_runway_segment" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="7">
<property name="tile" value="rwg_tile_tarmac_edge" />
<property name="RotationToFaceNorth" value="3" />
<property name="exits" value="" />
</column>
<column id="8">
<property name="tile" value="rwg_tile_airport_regional_concourse" />
<property name="RotationToFaceNorth" value="1" />
<property name="exits" value="" />
</column>
<column id="9">
<property name="tile" value="rwg_tile_airport_regional_terminal" />
<property name="RotationToFaceNorth" value="1" />
<property name="exits" value="1" />
</column>
<column id="10">
<property name="tile" value="rwg_tile_rwg_commercial_corner" />
<property name="RotationToFaceNorth" value="0" />
<property name="exits" value="0,3" />
</column>
</row>
<!-- Fifth Row, Row 4 -->
<row id="4">
<column id="6">
<property name="tile" value="rwg_tile_runway_segment" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="7">
<property name="tile" value="rwg_tile_tarmac_edge" />
<property name="RotationToFaceNorth" value="3" />
<property name="exits" value="" />
</column>
<column id="8">
<property name="tile" value="rwg_tile_airport_tarmac_01L" />
<property name="RotationToFaceNorth" value="1" />
<property name="exits" value="" />
</column>
<column id="9">
<property name="tile" value="rwg_tile_tarmac_edge" />
<property name="RotationToFaceNorth" value="1" />
<property name="exits" value="" />
</column>
</row>
<!-- Sixth Row, Row 5 -->
<row id="5">
<column id="6">
<property name="tile" value="rwg_tile_runway_segment" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="7">
<property name="tile" value="rwg_tile_airport_tarmac_corner" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="8">
<property name="tile" value="rwg_tile_tarmac_edge" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="9">
<property name="tile" value="rwg_tile_airport_tarmac_corner" />
<property name="RotationToFaceNorth" value="1" />
<property name="exits" value="" />
</column>
</row>
<!-- Seventh Row, Row 6 -->
<row id="6">
<column id="6">
<property name="tile" value="rwg_tile_airport_runway_35" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="7">
<property name="tile" value="rwg_tile_airport_taxiway_t" />
<property name="RotationToFaceNorth" value="3" />
<property name="exits" value="" />
</column>
<column id="8">
<property name="tile" value="rwg_tile_airport_filler" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="9">
<property name="tile" value="rwg_tile_airport_taxiway_straight" />
<property name="RotationToFaceNorth" value="3" />
<property name="exits" value="" />
</column>
</row>
<!-- Eighth Row, Row 7 -->
<row id="7">
<column id="6">
<property name="tile" value="rwg_tile_airport_filler" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="7">
<property name="tile" value="rwg_tile_airport_taxiway_straight" />
<property name="RotationToFaceNorth" value="3" />
<property name="exits" value="" />
</column>
<column id="8">
<property name="tile" value="rwg_tile_airport_filler" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="9">
<property name="tile" value="rwg_tile_airport_taxiway_straight" />
<property name="RotationToFaceNorth" value="3" />
<property name="exits" value="" />
</column>
</row>
<!-- Ninth Row, Row 8 -->
<row id="8">
<column id="0">
<property name="tile" value="rwg_tile_airport_taxiway_corner" />
<property name="RotationToFaceNorth" value="0" />
<property name="exits" value="" />
</column>
<column id="1">
<property name="tile" value="rwg_tile_airport_taxiway_straight" />
<property name="RotationToFaceNorth" value="0" />
<property name="exits" value="" />
</column>
<column id="2">
<property name="tile" value="rwg_tile_airport_taxiway_straight" />
<property name="RotationToFaceNorth" value="0" />
<property name="exits" value="" />
</column>
<column id="3">
<property name="tile" value="rwg_tile_airport_taxiway_t" />
<property name="RotationToFaceNorth" value="0" />
<property name="exits" value="" />
<column id="4">
<property name="tile" value="rwg_tile_airport_taxiway_straight" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="5">
<property name="tile" value="rwg_tile_airport_taxiway_t" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="6">
<property name="tile" value="rwg_tile_airport_taxiway_straight" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="7">
<property name="tile" value="rwg_tile_airport_taxiway_4-way" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="8">
<property name="tile" value="rwg_tile_airport_taxiway_straight" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="9">
<property name="tile" value="rwg_tile_airport_taxiway_t" />
<property name="RotationToFaceNorth" value="0" />
<property name="exits" value="" />
</column>
<column id="10">
<property name="tile" value="rwg_tile_airport_taxiway_corner" />
<property name="RotationToFaceNorth" value="1" />
<property name="exits" value="" />
</column>
</row>
<!-- Tenth Row, Row 9 -->
<row id="9">
<column id="0">
<property name="tile" value="rwg_tile_airport_runway_08" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="1">
<property name="tile" value="rwg_tile_runway_segment" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="2">
<property name="tile" value="rwg_tile_runway_segment" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="3">
<property name="tile" value="rwg_tile_runway_segment" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
<column id="4">
<property name="tile" value="rwg_tile_runway_segment" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="5">
<property name="tile" value="rwg_tile_runway_segment" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="6">
<property name="tile" value="rwg_tile_runway_segment" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="7">
<property name="tile" value="rwg_tile_runway_segment" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="8">
<property name="tile" value="rwg_tile_runway_segment" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="9">
<property name="tile" value="rwg_tile_runway_segment" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
<column id="10">
<property name="tile" value="rwg_tile_airport_runway_26" />
<property name="RotationToFaceNorth" value="2" />
<property name="exits" value="" />
</column>
</row>
</grid>

<!--
TAGS: Row, Column - Specify the Grid Cells.
TILE: Specifies the Tile's filename root.
ROTATION: Just like a POI's Rotation to Face North value.
EXITS: Tells RWG the tile sides to connect to City Tiles.

May need one or more additional attributes to work with RWG
TAXIWAYCONNECTOR: Signals that a Taxiway Connector Part needs to be placed between a runway/tarmac and taxiway.
AIRPORTTILES: Specifies which sides of an Airport tile can be adjacent to other Airport tiles.
PERIMETER: Specifies which sides have no adjacent Airport tiles. Important for defining airport fence placement.

Note that these last two attributes may be able to be rolled into one.
-->

</rwgmixer>




One glaring issue is that this would, in theory, lay out the RWG tiles, but NOT any critical parts such as the taxiway-runway connectors, taxiway-to runway connectors, taxiway lines on the tarmac as well as the entire perimeter fence. These could be laid out using part spawners on the RWG tiles, however they would have to be dependent on certain conditions and should not left up to random chance.

This is one step closer to adding airports to random gen. Thoughts?

 
One glaring issue is that this would, in theory, lay out the RWG tiles, but NOT any critical parts such as the taxiway-runway connectors, taxiway-to runway connectors, taxiway lines on the tarmac as well as the entire perimeter fence. These could be laid out using part spawners on the RWG tiles, however they would have to be dependent on certain conditions and should not left up to random chance.


I don't understand. Wouldn't those be built into the Tiles and just match up because the Tiles do? You're talking about columns 7-8 and rows 9-10, right?

 
Wouldn't those be built into the Tiles and just match up because the Tiles do?
Yes, fence parts and taxiway connectors would be built as part of the RWG tiles. However, the game would need to know exactly what parts to place and where to place them. Parts, to my knowledge and understanding are currently subject to be placed RANDOMLY to some degree. I need the exact parts to be placed CONDITIONALY.  In other words;

IF <There are no airport tiles on this side> THEN <Spawn fence section> ELSE IF <There is a taxiway segment that needs to be connected> THEN <Spawn a taxiway connector part> ELSE <If there is no connecting taxiway, and an airport tile on that side then spawn nothing>

Sorry for the confusion, but it's a problem that's been at the back of my mind that I've been trying to work out.

 
Last edited by a moderator:
To help visualize what I mean, consider rwg_tile_airport_runway_17 in the level/prefab editor:

20230314094005_1.jpg

Here you can see can see all of the possible parts (taxiway ends and fence parts) that can potentially spawn. However it is the Part Spawn Chance that determines whether or not the part actually spawns . . . Random Chance. For now I've set that chance at 0%.

In the world editor you can see the parts that I have manually placed for rwg_tile_airport_runway_17 to make sense.

20230314094350_1.jpg

Same with rwg_tile_airport_runway_35, which in this case requires a different set of parts to be placed.

20230314094442_1.jpg

If left to chance there is a high probability that the fence parts would spawn in the wrong places, fences could bisect taxiways, and taxiway ends would likely not spawn in the correct place or be missing entirely. That's why I need to figure out how to get the parts to spawn Conditionally

If that can be solved, I believe that random gen would be within reach for airports. Hopefully this makes things more clear. Any insight into how to make this work is much appreciated.

 
I think to begin with, just having a static runway and taxiway setup would be best so you don't even have to use parts.  

Later, if it is possible to have it more random, then depending on how that is made possible, it could be updated for that.

It may be possible to just treat the taxiways as roads in terms of what the tile type is considered.  Then they would connect properly if you are still marking what tiles can connect to what other tiles.  The only issue is how towns are generated... It could place a non-taxiway on one end and a taxiway on the other and then be unable to connect them . It depends if town creation is generated sequentially or from multiple directions at once.

 
Last edited by a moderator:
Parts, to my knowledge and understanding are currently subject to be placed RANDOMLY to some degree. I need the exact parts to be placed CONDITIONALY.  In other words;

IF <There are no airport tiles on this side> THEN <Spawn fence section> ELSE IF <There is a taxiway segment that needs to be connected> THEN <Spawn a taxiway connector part> ELSE <If there is no connecting taxiway, and an airport tile on that side then spawn nothing>


Ah, I see what you're saying. I had to read it twice as I misunderstood what you meant by "randomly" as it having a random location, but you correctly mean a random chance of being placed, or not.

I didn't grasp until I saw your examples that you are using Parts for taxiways so that your airport layout is dynamic.

I too have wanted such a thing. I had envisioned a large university campus with elevated walkways between buildings (much like a campus upon which I work). I'd want those walkways to continue onto neighboring campus Tiles, but otherwise end in a stairway if the neighboring Tile was some other District.

I see conditional Parts based on neighboring Tiles another feature request that I would happily support, but fear it might be more than the Devs want to support unless perhaps somebody had an easily implemented solution. Perhaps you've got a viable method?

For instance, if a Part were within 10 blocks (arbitrarily chosen) of an edge, the District name could be tested against some "neighbor" text field on the Part. A complication would be what if the Part is in a corner of the Tile?

Or perhaps, instead of 10 blocks, you specify a direction. If the District of the Tile in that direction matches what you typed in a "neighbor" text field on the Part, then the condition is met. If there is no neighboring Tile, then "wilderness" could be returned.

But even then, there's a case folks are probably going to want that isn't covered. For instance, Tiles often have roads that just stop. A "corner" Tile only has two exits, but it is common for a corner Tile to actually have roads that stretch to the other borders but then stop at a barrier. Sometimes the neighboring Tile has a similar road to a barrier and you end up with two roads ending with barriers that face either other. In this case it would be nice if both barriers could detect each other and remove themselves letting an impromptu connection appear.

To solve that, you almost need another pass through the Tiles just to place the Parts and even then I'll bet there's some nasty logic needed.

 
Last edited by a moderator:
As part of the first A21 Dev Stream, there was a mention of "Country Tiles" but no explanation. So for the past day or so I've been trying to guess what a "Country Tile" might be, which brought me back around to thinking of this Pimp Dream and others, where an Airport was discussed.

What if a Country Tile were a 500x500 Tile that represented a self-contained settlement and acted as its own Gateway Tile?

That is, you make a 500x500 Tile, scatter POI Markers and Parts across it, make it in the style of "cap", "corner", "intersection", "straight", and "t", and those road connections would be where the Gateway feature connected with a map's roads. At a size of 500x500, you could have a small regional airport's runway on the map and then place a bunch of airport POIs and Parts.

As a self-contained settlement, you would never try to place two Country Town Tiles next to each other. They would always be solo Tiles.

 
It definitely sounds to me like it's a tile for the wilderness.  I was trying to get an answer in the A21 thread, but my question seems to be being ignored, so they might not want to discuss what it means yet.  It definitely offers some possibilities, especially if they implement it well.

 
It definitely sounds to me like it's a tile for the wilderness.  I was trying to get an answer in the A21 thread, but my question seems to be being ignored, so they might not want to discuss what it means yet.  It definitely offers some possibilities, especially if they implement it well.


Yes, your speculation about a wilderness tile was partly what got me thinking about what it could be.

 
Back
Top