Earth as a fantasy RPG setting

This post is about using our Earth as a fantasy setting for roleplaying games like D&D or Fantasy!.

The appeal

The appeal with using Earth is that everyone already knows things. Egyptians, the Atlantic Ocean, Samurais, the Church and many other things are already there. If you play in a culture that your group is already familiar with there are symbols that can be used immediately for a feeling of authenticity.

The problems

The most obvious problems are the absence of supernatural fantasy things, and WHEN to set the campaign. I have seen the division of campaigns into Historical, Epic or Fantasy. I want to go for fantasy: there will be dragons, magic, and orcs.

The problem of WHEN is that in the history of Earth, civilizations are emerging and disappearing. And as some empires grew large, nature was also tamed and less land was truly wild and unexplored.

The solution (in principle)

We obviously need to rewrite history. Let us say the year is about 1000, but many civilizations and empires remained – smaller than at their peak – and they are now technologically mostly equal. Between these civilizations (and underground) there is wilderness, chaos and evil.

I suppose you need to cherry pick what remains and what was never there, based on what is meaningful and interesting to your group. I live in Sweden and I and my players (sadly) know nothing about the history of Belarus. So I can do what I want with that spot on the map (maybe it is an ancient empire of elves, or goblins). But you may be Polish or Ukrainian and want to center your campaign there, and Belarus has lots of references to you that you care about. Sweden on the other hand can be a land of viking barbarian orcs to you.

Europe Centric A-Z

Here follows short descriptions of countries and civilizations that can coexist. The exact borders matters little to me at this point.

Note that most nations consist largely of wilderness and that both internal and external borders can be quite fluid.

This is Europe centric because it is what I and my group know best. There is nothing right and wrong here – I am just trying to be practical.

The Alps

The naturally protected alps are home to dvarves in the mountains and elves and halflings in the valleys. There are well protected and profitable trade routes going through (and under) the mountains. However, other humanoids and dragons also dwell here.

Arabic Caliphate

Under Islamic leadership and with its political center in Mekka, the Arabic Caliphate is spreading from Southern spain, most of Sahara and northern Africa, around the Red Sea and over Arabic peninsula to the Persian gulf. These are arid, warm lands and its people are mostly fast moving nomads on camels, waging wars on many fronts. Egypt and many fertile settlements on the on the Mediteranean south coast are being proteced and held by the Roman Empire (and Christian allies and mercenaries).


Babylon, being one of oldest great settlements, remains on the banks of Euphrates. The persians, romans, ottomans and arabs have all tried to lay hands on this desert jewel but ancient sourcery and powerful allies have kept Babylon an independent city state (effectively ruling the fertile lands around it). This is a melting pot yet an ancient place where culture, traditions, rituals and worship has survived for centuries.

Baltic Nations

The three Baltic Nations are officially duchys of Russia. However, in practice they participate in the Hansa League, and often see themselves raided by barbarians and vikings.

Byzantine Empire

The Byzantine Empire covers Balkans and Bulgaria. It is home to Orthodox Christianty and a remaining part of the once huge Roman empire. On one hand the Byzantine Empire profits from being the crossroads of trade between east and west, on the other hand it struggles to protect all its boarders.


Catalonia has liberated itself from Muslim occupation and since then acted as an independent state.


Denmark is a viking monarchy, often at wars with its neighbors. It is a strong agriculture and trading nation and Christianity has made little progress here.


The ancient religous nation of Egypt was under control of the Roman Empire for long. However, it regained independence and is strongly allied with Rome against the Muslim campaigns and domination in northern Africa. Egypt is a religous dictatorship ruled by a divine Pharao, with some cities (mostly Alexandria) being open to foreigners and more international and multicultural.


England is a Kingdom of wealth and struggle, often at war with its neighbors. The Christian Anglican church dominates, but there are conflicts with other christian groups, pagans, druids and even vikings.


Finland is the land of Elves in northern Europe. Some towns along the coast have a significant human population and manage trade with Hansa.


France is a Christian kingdom, engaged in holy wars far from its own borders, while struggling to stay safe from Saxons, Germanic tribes, and Muslim onslaught in the south.

Germanic Tribes

The lands of Germany and Poland are largely wilderness, inhabited by barbaric tribes (and other humanoids). However, there are smaller kingdoms in these lands, and trade routes going through them.


Greece, the cradle of democracy, remains. Athens being the cultural and political center and Sparta being the home of the military that has defened the ancient nation countless times. Christianity is tolerated side by side with the old gods of Greece. Greece is also largely a nation of islands with a significant trade and military fleet.

Hansa Trade League

Towns and lands around southern Baltic sea form the Hansa Trade League. This is an economic, but also military alliance, with influence far beyond its member towns.

Holy Lands

Between the Ottoman empire, Egypt, the Persian Empire and the Arabic Caliphat lies the Holy Lands. Christians and Muslims struggle for control of the holy sites, especially Jerusalem. There is obviously room for a jewish aspect, or not, depending on your preferences. Apart from Jerusalem, there are desert city states like Palmyra here.


Iceland, populated with outcasts and refugees from Scandinavia and the British isles, is a viking meritocracy and democracy. The Icelandic’s have settlements also in Greenland and Newfoundland.


Ireland is a rural and pagan country dominated by druids. In some towns along the south east coast there are many Christians and they serve as intellectual melting pots. Both halflings and elves are common in Ireland.

Italy and the Roman Empire

Northern Italy consists of free city states, advanced in trade, culture and freedom of expression, and melting pots in the crossroads of Europe.

Southern Italy is the core of what remains of the West Roman Empire. There is decadence and arrogance but the empire is rich and with a strong military. However much wealth comes from lands in northern Africa which are part of the empire but now at war with Muslim forces.

Many Romans worship the old gods of the empire, however at the same time the Vatican and Pope in Rome are the head of Christians.


The ambitious Normands managed to forge their own kingdom, aspiring to expand over the English channel.


Norway, the coastal areas, are lands of vikings making a living plundering, trading and fishing. There is not much central government (although attempts are being made). The vast mountains hosts dvarves and monsters.

Ottoman Empire

The Ottoman Empire has internal religious power struggles between different religons groups (both Christian and Muslim). It is a vast country with untamed dangerous wilderness and ambitous rulers struggle to maintain the borders even though they occationally engage in foreign campaigns.

Persian Empire

The Persian empire is ancient vast and complex. Islam is growing more influential.


Portugal is a Christian kingdom mostly looking westward doing trade and some warfare in South America. Portugal has a strong fleet and is a strong trade nation.

Romania (Transylvania)

Romania has been part of both the old Roman Empire, the Byzantian Empire and the Ottaman empire. However, dark forces are moving here and Romania now consists of city states and smaller independent nations. However it is well established that sourcerors, vampires and perhaps even priests in unholy alliances rule these lands.

Russian Empire

The huge Russian empire has few borders. This nation upholds civilization in unlikely places. Officially the Tsar rules with an iron hand, but in practice power is given to local lords and the empire is losely kept together.

Chistianity dominates among the elite and in the large cities.


Saxons are an old people with a young nation located south of the English Channels. Saxons have been influential in England and they have been at war with all their neighbors.


Southern Scotland is a kingdom (Scotland), often at war with England, and often allied to France. Christianity is dominant in Scotland.

Northern Scotland is inhabited by barbarian clans.


Spain is a Christian kingdom at war with Muslims occupying the southern parts of the nations since over a century. The kingdom has family and political relations to the kingdoms of France, Normandy, England and Scotland but because of the wars within its own borders it has lost position to England and France.

Catalonia has declared independence from the weakened kingdom, yet stands against the Muslims.


Sudan and Khartoum are centres of trade between Africa, Europe (via Egypt) and the middle east. Slaves is one of the most important goods.


Southern Sweden is a quite rural pagan evolving feudal monarchy. This is a land of mostly wilderness and civilization is centered around some towns. Norse gods are still worshiped but Christianity is growing.

Gotland and the southeast of Sweden belongs to the Hansa trade league, and is a bit more advanced.

Northern parts of Sweden lack government and consists of vikings, barbarians, nomads (samis), dwarves, and other humanoids.


Wales is druid land, opposing monarchy and Christianity.

Beyond and other Continents

China and India deserves the same complexity, diversity and depths as all of Europe and if you choose to locate your campaign here you probably know what to do. I think of China as en ancient empire, struggling with being united and shattered over and over again.

North America is probably home to elves and native tribes (druids and rangers), and some viking settlements.

South America has its own militaristic empires, and som portuguese settlements.

Africa south of Sahara is a rich land of kingdoms and perhaps even empires of its own.

Japan is an advanced monarcy, quite isolated, but not unknown.

Antarctica has huge potential with ancient elven kingdoms under the ice, and lurking horrors.


Islands are great opportunities for things more outside the norm on Earth. Svalbard, Corse, Sicily, Crete, Canary Islands and the Hebrides all provide opportunity for extra spicy things.

Monsters and Beasts

Europe can seem crowded. But Africa and Siberia can host wild creatures and dragons that occationally visit Europe and even settle there. Evil humanoids (goblins and orcs) live in forests, mountains and underground.


I think religion is one of the best reasons to place your campaign on Earth. Apart from the world religions you also have old Norse, Greek, Roman and Egyptian gods, as well as druids and nature worshipping. It is all quite consistent and familiar, with lots of useful references and symbology.


Not being able to talk to anyone is rarely useful for good roleplaying experience. Latin comes in handy, perhaps in combination with a “common-anglo-germanic” language.

Historic People

I have avoided making references to historic people. I think Buddha, Jesus and Mohammed are needed. I can imagine the french making references to Charlemagne (as former or current king) and why not make references to Ceasar as well?


The exact passing of history was, and is, not known to most people or even most historians. You don’t need to know. They players don’t need to know. You can use “I am a direct decendent of Saladin, liberator of Jerusalem” in your game, and the players can believe what they want. Or you can make reference to the 100-year-war-between-babylon-and-persia, if you need to.

Hyborian Age

Was this Fantasy Earth following the Hyborian Age as in Howards stories about Conan? If you want to, it can be a soure of references: ancient artifacts, lost underground cities and Set the snake god.

JavaScript: Fast Numeric String Testing

Sometimes I have strings that (should) contain numbers (like ‘31415’) but I want/need to test them before I use them. If this happens in a loop I could start asking myself questions about performance. And if it is a long loop an a Node.js server the performance may actually matter.

For the purpose of this post I have worked with positives (1,2,3,…), and I have written code that finds the largest valid positive in an array. Lets say there are a few obvious options:

// Parse it and test it
const nv = +nc;
pos = Number.isInteger(nv) && 0 < nv;

// A regular expression
pos = /^[1-9][0-9]*$/.test(nc);

// A custom function
const strIsPositive = (x) => {
   if ( 'string' !== typeof x || '' === x ) return false;
   const min = 48; // 0
   const max = 57; // 9
   let   cc  = x.charCodeAt(0);
   if ( cc <= min || max < cc ) return false;
   for ( let i=1 ; i<x.length ; i++ ) {
     cc = x.charCodeAt(i);
     if ( cc < min || max < cc ) return false;
   return true;
pos = strIsPositive(nc);

Well, I wrote some benchmark code and ran it in Node.js, and there are some quite predictable findings.

It is no huge difference between the alternatives above, but there are differences (1ms for 10000 validations, on a 4th generation i5).

There is no silver bullet, the optimal solution depends on.

If all you want is validation, it is wasteful to convert (+nc). A Regular expression is faster, but you can easily beat a Regular expression with a simple loop.

If most numbers are valid, converting to number (+nc) makes more sense. It is expensive to parse invalid values to NaN.

If you are going to use the number, converting to number (+nc) makes sense (if you convert only once).

The fastest solution, both for valid and invalid numbers, is to never convert to number (but use the custom function above to validate) and find the max using string compare.

if ( strIsPositive(nc) &&
     ( max.length < nc.length ) || ( max.length === nc.length && max < nc )
  max = nc; 

This is obviously not a generally good advice.

Other numeric formats

My above findings are for strings containing positives. I have tested both code that only validates, and code that use the value by comparing it.

You may not have positives but:

  • Naturals, including 0, which creates a nastier regular expression but an easier loop.
  • Integers, including negative values, which creates even nastier regular expressions.
  • Ranged integers, like [-256,255], which probably means you want to parse (+nc) right away.
  • Decimal values
  • Non standard formats (with , instead of . for decimal point, or with delimiters like spaces to improve readability)
  • Hex, scientific formats, whatever

In the end readability is usually more important than performance.

Stress testing with Raspberry Pi

I have a system – a micro service architecture platform – built on Node.js. It can run on a single computer or distributed. It is a quite small system but quite critical that it works correctly.

Under what circumstances would the system fail to work correctly? How much load can it handle? How does it behave under too heavy load?

Stress testing is difficult, and expensive. Ideally you have plenty of test clients simulating realistic usage. It can be done, but often not easily. A simple and cheap option is to run the system on less resources.

My system used to run perfectly on a Raspberry Pi. The tests work fine. I have also kept the integrationtests working (although there have been timing issues). However, the other day I tried to restore production data to the Raspberry Pi, and it failed to run properly. Problems were

  • High latency and timeouts
  • Heavy swapping
  • Escallating retries, making the situation worse

The last point is particularly interesting. Error handling is designed for stability and recovery, but it risks increasing the total load, making the system even more unstable.

I did make the system work on a RPi again, and in doing so I leant about real problems, and fixed them. It is an interesting excersise in finding problems in systems that don’t work properly, and it is a practical way to “measure first, optimize second”.

Does your system work, with a reasonable amount of production data, on a Raspberry Pi?

Old and new Glenfiddich

I was given an old Glenfiddich miniature. It is probably from the 1960s and it has been stored dark and cold.

I bought a kit with the current Glenfiddich line of standard whiskies and made a little tasting. This is what I find about the old miniature.

The color is more pale, which is reasonable given that it the label says it was 8 years old when bottled, and there is no reason it should get darker being stored in a bottle.

A few minutes in the air made the aroma more pleasant. It was still a light, fruity (almost like white wine) aroma – not very different from the 12 YO.

Both on the nose and in the mouth I found the dominant thing to be “jerusalem artichoke”. I occationally find that in whiskies, never in Glenfiddich before, but sometimes in old whiskies.

All the modern Glenfiddich are partly stored on Sherry casks. I think the miniature was not, and I think that makes it taste a bit different.

I think most people would have prefered the 15/18YO to the miniature. But it is a matter of taste. It had not turned bad. If the difference between the miniature and the 12YO is mostly because of different production methods, or 50 years on a bottle, I can not tell.

I doubt this miniature had been a major success if it was sold. Everything was not better in the past, and storing whisky for half a century on a bottle is hardly a silver bullet to fanstatic whisky. Perhaps it give a taste that is hard to find otherwhise.

Linux on Hades Canyon

About a year ago I got a Hades Canyon NUC for Windows and Gaming. I have been happy enough with it to buy another one for running Linux, Xubuntu.

Basically Xubuntu 19.10 works perfectly on the Hades Canyon NUC. It was all smooth, except:

  • HDMI audio is low quality – for me it is acceptable to use the 3.5mm plug instead, but if you want HDMI audio this is bad for you

I think with NUCs Intel has managed to produce computers that are very good, and I don’t really see myself buying any other desktop computers. Why are there no AMD computers in this segment?

Keeping open Whisky bottles

So, you open a bottle of whisky, drink a little now and then, and years later you wonder if it still tastes the same?

Here are my empiric notes:

Deanston 12: One of the bottles is opened since perhaps 2 years, and has been almost empty for months. Head to head, initially, I slightly prefer the old bottle on the nose. But tasting, going back and forth, it is the same whisky.

Famous Grouse: I have a plastic bottle of Famous Grouse with very little left in it. It has probably been open for 10 years. It actually tastes significantly worse – more burning and chemical – than a fresh bottle.

Lagavulin 1984: This bottle has been opened for almost 20 years and there is not much left. When it was newly opened I compared it to a standard Lagavulin 16. Then my experience was that 1984 and 16YO was very similar, but 1984 was a little extra. Today I opened a new Lagavulin 16 and compared to the 1984. The 1984 is much softer, I guess the ABV is lower, and both aroma and taste has a clear jerusalem artichoke element to it. My conclusion is that 1984 is definitely changed, not necessarily for the better, but it is not much worse either. It is still enjoyable (some people would probably prefer it for being softer), it is still a Lagavulin, but it is not exactly the same.

Simple Vegetable Oil Lamp

WARNING: The lamp prototypes suggested below may not be safe for general use: especially not around children, left unattended, or close to anything flamable.

Oil Lamps

I got a beautiful Oil lamp that I use much.

Oil Lamp

This lamp uses Lamp Oil (kerosene, paraffin oil). When I bought that I was a little chocked with two thing:

  1. The price (compared to vegetable oil)
  2. How seriously poisonous it is (to the point I dont like to handle it, and I wonder if I want it at home at all)

However this “real” Oil lamp does not run well on vegetable oil (I have tried canola oil). It runs for a while but I think the problem is that the viscosity is too high so the oil does not flow properly upwards through the wick as required.

Vegetable Oil

I can buy canola oil for 25% of the price of lamp oil. And it is obviously not dangerous (since it is for cooking). However it is thicker and has a higher flash point. It is also supposed to not burn cleanly (leaving smoke and smell). So I was curious if I could design a simple practical and not too ugly oil lamp for simple (unused) cooking oil.

Skipping the failed designs here are the ones that kind of work.

A can lamp

What you see in the picture are five components:

  1. a metal can
  2. canola oil
  3. a few candlewicks
  4. a metal washer (the flat metal ring with a small hole in it)
  5. a metal “bridge”

placed inside a fireplace. This burns well: no smoke, no smell, burns for hours. I have read that vegetable oil consumes the wick faster than lamp oil. Perhaps that is true, but nevertheless the wick lasts much longer than it would have in a normal candle.

A little bottle lamp

How about moving the metal washer with the wick to a small bottle?

This is a very simple design and as you can see in the (somewhat unsharp) picture it burns nicely. But it only burns nicely for about 60min, and then it burns barely for another 60 minutes and then it dies.

Only the canola oil in the bottleneck is consumed. After that it appears the height difference between the oil level and the washer/fire prevents the oil from ascending the wick (fast enough).

A used candle jar

I tried filling an old candle jar with about 1cm of canola oil, and used a wick and a metal thing for this result.

This burns nicely! The sides of the candle jar does not get very hot, and the bottom of and the oil remains quite cool. The metal thing from a hardware store is obviously designed for another use.

The good thing with this design is that it is simple (jar+metal thing+wick) and that not so much oil goes into the lamp. You can easily reuse pretty candle jars that are already designed for the purpose.

Spirit Burner

I would not guess that most spirit burners (or oil lamps) work well. But SPIRI-1 from Böhm Stirling-Technik works perfectly with canola oil. The good thing is that it is (roughly) the size of a tealight so you could replace your disposable tealights. The bad thing is that it is quite expensive.


First I think vegetable (canola) oil is underestimated for decorative light at home. However I can see that tealights can be sold and managed in a safe way and are easier to use.

It often requires two matches to light the canola, because the flash point is very high. However I think the high flashpoint is also good for safety.

Cheap candles and tealights are made of petroleum and they don’t necessarily burn cleanly without leaving unhealthy particles in the air. I can not guarantee that the canola oil also does not leave any particles in the air, but the oil itself is not toxic at all.

Force Vue Update ($forceUpdate)

Occationally you want to force some part of your Vue application to update. One situation is that I have a “big” web application not written in Vue, and somewhere I add a Vue component. Something in the world around it changes but it is not aware of it, so I want to force it to update.

It seems, the vm.$forceUpdate method is just updating the component itself, and children with slots. I didn’t use slots, and $forceUpdate was useless.

So, if you do myVue.$forceUpdate() without success, try:

    myVue.$children.forEach(c => c.$forceUpdate());

It might do what you want. It did for me.

QNAP TS 251+ for Container Station

After many years of running home server systems on Raspberry Pi, another one broke down and I decided I can to better, so I bought a QNAP TS 251+ with two WD 6TB Red drives (suitable for NAS).

My objective here is to mostly use the QNAP with Container Station; for running virtual machines on it.

First Impression

The TS 251+ looks profesionally black, but it is all plastic. Installation was fine but for someone with little computer experience I would imagine it a bit scary. A few things to note:

  • It restarted several times for firmware upgrades, and restarting took some time
  • There are some “I accept privacy…”-things to accept. I guess it is fine. But one reason you get your own hardware instead of running in the cloud is that you know your data is private. So if you are paranoid, read the fine print or get into the details.
  • I suggest you familiarize yourself with RAID0, RAID1 and JBOD before you start it up.
  • I suggest you read about Static Volume, Thin Volume and Thick Volume, and make up your mind, before you start it up (I think Thin makes most sense, especially for use with Container Station).
  • The Web GUI is good – very “modern” – in a way that it almost feels like a desktop computer. A bit over-engineered and messy if you ask me. There are very many features and details, and it is a bit intimidating and confusing at first.
  • Container Station is just what I want and need!
  • I find it silent and cool enough (44C reported under load)
  • It automatically started some “Raid Syncronization” that takes about 24h with my drives. Guess it is fine, but it makes me a bit nervous with something new that I hesitate to restart or reconfigure it because it is doing something low-level and important.

Container Station Problem

When I woke up in the morning it turned out my container was down. There was message from the middle of the night:

 [Container Station] Created interface "lxcbr0" with errors. Unable to start DHCP service.   

I found this strange, I could not start Container Station again, and I found other people had had this problem with no elegant solutions. I found that the problem was solved if I deleted the two virtual switches (docker0) and (lxcbr0); Container Stations creates them automatically when it starts.

I think my container may have crashed due to too little RAM in the middle of the night, and that somehow corrupted something.

Memory Upgrade

This model comes with 2GB RAM. That is quite enough, but not if you want to run Container Station conveniently. I have switched off most QNAP services, running a single LXC Container with syncthing using about 500MB of RAM, and the QNAP complains there is little available RAM (and it uses swap). So I think it is safe to say that to run Container Station or Virtualization Station, more RAM is recommended.

Officially max RAM is 8GB but there are multiple records of people saying it works with 16GB as well. It also appears that you may use just one memory module (out of two), they dont need to be installed in pairs.

So I bought 2x8GB and it seems to work perfectly:

  • Corsair DDR3L 1600MHz MACMEMORY
  • CMSA16GX3M2A1600C11


There are several Virtualization options with the QNAP:

  • Virtualization Station: running real virtual machines (like VMWare), emulating hardware. Just starting Virtualization Station used almost 1GB or RAM.
  • Container Station:
    • running (LXC) virtual linux machines, emulating just the kernel. This is much more light-weight, and it means the virtual machine shares disk and RAM with the main system (you do not need to allocate disk, all disk is available and shared for every virtual machine – they just live in separate folder)
    • running Docker containers
  • Linux Station: allowing the QNAP to work as a Linux Desktop.

Apart from virtualization, the QNAP also allows you to install things like WordPress, Mediawiki, MySQL and other services as packages.

Update and Problems 2020-02-29

One of my virtual container station machines had its clock out of sync. When I started investigating I could not connect to the QNAP itself. The two virtual machines were up normally. The QNAP itself was nowhere to be seen on the network. I restarted it (using the power button – I believe it shuts down properly), it came up and it wanted a firmware update, which I immediately accepted. After that it did not come up (on the network) again.

I tried to reach it on with no success.

I finally did a “reset” (using a paperclick on the rear side of the QNAP for 3-4s when it was already on). Following the reset it immediately appeared normally on the network. Password was “admin”.

However, the virtual container station machines did not start. I had to change their network settings to NAT, and then back to Bridge, then they worked. So it seems to me the virtual switch is not quite 100%.

All seems good now, but this took quite a while to figure out and fix. I bought a QNAP to get something much more stable and reliable than my old Raspberry Pi, but this was not impressive.

Dungeon Master Inspirational Reading

This is work in progress.

I read to get inspiration for my D&D Dungeon Master hobby.

5/5 Recommended

  • Conan Chronices (short stories of varying length and quality)
  • Northlanders 1-3 (comic)
  • Untold Adventures – Dungeons & Dragons (short stories)
  • The Outsider (short story, H.P. Lovecraft)
  • Thorgal (comic)

4/5 Recommended

  • Berserk (Deluxe, 1-2, manga)
  • Kull Exile of Atlantis (short stories)
  • Lone Wolf (Project Aon)

3/5 Average

  • Crannog Saga 1-2 (Comic)
  • Fall of Gondolin
  • Legends and Myths: Knights of the round table

2/5 Not so recommended

  • Den eviga nattens riddare + Det mörka hjärtats vilja (Swedish)
  • Legends and Myths: Charlemagne
  • Vox Machina

1/5 Not recommended

  • Legends and Myths: King Arthur