Wednesday, December 14, 2022

Distributing Infrastructure in a Pseudo-medieval, Fantasy Ireland

I'm experimenting with methods of procedurally generating plausible settings for TTRPGs, and here I'm specifically looking at the distribution of infrastructure. This exercise will follow, pretty closely, my interpretation of a system that Alexis Smolensk has developed for his own setting.

I have as external inputs the SRTM elevation data from the USGS and a list of the 60 largest settlements on the island of Ireland according to the 2011 Northern Ireland Census and 2016 Census of Ireland. Because I'd like to simulate a population somewhat like a 16th century Europe, I will make assumptions about total population of the island and its distribution. Estimates I've found of the island's population in the 1500's is around 800,000 and so I'm taking that figure as the first assumption. My second is that in a medieval, agrarian society, some 8% of the population might reside in urban locations. That might be on the high side, historically, but since I'll be scaling the 60 starting settlements accordingly only one of them will end up with a population over 10,000 and one more over 5,000, representing a little under 4% of the total population which is good enough for me to start.

One convenient thing about this exercise is that I can execute it over and over very quickly using different assumptions. While I'm interested in making reasonable and justifiable assumptions, I needn't fixate on getting them right the first time. Indeed, much of what I hope to gain through this exercise is refinement of these assumptions and procedures.

In order to execute Alexis' infrastructure method, I first need to assign, to each of the 18-mile hexes of which the island is composed, an elevation. I'm starting with data that has 3-second arc precision, about 90m, so going out to 18 miles is going to mean averaging tens of thousands of data points to get one figure for the 280.6 square miles the hex covers.

The image below provides a sense of the number of elevations to be counted. Notice that they have varying area, so some of these points will contribute more or less to the average for the 18-mile hex depending on how large each polygon is.

Up close, the input data looks like this:

 


I had a fair amount of foundational work to build before writing the program to actually do the hex grid calculation, so it was two days later before I was able to actually execute this. For the whole island of Ireland, the program ran for about 14 minutes, which isn't great, but I'll call it good enough since it's I'm not planning to re-execute many times.

There are 272 18-mile hexes in my grid over Ireland, although I could have selected a tighter grid if I had been careful, many of them are water only, but really there's no harm in having the extras; they don't eat much.

Here are the results, zoomed in fairly close, and with the contours turned on, because I'm rethinking the role of elevation, at least at the 18-mile hex scale, as not as helpful to what I want to achieve as what the contours say could be.

The small, black numbers are just my hex labels, the larger, red numbers toward the upper right of each hex are the average elevation figures in meters. I think for infrastructure distribution purposes I might consider counting contours between the centers of each hex, or something like that, instead. For now, though, I'll move on with the next step given the answers I have at the moment.

The population of settlements forms the basis for distributing infrastructure. The population assumptions are 1) total island population 800,000 and 2) 8% of the population resides in settlements (that is, the "urban" population). My input data for the 60 largest settlements on the island indicate the 48% of the contemporary population of the island lives in those settlement. This scales the size of the setting's settlements to about 1.88% of their contemporary population.

Given that infrastructure is driven by settlement, each 18-mile hex containing one or more settlements will start with an infrastructure number equal to the hex's proportion of the total urban population times the island's population divided by the area of an 18-mile hex.

This initial assignment sets a number above 0 in about 20% of the hexes with a very steep drop off from the highest at 1,074 to 468 to 221 and then decreasing with a gradually flattening slope with about half of the 52 hexes with some infrastructure number having between 10 and 20, and after 10 dropping to 0.

The next step of contributing infrastructure points to nearby hexes will take another slug of work, so I'll leave off here for now.

No comments:

Post a Comment