Open rhysmakesthings opened 2 years ago
I have completed my special case graph rewriting code, so now i need to hook some world generation code I already had into it. I might need to expand the world generation code before starting on the rewrite rules themselves because at the moment it just has places and creatures, no characters yet.
Faction generation working. Now with a larger world model than my initial test it looks like I've got some bugs to quash in the graph finding code.
Bugs quashed and Characters generating. The characters are given graph edges to other characters in their hex with emotions. "hate", "friendly", "love", "dislike", "ambivalent etc.
Resources added and first proper graph search of the generated world model happening. Uncovered some pretty bad inefficiences that will need to be squashed.
Inefficiencies largely dealt with. I think there's still a bug floating around, but it's functional enough that I can use it to start doing some graph rewriting. Next step: write rules and get some output!
Done! Find the full example output as a webpage here: https://github.com/rhysmakesthings/rpgcampaign_setting_nanogenmo/tree/main
Live version and code at: rhysmakesthings.com/gm_friend. Press "Random" in the sidebar to generate a map (change the height and width to a reasonable size, depending on your settings it will hang for a bit), and then right click on individual hexes to view the hex information (scroll down to the notes section). Right click on the map again to return to the main level. "Show factions" checkbox in the sidebar is also useful. The "graph finding" code is in js/graph.js at the website and the model building is in "js/data.js" and "js/world_generator.js"
And a preview of the first hex below.
I hit the target, but it really needs some formatting improvements. It also ended up quite violent, so theres lots of room for more interesting rules that aren't just about killing.
This hex is controlled by the Zerind Sultanate
Jaren Hariga the knightFaction:Zerind SultanateHP:1.5HDAC:13Hit Bonus:1Attacks:1Jaren Hariga hates the Damire, and will reward you for killing them.
Jaren Hariga wants help preventing Nanalm Vonenda from harming the Mellor. They do not believe the monsters should be slain for no reason.
Heriurle Mathara the witchFaction:Zerind SultanateHP:3HDAC:13Hit Bonus:6Attacks:3Level 1 SpellsDetect MagicLightLevel 2 SpellsWebHeriurle Mathara wants help preventing Jaren Hariga from harming the Damire. They do not believe the monsters should be slain for no reason.
Verageli Relrlill the thiefFaction:Zerind SultanateHP:1AC:12Hit Bonus:0Attacks:1Nanalm Vonenda the artistFaction:Zerind SultanateHP:9HDAC:18Hit Bonus:9Attacks:1Level 1 SpellsSleepShieldLevel 2 SpellsPhantasmal ForceNanalm Vonenda hates the Carso, and will reward you for killing them.
Nanalm Vonenda hates the Mellor, and will reward you for killing them.
Tirilli Idrasil the sailorFaction:Zerind SultanateHP:1AC:12Hit Bonus:0Attacks:1Tirilli Idrasil wants help taking down Jaren Hariga in order to stop them from harming Damire.
Tirilli Idrasil wants help taking down Nanalm Vonenda in order to stop them from harming Mellor.
Tirilli Idrasil wants help preventing Nanalm Vonenda from harming the Carso. They do not believe the monsters should be slain for no reason.
Donrra Calia the blacksmithFaction:Zerind SultanateHP:1.5HDAC:13Hit Bonus:1Attacks:1Damire (monster)Monster (Theme:growth)Appearance:Butterfly-entHP:3HDAC:12Hit Bonus:3Attacks:2Number Appearing:1-3Level 1 SpellsPurify Food and WaterProtection from EvilIntelligence:IntelligentCarso (monster)Monster (Theme:growth)Appearance:golemHP:1AC:12Hit Bonus:0Attacks:1Number Appearing:1-1Intelligence:IntelligentOzienor (monster)Monster (Theme:growth)Appearance:elementalHP:3HDAC:11Hit Bonus:3Attacks:2Number Appearing:1-3Special:heal each turn HD/2Intelligence:AnimalLarat (monster)Monster (Theme:growth)Appearance:BoarHP:6HDAC:15Hit Bonus:6Attacks:1Number Appearing:1-2Intelligence:NoneMellor (monster)Monster (Theme:antlers)Appearance:MinkHP:1.5HDAC:13Hit Bonus:1Attacks:1Number Appearing:3-5Intelligence:IntelligentSaveld (monster)Monster (Theme:growth)Appearance:Lemur-TermiteHP:3HDAC:11Hit Bonus:3Attacks:2Number Appearing:1-1Level 1 SpellsProtection from EvilDetect MagicIntelligence:IntelligentFound an amusing hex where everyone wants to get their hands on item called "The Sword of Old Men"
(15,8)East Andalo This hex is controlled by the Black Grkol Society
Netrrirvala Samond the warlock Faction:Jellyfish Union HP:2HD AC:12 Hit Bonus:2 Attacks:2 Netrrirvala Samond guards sword of old men
Netrrirvala Samond wants help preventing Theraya Ulueyn from harming the Desakalo. They do not believe the monsters should be slain for no reason.
Mazona Chosseh the man Faction:Black Grkol Society HP:1HD AC:13 Hit Bonus:1 Attacks:1 Mazona Chosseh says that Netrrirvala Samond is guarding the sword of old men, and they will pay you for its return.
Mazona Chosseh wants you to find the sword of old men fast before it is taken by Ahrniel Thand. If you can prevent Ahrniel Thand from retrieving the item they will reward you.
Ahrniel Thand the diplomat Faction:Black Grkol Society HP:1HD AC:13 Hit Bonus:1 Attacks:1 Ahrniel Thand says that the Netrrirvala Samond are also guarding the sword of old men, and they will pay you for its return.
Chush Talven the cook Faction:Sanayn Union HP:4HD AC:14 Hit Bonus:4 Attacks:1 Chush Talven would like the PCs to retrieve the sword of old men from where it is guarded by Netrrirvala Samond.
Chush Talven wants you to find the sword of old men fast before it is taken by Theraya Ulueyn. If you can prevent Theraya Ulueyn from retrieving the item they will reward you.
Theraya Ulueyn the fletcher Faction:Black Grkol Society HP:2HD - 2 AC:13 Hit Bonus:1 Attacks:1 Theraya Ulueyn hates the Desakalo, and will reward you for killing them.
Theraya Ulueyn would like the PCs to retrieve the sword of old men from where it is guarded by the Netrrirvala Samond.
Your maps are beautiful.
This is great! I love the monster themes and special abilities. This already seems like a really useful tool for worldbuilding!
Your maps are beautiful.
Thanks! Adding the faction colours really makes them pop.
This is great! I love the monster themes and special abilities. This already seems like a really useful tool for worldbuilding!
Thank you! Yeah the idea is to provide evocative details so you can use it as a starting point or something you can improvise from.
I will attempt to generate something akin to a tabletop rpg adventure book, generating a world and then using graph rewriting to create quests within that world that match the world model.
E.G. World Model: King Alexander = Character The Baronies = Faction Irvin Gold Mine = Resource The United Banners = Army King Alexander belongs to Faldland. King Alexander hates The Baronies. King Alexander controls The United Banners The Baronies control Irvin Gold Mine
Graph Rewriting Rule: (A hates B + A controls Army) -> (A at war with B, Army attacking B) (A hates B + B controls Resource) -> (A wants to sabotage B)
Result: King Alexander is at war with The Baronies. Under his command, The United Banners attack The Baronies. He will pay adventurers to sabotage the Irvin Gold Mine which is under The Baronies control.
Will be interesting to see how effective this attempt is, and how slow the performance will get since graph rewriting is not fast.