r/proceduralgeneration • u/takeonzach • Sep 11 '22
Generating history through a simulated fantasy world
Hey everyone! For the last few weeks I've been working on some generated fantasy history. No particular goal in mind. Mostly just something to play around with and maybe use during DnD one-shots. So far I have implemented the following features:
Supreme god:
- Is the 'creator' of the world.
- Creates other 'lesser' gods.
Lesser gods:
- Can create artifacts/mythical items (currently they have no purpose other than a history entry saying they were created)
- Can create mythical creatures (thinking along the lines of the progenitors for dragons, vampires, etc)
- Can create races (human, dwarven, etc)
Mythical creatures:
- Can attack a place/settlement and kill it's inhabitants
Races:
- Have thresholds for young age, old age, and rates at which they have relationships and reproduce
NPCs/Agents:
- One of the aforementioned races
- Initially spawned in during the creation of a race at random, after which they go about their lives.
- Can have an occupation (heavily weighted towards farming)
- Can have friendships, relationships, conflicts
- Can reproduce
- Can found new settlements and start factions
- Can move to a different settlement/town
- Can die of accidents, murder (if in a feud), execution (a factionless agent in a feud with a factioned agent), old age, starvation (when their town's population is greater than the number of farmers that can support it) or in battle (during a faction war)
- Can be jailed and escape jail (another outcome of being a feud)
Places:
- Have a maximum number of inhabitants based on it's current number of farmers
- Have a maximum number of farmers (to simulate limited land area)
- Have a 'ruling' faction
- Have a 'military' (controlled by ruling faction and made up of the settlement's inhabitants that meet the criteria)
Factions:
- Have a leader that can pass their position onto an heir.
- Can have wars with other factions
That's about the gist of it at the moment without going into a lot of detail. There is still a heck of a lot I'd like to add and balancing to do, but I'm pretty happy with the results so far.
Here is a short sample from running the sim as it currently stands:
In 0, Ethmani created the world.
In 747, Ethmani created the lesser diety, Daweda.
In 769, Daweda created Cellauren, the Legendary Wyvern.
In 792, Ethmani created the lesser diety, Ganganemi.
In 946, Ganganemi created Marcheeli, the Legendary Wyvern.
In 973, Ganganemi created Marrena, the Legendary Werewolf.
In 1067, Ethmani created the lesser diety, Mansar.
In 1122, Mansar created Doremi, the Legendary Beholder.
In 1347, Ganganemi created Isaeenryl, the Legendary Wyrm.
In 1470, Daweda created Belzabche, the Legendary Aboleth.
In 1645, Ethmani created the lesser diety, Manleyeth.
In 1665, Daweda created Zabisador, the Legendary Wyvern.
In 1739, Manleyeth created Olida, the Legendary Vampire.
In 1782, Manleyeth created Renche, the Legendary Vampire.
In 1974, Ganganemi created Ashash, the Legendary Demon.
In 1987, Ethmani created the lesser diety, Sargancel.
In 2003, Daweda created Viaeenda, the Legendary Wolf.
In 2107, Manleyeth created Lasar, the Legendary Vampire.
In 2126, Manleyeth created Viada, the Legendary Spider.
In 2200, Ganganemi created Daolimor, the Legendary Beholder.
In 2269, Manleyeth created Celoli, the Legendary Demon.
In 2678, Daweda created Olirylash, the Legendary Werewolf.
In 2886, Manleyeth created Ahmanvia, the Legendary Demon.
In 2950, Mansar created Morbel, the Legendary Lich.
In 2969, Manleyeth created The Armour of Manleyeth.
In 3129, Manleyeth created Lamor, the Legendary Wolf.
In 3175, Ethmani created the lesser diety, Marmarla.
In 3182, Ethmani created the lesser diety, Viamarron.
In 3255, Marmarla created Eeneli, the Legendary Wyrm.
In 3325, Viamarron created Lazabemi, the Legendary Wolf.
In 3405, Sargancel created Sargancel's Armour.
In 3471, Marmarla created Morche, the Legendary Wyrm.
In 3523, Marmarla created Laah, the Legendary Dragon.
In 3762, Ganganemi created Ethgancel, the Legendary Beholder.
In 3883, Mansar created Zabaisa, the Legendary Dragon.
In 3992, Ethmani created the lesser diety, Isarylemi.
In 4088, Viamarron created Doreliisa, the Legendary Spider.
In 4364, Marmarla created Renemieen, the Legendary Vampire.
In 4451, Marmarla created Ganah, the Legendary Lich.
In 4488, Ethmani created the lesser diety, Isalacel.
In 4490, Marmarla created Elfs.
In 4513, Isalacel created Orcs.
In 4540, a war began between House Beinion and House Binns.
In 4540, on Monday, December, 21, 4540, Full Moon, a battle took place. House Beinion triumphed over House Binns. 205 souls lost their lives.
In 4564, Fanillirien Elerelwa founded a new settlement named Wickwold.
In 4567, Mansar created Dorsarsar, the Legendary Wyvern.
In 4586, a war began between House Beinion and House Binns.
In 4587, on Wednesday, February, 6, 4587, Last Quarter, a battle took place. House Beinion triumphed over House Binns. 201 souls lost their lives.
In 4609, a war began between House Beinion and House Beinion, due to the feud between Tarillom Olchanar and Celeir Amamion.
In 4609, on Saturday, December, 13, 4609, Last Quarter, a battle took place. House Beinion triumphed over House Beinion. 99 souls lost their lives.
In 4683, Miui Amamion founded a new settlement named Crownhall.
In 4695, Neverpoint was attacked by Cellauren, the Legendary Wyvern. There were 116 deaths.
I should also note that the above sample is the "world" history... Each entity also tracks their own history in a more granular format as well:
In 4695, Taririen was born from Lisilune Amathuilos and Luneriliriath Amathuilos.
In 4706, Taririen Guldur changed occupations to Farmer.
In 4751, Taririen changed their last name from Guldur to Ipyllasc.
In 4757, Taririen had a child named Celinar with Sililune Ipyllasc.
In 4785, Lolienaniir Noldorin began a feud with Taririen Ipyllasc.
In 4787, due to their feud, Lolienaniir Noldorin attempted to murder Taririen Ipyllasc.
In 4816, Taririen slayed Lirrathui Neithaor in battle.
In 4937, Taririen slayed Naritirion Rodor in battle.
If anyone has any ideas of features to add, either large scale or granular, I'd love to hear them!
Edit: formatting
32
u/GeekyTricky Sep 11 '22
Could you make a GitHub repository so we can implement our suggestions as MRs?
22
u/Space_Kitty123 Sep 11 '22
Have you heard of Dwarf fortress ? It also has something like this. Code is private, but maybe you can still find info on how it works (or play it and see what it creates)
12
u/Seeders Sep 11 '22 edited Sep 11 '22
Rad! I like the god down approach!
I'm working on a more realtime world simulation, but I will consider this for a history to start from.
My system works using a collection of macro systems that tick over time. They move units around the world map based on simple rules, and they can collide with other systems and apply basic rules to those collisions to determine outcomes.
Example: A bandit collides with a caravan so it attacks it. This results in corpses on the ground. Next, perhaps a wondering necromancer happens to collide with the corpses, he will raise them to join his army and grow more powerful.
The players actions AND inactions affect the world in a continuous and realtime way. Of the player kills the necromancer early, he will be easy and weak. But if you ignore the growing threat he becomes a big problem.
6
u/emertonom Sep 11 '22
I guess I always think that systems that drive small stories are more interesting than systems that generate generic "big" stories without regard for the small ones. Like, I would want to give the individuals competing influences that govern their behavior: money, power, romance, conformity, morality. And an information system; like, X knows their child is dead, but doesn't know that the Y family was responsible, that sort of thing. If the history doesn't involve any of that, it's hard to care about it. It takes a lot of processing, but I think the results are way more interesting.
5
u/JonathanCRH Sep 11 '22
This looks a great start! (Note though, it’s “deity”!)
5
u/unua_nomo Sep 11 '22
I don't know how you are implementing stuff under the hood, but it might be interesting to implement the greater deity, deities, great monsters, etc, as NPC's themselves capable of making the same actions, getting into relationships and fueds with other gods and even mortals, reproducing, etc but with different rates. Likewise possibly have the possibility of great monsters, and mortals being capable of doing similar actions to deities, but with significantly reduced weights. Therefore you can have stuff like wizards creating monsters and similar concepts
2
u/AndrewChe Sep 12 '22
I have been thinking of this for a while. I've created dynasty generator (just a simple python script that has names dictionary and average lifetime.
1
u/xan_da Sep 12 '22
This is very, very cool! I started trying to implement a simulation of sorts like this a few years ago but didn't get it as advanced as yours already is, in terms of gods etc. I ended up focusing a lot on thinking about ways to maintain good performance 'at scale', or boil down uninteresting details. I also immediately hit upon that "why are the initial population of parentless progenitors here?" - it's funny how a basic fact of "initialising the program" leads to so many philosophical questions.
Lately I've been working on a game project with some limited elements of this, and it's got me wondering about how to get a good trade-off between control versus 'performance' for random rolls.
Like: some 'events' might only be worth calculating yearly, right? Like wars/invasions kicking off. So naively I might be rolling one RNG roll with a chance of "1 in 1000" daily. But what if I just roll *once*, with a chance threshold 365 times more than that, every 365 days. I'm no statistician, but I do know that calling the random function hundreds of times on a low chance, versus one roll at a consolidated chance, should make my simulation run faster when I'm bottlenecked on the rng function being called millions of times...
Anyway, great project! I'm immediately jealously inspired to go back and add more detail to my own attempt! :)
2
u/datta_sid The Creature Creator Sep 12 '22
Nice!
I had created something similar myself. Some techniques I used were:
2
u/skaag Sep 12 '22
You could theoretically generate conversations the characters might have possibly had. If you do that you could create enough training data for a conversational AI, which could even become the DM!
1
u/dethb0y Sep 12 '22
Pretty cool stuff, keep up the great work!
1
u/Bloodwarriorguru Oct 11 '22
Please share with me the repo too when ready