Skip to main content
Mining Someone Else’s 
Magic World 
by Lynn Cherny (@arnicas)
Mining Someone Else’s 
Magic World 
or, “How I Spent Way 
Too Much Time But Still 
Failed to Finish This for 
#NaNoGenMo But You 
Get to Hear About it 
Anyway Because I Think 
It’s Funny” 
by Lynn Cherny (@arnicas)
“Learn to Play the 
Most Complex 
Video Game Ever 
Made” 
248 pages of “getting started.”
“Dwarf Fortress is a game featuring…distinct, randomly-generated 
worlds (complete with terrain, wildlife and 
legends), gruesome combat mechanics and ubiquitous 
alcohol dependency.”
“Dwarf Fortress is a game featuring…distinct, randomly-generated 
worlds (complete with terrain, wildlife and 
legends), gruesome combat mechanics and ubiquitous 
alcohol dependency.”
Bug Fixes (We’d Rather Weren’t Fixed) 
“Stopped fort dwarves from throwing their clothes off into 
a pile after being visited by adventurer.”
Bug Fixes (We’d Rather Weren’t Fixed) 
“Stopped fort dwarves from throwing their clothes off into 
a pile after being visited by adventurer.” 
“Stopped fort animals from getting 
clothing after being visited by 
adventurer.” 
“Stopped animals with kills from 
getting trinkets from corpses.” 
“Stopped animals from growing 
attached to and bestowing names 
on items in their possession.”
“I cleaned up some crashes today. One of them 
involved a night creature that had wandered 
into a shop and killed the owner... the creature 
then somehow got assigned as the owner. The 
crash happened when the night creature tried 
to come up with things to say to 
potential shoppers, since it didn't have 
a civilization as a frame of reference. 
I fixed that part, but I still have no idea 
why it thought it should change 
professions in the first place...”
This game is so complicated even the author doesn’t 
really know why things happen.
This game is so complicated even the author doesn’t 
really know why things happen. 
And ABSOLUTELY: None of the players knows what’s going on.
“I think Dwarf Fortress generates such complexity and 
depth of information, that the task of the storyteller is to 
simply sift through and find the narrative.” 
-Tim Denee
Region-1-blahblahblah-legends.xml
Extracting Stories from XML 
1. Create xml in game, export it (“legends” mode) 
2. Load into python and parse 
3. Make some charts - what’s in this? 
4. Tie together the id’s of people to events 
5. Turn some fields into human-readable text: e.g., skills, events 
6. Build a context free grammar to tie snippets of english together 
7. Add a list mechanism to add relatives and victims to the stack of 
historical figures to “describe”
The data…
The data…
Nako Bentcurse, who was a female GOBLIN, always 
hoped to rule the world. Nako Bentcurse got married. In 
the year 50, Nako Bentcurse was killed in the dark pits 
called Wraithblockade by Oce Gravecaverns The Sable 
Twilight. She lived for 227 years.
Nako Bentcurse, who was a female GOBLIN, always 
hoped to rule the world. Nako Bentcurse got married. In 
the year 50, Nako Bentcurse was killed in the dark pits 
called Wraithblockade by Oce Gravecaverns The Sable 
Twilight. She lived for 227 years. 
Iddim Candlemerges, who was a male HUMAN BABY, 
always hoped to become a legendary warrior. In the year 
102, he was killed in a town called Goosebalded by 
Vispol Amusepants. He lived for 0 years.
Here's the life of Nepe Coloredgarlics The 
Ponderous Escort Of Spiders, who was a female 
HUMAN. Nepe Coloredgarlics The Ponderous 
Escort Of Spiders was kind of crap at dissecting 
fish, kind of crap at doing useful things with fish, 
kind of crap at fishing. She lived for 59 years. 
In the year 61, she was abducted in a hamlet 
called Soundedstop by Ngebzo Taperedevil. 
Nepe Coloredgarlics The Ponderous Escort Of 
Spiders took up another role, possibly to do 
something with fishing in a dark fortress called 
Anguishsteal. In the year 65, she hooked up with 
Zega Chasmspike, a male HUMAN. In the year 
85, she foully murdered Ecod Scrapedcleared in 
a dark fortress called Anguishsteal. She foully 
murdered Snamoz Stolenwax in a dark fortress 
called Anguishsteal. In the year 99, Nepe 
Coloredgarlics The Ponderous Escort Of Spiders 
foully murdered Necalo Creatureacted in a dark 
fortress called Anguishsteal. … She started a 
new career, possibly to do something with 
fishing. She was foully murdered in a dark 
fortress called Anguishsteal by Ngebzo 
Baldcruelty, maybe because of her deficiencies 
at dissecting fish. 
Really Terrible Things Are 
Happening in 
A Dark Fortress 
Called Anguishsteal
You might also want to know about Cika 
Ringspikes, who was a male 
NIGHTCREATURE . Cika Ringspikes had no 
animal friends. He lived for 43 years. Cika 
Ringspikes hooked up with Kuppo 
Bushelsounds, a female HUMAN. In the year 
31, Cika Ringspikes took up another role, 
possibly to do something with butchering 
animals in a hamlet called Actevened. He 
was abducted in a hamlet called Actevened 
by Oce Gravecaverns The Sable Twilight. In 
the year 50, he took up another role, possibly 
to do something with butchering animals in a 
hamlet called Actevened. In the year 50, Cika 
Ringspikes hooked up with Oce 
Gravecaverns The Sable Twilight, a female 
NIGHTCREATURE. In the year 51, he was 
changed into a MALE NIGHTCREATURE by 
Oce Gravecaverns The Sable Twilight. In the 
year 62, Cika Ringspikes was struck down in 
battle by San Prairieblunt, maybe because of 
his deficiencies at butchering animals.
The Whisper Of Rain, who was a male BAT , was 
outstanding at mechanics, outstanding at operate_pump, 
outstanding at siegecraft, outstanding at telling jokes, 
outstanding at pacifying others who are upset, 
outstanding at lying, outstanding at figuring out what 
others intend, ok at throwing a spear, kind of crap at 
noticing what's going on, kind of crap at climbing, kind of 
crap at tracking. He was born in the year -1 and is still 
living. In the year 73, The Whisper Of Rain got married . 
In the year 74, he hf does interaction . In the year 84, he 
hf does interaction . The Whisper Of Rain hf does 
interaction . In the year 100, The Whisper Of Rain got 
married . In the year 101, he got married . The Whisper 
Of Rain got married . The Whisper Of Rain got married . 
In the year 106, he got married . In the year 107, he got 
married . In the year 108, he got married . The Whisper 
Of Rain got married . He got married .
Once upon a time, there lived The Whisper Of Rain, who was a male BAT 
deity whose spheres were stars and sky and rainbows and light. The 
Whisper Of Rain was only good at boring fighting skills. He was born at the 
beginning of time and is still living. In the year 73, The Whisper Of Rain was 
worshipped by Dacap Dipspecial, a female HUMAN. The Whisper Of Rain 
cast the Curse of the Vampire. He cast the Curse of the Werebeast. In the 
year 95, he cast the Curse of the Werebeast. The Whisper Of Rain was 
worshipped by Zurko Agedtrench,a female HUMAN ANIMALDISSECTOR . 
In the year 101, he was worshipped by Ica Doorbutter,a female HUMAN 
ANIMALCARETAKER. The Whisper Of Rain was worshipped by Histek 
Spikewires,a male HUMAN BONESETTER. The Whisper Of Rain was 
worshipped by Xugot Baldrub, a male HUMAN TANNER. …
Fanfiction? Or Translation? 
Iddim Frostspatter, who 
was a female HUMAN 
FARMER, lived in this 
world. She was born in 
the year 110 and is still 
living. Iddim 
Frostspatter always 
hoped to rule the world.
“The game simulates surprisingly realistic geology…, and 
somehow generates civilizations, complete with long 
histories of murdering the shit out of each other. The 
game is in a sort of open alpha at the moment, standing 
at an estimated 31% complete; we are forced to assume 
that, when finished, the game will fully and perfectly 
simulate the Universe, judging by its current progress. 
Eventually, it's supposed to generate complete fantasy 
worlds and storylines. Basically, it'd be like if your 
computer could write The Lord of the Rings or Dragon 
Age at the push of a button.”
“When you are playing Dwarf Fortress, you are 
God, and the world is talking back to you. And 
you are a very anal god.” 
– Paolo Antonelli, MOMA
How do we get their stories out?
References 
• http://www.cracked.com/funny-6021-dwarf-fortress/ 
• http://www.wired.com/2010/09/oilfurnace/ 
• http://www.polygon.com/2014/7/23/5926447/dwarf-fortress- 
will-crush-your-cpu-because-creating-history-is- 
hard 
• http://www.nytimes.com/2011/07/24/magazine/the-brilliance- 
of-dwarf-fortress.html?pagewanted=all&_r=0
• http://forums.xkcd.com/viewtopic.php?f=2&t=70099 
• http://dwarffortresswiki.org/images/e/e6/FlowchartDF.png 
• http://www.reddit.com/r/dwarffortress/comments/15t7hs/ 
this_has_been_my_general_progression_as_a_dwarf/ 
• http://i.imgur.com/YVMaJ.png 
• http://dwarffortresswiki.org/index.php/Main_Page 
• Bugs in release notes: http://www.bay12games.com/dwarves/ 
• http://dwarffortresswiki.org/index.php/DF2014:Glass_industry 
• http://www.keepcalm-o-matic.co.uk/p/start-over-and-remember-losing-is-fun-1/ 
• Missale et horae ad usum Fratrum Minorum. 1301-1400. God creating the 
heavens and the Earth. 
• http://www.reddit.com/r/dwarffortress/comments/1hl9ea/
• Codex Gigas http://www.ancient-origins.net/myths-legends- 
europe/codex-gigas-devil-s-bible-largest-manuscript- 
world-001276 
• http://publicdomainreview.org/collections/kitab-al-bulhan- 
or-book-of-wonders-late-14thc/ 
• Universitätsbibliothek Kiel. Nürnberger Schembart- 
Buch, f.247. 17th century 
• The Creation of the World and the Expulsion from 
Paradise Giovanni di Paolo (Giovanni di Paolo di Grazia) 
(Italian, Siena 1398–1482 Siena 
• Kongelige Bibliotek, Gl. kgl. S. 1633 4º, Folio 42v. Bat
Thanks to @badnetworker (David Masad), 
Caleb Howe, and Nicolai Krakowiak for 
introducing me to stories about Dwarf 
Fortress.