{"id":1738,"date":"2023-01-28T15:51:41","date_gmt":"2023-01-28T06:21:41","guid":{"rendered":"https:\/\/cosmicheroes.space\/blog\/?p=1738"},"modified":"2023-01-28T15:52:19","modified_gmt":"2023-01-28T06:22:19","slug":"chatgpt-uses-random-tables","status":"publish","type":"post","link":"https:\/\/cosmicheroes.space\/blog\/index.php\/2023\/01\/28\/chatgpt-uses-random-tables\/","title":{"rendered":"ChatGPT uses &#8211; random tables"},"content":{"rendered":"\n<p>Things along these lines:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>please continue as above, starting at 22\n22: {\n'6th Level': 'Spiritwrack',\n'7th Level': None,\n'8th Level': None,\n'9th Level': None\n},\n23: {\n'6th Level': 'Stone To Flesh',\n'7th Level': None,\n'8th Level': None,\n'9th Level': None\n},\n24: {\n'6th Level': 'Tenser's Transformation',\n'7th Level': None,\n'8th Level': None,\n'9th Level': None\n}\n}\n\n\n\n\nplease continue as above, starting at 17\nSure, here is the python dictionary for the table starting at level 17:\n\npython\nCopy code\nspells = {\n    6: {\n        '17': 'Otiluke\\'s Freezing Sphere',\n        '18': 'Part Water',\n        '19': 'Project Image',\n        '20': 'Reincarnation',\n        '21': 'Repulsion',\n        '22': 'Spiritwrack',\n        '23': 'Stone To Flesh',\n        '24': 'Tenser\\'s Transformation'\n    },\n    7: {\n    },\n    8: {\n    },\n    9: {\n    },\n}\nPlease note that the numbers in the outermost dictionary are the spell level and the numbers in the innermost dictionaries are the spell numbers.\n\n\n\n\n\ncan you give me the full 7th 8th and 9th levels as above?\nSure, here is the full python dictionary for the 7th, 8th, and 9th levels:\n\npython\nCopy code\n{\n    7th Level: {\n    '1': 'Anti-Magic Shell',\n    '2': 'Bigby's Grasping Hand',\n    '3': 'Bigby's Forceful Hand',\n    '4': 'Control Weather',\n    '5': 'Death Spell',\n    '6': 'Disintegrate',\n    '7': 'Enchant An Item',\n    '8': 'Extension III',\n    '9': 'Geas',\n    '10': 'Glassee',\n    '11': 'Globe Of Invulnerability',\n    '12': 'Guards And Wards',\n    '13': 'Invisible Stalker',\n    '14': 'Legend Lore',\n    '15': 'Lower Water',\n    '16': 'Monster Summoning IV',\n    '17': 'Move Earth',\n    '18': 'Otiluke's Freezing Sphere',\n    '19': 'Part Water',\n    '20': 'Project Image',\n    '21': 'Reincarnation',\n    '22': 'Repulsion',\n    '23': 'Spiritwrack',\n    '24': 'Stone To Flesh',\n    '25': 'Tenser's Transformation'\n    },\n    8th Level: {\n    '1': 'Antipathy\/Sympathy',\n    '2': 'Cacodemon',\n    '3': 'Bigby's Clenched Fist',\n    '4': 'Bigby's Crushing Hand',\n    '5': 'Charm Plants',\n    '6': 'Clone',\n    '7': '\n\n\n\nplease finish the table from 3 responses ago that ended at 21: {\n'Move Earth': '',\n'Vanish': '',\n'Trap The Soul': '',\n},\n22: {\n'Otiluke's Freezing Sphere': '',\n'Part Water': '',\n'Project Image': '',\n'Reincarnation': '',\n'Repulsion': '',\n'Spiritwrack': '',\n'Stone To Flesh': '',\n'Tenser's Transformation': '',\n},\n23: {\n'Anti-Magic Shell': 'Bigby's Grasping Hand',\n'Bigby's Forceful Hand': 'Cacodemon',\n'Control Weather': 'Charm Plants',\n'Death Spell': 'Delayed Blast Fireball',\n'Disintegrate': \"Drawmij's Instant Summons\",\n'Enchant An Item': 'Duo-Dimension',\n'Extension III': 'Limited Wish',\n'Geas': 'Mass Invisibility',\n'Glassee': 'Monster Summoning V',\n'Globe Of Invulnerability': \"Mordenkainen's Sword\",\n},\n\n\n\n\nThe below, for if I want to rewrite to lazily add to my generic shared host here.\n\nconvert this python function to perl     def random_check():\n        pc_dict = {}\n        pc = roll_dice(1,20)\n        \n        if pc &lt;= 2:\n            pc_dict&#91;'direction'] = 'ahead'\n            pc_dict&#91;'check'] = 6\n        elif pc >= 3 and pc &lt;= 5:\n            pc_dict&#91;'direction'] = 'exit'\n            pc_dict&#91;'check'] = 6\n        elif pc >= 6 and pc &lt;= 10:\n            pc_dict&#91;'direction'] = 'side'\n            pc_dict&#91;'check'] = 3\n        elif pc >= 11 and pc &lt;= 13:\n            pc_dict&#91;'direction'] = 'turn'\n            pc_dict&#91;'check'] = 3\n        elif pc >= 14 and pc &lt;= 16:\n            pc_dict&#91;'direction'] = 'room'\n            pc_dict&#91;'check'] = 3\n        elif pc == 17:\n            pc_dict&#91;'direction'] = 'level'\n            pc_dict&#91;'check'] = 'up_down'\n            if LEVEL == \"N\": #make this what you like or could be config\n                pc_dict&#91;'direction'] = 'room'\n                pc_dict&#91;'check'] = 3\n        elif pc == 18:\n            pc_dict&#91;'direction'] = 'stop'\n            pc_dict&#91;'check'] = 'spy_things'\n        elif pc == 19:\n            pc_dict&#91;'direction'] = 'bad_things'\n            pc_dict&#91;'check'] = 3\n        elif pc == 20:\n            pc_dict&#91;'direction'] = 'random_encounter'\n            pc_dict&#91;'check'] = 'roll_again'\n            \n\n        if VERBOSITY:\n            print(\"RANDOM_CHECK\",pc, pc_dict&#91;'direction'])\n\n        #test purposes\n        #pc_dict&#91;'direction'] = 'ahead'\n\n        return pc_dict\nsub random_check {\nmy $pc_hash = {};\nmy $pc = roll_dice(1,20);\n\nif ($pc &lt;= 2) {\n$pc_hash->{'direction'} = 'ahead';\n$pc_hash->{'check'} = 6;\n} elsif ($pc >= 3 &amp;&amp; $pc &lt;= 5) {\n$pc_hash->{'direction'} = 'exit';\n$pc_hash->{'check'} = 6;\n} elsif ($pc >= 6 &amp;&amp; $pc &lt;= 10) {\n$pc_hash->{'direction'} = 'side';\n$pc_hash->{'check'} = 3;\n} elsif ($pc >= 11 &amp;&amp; $pc &lt;= 13) {\n$pc_hash->{'direction'} = 'turn';\n$pc_hash->{'check'} = 3;\n} elsif ($pc >= 14 &amp;&amp; $pc &lt;= 16) {\n$pc_hash->{'direction'} = 'room';\n$pc_hash->{'check'} = 3;\n} elsif ($pc == 17) {\n$pc_hash->{'direction'} = 'level';\n$pc_hash->{'check'} = 'up_down';\nif ($LEVEL eq \"N\") {\n$pc_hash->{'direction'} = 'room';\n$pc_hash->{'check'} = 3;\n}\n} elsif ($pc == 18) {\n$pc_hash->{'direction'} = 'stop';\n$pc_hash->{'check'} = 'spy_things';\n} elsif ($pc == 19) {\n$pc_hash->{'direction'} = 'bad_things';\n$pc_hash->{'check'} = 3;\n} elsif ($pc == 20) {\n$pc_hash->{'direction'} = 'random_encounter';\n$pc_hash->{'check'} = 'roll_again';\n}\n\nif ($VERBOSITY) {\nprint \"RANDOM_CHECK $pc $pc_hash->{'direction'}\\n\";\n}\n\nreturn $pc_hash;\n}\n\n\n\n\nI had already done monsters before I thought of this - and they were standard mostly, so a parser did all 10 levels reasonbly well.\nDid magic items and spells with ChatGPT assistance.  Possibly not lots and lots quicker - but easier on the fingers and wrists.\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Things along these lines:<\/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,3],"tags":[316,362,325,77],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paET2V-s2","jetpack-related-posts":[{"id":1710,"url":"https:\/\/cosmicheroes.space\/blog\/index.php\/2023\/01\/23\/add-1e-random-dungeon-generator-binder\/","url_meta":{"origin":1738,"position":0},"title":"AD&#038;D 1e Random Dungeon Generator Binder","author":"richard","date":"January 23, 2023","format":false,"excerpt":"So you can run this in a browser: https:\/\/mybinder.org\/v2\/gh\/bluetyson\/ADnD1e-Random-Dungeon-Generator\/HEAD click the above to fire up a web container environment that lets you run this in your browser you get jupyterlab, just click on the terminal link at the lower left and then type 'python dungeon.py 1' [or however many rolls\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":1738,"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":1788,"url":"https:\/\/cosmicheroes.space\/blog\/index.php\/2023\/02\/03\/dungeon23-025-ruby-base-level-24-key-1-2-2-2-2-2-2-2-2\/","url_meta":{"origin":1738,"position":2},"title":"Dungeon23 \u2013 033 Ruby Base Level 24 Key 9","author":"richard","date":"February 3, 2023","format":false,"excerpt":"Level 24 is the Captain's quarters; GM: At Key 9 is a whole bunch of storage of fancy captain gear, supplies, weapons and booze. Along with one stuffed bear, for some unaccountable reason. Ruby Base Level 24 Storage crates. Random stuffed bear.","rel":"","context":"In &quot;Historical&quot;","block_context":{"text":"Historical","link":"https:\/\/cosmicheroes.space\/blog\/index.php\/category\/historical\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/cosmicheroes.space\/blog\/wp-content\/uploads\/2023\/01\/gridmapper-mapLevel24-2.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/cosmicheroes.space\/blog\/wp-content\/uploads\/2023\/01\/gridmapper-mapLevel24-2.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/cosmicheroes.space\/blog\/wp-content\/uploads\/2023\/01\/gridmapper-mapLevel24-2.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":1164,"url":"https:\/\/cosmicheroes.space\/blog\/index.php\/2020\/04\/19\/cepheids-dungeon-tool-the-mite-massacre\/","url_meta":{"origin":1738,"position":3},"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":1698,"url":"https:\/\/cosmicheroes.space\/blog\/index.php\/2023\/01\/23\/add-1e-random-dungeon-generator-version-0-3\/","url_meta":{"origin":1738,"position":4},"title":"AD&#038;D 1e Random Dungeon Generator Version 0.3","author":"richard","date":"January 23, 2023","format":false,"excerpt":"I just update to this and i just generated a short dungeon. For reference, this is '10 rolls' See the GitHub README for a bit more details. https:\/\/github.com\/bluetyson\/ADnD1e-Random-Dungeon-Generator DUNGEON BBBBBCCHlCOCCCBBBBCCCCCHlCBBBBBBBBCCCCwmCBBBBBBBBBBBBCBCBBBBBBBBBBBCCCCBBBBBBBBBBCCCwmBBBBBBBBBCBBBBBBBBBBBBCBBBBBBBBBBBBCBBBBBBBBBBBBBCBBBBBBBBBBBBBCBBBBBBBBBBBBBCBBBBBBBBBBBBBCBBBBBBBBBBBBBCBBBBBBBBBBBBDsdCDBBBBBBBBBBR2R2R1R1R1R1R1R1R1R1R1BBBR2R2R1R1R1R1R1R1R1R1R1BBBR2R2R1R1R1R1R1R1R1R1R1BBBR2R2R1R1R1R1R1R1R1R1R1CCHlCBBR1mR1R1R1R1R1R1R1R1CCHlCBBR1R1R1R1R1R1R1R1R1BBBBBR1R1R1R1R1R1R1R1R1BBBBBR1R1R1R1R1R1R1R1R1BBBBBR1R1R1R1R1R1R1R1R1BBBBBR1R1R1R1gR1R1R1R1R1BBBBBR1R1R1R1R1R1R1R1R1BBBBBR1R1R1R1R1R1R1R1R1BBBBBR1R1R1R1R1R1R1R1R1BBBBBBBBBBBBBCBBBBBBBBBBBBBCBBBBBBBBBBBBBCBBBData: 1{'shape': 'R', 'size': [9, 13], 'water': 'N', 'fancy_shape': 'H', 'fromdoor': 'Y', 'contents': {'monster': {'level': 1, 'type': 'Orc', 'No': 8, 'XP':\u2026","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":820,"url":"https:\/\/cosmicheroes.space\/blog\/index.php\/2018\/11\/06\/witchblade-sara-pezzini\/","url_meta":{"origin":1738,"position":5},"title":"Witchblade &#8211; Sara Pezzini","author":"richard","date":"November 6, 2018","format":false,"excerpt":"From Ben Riely http:\/\/imagecomix.angelfire.com\/sarapezzini.html Witchblade Sara Pezzini F) Rm30\/Ex20 A) Rm30\/Gd10 S) Am50\/Ty6 E) Am50\/Ex20 R) Gd10 I) Ex20 P) Rm30 Health: 160\/56 Karma: 60 Resources: Ty Pop: 10 Known Powers: None Equipment: Witchblade: Sara Pezzini herself has no superhuman abilities. Her power resides within the Witchblade and is limited\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":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/cosmicheroes.space\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1738"}],"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=1738"}],"version-history":[{"count":2,"href":"https:\/\/cosmicheroes.space\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1738\/revisions"}],"predecessor-version":[{"id":1740,"href":"https:\/\/cosmicheroes.space\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1738\/revisions\/1740"}],"wp:attachment":[{"href":"https:\/\/cosmicheroes.space\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1738"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cosmicheroes.space\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1738"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cosmicheroes.space\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}