Jump to content

Customizable Tile Connections


Riamus

Recommended Posts

I have been thinking about tiles and the benefits and limitations of them.  They are a great way to allow for interesting and somewhat realistic designs of cities, but you can only do so much with them.  I have a suggestion that I believe offers a significant increase in value of tiles.  I apologize for the length of this, but in order to understand what I'm talking about, it needs a lot of explanation and examples.  Please bear with me.

 

So, right now, tiles are placed based on whether or not it is allowed in that location (based on district settings) and in that size town/city and if it has the correct road connections.  This allows you to do a lot with them, but you are still very limited.  You can't have road connections that aren't centered on the edges.  You can't have multiple roads exiting the same side.  That may not seem like a big deal, but I think you'll see how much of a limitation that is as I explain my suggestion.

 

Let's say you want to have a boulevard (a divided road).  You can do that now on the tile itself, but it needs to be a single road by the time it exits to the next tile.  That makes for a very short boulevard.  Let's say you want an airport runway.  You could design tiles for it, but there's no way to guarantee everything will get laid out properly.  Let's say you want an underground subway or sewer system.  There are limitations to what you can do with it if you want it to not get cut off, though with work you could get it to work, I think.  Let's say you want a long raised road.  You can make a raised road, but it would need to be at ground level when exiting the tile or you risk ending up with the road suddenly becoming raised or at ground level at each tile change.  These are just some examples where tiles have limitations right now.  And all can be solved with the same suggestion.

 

My suggestion is this... Have an invisible "block" that you can place at the edge of a tile that shows where the road connection is located.  This "block" would need to be placed to cover the entire width of the road for the suggestion to work, but should be resizable to allow for different sized roads.  For current tiles, it would basically be an invisible set of "blocks" placed at the center of each side of the map at ground level -1 (even with the road block) that covers the width of the road.  When RWG places tiles, it will only place a tile that has a matching set of "blocks" so that the roads align properly.  Now, for what we currently have, that will not actually change anything for the maps.  However, with this feature added, you can change the placement of these "blocks" based on where you want the roads to be located.

 

And to clarify about this invisible "block", I am not referring to an actual block that has any physical properties.  It would be similar to the quest marker when not active (i.e. invisible, but still at that location).

 

I'll give some examples:

 

North/South Boulevard

  • Tile 1
    • Road starts at the bottom as a normal road so it will connect with tiles we currently have and then splits into a boulevard and leaves the top of the tile as two single lane roads with a median between them.
    • At the bottom, the invisible "blocks" are placed to cover the width of that one road in the center of the bottom of the tile.  At the top, the "blocks" are placed only covering each of the two individual roads, with a gap between them where the median is located.
  • Tile 2
    • Full boulevard.  The road is two single lanes with a median between them from top to bottom.
    • The invisible "blocks" are on the two individual roads both at top and bottom.
  • Tile 3
    • Road starts at the bottom as a boulevard and merges on the tile so it ends at the top as a single road.
    • At the bottom, the "blocks" are on the two individual roads.  At the top, they are on the single road.
  • Tile 4 (optional)
    • Full boulevard with T-intersection of a normal road (not a boulevard).
    • As with Tile 2, the "blocks" are on the boulevard roads at top and bottom and then also on the road that comes off the T-intersection.
  • Tile 5 (optional)
    • Full boulevard with a cross-intersection of a normal road (not a boulevard).
    • This is the same as Tile 4, but also has the "blocks" at the other end of the normal road.
  • Tile 6 (optional)
    • Full boulevard that has a 90 degree corner and merges into a single road at the corner.
    • The "blocks" are on both roads at the bottom and the one road at the side.
  • Tile 7 (optional)
    • Full boulevard that has a 90 degree corner and continues on as a boulevard around the corner and off the tile.
    • The "blocks" are on both roads at the bottom and both roads on the side.  Including this tile would require additional tiles that are horizontal boulevards, but would be similarly set up as these north/south boulevard tiles.  You can also include T-intersection and cross-intersection tiles with boulevards intersecting if you wanted to.
  • Tile 8 (optional)
    • A cap tile where the boulevard starts at the bottom and then, in order to end, has something such as a rotary or parking lot or something that would look okay as a way to end the boulevard and not continue on into another tile.
    • The "blocks" are on the one end of the tile where the boulevard is and nowhere else.

 

Raised Roads

  • These tiles would be almost identical to the North/South Boulevard tiles except that the placement of the invisible "blocks" would not be at ground level -1, but at ground level +X (where X is the height of the raised road).  The raised road could be a normal road or a boulevard or a road with a barrier between the different directions.  The placement of the "blocks" would just have to match the roads.
  • Instead of the tiles that merge the boulevard into a single road or split a single road into a boulevard, the raised roads would have ramps for those tiles to change the height of the road between ground level and the raised height.

 

Underground Subways or Sewers

  • These would likely be set up where the underground section follows the roads, though that wouldn't be a requirement.  They would be set up with any selection of tiles you want to include the underground section.  The invisible "blocks" would be placed both at the ends of the road and at the ends of the underground section.  Note that you can also have a raised road and would just place these "blocks" at the ends of the raised road as well.

 

Airport Runways

  • These would be set up similarly to roads, with one major exception.  The runway would have to be either wider or narrower (wider would make more sense) than any roads you might have so that a road tile cannot incorrectly be placed next to the runway tile.
  • In order to not only get the runway to work, you'd want to have the ability to connect buildings (hangars and terminals, for example).  To do so, you'd need to include these invisible "blocks" in a way that will match ones placed on those same hangar and terminal tiles.

 

Train Tracks

  • These would be set up just like runways, but instead of runways, they'd be train tracks.  The width would have to be different than roads or runways (or you'd use a custom pattern to make it work), but that can easily be done.

 

Very Large Buildings

  • In addition to connecting roads, you can also make it possible to create a very large multi-tile building within a city that will always generate properly.  The idea here is a creative use of those invisible "blocks" that basically create a code or key that will only match up with the tile you want to connect to.
  • Example:
    • Tile 1 has the south half of the building next to a north/south road.
    • Tile 2 has the north half of the building next to a north/south road.
    • The invisible "blocks" are placed on the ends of the roads on both tiles.
    • The invisible "blocks" are also placed in a specific pattern (any pattern) anywhere along the north edge of Tile 1 and matching "blocks" are placed in the same pattern on the south end of Tile 2.
    • When RWG places Tile 1, it will then try to find a tile to connect to Tile 1 and only Tile 2 will have the matching pattern of "blocks", so only Tile 2 can be placed there, creating a building that appears to be a single building on a single tile, but spans multiple tiles and can be very large.
    • Note that this would allow a very large building, but it would still be more than one POI, so questing in it could only be done one tile at a time.  It would be something you'd use less as a quest location and more for just clearing for the fun of it.

 

Ok, I know these examples may not be clear enough for you to understand what I'm suggesting, so I have included a small example I drew of the boulevard example.  I'm not an artist, so please forgive the basic quality of it and the fact it is not centered and may not be sized properly.

 

Even with the picture, it may not be entirely clear what I'm talking about, so please feel free to ask for clarification on anything that you're confused about.  But think of it this way.  If you were to look at a tile from it's side (you normally view it from the top) and you were to see all the ground below and air above the tile for whatever heights you are using in your tile.  From the side, imagine seeing the ends of roads and tunnels and such that reach the edge.  Everywhere that you see these ends of roads and such, you would have the invisible "blocks" covering the entire width/area of them.  Imagine those sticking out from the edge of the tile (they aren't, but imagine it...).  Now, imagine trying to connect another tile to it where instead of sticking out, these are inset into the tile.  If these invisible "blocks" line up, you can connect them like Legos.  If they do not, they will not connect.  RWG would be updated to look for these connections and only connect tiles that match.  A clever tile designed can create a unique pattern like suggested for the very large building example that would allow only specific tiles to connect, allowing for a LOT of control over how things get placed in RWG.  Of course, RWG is designed to create a fully connected road system (or at least going to a cap tile).  For this to work, it would still need to function using the same tile types (straight, T-intersection, cross-intersection, corner, cap) and the tile designer would need to take into account how the tiles will be treated so they don't try using a cap without having the road end, for example.

 

I am suggesting this as a way to offer a significant increase to the creative options of tile designers for what would be a relatively "small" amount of work.  It would certainly require work to make it happen, but there really aren't significant changes to how RWG already functions, so that is why I say relatively small.  And all tiles would need to be updated to include these invisible "blocks", but there aren't a significant number of tiles (unlike if we were talking about POI), so it wouldn't take that much time to add this to the tiles.  I believe the value greatly outweighs the "cost" to add this feature and would allow for a vastly greater amount of options for what you can do with tiles and RWG.

 

As one last note, by setting a maximum number of times a specific tile can be used within the town, you can prevent situations where things like the raised roads or boulevard would go crazy.  For example, if you didn't have a maximum setting of 1, then you may have a single road turn into a boulevard, then turn into a single road, then turn into a boulevard, then turn into a single road, etc.  Or a raised road that goes to ground level, then raised, the ground level, then raised.  By setting specific tiles (the merge tiles for boulevards and the ramp tiles for raised roads to a maximum of 1, you'll only have a single boulevard or raised road in the city and it will not alternate.  Now, RWG might make it just a 2 tile boulevard or raised road or it might make it a 10 tile boulevard or raised road.  That would be based on the RNG nature of RWG, but that wouldn't really be a bad thing.  And only having a single boulevard or raised road in a town isn't really that big of a deal in order to get the ability to have any at all.

 

Thoughts?  Ideas?  Feedback?  I'd be interested to hear thoughts from everyone on this.  It would be a significant change and improve the value of tiles drastically.  I've only touched on a small number of ways this would help add control over the placement of tiles and the types of roads/etc. you could have with this.  There are many other options, from simply having roads exit from different parts of the tile instead of the center, to having multiple roads exit the same side of a tile to being able to force RWG to connect specific tiles together to create what is essentially one huge tile since nothing else will connect to the pattern you use.  The main part with using this is that you need to have all the necessary matching tiles for it to work.  for example, if you don't have a tile that can allow a boulevard to end either at a cap or looped back around the way RWG closes off the roads of a city to finish it, you'll run into an error in map generation.  The same for anything else.  If RWG places a tile and is unable to place another tile because nothing matches, you'll have an error.  It would be a requirement to have at least one tile that matches all connections on any tiles made.  Tile designers should have no problem with that, but it is something that has to be understood.

Example.png

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

I think I get it. When selecting a neighboring tile to place, make sure the road marker's match up. You wouldn't necessarily need a custom block if the code were able to look for "Road Parts", which might act something like a "Driveway Part" does on a POI.

 

10 hours ago, Riamus said:

You can't have road connections that aren't centered on the edges.

 

You can, actually, but you would have to make your own custom settlement. MLP made an alternative settlement where the Tile connections were water.

 

The road connections being in the center is a design convention, and the most obvious way of making a repeatable pattern with a lot of flexibility. I'll call this "center road" approach the "75th block" connection because it is halfway along a 150 block wide Tile edge.

 

You could make a set of Tiles with two road connections per side. I'll call it the "50-100th block" connections because for this example you'd connect the roads about 1/3 of the way in on both sides. Within a settlement that used Tiles from this convention, everything would match up, except for the Gateway Tile (because of what I assume and hope is an A20 limitation).

 

Where I think this might bog down is the amount of work involved. You need Tiles for each District that you want to appear in your custom city. You probably need to make a large collection of POIs to fit into your custom city. You might be able to arrange to get Vanilla POIs to land in your custom city if you reuse District names, but otherwise you have no XPath ability to inject your District Tags into the vanilla POI XML files. (At least, I don't think we have that ability.)

 

If you wanted to make a "75th Block" district connect to a "50-100 block" district you would need to make another Tile set with both connectors. This starts to increase the number of Tiles needed and I'm not entirely sure what mathematical progression it would be when you start to get lots of different districts of both approaches together. Does it end up creating the need for "transition districts?" That is, would you need Tiles for a "Residential-Industrial Transition" district? Given all the potential districts, how many transition districts would that be?

 

Or maybe there's a better scheme?

Link to comment
Share on other sites

1 hour ago, zztong said:

I think I get it. When selecting a neighboring tile to place, make sure the road marker's match up. You wouldn't necessarily need a custom block if the code were able to look for "Road Parts", which might act something like a "Driveway Part" does on a POI.

That is what I'm trying to avoid.  For one, that only helps with roads and not with the other examples, especially the large buildings and attaching hangars/terminals to a runway correctly.  By using an invisible marker of some sort, it doesn't matter what you are connecting and can be placed wherever you want in order to provide control over connections.  Anything visible would have to be hidden in something to make it not be visible, so no reason for it to be visible in the first place.

 

1 hour ago, zztong said:

You can, actually, but you would have to make your own custom settlement. MLP made an alternative settlement where the Tile connections were water.

 

The road connections being in the center is a design convention, and the most obvious way of making a repeatable pattern with a lot of flexibility. I'll call this "center road" approach the "75th block" connection because it is halfway along a 150 block wide Tile edge.

A custom water connection between tiles would be another good example where this suggestion would work well.

 

I didn't know you could change the road position, which is good to know, but it still doesn't handle the variety of examples I had given.  I'm not saying my idea is the best option, but I think it would provide a lot of benefit to tile designers.

Link to comment
Share on other sites

9 hours ago, Riamus said:

That is what I'm trying to avoid.

 

I probably don't completely understand the details then beyond you'd like one or more placeholder blocks to indicate when Tiles should join.

 

9 hours ago, Riamus said:

I didn't know you could change the road position

 

Yep, the road only joins up by convention. RWG doesn't do anything with roads on Tiles. As far as RWG knows, an Intersection Tile is supposed to cater to roads on all four sides. It has no idea if the Tile actually does. If you were to make rwg_tile_residential_intersection_raimus_01 and not put any roads on it at all, it would still get placed in a residential district and it would look however you made it. Roads from other Tiles would just stop at the edge of their Tiles.

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

54 minutes ago, zztong said:

 

I probably don't completely understand the details then beyond you'd like one or more placeholder blocks to indicate when Tiles should join.

 

 

Yep, the road only joins up by convention. RWG doesn't do anything with roads on Tiles. As far as RWG knows, an Intersection Tile is supposed to cater to roads on all four sides. It has no idea if the Tile actually does. If you were to make rwg_tile_residential_intersection_raimus_01 and not put any roads on it at all, it would still get placed in a residential district and it would look however you made it. Roads from other Tiles would just stop at the edge of their Tiles.

The part I'm trying to avoid is using visible parts as that impress some limitations on where you can place them without them looking wrong (driveway part in water, for example).  But, it is generally similar in function.

 

It makes sense how you explain tiles and roads not mattering.  I think this suggestion or something similar can help to allow control that is lacking.

Link to comment
Share on other sites

  • 2 weeks later...

Ok, I realized today that the best way to accomplish what I am thinking is to simply use a numeric or alphanumeric code parameter for each side of a tile.  You set a code and any tile with the same code can connect to that side of the tile.  It is very easy to set up and use and gives you control of layout while still allowing randomization if desired.

 

Example:

For an airport, I might have the start of the runway set up with a code on the runway itself off runway and a code on one side for terminal.  Then I have a middle tile for the runway that just had a runway going all the way across it that has a code on both ends of runway and a code on one side for hangars.  And then I have an end to the runway with a code on the runway end of runway.

 

This then allowed the runway to be random in length (you could control length with codes as well) and puts any tile with a terminal code on a side in the position of terminal, which could be a couple different tiles with different layouts if you want, and a hangar tile with hangar code on one side that will connect to the runway in the middle and could be one or more hangar tiles with a variety of POI that can go on them to allow for variety.  Other things like residential tiles won't connect because they don't have the right code.  It seems like this would be fairly straightforward to add to the tiles and to add to RWG and offer great improvements to options in map generation.

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

Using an alphanumeric word, like a name field, seems simple but I can see complications.

 

Desired Airport:

 

      +-----+
      | GTE |
+-----+-----+-----+
| RW3 | RW2 | RW1 |
+-----+-----+-----+

 

(1) You would have to be able to leave the name blank without restricting RWG's ability to place something beside it. In this way, RWG could decide to place any other type of district beside the Tile. Example: A Tile that is the center of a 3-Tile Runway that also connects to a small regional airport tile.

 

North: Gates

South: <blank>

East: Runway

West: Runway

 

Where RWG could put Residential, Downtown, Industrial, Rural, Commercial, CountryTown, CountryResidential, OldWest or whatever player defined districts there might be. You'd only list a name when you had to specify something for continuity.

 

(2) The second complication I see is a name by itself doesn't specify a rotation. Though maybe you mean for the names to be unique which I guess would make the rotation obvious. Example:

 

North: Gates

South: <blank>

East: Runway1

West: Runway3

 

North: <blank>

South: <blank>

East: Runway2

West: <blank>

 

North: <blank>

South: <blank>

East: <blank>

West: Runway2

Link to comment
Share on other sites

18 hours ago, zztong said:

Using an alphanumeric word, like a name field, seems simple but I can see complications.

 

Desired Airport:

 

      +-----+
      | GTE |
+-----+-----+-----+
| RW3 | RW2 | RW1 |
+-----+-----+-----+

 

(1) You would have to be able to leave the name blank without restricting RWG's ability to place something beside it. In this way, RWG could decide to place any other type of district beside the Tile. Example: A Tile that is the center of a 3-Tile Runway that also connects to a small regional airport tile.

 

North: Gates

South: <blank>

East: Runway

West: Runway

 

Where RWG could put Residential, Downtown, Industrial, Rural, Commercial, CountryTown, CountryResidential, OldWest or whatever player defined districts there might be. You'd only list a name when you had to specify something for continuity.

 

(2) The second complication I see is a name by itself doesn't specify a rotation. Though maybe you mean for the names to be unique which I guess would make the rotation obvious. Example:

 

North: Gates

South: <blank>

East: Runway1

West: Runway3

 

North: <blank>

South: <blank>

East: Runway2

West: <blank>

 

North: <blank>

South: <blank>

East: <blank>

West: Runway2

You bring up good points that I hadn't really gotten into.  In terms of a blank side, I think there are two things here.  Blank would allow anything to connect to it, though RWG will still work to connect things via roads rather than putting things on blank sides. What it would do is allow you to place a tile next to a blank side if RWG was trying to go that direction, but it wouldn't just place something there without cause.  Second, there should be a null option that prevents any tile from being placed next to that side to enforce an empty space.

 

For the second part, I had mentioned being able to "control length" with codes, which was the same idea you mention.  Basically, you can use unique codes to make something appear a specific way if you want.  But you can also have a generic "runway" code that allows RWG to create random length runways.  Rotation can still be an issue if you want more random than fixed.  This may be an additional property for the tile that states which side is "north" with an option of "any" to allow some tiles to rotate and some to not rotate.  Note that the rotation setting would enforce a tile to always be one direction, but would treat "north" based on the rotation of the gateway tile.  So if a gateway tile's "north" is actually east, then any other tiles that have a north set will also have that north facing east.

 

In terms of vanilla tiles, all tiles fall under categories based on where roads are (straight, corner, etc.).  The sides with roads can simply be labeled road_center.  Sides without roads can be blank.  This would allow current tiles to connect normally and RWG could be set to look for "road" in a side's code to build a road network.  Center would just make it clear the road is in the center as is the standard right now.  The north setting would be set to any as all vanilla tiles can face any direction and be valid.  For custom tiles where roads are off-center, some standard would be needed.  It may require another setting relating to rotation because road_left wouldn't connect to road_right, which would be the rotated version that should connect.  That is something that would need to be considered to find the best option without forcing everything to always face the same way.  Forcing a rotation makes sense in some cases, but not in most.  Maybe it would make sense to combine to code with my original thought of making where roads, water, tunnels, etc. are on the side.  Not sure on that part right now.

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

Being able to control the tiles would also allow you to make your own hill terrain within a town by having tiles that slope up/down and using the codes to indicate terrain heights as well.  You'd need to create a lot of extra tiles at different heights to make that work, so it's not a simple thing, but this would make that possible.  You could make a city like San Francisco if you wanted and still have randomization if you made enough tiles at different heights in the different tile layouts.  A *lot* of work, but it would be possible and that's the idea here.  With some creativity, this type of feature would provide so many amazing options to modders and tile designers without needing to manually make maps in order to get these features.  You could have these types of things in RWG.

Link to comment
Share on other sites

  • 2 weeks later...

Well, now that I have finally released my airport map & POIs, you may be able to see how I put them together in the World Editor & Level/Prefab Editor.

 

Feel free to look into it, take it apart, try to make your own airports, etc. This may give you some more ideas where to go with random gen. I still like the idea of a grid system. 

 

On 2/15/2023 at 8:18 PM, zztong said:

he second complication I see is a name by itself doesn't specify a rotation. Though maybe you mean for the names to be unique which I guess would make the rotation obvious.

 

There is an XML attribute called RotationToFaceNorth in pretty much all prefabs. I believe there is a way to lock that rotation, which would be the key to having straight runways and runway ends that face the correct direction. 

 

On 2/15/2023 at 5:43 PM, Riamus said:

This then allowed the runway to be random in length (you could control length with codes as well) and puts any tile with a terminal code on a side in the position of terminal, which could be a couple different tiles with different layouts if you want, and a hangar tile with hangar code on one side that will connect to the runway in the middle and could be one or more hangar tiles with a variety of POI that can go on them to allow for variety.  Other things like residential tiles won't connect because they don't have the right code.  It seems like this would be fairly straightforward to add to the tiles and to add to RWG and offer great improvements to options in map generation.

 

This is pretty much how I would like to see an airport generated. They already do have the right codes, called 'Zoning' but that's mostly for POIs and not placing RWGs I think. The trick would be to lay out the RWG tiles correctly, and then the rest will follow.

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...