{"id":1842,"date":"2023-02-07T13:23:59","date_gmt":"2023-02-07T03:53:59","guid":{"rendered":"https:\/\/cosmicheroes.space\/blog\/?p=1842"},"modified":"2023-02-07T13:23:59","modified_gmt":"2023-02-07T03:53:59","slug":"map-generation-part-2","status":"publish","type":"post","link":"https:\/\/cosmicheroes.space\/blog\/index.php\/2023\/02\/07\/map-generation-part-2\/","title":{"rendered":"Map-Generation part 2"},"content":{"rendered":"\n<p>I have started looking at adapting this for HexDescribe type reasons.<\/p>\n\n\n\n<p>For example: &#8211; https:\/\/github.com\/bluetyson\/Map-Generation\/blob\/main\/src\/map.py<\/p>\n\n\n\n<p><a href=\"https:\/\/chgowiz-games.blogspot.com\/\">https:\/\/chgowiz-games.blogspot.com\/<\/a> is working on a epic random generator for a campaign you can read about at his blog &#8211; using HexDescribe https:\/\/campaignwiki.org\/hex-describe<\/p>\n\n\n\n<p>You can see some examples here <a href=\"https:\/\/docs.google.com\/spreadsheets\/d\/1G8AZf2tBOtGYr5AEKis7_AZYpJ1_T18LFYp_mi_rikY\/edit#gid=1019219400\">https:\/\/docs.google.com\/spreadsheets\/d\/1G8AZf2tBOtGYr5AEKis7_AZYpJ1_T18LFYp_mi_rikY\/edit#gid=1019219400<\/a> and <a href=\"https:\/\/pastebin.com\/raw\/W9zgH3pN\">https:\/\/pastebin.com\/raw\/W9zgH3pN<\/a><\/p>\n\n\n\n<p>Borrowing his business classifications for an example for the Map-Generation software:<\/p>\n\n\n\n<p>The output for this program is GeoJSON, so thanks to <a href=\"https:\/\/qgis.org\/en\/site\/\">QGIS<\/a> &#8211; which is great open source software. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-attachment-id=\"1843\" data-permalink=\"https:\/\/cosmicheroes.space\/blog\/index.php\/2023\/02\/07\/map-generation-part-2\/image-5-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/cosmicheroes.space\/blog\/wp-content\/uploads\/2023\/02\/image-5.png?fit=799%2C837&amp;ssl=1\" data-orig-size=\"799,837\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image-5\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/cosmicheroes.space\/blog\/wp-content\/uploads\/2023\/02\/image-5.png?fit=286%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/cosmicheroes.space\/blog\/wp-content\/uploads\/2023\/02\/image-5.png?fit=525%2C550&amp;ssl=1\" decoding=\"async\" loading=\"lazy\" width=\"525\" height=\"550\" src=\"https:\/\/i0.wp.com\/cosmicheroes.space\/blog\/wp-content\/uploads\/2023\/02\/image-5.png?resize=525%2C550&#038;ssl=1\" alt=\"\" class=\"wp-image-1843\" srcset=\"https:\/\/i0.wp.com\/cosmicheroes.space\/blog\/wp-content\/uploads\/2023\/02\/image-5.png?w=799&amp;ssl=1 799w, https:\/\/i0.wp.com\/cosmicheroes.space\/blog\/wp-content\/uploads\/2023\/02\/image-5.png?resize=286%2C300&amp;ssl=1 286w, https:\/\/i0.wp.com\/cosmicheroes.space\/blog\/wp-content\/uploads\/2023\/02\/image-5.png?resize=768%2C805&amp;ssl=1 768w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-attachment-id=\"1844\" data-permalink=\"https:\/\/cosmicheroes.space\/blog\/index.php\/2023\/02\/07\/map-generation-part-2\/image-6-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/cosmicheroes.space\/blog\/wp-content\/uploads\/2023\/02\/image-6.png?fit=1116%2C835&amp;ssl=1\" data-orig-size=\"1116,835\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image-6\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/cosmicheroes.space\/blog\/wp-content\/uploads\/2023\/02\/image-6.png?fit=300%2C224&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/cosmicheroes.space\/blog\/wp-content\/uploads\/2023\/02\/image-6.png?fit=525%2C393&amp;ssl=1\" decoding=\"async\" loading=\"lazy\" width=\"525\" height=\"393\" src=\"https:\/\/i0.wp.com\/cosmicheroes.space\/blog\/wp-content\/uploads\/2023\/02\/image-6.png?resize=525%2C393&#038;ssl=1\" alt=\"\" class=\"wp-image-1844\" srcset=\"https:\/\/i0.wp.com\/cosmicheroes.space\/blog\/wp-content\/uploads\/2023\/02\/image-6.png?resize=1024%2C766&amp;ssl=1 1024w, https:\/\/i0.wp.com\/cosmicheroes.space\/blog\/wp-content\/uploads\/2023\/02\/image-6.png?resize=300%2C224&amp;ssl=1 300w, https:\/\/i0.wp.com\/cosmicheroes.space\/blog\/wp-content\/uploads\/2023\/02\/image-6.png?resize=768%2C575&amp;ssl=1 768w, https:\/\/i0.wp.com\/cosmicheroes.space\/blog\/wp-content\/uploads\/2023\/02\/image-6.png?w=1116&amp;ssl=1 1116w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" data-recalc-dims=\"1\" \/><figcaption class=\"wp-element-caption\">closeup example<\/figcaption><\/figure>\n\n\n\n<p>Randomly perturbed Voronoi generation seems to work well for the random wanderiness of towns or cities that spring up.<\/p>\n\n\n\n<p>The original code has churches, monasteries and Cathedrals.  Pretty sure our D&amp;D type games don&#8217;t need that sort of building type overload.<\/p>\n\n\n\n<p>As well as GeoJSON &#8211; it has a viewer script that is basically QTing a PNG, so your usual plt.savefig() before that will get you that version of the output, saved, too.  Need to make one that is labelled &#8211; maybe a <a href=\"https:\/\/geopandas.org\/en\/stable\/ version\">geopandas<\/a> .<\/p>\n\n\n\n<p>Converting this to perl directly would take a bit of work &#8211; no higher level geospatial apis like <a href=\"https:\/\/shapely.readthedocs.io\/en\/stable\/manual.html\">shapely <\/a>around there, so would have to redo in gdal directly :- https:\/\/metacpan.org\/pod\/Geo::GDAL.  Probably easier to wrap, for fun.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have started looking at adapting this for HexDescribe type reasons. For example: &#8211; https:\/\/github.com\/bluetyson\/Map-Generation\/blob\/main\/src\/map.py https:\/\/chgowiz-games.blogspot.com\/ is working on a epic random generator for a campaign you can read about at his blog &#8211; using HexDescribe https:\/\/campaignwiki.org\/hex-describe You can see some examples here https:\/\/docs.google.com\/spreadsheets\/d\/1G8AZf2tBOtGYr5AEKis7_AZYpJ1_T18LFYp_mi_rikY\/edit#gid=1019219400 and https:\/\/pastebin.com\/raw\/W9zgH3pN Borrowing his business classifications for an example for the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/cosmicheroes.space\/blog\/index.php\/2023\/02\/07\/map-generation-part-2\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Map-Generation part 2&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[217,17,101,3],"tags":[539,538,26,325,542,537,540],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paET2V-tI","jetpack-related-posts":[{"id":1822,"url":"https:\/\/cosmicheroes.space\/blog\/index.php\/2023\/02\/06\/map-generation-cities-and-towns\/","url_meta":{"origin":1842,"position":0},"title":"Map Generation &#8211; Cities and Towns","author":"richard","date":"February 6, 2023","format":false,"excerpt":"https:\/\/github.com\/LAVS-TM\/Map-Generation A program that can generate cities and towns, medieval Voronoi style. Along with a viewer that can produce graphcis the base output is json, which gives you vector data to use with other things. Very nice! Sample city Here is an example of a possible\u00a0configuration\u00a0for the city to be\u2026","rel":"","context":"In &quot;Data Science&quot;","block_context":{"text":"Data Science","link":"https:\/\/cosmicheroes.space\/blog\/index.php\/category\/data-science\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1809,"url":"https:\/\/cosmicheroes.space\/blog\/index.php\/2023\/02\/06\/welsh-piper-hex-map-algorithm-python\/","url_meta":{"origin":1842,"position":1},"title":"Welsh Piper hex map algorithm &#8211; Python","author":"richard","date":"February 6, 2023","format":false,"excerpt":"In relation to HexDescribe and TextMapper - the random or Smale algorithm is the Welsh Piper's. https:\/\/welshpiper.com\/hex-based-campaign-design-part-1\/ There's a follow on part linked for stocking hexes. I translated this to python - partly as a ChatGPT exercise. https:\/\/github.com\/bluetyson\/Dungeon23-Mokuy\/blob\/main\/smale.py Where I did a few tweaks of the Primary and Secondary maps\u2026","rel":"","context":"In &quot;Data Science&quot;","block_context":{"text":"Data Science","link":"https:\/\/cosmicheroes.space\/blog\/index.php\/category\/data-science\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1164,"url":"https:\/\/cosmicheroes.space\/blog\/index.php\/2020\/04\/19\/cepheids-dungeon-tool-the-mite-massacre\/","url_meta":{"origin":1842,"position":2},"title":"Cepheid&#8217;s Dungeon Tool &#8211; the Mite Massacre","author":"richard","date":"April 19, 2020","format":false,"excerpt":"https:\/\/docs.google.com\/spreadsheets\/d\/1rus2u7HBCNQe_Mi0zhMXZQJbDY4lQ-02vfgBuE6grQM\/edit#gid=1081359187 Yesterday I knew I had a random dungeon generated in text that wasn't the DMG, so went to have a look in pos-migraine can't be bothered doing anything recovery. Found the below. The above dungeon google spreadsheet has a nice way of drawing a map by using conditional formatting\u2026","rel":"","context":"In &quot;RPG&quot;","block_context":{"text":"RPG","link":"https:\/\/cosmicheroes.space\/blog\/index.php\/category\/rpg\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":745,"url":"https:\/\/cosmicheroes.space\/blog\/index.php\/2018\/10\/28\/random-super-agents-generation-for-classic-marvel-rpg\/","url_meta":{"origin":1842,"position":3},"title":"Random Super Agents Generation for Classic Marvel RPG","author":"richard","date":"October 28, 2018","format":false,"excerpt":"From Republic of Replicants. Random Super Agent Generation A fun touch - random facial hair. This is good, as what is in the game is very generic, and no supplement as such. Thinking about the Ingurian Science Police, this can be nicely adapted.","rel":"","context":"In &quot;RPG&quot;","block_context":{"text":"RPG","link":"https:\/\/cosmicheroes.space\/blog\/index.php\/category\/rpg\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":536,"url":"https:\/\/cosmicheroes.space\/blog\/index.php\/2018\/05\/19\/fantasy-weather-generation\/","url_meta":{"origin":1842,"position":4},"title":"Fantasy weather generation","author":"richard","date":"May 19, 2018","format":false,"excerpt":"Random generation of weather discussion, with some code. https:\/\/plus.google.com\/+SunDamageOmen\/posts\/aSENtFGZEkM Fantasy weather generation","rel":"","context":"In &quot;Fantasy&quot;","block_context":{"text":"Fantasy","link":"https:\/\/cosmicheroes.space\/blog\/index.php\/category\/fantasy\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":541,"url":"https:\/\/cosmicheroes.space\/blog\/index.php\/2018\/05\/19\/pits-perilous-weather-generation\/","url_meta":{"origin":1842,"position":5},"title":"Pits Perilous weather generation","author":"richard","date":"May 19, 2018","format":false,"excerpt":"Random weather generation from a retired meterologist. http:\/\/pitsperilous.blogspot.com.au\/search?updated-max=2017-10-03T14:31:00-07:00&max-results=4&start=16&by-date=false","rel":"","context":"In &quot;Fantasy&quot;","block_context":{"text":"Fantasy","link":"https:\/\/cosmicheroes.space\/blog\/index.php\/category\/fantasy\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/cosmicheroes.space\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1842"}],"collection":[{"href":"https:\/\/cosmicheroes.space\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cosmicheroes.space\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cosmicheroes.space\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cosmicheroes.space\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=1842"}],"version-history":[{"count":1,"href":"https:\/\/cosmicheroes.space\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1842\/revisions"}],"predecessor-version":[{"id":1845,"href":"https:\/\/cosmicheroes.space\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1842\/revisions\/1845"}],"wp:attachment":[{"href":"https:\/\/cosmicheroes.space\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cosmicheroes.space\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1842"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cosmicheroes.space\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}