A recent discussion on Bob Cordery's blog, regarding generating random layouts for Portable Wargame boards, led me back to an idea I had some years ago for using MS Excel's conditional formatting function to do just that. Put simply, when a condition is met by the content of a spreadsheet cell, another cell will automatically be populated, say by a coloured fill. This enables a PW Grid to be randomly populated with colours representing scenery.
The following demonstrates this using a 6x6 grid, a system I'm currently trying using 3x3PW rules.
Two identical grids are made, one contains a random number generating function, in this case set between 1 and 20, though this can easily be altered. The other has the conditional formatting set in each corresponding cell.
The sheet I have generated will populate the squares using the above values - I put two possible options for wooded/forested squares which I may edit. The hills and woods are universal across all 36 of the grids; the lakes are restricted to the middle two rows, and the Built Up Areas are restricted to the centre 4 squares. This was just a preference for my own purposes. The type of terrain to be generated can be tailored by the settings of the formatting.
Following are a few random examples that were created with the above settings:
Adding other features such as roads or rivers automatically is currently beyond the scope of this spreadsheet, however Lakes need to be fed by a water feature and settlements usually have some sort of track/road going to them, so these can be added as makes some sort of sense.
Good little exercise, MJT. How would you modify your conditional formatting routine if you wanted to place woods (or BUA) upon a hill?
ReplyDeleteI'll have to think about that and come back to you Jonathan!
Delete