The best kittens, technology, and video games blog in the world.

Saturday, April 13, 2019

Napoleon Total War review

Empire Total War was the last Total War game I seriously played. Then I got into making modding tools for Empire, but I never played any of the newer games other than a few quick battles.

I didn't get into Napoleon because I much prefer sandbox campaigns to scripted ones, and this is basically one big scripted war. Well, I'm going to ignore this and try to unify Germany as Prussia.

So here's how I played, and towards the end a bit of game review.

Opening moves

So playing Prussia at normal/normal. Started by trading some technologies, and making some trade deals.

There's a huge war between France and various minors vs Great Britain, Austria, Russia, and other minors. Prussia doesn't take part in it yet, but it has oversized army it can barely pay for, so it's time to get some new taxpayers.

So the obvious targets are German minors like Saxony and Mecklenburg.

First battle of the game was one for Saxony, where AI was actually trying to much harder than in Empire. Enemies formed line before charging, then ran forward. Cavalry only tried doing its things when infantry attack was imminent. When attack broke out and Saxony reformed its troops, it did so away from my line (and diagonally, so I had to reposition my artillery), instead of each unit doing separate suicide run into my canister shot. There was still some derping, but improvement is real. Also the battle mini-map is top quality. It was real bad in Medieval 2 and Empire.

Battle of Mecklenburg was even more fun. We both had about 800 regulars, except they also had 1600 firelock armed citizens. Mecklenburg put all its professional troops on one flank, and would not advance. After some feints, I charged my cavalry into the mob like it's Medieval 2 all over. This was sweet, and also probably wouldn't work on higher difficulty levels. 144 horsemen routing 1600 enemies losing just 10, that's some winged hussar tier charge. All this forced them to advance on me. AI still derped, and moved its artillery behind a hill just so it can shoot into it and not into my troops. Well, there's only so many bugs they can fix. Overall 872 vs 2408 battle ended up with just 45 casualties. I really like how they buffed cavalry, it was far too weak in Empire.

Lesser German Unification

I took it slow basically waiting who's going to attack me first, France or the Coalition. France annexed its two German minor allies by event. That's something that existed in Empire too - AI gets those annexation events, but player doesn't. In Empire it was Spain integrating New Spain and Britain integrating Thirteen Colonies.

I took Hesse, getting my general killed, and discovering just how damn expensive they are. I guess it's not such a great idea to use them as cheap cavalry.

Then Oldenburg was the last German minor I could take while staying neutral.

First War with France

It was now the question of which alliance to join. France held Hannover, Holland, Belgium, Bavaria, Baden-Wurttemberg, Alsace, and Tyrol, and it would be fairly clear Western / South-Western front.

Coalition would require fighting in multiple directions while horrible exposed to backstab from France.

I waited a few turns trying to get some diplomatic offers, but nothing came out of it. Well, time to attack France anyway. First turn I took Hannover, Amsterdam, and Baden-Wurttemberg. Another one of my generals died taking Brussels.

After that I wanted to do a quick swing East and take Bavaria and Tyrol, but my spies informed me that somehow Napoleon with a full stack found his way there. Damn. So instead I took Alsace, sacked it, and abandoned it to the locals. I likewise sacked Reims.

I was preparing for a big showdown with Napoleon, but just in case I asked him for peace, and he agreed, letting me keep all the lands, including Alsace and Reims, which were now going to be totally overran by rebels because they got sacked. Oops.

Napoleonic Rebels

In Empire occupying anything automatically looted it and gave -13 unrest for minor settlements, and -30 unrest for majors. What counted as major wasn't totally clear.

In Napoleon you can occupy peacefully which generates about -8 unrest, or loot which seems to generate about -25 unrest, damages a lot of buildings, but gives you lump sum of gold. I'm saying about as these don't seem to be the same between settlements. Or you can release as protectorate OPM, but only certain regions.

If you want to keep settlement, it seems that peaceful occupation is far more profitable. Repairing damaged buildings, town watch cost, loss of tax income from destroyed town wealth, and upkeep cost of troops needed to pacify a region all together are just far more than gold you get from looting.

Rebels in Alsace got absolutely ridiculous units. There was a tiny 3 unit stack I crushed. I didn't even notice that they also spawned second stack - 6 dragoons, 4 12-pound artillery, 10 line infantry, all with 3 experience. Like no country has this kind of units - they had huge advantage in numbers and in quality of infantry, artillery, and cavalry. Oh well, I guess I don't really need Alsace. I might be able to defeat that, but it was just the first wave, and next one would be coming in 3 turns.

In Empire they'd be like 4 Militia 1 shitty artillery 1 Provincial Cavalry.

Rebellion in Reims was much more modest, so I kept that.

French Tyrol fell to rebels and then to Austria. Romania emerged somehow. But the main war between France and Coaliton was rather uneventful. Napoleon just stayed in Munich while Austrians and Russians did basically nothing.

Napoleon in Vienna

I allied Austria because mission gave me 1000 gold for it, and I didn't really have a good reason not to. They bribed me to join their war against Switzerland, and that did not call France into war against we. Wat?

Second Reims rebellion spawned full stack of professional troops, even if not quite as ridiculous as one in Alsace. At this point, it was finally possible to keep it under control, barely.

Napoleon left his entrapped Bavaria with no garrison behind and sacked Vienna. Undefended Bavaria fell to the Austrians, but the war continued.

Well, I didn't have anything better to do so I got best stack I could and assaulted Alsace. I sacked it again just to send the message. Thus ended year 1805, first 24 turns of the game.

Fighting OP stack of Alsace rebels. As usual I deploy to the side with artillery embedded in the line. Skirmishers deployed stakes to protect the left flank, right one is protected by end of the map and by cavalry. When attacked I fell back a bit to better expose the enemy to canister shot fire.
Most important on this screenshot is the glorious minimap.

Second War with France

I had 2.5 stacks, one in Reims, one in Alsace, and half in Switzerland. I got some of that replaced by militia, recruited a few more, until I had one full attack stack in Saxony and another in Switzerland.

I was ready to backstab Austria with that, but instead France declared war on me. Great timing France, you're barely holding to what you have and Great Britain took Brittany.

Well, my Western borders were sort of secure thanks to my two stacks of leftovers in Reims and Alsace.

France held Bavaria, Vienna, and Venice behind my lines. Napoleon did the silly thing and split his forces into three between Vienna, Munich, and his personal stack, so taking them all was easy. I ambushed Napoleon as he was trying to sneak back West. Napoleon is unkillable, but I wounded the bastard, and it will take him a while to respawn.

I tried to very generously offer to return Vienna to the Austrians for Bohemia so I'd have pretty borders and one fewer rebellious province to worry about, but they didn't take it.

After taking Vienna I accepted Russian and British offers of alliance for some petty cash, basically joining the anti-French coalition.

Wounded Napoleon accepted peace treaty.

War with Austria

Germany was basically unified, the only victory condition region left was Bohemia, so I needed to cause a diplomatic incident with Austria. Austria allied Pope without the rest of the coalition getting involved.

So I sent a polite letter to the Pope inviting him to Vienna for my coronation as Holy Roman Emperor. Austria and Naples somehow got involved on Pope's side, but Russia, Britain, Sweden, and Sardinia ignored that. I instantly took Prague, Milan, and Zagreb without a single shot being fired. Then Tyrol and Piedmont with a lot of shots being fired.

And that was exactly 25 regions I was supposed to have, including all regions on the list, which unlike Empire (where I'd need to wait for time to run out) instantly popped Supreme Victory dialog. No Steam achievement for it somehow. Oh well.

AI puts infantry in the middle and splits artillery and cavalry between flanks. This glorious light cavalry charge crushed artillery on one flank, then routed citizens of Munich. It then tried to go behind advanced enemy lines and do the same to other artillery, but it got crushed by enemy cavalry.
Overall great strategy not really possible in Empire, as balance is worse, and AI deployment is too much just tossing everyone at random.

Overall Impressions

This is an expansion pack for Empire, not a real new game. It doesn't fix any of the fundamental issues of Empire, like godawful naval battles, or poor moddability, but it improves it in many small ways.

I liked most of the changes. Battle AI is definitely better. Good battle minimap is great quality of life improvement. Battles are much more enjoyable. Units not requiring any cost for reinforcements, but requiring stay in home province for a while, with rate based on tech, buildings in province, and generals is a great idea. There's even winter attrition, but I'm less sold on that really. Various economic numbers got rebalanced quite hard, and I think new numbers are better overall.

The big downside is that there's basically one big war on a small map, and you can't really play it as a sandbox game. They included a few extra campaigns, but they're even more scripted and less sandboxy.

One big exception to balance changes are Napoleon rebels who are just ridiculously too strong.

If someone managed to have Empire style big map with Napoleon engine enhancements, that would be combination very much worth playing. People did just that for Medieval 2 and Kingdoms (Retrofit Mod). Unfortunately moddability of the game engine is too poor for it. There's a "retrofit" mod for Empire, but that's just for some battle and balance changes, and still runs on the original Engine.

Ironically after praising Napoleon so much, I can see myself coming back to Empire much more than to Napoleon.

I definitely don't hate this game the way LegendofTotalWar does. I don't see that much replay value, but it was enjoyable.

Tuesday, April 09, 2019

Playing Empire Total War as Venice

So after a quick campaign as Russia on normal/normal, I decided to do something a bit more challenging. Playing as tiny Venice long past its prime, on hard/hard.

Using Additional Units Mod, diplomacy fix mod, and no walls mod. Now due to bugs, playing as minors is only possible if I completely disable fog of war over the whole map. Or spend a weekend figuring out how to mod visibility quad trees. No fog of war definitely made the game a bit easier than it would be otherwise, but it wasn't decisive.

Year 1700

Venice is a teensy minor with 2 armies:

  • Venice: General, 1 Provincial Cavalry, 2 Pikemen, 1 Militia
  • Morea: General, 1 Fixed Canons, 1 Pikemen, 1 Militia

Plus a small fleet. So what do we do? Well, first we need to research stuff, build up economy... Who am I kidding, we ally Austria and Spain (just for one turn to call them into our war), and attack Ottoman Empire turn one. They already start at war with Russia.

First army takes Athens against overwhelming force in a two stage battle.

Second army lands in Bosnia, takes that without a fight, then goes to Serbia and against wins against enemy force twice the size.

That unfortunately meant I left behind one unit of Ottoman Line Infantry, and they took Bosnia back. I had 2x 60 Firelock Armed Citizenry against their 1x Line Infantry. This was hopeless, as each citizen has 3 bullets, and can't fight in melee. Thanks to amazing tactics I managed to kill 57/120 of them. They will be missed.

Next turn my army from Serbia came back, ad crushed the remaining Ottoman forces with just 1 man dead. Oh and Austria and Spain both broke our alliance, but since they're at war with Ottomans, it's fine.

So, my main problem is that I don't have any way to recruit good units. Additional Units Mod is not helpful, since it mostly adds units to major and some late game units. If I remember correctly only Prussia gets stupid OP early units in it.

All this reset Bosnia's unrest from -13 to -4, so I only had two regions where rebellions were a problem. Thanks to no fog, I could also see that Austrians were actually fighting Ottomans in some skirmishes, and that prevented early counterattack against my undefended Serbia.

But God, those end of turns take forever that I see every AI unit movement anywhere on the map. After a few such turns I disabled following AI moves. It's a bit bad, as I can miss enemy units walking next to my cities, but it makes end turns bearable.

Liberation of Constantinople

I raided Ottomans ports. And maybe that's what finally convinced them to peace out. Or maybe all the other wars they were at.

Meanwhile rest of the world was at total war already - Austria vs Poland, Austria vs Prussia, Russia vs Sweden, Spain vs Netherlands, France vs Netherlands, Britain vs Poland, Britain vs Prussia, Marathas vs Mughals, Sweden vs Denmark, Ottomans vs everyone I made them fight, and then various German minors and American natives dragged into all this.

Well, I had Serbian and Greek revolts to deal with. Both spawned with armies a bit stronger than what I got. I crushed Serbians, but battle with Greeks was a long distance shootout with fixed artillery, and I withdrew with 0 loses on both sides instead of trying something risky. One of my general died fighting the Greeks.

Ottomans lost Bulgaria to the Austrians, but captured Transylvania instead. Then Transylvania rebelled, so I was pretty happy about how things were going, merged my shitty armies into one stack (1 general, 1 cav, 6 militia, 2 fixed artillery) and declared war on them again, marching on Constantinople.

Damn Pope took this opportunity to attack me. I seriously wish it was possible to go Orthodox in this game, but sadly I need to remain Catholic forever. This meant something horrible - I had to fight a bunch of naval battles to clear route to Venice. And they were just as miserable as I remembered them. I started recruiting second stack, but Pope agreed to peace out after losing some ships.

Meanwhile my first army took Constantinople. Those battles can take seriously forever if AI is not cooperating, and me still only having fixed artillery means AI does not like to cooperate. Once Constantinople fell, I agreed to peace with the Ottomans, as majors' capitals are all 30 turns of unrest. Ottomans still have one holding in Europe somehow - Moldova, I wonder if Austrians or Russians get to it first.

Meanwhile Spain took over Portugal, Sweden took over Denmark, and French blobbed into Belgium and Rhineland a century too early.

Liberation of Rome

I demolished one building in my capital on first turn to build one college, but that's research is really slow, so I've been also stealing and trading techs. I even got a Steam achievement for stealing a lot of techs. When this game get achievements? Well, apparently ages ago as I got some in 2010. A welcome surprise, most are unfortunately either for multiplayer or for playing all the way to the end, so not really seeing myself going for that.

And finally, after liberating Constantinople and nearly single-handedly removing kebab from the European premises against overwhelming odds, I can recruit my first horse-drawn artillery. The very unit I probably should have waited for before starting the first war. I also didn't use any Line Infantry up to this point, but I recruited a bunch to face the Pope. Their first task was to fight Ottoman rebels, who wouldn't accept liberation of Constantinople. Two revolts got nicely crushed, but then election happened, and new government got elected, highly unpopular with the peasants.

I divided my troops into two stacks. One general leading militia and fixed artillery stayed in Constantinople to keep order. The other took line infantry, mobile artillery, and cavalry to Africa. On the way minor stop to take Malta. And that's where I needed to stop as Malta somehow had -30 unrest like capitals of majors. Why? Nobody knows, that's the kind of game Empire is. So now I have two babysitting armies. So much for Africa.

The Pope declared war on me again. And the Ottomans next turn. Ottomans are not a big deal, as they'd have to pass through Constantinople and I'm blockading the straits with a single ship for good measure, but Pope might take Venice. So I recruited some armies in Greece, and together with armies from Malta I landed everyone next to Rome. The key to victory was Pope only having fixed artillery which can't join as reinforcements, so I could fight him without his artillery, and that's decent odds. And Rome is also at -30 unrest. What the hell, seriously. Now I have two stacks and need to babysit three provinces, definitely nothing left over to spare for fighting Ottomans.

Battle for Rome. Good cavalry charge on weaker wing can cause massive chaos in enemy ranks while the artillery keeps shooting, but it backfires occasionally if enemy holds.
That fog is sure annoying, and Total War games would be better without weather effects.

Unification of Italy

There was going to be fun ping pong to get one army to babysit two provinces, but what needs to be done needs to be done. Empire Total War is just so much better at making overextension feel real than EU4. This desperate struggle to keep the expanding country from just falling apart, and done without any bullshit events, just with solid core game mechanics.

I now had three half-stacks - Constantinople, Rome, and Malta. And one from Malta took a quick break to liberate Tunis. Then Genoa attacked me. So many fronts, and I've been mostly giving up naval supremacy because I don't want to spend more time fighting naval battles than necessary, so it's hard to haul troops to the right place.

Fighting on so many frontline is quite hard. At least Austria didn't attack me yet - I allied them like 3 or 4 times already, then they break up but accept alliance next turn anyway. Weird relationship.

So I took Genoa and it's -30 unrest again. If I could figure out which provinces will have -30 and which only -13, that would be nice. I thought it's just capitals of majors, but that doesn't seem to be the case. Is it based on capital of major or anything with a level 4+ government building? That's my best pattern match.

Well, Spain attacked me before I could figure it out. I'm OK with AIs ganging up on me, or with this massive undocumented unrest, but why both? I quickly took Milan, but Spain wouldn't accept any terms. And neither would they after I took Naples. At least that unifies Italy. Not counting Corsica, Sardinia, and I guess Savoy.

I had my relatively speaking bloodiest battle to date when Barbary States sent their stack at me, and did basically melee charge. They even had female unit of Dahomey Amazons, whatever that's based on. At least after that Barbary states peaced out. They lost Algiers to Spain, so they're now just Tripoli.

Meanwhile - Sweden took Moscow but then lost it, Prussia took Warsaw but then lot it, France took Amsterdam but then lost it. It feels like a bit of a pattern, probably -30 unrest together with foreign armies does that. Everybody is at war with everybody else.

Justinian would be proud

Savoy declared war on me just turn later, as my army was standing next to them in Genoa. So I guess my Italy will be a bit bigger than originally planned. Unfortunately Genoans rebelled same turn, but I just barely managed to squeeze both battles with last fraction of movement point.

Spanish Sardinia was undefended, so I seized it too.

Then France attacked me. That's with the mod that fixes diplomacy? Well, at least none of them are pushing me too hard except on sea. Constantinople and North-West Italy are good chokepoints. Places like Tunis and Malta are exposed, but AI doesn't invade by sea too often.

I wanted to take Genoa, but Genoa, France, and Ottomans together successfully navally blockaded me, and I really didn't want to slog through a few hours of naval battles. So instead I took some armies from Constantinople, recruited a few more troops, and landed in Egypt. I took Cairo unopposed, Jerusalem in a small battle, and Damascus in another.

Ottomans could either try to stop my fairly small army there, or they could try to break into Constantinople. In their probably fifth futile one ship attack they failed to break blockade of the straits, and I finally had some savings to upgrade my Constantinople army to a reasonable stack and went to fight in Anatolia.

I finally got an epic battle. On my side 4 cavalry (1 General, 1 Regiment of Horse, 2 Hussars), 6 basic Artillery, 10.1 infantry (5 Line Infantry, 5.1 old Militia).

On Ottoman side 5 cavalry (all Camel Nomads), 3 artillery (1 stronger version of basic, 2 howitzers), 10 melee infantry (3 Swordsmen, 2 Pikemen, 2 Peasants, 3 basically Berserkers), and 1 Mob with firearms. Do they realize which century this is? That's West vs East, the battle which will decide the fate of the Middle East. After that Anatolia got taken and by 1720 my borders are so close to Justinian's borders like I've been actually trying.

Battle for Anatolia, and my usual setup. Artillery in 2-3 batteries between infantry line. Using groups to quickly refocus where they fire. Cavalry in reserve.

Liberation of France

Those armies from the East could now land in Corsica, switching to fresh ships a few times on the sea. I know it's cheesy, but I don't feel like playing legit naval game.

While all those campaign in the East were going on, I recruited some dragoons to keep North Italy in check, somehow randomly got a really good justice minister, and moved straight for Paris. That risks Prussia and Britain attacking me, as seems to be the pattern, but France is wealthy enough to basically pay for upkeep of a full stack.

Paris was defended by some really advanced troops. I put my artillery in 3 groups of 2, with infantry between them, and some cavalry as reserve. The French assaulted everything on my left flank, and managed to break it, fortunately at this point they were spent and my remaining half the army finished the job. French would not negotiate even when reduced to just Alsace and some colonies, but at least without Ottoman and Genoese fleets, I could challenge small French fleet, break blockade of my ports, and finally get some serious trade income.

Spanish and French troops were ravaging French countryside, so I couldn't move against Alsace, but surprisingly my Dutch allies took it, destroying France, and liberating Quebec. How did I get Dutch as allies? French once destroyed them, then they respawned, then they asked to ally me, and I said sure whatever. That was long before I was anywhere near France.

So now my Northern borders are my ally Netherlands, impassable Switzerland, and my ally Austria. To the East there's broken Ottomans and Barbary States leftovers in Tripoli. So just Spain to crush.

Liberation of Spain

My armies shrunk a lot from the peak as I didn't need quite that many stacks and merged some damaged units. Some were left in Paris, Anatolia, and even a few dragoons in Savoy, but there was still plenty left. I landed in Algiers which surrendered without a fight. A bigger force just marched onto Madrid.

Spanish armies were ravaging countyside, so I took some troops, 5 full units against half of enemy unit so about 10:1, tried to autoresolve as it would be completely trivial massacre and then got defeated. Seriously, autoresolve in all old Total War games is just ridiculously biased against the player. When I finally fought them, they didn't even fire a single shot, basically marched, got shot by all my artillery, and died.

Spain was not willing to surrender yet. They attacked Algiers with overwhelming force, and it was a really close fight.

Then I reached Madrid and AI marched halfway there and then derped for 15 minutes trying to figure out if it wants to place its line diagonally left or diagonally right against mine, like some cat trying to get in or out, while getting shot from fairly close range by my artillery. That's how a 1000 vs 1000 battle turns into 1000 died vs 50 dead.

Spanish stack tried to siege Madrid, but then cancelled same turn and went to raid some farms instead. Oh well. Spain still held Lisbon, Gibraltar, Morocco, and good chunk of America, but just a bit later they peaced out.

Peace was achieved, and I basically recreated Roman Empire at its peak. Well, without England, Vienna, and a few peripheral provinces here and there, but it's basically done.

Battle of Madrid. AI artillery really hated this hill, so it fortified itself behind it so the hill is the only thing it could possibly shoot. Empire artillery has very low max gun elevation, that might be historical, but for gameplay it would be better off if they increased max elevation to howitzer levels. AI is completely lost, and it's hard for the player too as even tiny hill might be too big for artillery.

Strategy Retrospective

I really liked the turn one ally Austria invade Ottomans and rush 3 provinces opener. Maybe Serbia was one too far, and I would be better off limiting myself to Bosnia and Athens, but no big deal.

Empire Total War has some amazing opening turns, as you can do diplomacy with anyone - in Medieval 2 it would take forever to get your diplomats anywhere. Instant diplomacy is the biggest improvement Empire did, no question about it. It's really easy to basically "win" the campaign turn 1, for example as Mughals just pay Marathas a bit of gold for peace, this will give you time to move troops South and consolidate, basically removing all the challenge.

Permanent blockade of straits to Constantinople to keep Ottomans stuck in Anatolia, then opening a second front against Egypt was a great way to turn a prolonged stalemate into a victory.

What I feel I did wrong was leaving Venice undefended for so long. AI chain declared on me - Pope, Genoa, Spain, Savoy, France, pretty much turn after turn. If they didn't lollygag and just seized Venice, it would be really awkward. I had relatively safe second homeland in the Balkans I guess, so I would turn into real Eastern Roman Empire there if that happened.

I've been massively handicapping myself economically both campaigns by not sending any trade ships to colonies, but that would mean far too much naval combat. That's another reason why I'm not too keep on playing on very hard campaign difficulty - AI would get too strong economic bonuses, so I'd need to get some colonial trade, and so I'd need to fight all those damn naval battles.

Research stealing and trading was far more successful that expected. I got almost as good research with 1 school as Venice as I did with 4 as Russia previously.


This was quite fun. Playing as a minor on hard/hard made battles a lot more interesting. I was usually facing stronger opponents, so maybe about half the battles were either fun or quick massacre, similar proportion as in Medieval 2. The unfun ones were a lot worse, since they drag on forever. It's always easier to have AI come to me, but in Medieval 2 it's not a huge deal if I have to be on the offensive. In Empire, dragging the artillery across the map just takes forever, and enemies won't just stand somewhere, they'll reshuffle again.

Naval combat was just as miserable as I remembered, every single time. If this game had no ships, just a lot of land bridges, it would be a lot more fun. That's one thing that's worst for my enjoyment of the game. And I can't even autoresolve it, as autoresolve has absolutely ridiculous level of bias against players. New games removed naval combat, and got rid of this crazy autoresolve bias.

As planned, I'll now go on to try the next Total War game - doing some short Napoleon campaigns.

I can totally see myself coming back to Empire later. As long as I'm fighting on land, I'm having fun. So countries like Sweden, Prussia, or Persia could be a lot of fun.

As for optimal difficulty level, hard/hard might be right since:

  • very hard campaign is really hard without doing colonial trading, and that means naval combat, and all its tedium
  • very hard battles gives enemy massive morale buffs, making cavalry basically useless, encouraging uniform art/inf lines, and reducing tactical complexity

I made second blog for gaming content, but it was more Google+ backup, and campaigns that take 50+ episodes to finish. I'm not really sure what to do with it going forward. I think I'll just post everything here unless it really takes a lot of parts.

Wednesday, April 03, 2019

Revisiting Empire Total War

I finally have a bit of free time, so I decided to revisit some old games. This post will be about Empire, but first I did a bit of Medieval 2.

Medieval 2 Britannia as Wales

So first, Medieval 2 Kingdoms - Britannia campaign - as Wales. I only played Britannia once before, but I played the hell out of Medieval 2.

I didn't play that much Medieval 2 recently, and the manual claims Wales is the most difficult country, so I picked only hard / hard. I'm not really sure how they reached this conclusion - Wales gets enormous event stacks during first few turns. I was the strongest country almost right away with barely any recruiting. The only problem was paying all those troops, but then there's loot button.

In 10 turns it was basically over, with England being reduced to Nottingham and some Irish towns. I actually lost a few battles, but most of them were me sending a single unit to grab some fort (forts in Britannia campaign are small permanent castles) and that unit getting ambushed or attacked. Oh well, not a big deal.

I really like those mini-campaigns. They add just enough new mechanics to make things fresh for a few sessions, but don't do anything crazy. "Culture" replacing "religion" was a cute idea, but then London was 50% Welsh in 5 turns of me holding it, so maybe nobody looked at the numbers. Permanent forts definitely mattered. In all Kingdoms campaigns merchants are somehow worth many times more than vanilla, so they're actually good.

Overall Medieval 2 is fun, but damn it's easy. Now onto Empire.

Empire Total War

I reviewed this game once before. It's nice to see I hated "professional game reviewers" years before Gamergate made it mainstream to do so. Hating someone before it was cool is even more hipster cred than liking someone before it was cool. It's still completely ridiculous that publisher-paid whores rated this game as better than Medieval 2.

Anyway, regardless of its many flaws, I mostly enjoyed this game, and it's been so long since I last played it. I had some old mods - one I wrote to remove walls, and another someone else wrote to fix diplomacy based on my research. Figuring out how to activate them took a while. A lot of links I googled were dead or led to tools for newer Total War games.

So here's the story. Rome and Medieval 2 were very moddable, but then Empire came with a new engine, and moddablity was nearly zero. Even Creative Assembly couldn't really mod it, they had some extremely convoluted build system to duct tape everything together overnight, and that was it. I was so annoyed by this state of events that I researched format after format, and wrote decoder after decoder - not just for Empire, but for all Total War series going forward. I even wrote tools to mass crack tens of simple formats with statistical analysis.

There were a few people doing some research and tooling, but to be honest I don't think the Total War modding scene would have survived without my push. By the time of Shogun 2, CA figured out modders exist, started releasing some modding tools, mostly complementary to what community already did, and it's kinda self sustaining now. Still none of the new titles are anywhere as moddable as Medieval 2 was. Medieval 2 was peak Total War.

The modding scene is formed mostly by all the people who actually create mods, but there's plenty of games which could have had thriving modding scenes, but don't due to lack of tooling. Like XCOM has godawful tooling and it basically has just one mod (Long War) - plus a bunch of minimods doing literally VM binary patching, half of which got broken by a game patch and never fixed. Total War series was heading in such direction before it got saved. Congratulations past me.

Empire Total War as Russia

Unfortunately while adjusting graphics settings I accidentally switched to Large unit size (120 for line infantry, 3 cannons per unit) instead of Ultra I wanted (160 for infantry, 4 cannons per unit etc). I only figured it out after a few turns and didn't feel like restarting.

My least favorite part of Empire was naval combat, so I picked Russia at normal / normal to avoid it as much as possible. I used to play on very hard / very hard, but this is just a casual revisit. 1700 Russia starts at awful economy, awful tech, awful army with most of infantry not even having guns, and at war with Ottomans and Crimea. It feels so much more realistic than EU4, where 1444 Russia is basically a fully Westernized power already.

In the first war I took Crimea, tried to peace out Ottomans, but they didn't, so I took Moldova to get them to peace talks. This gave me first port (in Empire Arkhangelsk doesn't have a port), and let me get my economy on track.

OPM Dagestan declared on me. I forgot just how aggressive Empire AI was. They didn't last long. Since I already had my troops there, I took Georgia - and Armenia which Georgia grabbed in some war with Ottomans. I allied Persia as I didn't want another front.

I attacked Sweden for Ingria, Livonia, and Finland, leaving them with just Sweden.

Ottomans attacked Persia, pulling me into their war, so I grabbed Bulgaria, Mesopotamia, and Constantinople itself before they peaced out.

Sweden attacked me, and was sending 2 nasty stacks all the way around the coastline, so I recruited a single ship (in Total War the whole army fits on the smallest ship), and dropped it next to Stockholm ending the war in no time.

Then once Constantinople chilled down I actually attacked Ottomans again.

That's overall a shocking mix of everyone declaring wars in every way. It's biased against the player, but every AI was fighting one or more other countries. This is fun. EU4 diplomacy is so tame by comparison. After this session, Paradox games feel so static, as all wars are either declared by me, by a coalition against me, or by some AI blob against minor who can't defend itself.

I tried trading techs, and I managed to buy a lot, but I have no idea what's the AI logic. Friendly AIs would refuse trades like 1 their tech for sometimes even 10 my techs. Overall this Civ1 style tech trading is a bad mechanic as AI is always awful at it, and it's not surprise that very few games have this mechanic nowadays.

I built a lot of universities - 3 in my capital region, and got 1 each in Georgia and Sweden, then I discovered just how big clamor for reform penalty gets with enlightenment research. I had to destroy one of universities in my capital region. Then again, the only really important tech is Canister Shot, and it's available right away. The rest are nice-to-haves.

Empire Total War tech system

Empire has such a weirdly designed tech system. A stack of like 1 General, 10 Line Infantry (available right away), 6 basic mobile artillery (needs Canister Shot), and 3 whichever cavalry to chase routing units is really close to being a perfect stack, and you can get it basically immediately.

Line Infantry gets a lot of upgrades for first few techs, but high tier infantry units are more gimmicky than good. High level cavalry is better, but cavalry is mostly going to be chasing routing units who don't fight back. High level artillery doesn't get meaningfully better.

Everything naval is a joke - the optimal strategy is taking one cheapest ship and zig-zag-ing with chain shot to defeat a fleet with 100x as many cannons.

Industry tech unlocks better buildings, but while early buildings have amazing return on investment, late ones are fairly mediocre upgrades and come with lower class unhappiness penalty.

Enlightenment techs improve research speed, but they also massively increase unhappiness from universities, so it's quite awkward.

Oh and you also get prestige from researching tech, which does literally nothing unless you select Prestige Victory condition. Not like there's any chance of ever winning by prestige, if game lasts that long, you'll just be the biggest blob with most prestige anyway.

It's super easy to rush late techs by just building more universities - having 4 universities means 4 times faster research than having 1 most major countries start with. But it doesn't feel like there's really that much reason to get those techs. I can't think of any game that does this.

Minor Interface Annoyances

In Rome and Medieval 2 it was possible to rearrange units by getting all your cavalry in one stack, all your infantry in another, then merging them, or so. Basically last unit to join the stack was last on the list, except for generals always being first. Also during battle grouping and ungrouping units rearranged their order to my liking. Trying the same things in Empire? Nope, all unit cards are always totally mixed, and that gets on my nerves. I think in newer games at some point they introduced drag and drop to rearrange units.

Inability to wait for better weather is annoying too, but at least Empire doesn't have those extreme foggy weathers like Medieval 2, where AI could see everything, but I couldn't unless I paused all the time. So it's about even. Are there any Medieval mods to get rid of those silly weathers? They mostly make everything look bad.

With building slots scattered in minor town of every province, it's difficult to see what's available for building. There's "building browser" which shows what's current state of all towns, but you can't see what's under construction or build anything from it, so it's a bit wasted interface. Not like it matters terribly much to do it a bit suboptimally. In new games there's just one central place to manage all building in a province.

None of these are what makes Empire a bad game. It's just an inevitable consequence of new engine.

Battles in Empire

Empire AI tries some maneuvers - infantry lines up, marches forward until enemy is in range, each unit faces nearest enemy, and keeps shooting until one side or the other is dead. Mobile artillery advances to the point where enemy is in range, then start firing. Cavalry prances around and sometimes flanks.

Except it never works properly. Just standing still with a mix of line infantry and artillery on canister shot completely obliterates AI in 80% of battles with nearly zero loses. About 20% of battles are actually fun, when this script doesn't work for any reason.

Battles in Empire are paced like a Tarantino movie. There's a very long setup, then the action is over in a minute. AI spends so much time forming its initial line, often derping in process and having to restart multiple times, while under artillery fire. 10 minutes of that, and it loses maybe 1% of its troops, because long distance round shot is so inaccurate against infantry. It's more decent against cavalry, enemy artillery, and buildings, so it's common that enemy general dies before the battle stars.

Then AI slowly marches towards me. It's all tolerable up to this point. Then 125m from my line artillery unloads canister shot causing massive casualties, but AI infantry still slowly walks forward, and takes time to form lines facing me at 70m while both canister shot and muskets are murdering them. Many units never even fire, they just break. What's left loses the firefight quite fast. I might send cavalry against units running away, but that risks friendly fire, so it's the riskiest part of the whole fight. Not exactly exciting.

The only AI counter to this I've ever seen was when AI had a lot of garbage melee infantry, and decided to just charge at my lines. Of course it didn't win, line infantry (especially after a few bayonet techs) is actually much stronger in melee than most melee infantry units, but it inflicted far more casualties than typical AI slow derping.

The simplest AI strategy that could work is checking if enemy has canister fire, and if so, don't try to form lines to shoot, just get bayonets on and run through the whole canister fire range straight at artillery. Or just nerf canister shot and make regular shot better to compensate?

The obvious self-limitation of using less artillery doesn't work, as without artillery superiority on my side AI often just derps around forever, and I have to really slowly advance while it runs around the map. It makes every battle drag on forever.

Actually now that I think of it, I'm seeing a lot less suicidal cavalry behaviour than I remember. Did that get patched?

Oh and this was all normal, but it only gets worse on higher difficulty levels, as AI gets completely ridiculous morale bonuses, as well as more reasonable shooting bonuses, basically making cavalry unusable, and nerfing a lot of tactics, but canister shot is just as good at very hard as at normal.

Continuing as Russia

And so I destroyed the Ottomans - this gave me really nice borders down South as there's no way to walk to Egypt from the West in any reasonable time, and shockingly my ally Persia didn't backstab me yet.

Then I wasn't sure about Norway (who rebelled from Denmark at some point I guess), so I took the stack which was keeping Sweden under control and took it.

Battle of Norway, viewed from AI side. I did a very suboptimal thing and placed artillery on a cliff, just because the cliff was there and it was something different to try.

Notice AI immobilizing both its artillery unit with entrenchment. This is like top trivially preventable dumb AI mistake. Entrenched artillery not only can't move, it can't even rotate properly and can only shoot forward, so basically it will ever affect the battle, and any unit can just walk around and shoot them at its leisure.
It's notable because this is the worst tactic I've ever seen LegendofTotalWar try, when tried to play Empire.

Lower class was getting unhappier and unhappier. Weirdly farms at level 3 have -1 to lower class happiness, but that disappears at level 4, and level 5 is actually +1 upper class happiness. All industrial buildings get from 0 to -1 t -2.

So I triggered revolution, and switched from absolute monarchy to being a republic. I didn't even need to do any shenanigans, 2 universities in capital region was enough. That didn't really help that much - instead of nobility and lower class, I have middle and lower classes now, and better lower class base bonus. But absolute monarchy let me have amazing cabinet with huge lower class happiness bonuses, so it ended up being not all that much better.

At this point it became really weird that none of my allies backstabbed me yet, and we were already in 1726, so I attacked Polish protectorate of Courland to invade Poland. I took 6 provinces from Poland, 1 from Courland, then I bribed Poland to peace out with 2 techs. AI seriously overvalues techs.

Two turns later, OPM Austria attacked me. I thought they'd actually do something useful, like attack with their full stack and a bit in Vienna against my 2/3 stack in Pressburg, as my armies were scattered around recently the conquered Balkans to keep public order, but AI didn't do anything, so I moved some extra troops from Serbia, sieged Vienna, and won in one turn. I still hate lack of grid on this map. I had to reload 3 times just to move my armies from Serbia the way I wanted to join the siege. With Medieval 2 style grid it's very easy to do precise movements. In Empire if you clicked a few pixels off, your armies will just barely not be able to join, and the route game choses is generally not the faster route due to random downs blocking roads which can you enter but only manually. It's an awful change.

I remembered just how highly AI overvalues techs, so I bought Morea from Venice for 10 techs. That really cleans up my borders. And there I was wondering if they'd take all techs plus Vienna for Morea - mostly so I wouldn't have to babysit Vienna while resistance slowly dies out (for capitals of majors it's 30 unrest, for everything else just 13, either way dropping 1 per turn). I tried it with a few other countries by nobody took it. Looking at tooltips I guess that's because Venice likes me as I'm a republic, but all absolute monarchies hate me.

OPM Mysore declared war on my ally Persia, so I joined. Mysore doesn't even have a port.

I was end of 1730, I was absolutely dominant militarily, economically, and scientifically, so I guess that's a good time to end this.

Battle of Hungary. Poland had two stacks against my one damaged stack. The river map has 2 crossings, so I split my army in two defending each. 6 line infantry, 2 canister shot artillery, 1 howitzer, and 2 cavalry chilling behind.
AI could have easily forced the crossing if it just charged my artillery, or if it unpacked all its artillery (8 or so total) and tried to win a long distance shootout against one of my half-stacks. It was still a good battle, and I had to send cavalry across multiple times.

Overall impressions

It was much slower paced game than how I'd usually play. I used my regular stacks to maintain public order instead of just hiring some cheap dragoons while I keep pushing against next and next enemy.

What I totally loved was how it really felt like the country is developing. Villages turned into new towns, industry and infrastructure developed, disorganized militias turned into professional armies, there was peasant unrest for a while, workers' unrest getting worse as time went, revolutionary movements among the students only got worse and worse, while religious and ethnic minorities in conquered lands slowly accepted my rule.

Thanks to the mod I used, AI diplomacy was actually interesting, not just suicidal as in vanilla, and it wasn't just standing there waiting for me to do things like in EU4. This world felt far more alive and evolving than EU4, where 1444 is basically same as 1821 except for some bonuses.

Comparing campaign part of Empire to Medieval 2, I think Empire mostly wins, especially if we forgive it all the minor issues caused by a new engine.

Battles compare much worse. Every now and then I'd get an interesting battle, but most felt just trivial and some were outright tedious. I disabled sieges with my mod, and picked a country which could ignore naval battles (the only naval action was sneaking my stack to Stockholm and some recon), as they are far far worse than land battles. Naval battles are completely unfixable, and I'm saying that after wasting far too much time trying to mod them into something not horrible years ago.

Probably the best thing is that sieges are generally just regular field battles - Rome 1 and Medieval 2 field battles are far more fun than sieges, but playing them normally sieges are a big majority of fights. At least early game, late game without mods become boring siegefest.

The game definitely needed massive polish and balancing fixes it never received. I don't even think it was such a bad game, it was just a big downgrade from Medieval 2 in so many ways.

6 Amazing Games

After a long day of gaming. by ocean.attic from flickr (CC-SA)

Now that Google+ got murdered by Google, I'll go back to reviewing stuff on this blog. I should probably start coming up with backup plan in case they murder Blogger too. Oh and maybe I'll dig through my Google+ posts and report reviews here as well.

So here's 6 video game recommendations of games I played relatively recently. These games are not merely good and enjoyable, they go far beyond that. If you like games and game design, it would be utter silliness not to try out every one of them.

Her Story

My memory is fairly poor when it comes to stories. Even if I enjoy a movie or a book, I would have a lot of trouble recalling much beyond general outline and a few highlights. Video game stories are usually even less important and less memorable, usually just providing some background on which the actual game takes place.

And yet, somehow I remember every minute of playing Her Story. It just burned into my memory like no other game ever.

It doesn't "tell a story". It invented a completely new genre, which lets you discover what might have happened, in a way that naturally leads to emergent plot twists, and apparently people end up strongly believing completely opposite conclusions on what the story was depending on which way their exploration went, even if they've seen the same content, just in different order, and with different mindset. This level of story engagement is unprecedented.

I very strongly recommend everyone to play it without any spoilers, as soon as possible. It's a one evening game.

I hope more games like that get made, but it was such a masterpiece of story construction and acting that maybe it's too difficult and it will remain a singular masterpiece forever.


It's Steam's second highest game of all times, behind just Portal 2, so throwing another endorsement to million other endorsements might feel a bit redundant.

Factorio invented a new genre of automation games. You start on a new planet, manually extract some resources, and gradually setup more and more complex manufacturing chains so everything runs without your participation as much as possible. If everything in base game is too simple, you can ramp up complexity by another factor of 10x by getting some mods, which are conveniently available from in-game menu.

It's been such a great hit that new Factorio-style games like Satisfactory and Factory Town started coming out, but I don't think they're really there yet.

I don't love all their choices - color palette feels depressingly desaturated, and combat feels like a distraction from core gameplay (it can be turned off when starting a new game). It's still first and so far the best game in this new genre. It wouldn't surprise me if Factorio did to automation what Minecraft did to crafting, and it became regular feature in new games soon.

And it did it all while still in "early access". It's been far more ready for years than most games are on publication day.

Warning: The game can easily take hundreds of hours of your lifetime.

The Elder Scrolls V: Skyrim Special Edition

Everybody knows Skyrim by now, but special edition brought new life into the game. Games like Skyrim only truly come to life with mods, but setting up mods for them was always pain. I still remember wasting a weekend setting up modded Oblivion for it to only glitch itself into unplayability as soon as I left tutorial dungeon.

Special Edition wasn't just the usual remaster with some better graphics, it brought 64 bit support (which enables big mods), and built mod support into the game itself, so installing a hundred mods at once is fairly easy. It still doesn't have perfect detection of mod dependencies and conflicts, but you'll only face problems if you take things too far, and they'll probably be fairly minor.

You can use third party tools if you're setting up particularly complex mix of mods, but you don't have to, and it will probably going to be fine anyway. Amount of content provides by the mods is enormous, and many of them are of very high quality. And many are not. It's all good fun.

Special Edition even brought mods to console playing peasants! Much more limited, but still, give them a taste of what PC gaming is like.

Annoyingly you need a special mod to enable achievements on modded games, which is basically the point of Special Edition. And between game bugs and 100 mods at once, I ran into bug in main questline, and didn't figure it out right away to reload, so I couldn't actually win this time, but it was so much fun anyway.

It's not a game for everyone, especially because you need a lot of time to play it, but it's definitely best in its genre of vast open world games.

Doki Doki Literature Club!

This completely free game pretends to be a dating sim taking place in literature club of a Japanese high school, but it turns into... Well, I can't say without spoilers. There's a bit of gameplay, but it's mostly a really great mindfucky story.

As the trailer says "This game is not for children or those who are easily disturbed", so I can't recommend it for everyone, but other than that, do it, it's amazing. Play without any spoilers. It probably helps if you enjoy anime visuals, but it only really pretends to be a dating sim. It's a one evening game.

Sniper Elite 4

Having played Sniper Elite 3 previously, I was expecting a decent stealth shooter, but I got a lot more.

The levels are huge, and allow a lot of approaches. Very few games ever tried that - Far Cry 1 and its sequels Crysis 1 and Crysis Warhead did it and then the whole concept died out, probably because console hardware had too little memory, and PC exclusives don't sell quite as well. It's those console peasants' fault as usual.

The second great thing is what happens when you break stealth. In basically all other games every enemy within some distance would magically know where you are, and now you'd have to run away or face a shootout against overwhelming odds. That's fine, and even Sniper Elite 3 did basically that. Sniper Elite 4 has a better idea. Enemies lack this magic, and only guess you might be based on when you've been last seen or where shots have been heard from. They'll try to suppress and flank your suspected location, throw grenades, and even artillery strikes to get you, but you can use it to your advantage.

This change makes breaking stealth a tool, not a fail mode. You can shoot to reveal yourself to lure enemies in direction you want, straight into some mines you just put, while you take advantage of them moving away from their posts to sneak past. Blow something up to make them take cover facing completely wrong direction, while you backstab them staring at the blazing inferno. Huge maps give plenty of options for creativity. Oh and as is tradition of the series, you get to kill Hitler in a DLC, in many unique ways. You can even shoot him in his one ball.

A big downside is third person perspective, which offers less control and immersion than first person would. But it's still an amazing shooter taking the genre in a new direction. If you enjoy shooters, it would be silly not to give this one a try.

The game doesn't actually explain all that well that you can take this dynamic approach, and I guess many people will play it as a traditional stealth game, which also definitely works. But if you do, you won't see why it's so special.

Silicon Zeroes

So it looks like a puzzle game inspired by TTL era chip design. Except they didn't just take vague inspiration, by the end of it, you will actually be designing superscalar pipelined processors with bypass logic. A lot of details of real hardware are simplified, but problems you'll be solving are completely genuine. It's a total opposite of games like Shenzhen I/O where everything is as fake as fake gets.

It feels to me like the most successful educational game I've ever seen, and I'm not even sure if that's what they were aiming for, or just accidentally hit.

There's also some story in it, but it's totally lame (half of negative reviews it has are about the story). At least it's not much of a distraction, you can basically ignore it and just enjoy the game.

The game starts very easy, but final designs are sort of Microprocessor Design 101 finals level, and only 1.5% of people have achievement for completing all challenges.

Oh and there's a free downloadable demo with first levels. Just give it a try.

Good gaming!

Enjoy the games. For summary of key points:

  • Her Story - one evening game, avoid spoilers at all cost
  • Factorio - long and very replayable, little to spoil, it's more fun if you try your own designs first few times; then it's OK to see how others did it, but if you want to start by watching some let's plays it's all fine too
  • Skyrim Special Edition - very long, and mods make it a lot longer, spoilers are mostly fine, 
  • Doki Doki Literature Club! - one evening game, avoid spoilers at all cost
  • Sniper Elite 4 - medium length, little to spoil
  • Silicon Zeroes - medium length, mostly avoid spoilers as it's a puzzle game

I plan to posting a lot more on this blog now.

Saturday, March 30, 2019


a185975 jewel-2 by The.Rohit from flickr (CC-NC)

So here's my second interesting Javascript npm package - stringify-any.

Javascript is a basically very low quality language where everything only kinda sorta mostly works. In this case I ran into problems of inspecting objects.

Problem this package is targeting

If you want to inspect obj in a browser, you'd usually just do:


And the browser will generate appropriate interactive widget you can click around to look around.

That's of course not possible outside the browser. So what if you want to print the object?


The most obvious way will fail with [object Object].

JSON sort of helps, and we can do this:


It's hard to read due to bad indentation, but copy and pasting JSON into pretty printer is a basic web development skill, so it's kinda tolerable.

And then you try some modern Javascript, and somewhere in that obj there's a nested new Set([1, 2, 3]), which quietly turns into {}, making you want to drop Javascript and just code Ruby in browser or Clojurescript or something.

What you can do now

Just get the package, import stringify function, and call it:

import "stringify-any" as stringify

It will do the right thing.

It handles all cases I could think of, like undefined, -0, infinities, NaN, DateMapSet.

It also sort of handles WeakMapWeakSetFunction - we can't show what's inside, but we can at least show the type.

Because Javascript is Javascript I'm sure I missed something. Please report, github issues are the best place.

I couldn't find any other package that does this correctly (found a lot which tried but failed), but then it's totally possible something like this already exists.

Friday, March 15, 2019

How democratic are countries really

BOY was that EXHAUSTING!! by Lisa Zins from flickr (CC-BY)

I mentioned many times how "democratic" countries are actually not all that democratic. It's time to quantify that.

I have no time to data mine all the Tanzanias and Liechtensteins of the world, so I limited this analysis to OECD member countries plus 3 extra not-yet-OECD EU members. Also excluded is Switzerland, as it has a completely unique system of government.


This ranking only covers how representative elections are, and only for Lower House, Upper House, Head of State, and Head of Government, as most countries either have those four roles, or a single entity covers two of those roles in a way that's easy to score.

This excludes all other elections, such as regional elections, super-national elections, possibly judicial elections, and such.

This also excludes any issues such as term limits, mandatory retirement age, campaigning, party financing, relative division of power between those branches, any rule of law issues and such. There's a lot to cover beyond this list, but it's very country-specific and difficult to score objectively.

It's all about how will of the voters is translated into results. If votes are thrown away (by non-proportional system), or voters are forced to vote for their non-preferred candidates (by FPTP and such), it gets lower scores.

If a very insignificant number of seats are reserved (like current VP, former presidents, ethnic minority groups), I'm not counting that either way.

I compiled the information from Wikipedia, and it's possible that I made a few mistakes.


Power is divided differently between branches of government in different countries, but for some reasonable baseline the following mix is used:
  • Lower House - 40%
  • Upper House - 15%
  • Head of Government - 30%
  • Head of State - 15%
If there's no Upper House, Lower House is counted for both roles.

If elected Head of State is also Head of Government, they're counted for both roles. 

If parliament elects Head of Government and/or Head of State, Lower House is counted for both roles. This also includes all cases where technically Head of State nominates Head of Government, but they need some kind of parliamentary confirmation, as that's in practice the same as direct election by the parliament.

Scoring for parliamentary elections

  • Proportional representation (with threshold less 4%) - 100%
  • Proportional representation (with threshold 4% or higher) - 80%
  • Single Transferable Vote - 80%
  • Mixed Member Representation - 60% - there's a lot of variety here, so it's a non-committal scoring
  • Proportional representation (with threshold 7% or higher) - 60%
  • FPTP with runoff - 60%
  • Proportional representation (with threshold 10% or higher) - 40%
  • Proportional representation with majority bonus - 40%
  • FPTP - 40%
  • FPTP with vastly disproportional sized districts (like US states) - 20%
  • Unelected - 0%
Proportional representation always has some threshold. For example a no-threshold elections with single national list for 100-member parliament basically forces de facto 1% threshold. And any kind of regional lists de facto results in low thresholds, even without any distortionary intend.

Medium-threshold systems are distortionary in practice. For example in Poland's electoral threshold alone was responsible for overturning results of 1993 and 2015 elections.

High threshold systems and bonus for largest party are intentional distortions targeted against minor parties.

FPTP is extreme distortionary in theory and practice, and it only somewhat works if districting just so happen to be random and not too biased. In practice every single FPTP system in the world has severe bias against certain demographies and parties.

FPTP with vastly disproportional sized districts is borderline if it should count as elections at all.

Unelected Upper House obviously gets no points.

STV and Mixed Member Representation systems cover various systems which are generally less representative than pure proportional representation would be, but it's difficult to score them properly.

Scoring for presidential elections

  • Single Transferable Vote - 100%
  • Majority with runoff - 80%
  • Plurality without runoff - 60%
  • Electoral College - 40%
  • Monarch - 0%
This should be fairly obvious. There's no way to elect a single position proportionally, so whichever system most reasonably approximates Condorcet winner is best.

None of the countries currently hold Prime Minister elections (Israel had them for a while), so either Lower House score or Head of State score counts.


  • 100 Israel
  • 97 Finland
  • 97 Portugal
  • 94 Iceland
  • 91 Romania
  • 85 Denmark
  • 85 Luxembourg
  • 80 Bulgaria
  • 80 Croatia
  • 80 Estonia
  • 80 Latvia
  • 80 Slovakia
  • 80 Slovenia
  • 79 Chile
  • 76 Spain
  • 74 Czech Republic
  • 74 Poland
  • 71 Ireland
  • 70 Netherlands
  • 68 Australia
  • 68 Austria
  • 68 Norway
  • 68 Sweden
  • 63 France
  • 63 Lithuania
  • 60 Hungary
  • 60 Italy
  • 60 Mexico
  • 60 South Korea
  • 58 Turkey
  • 56 Belgium
  • 51 Germany
  • 51 Japan
  • 51 New Zealand
  • 40 Greece
  • 37 United States
  • 28 Canada
  • 28 United Kingdom

Raw data

CountryLower HouseUpper HouseHead of GovernmentHead of State
Chile0%2 per statePresidentRunoff
Czech Republic5%FPTPParliamentRunoff
FranceRunoff FPTPMixedParliamentRunoff
New ZealandMixednoneParliamentMonarch
South KoreaMixednonePresidentPlurality
United KingdomFPTPUnelectedParliamentMonarch
United StatesFPTP2 per statePresidentElectoral College


There's a lot of "democratic" countries with very questionable scores. It's usually not quite as bad, as the general pattern is that more representative branches of government have more power than less representative branches.

So monarchs tend to have a lot less power than presidents, unelected Upper Houses tend to have a lot less power than elected Upper Houses and so on. Notably Emperor of Japan (sort of Head of State) has no role whatsoever, and British House of Lords (Upper House) is basically meaningless.

If this list was weighted by actual power, it would look a bit better.

The main exception to this pattern is US, which has it exactly backwards, and the (relatively speaking, none of them are actually good) most representative House of Representatives (Lower House) is least powerful, while the even less representative Senate (Upper House) and Presidency have almost all power between them.


It all might have seemed like a purely theoretical issue a decade ago, but right now of the bottom 4 countries, 3 are in a major unending political crisis, and Canada's luck might run out just as it did for UK and US.

Of 13 countries scored 60% or lower, only Canada, Mexico, and New Zealand avoided major political crises recently, unless there were some that I missed. On top of the list, such situations are fairly rare.

One thing that's not directly connected with electoral systems, but would greatly improve quality of democracy, is implementing strict term limits, especially for top positions like presidents and prime ministers. Eternal prime ministers cause all sorts of problems, which could be easily avoided if their party just picked someone else for the role.

Emojiful ls in your terminal

lsd is a really sweet looking ls replacement, unfortunately it's awkward to install, so here are the steps for OSX:

Install lsd and font with emoji

brew tap caskroom/fonts
brew cask install font-hack-nerd-font
brew install lsd

Change font in your terminal

For iTerm2, it's: Preferences > Profiles > Text.
Then for both Font and Non-ASCII Font, choose "Hack Regular Nerd Font Complete".
It's a bit smaller than default font so I increased point size from 12pt to 14pt, but it's up to you.

For builtin Terminal app, it's Preferences > Profiles > Font.

Because this setting is per-profile, if you use multiple profiles, or some non-default profile, you might need to set it in multiple places.

Make it default

Depending on your setup, add this to your ~/.bashrc or ~/.profile or ~/.bash_profile:

alias ls="lsd"

Or depending If you use another shell, edit ~/.zshrc or such file.

Tuesday, March 12, 2019

Map mode for Hearts of Iron 4 resistance and suppression system for 1.6

I previously published this data for HoI4 1.0-1.5, and simply updated that post each release, as there were minimal differences.

1.6 changes thing a lot, so it's best to just publish new maps.

For some theory behind this map, check out this post as nothing really changed. It's still a horrible system that forces endless tedious and boring micromanagement on the player, and which completely cripples the AI.

If Paradox wants to do resistance, it should be possible to just put units anywhere in some big region like "France", and they'd apply to all its states, not this nonsense of individually placing every damn 1cav brigade by alt-tabbing out of the game and hoping you clicked things right. Or just remove it completely, the game already applies flat static penalty to occupied lands.

EU4 figured that out, why can't HoI4? Also contrary to romantic visions of La Résistance, all that resistance was historically close to irrelevant minor hassle, except maybe in Yugoslavia.

Anyway, here are the maps. Click for full resolution version.





Friday, March 01, 2019

Challenges for February 2019 SecTalks London

Snow Leopard Cub Looking Curious by Eric Kilby from flickr (CC-SA)

I ran another round of London SecTalks CTF.

There were 12 regular challenges, and 1 super-hard bonus challenge. Only 10/13 got at least one solve during the event, so maybe difficulty or number of challenges were a bit too high.

Challenge files and code used to generate them available on github.

There are no answers below, but some serious hints which might make it too easy.

For previous rounds, see posts about September 2017, November 2017, May 2018, July 2018, and October 2018 CTFs.

from_future_import_flag (5 points)

It was a simple program which could tell you the flag if you run it in year 2020.

Censored SVG (10 points)

A simple HTML file with SVG image on it. The image contains flag covered with some censoring square. SVG image is base64 encoded for one small layer.

Hello RISC-V (15 points)

A simple binary which will give you the flag if you run it. It only runs on RISC-V, so you'll need to figure out a way to do so.

Crystal (20 points)

Password validator binary compiled from Crystal. Binary contains a lot of extra stuff, but validating function shouldn't look all that strange.

Powerpoint (25 points)

PowerPoint PPTX file encrypted with XOR. Flag is on the slides.

RISC-V Verify (30 points)

RISC-V binary validating password. It might be easier to run static analysis, but you should still understand basics of RISC-V assembly. Or you could run gdb on RISC-V emulator.

OCaml (35 points)

Password validator binary compiled from OCaml. OCaml uses unusual integer representation, so it's extra layer of confusion.

It had zero solves during the event.

LOLHEX (40 points)

English text encoded by hex encoding, but which of 16 digits is which is scrambled. Simple statistical analysis should do here.

Imba (45 points)

Password validator written in Imba. It will tell you if you get your flag right. It can be solved by static analysis (data driving logic is easy to see), or in-browser, possibly by by attaching DOM breakpoints.

It had zero solves during the event.

Catzip (50 points)

For mandatory meme challenge. It's a zip format made by gzipping something, then turning it into a PNG containing cat emojis. There's two cat emojis, 8 per row, so you can probably guess where it's going.

FPGA (55 points)

A slight variant of challenge from previous time. It's a small circuit, and you need to find inputs which give positive result. This time circuit has NAND, AND, NOR, OR, and XOR gates.

It's highly advisable to use Z3 or similar for it.

Monoalphabetische Chiffrierung (60 points)

German text encoded with monoalphabetic cipher, and then turned into Unicode Fraktur.

It's actually very easy, as punctuation, capitalization, digits etc. were not really scrambled.

LOL64 (100 points)

For super hard bonus challenge, it's English text encoded by Base64 variant, but which of 64 digits is which is scrambled.

Understandably, it had zero solves during the event.

It's definitely solvable in principle, but I'm not really sure how to write such solver. It can be seen as breaking a key of 64 6-bit parts, so 512 bits total. Knowing that it's all ASCII and simple statistical methods get a lot of those bits, but from that point on it would take some creative statistical analysis. Big difficulty is just size of the key, and how a single error in decoding can mess up all following statistical analysis, and cost a lot of time.

I'm sure there are also some ways to circumvent this whole process, and find exact encoded text from some simple statistical properties, but I didn't try it this way as it's less fun.

Sunday, February 24, 2019

Parable of the Sharks

Art show for sharks at Spoke Art by Steve Rhodes from flickr (CC-NC-ND)

Alice believes sharks are the biggest problem facing humanity.

If you ask her, she'll tell you about all documented cases of shark attack. She'll tell you how it's definitely undercounted - random disappearances will be counted as drownings even if they were shark attacks. Or someone could actually drown but only because they were running away from sharks.

She'll tell you that population increases every year, mostly in warmer and so presumably more shark-infested areas, that most people live in coastal areas, so we can expect more shark attacks in the future.

She'll tell you that as people get wealthier, tourism increases, and more tourists means more possibility of shark attacks.

She'll tell you that even living far away from the coast doesn't guarantee safety, as some sharks live in rivers. And what stops sharks from swimming into canals and sewer systems really?

She'll tell you that direct sharks attacks are just start of the problem. Sharks will eat fish, causing famines or mass unemployment in fishing dependent regions. Panics caused by shark attacks might cause mass migration, and all that together increases likelihood of armed conflicts. The more you talk to her, the most every problem turns out to be related to sharks.

She'll tell you how we need global solution to shark problem. Armed guards on every beach. Shark radars. Maybe even security bars in every toilet so shark won't swim up to bite you in your most vulnerable moment. The more you talk to her, the more elaborate her solutions become.

And of course she'll happily provide links with evidence for all those claims.

Bob doesn't believe sharks are even real.

Which of them is less wrong?

Sunday, January 27, 2019


Cat (OOF!) by Long Road Photography (formerly Aff) from flickr (CC-NC-ND)

I was playing a bit with Electron, building a small image viewer, as Xee is weirdly crashy nowadays. A small aspect of any image viewer is sorting images to show them in order. As far as I know there's no programming language with any special support for sorting file names, and default ASCII sort is just atrocious - going cat1.jpg,  cat10.jpg,  cat2.jpg etc.

It's not uncommon to find file manager or image viewer which uses this completely unsuitable sort order.

OSX Finder is notable for very much not doing so, and using human-friendly ordering. Exact details are unfortunately not properly documented.

I created something which works more or less the same, and published it as npm package finder-sort.

There could be some differences, especially for non-ASCII locales. In the end, it's trying to solve the same problem, not necessarily match OSX Finder exactly.

The source code is on github.

About the only interesting thing about it from code point of view is that I used ava testing package this time. Javascript has over 9000 different testing packages, and it's not uncommon for a single program to duct tape together 10+ of them. I'm surprised there's no clear winner yet. Some of the new ones like ava and cypress seem mostly decent.

Sunday, January 13, 2019

What I learned from Awair Air Quality Monitor

Unimpressed kitten by Magnus Bråth from flickr (CC-BY)

After watching DHH's video about air quality I decided to get myself AWAIR 2nd Edition air quality monitor.

Here's what I found.


Awair setup was fairly awkward. It couldn't connect with my WiFi until I changed my router to some compatibility mode, there were weird error messages about firmware update and so on. I finally got it running, but it wasn't smooth. At least there were no further issues after that.

Air circulation inside the flat is poor

I originally assumed that air in the flat would rapidly be fully mixed up, as it's a fairly small London flat, but that's not what I found. If I open all windows, fresh air gets to the sensor real quick, but as soon as I close them, the stale air is back just as fast from parts of the flat not on air flow path between open windows. I guess it's all the awkwardly placed walls and doors. Keeping windows open much longer eventually works, at least for a while.

How much CO2 per day do I need to get rid of?

One person burns about 2000 kcal a day, so let's say that's 500g carbohydrates getting burned. That's 200g carbon, or 730g CO2 per day, or 17 moles. 17 moles of CO2 takes volume of a bit over 400 liters. Plus a bit more for the cat, and for gas cooker.

Let's say the flat is 50 square meters, at height of 250 cm, so 125 cubic meters. Atmospheric CO2 is 400ppm, and let's say I want to keep it under 1000ppm, so 600ppm difference. 600ppm of 125 cubic meters is just 75 litres.

These are all heavily rounded calculations, but unless I forgot all the high school chemistry already, I need to somehow fully replace air at home 5-6 times a day to keep it in the happy range. Either by opening windows until fully replaced, or by having some small continuous air "leaks".

This number doubles with a second person, to 11 times a day.

That's a far higher number than I expected.

This number also changes depending on carb vs fat based diet, actual caloric expenditure, and so on, but in any case, it's very high.

Cooking anything generates massive PM2.5 spike

The sensor is placed in the computer room, about as far from the kitchen as it gets. And it looks like cooking anything whatsoever without windows open generates a massive PM2.5 spike for a fairly long time. This can fortunately be easily fixed by only cooking with windows open.

It's difficult to keep Awair happy

Awair never had any serious problems with chemicals, and PM2.5 spikes were only caused by cooking.

The problem were the other three readings. If windows are closed, CO2 levels creep up. If windows are open, CO2 levels go down, but temperature and somehow humidity go into unhappy zone. Pretty much no matter what I do, Awair will be unhappy. Only briefly after closing the windows when temperature goes back up but CO2 is still low Awair becomes briefly satisfied.

Perhaps I should move it farther away from airflow to make it more stable, then again it's fairly close to my computer chair, so it should be more representative of air I breathe this way.

What should I do?

I've been definitely opening windows more now, especially when cooking, but that's not too great - I like my place real warm (24-26C), and the outside is quite cold, especially in the winter.

I don't want to keep windows open too long not just because of higher heating bills, but also because of all the sound coming from outside. I'd have serious trouble falling asleep with bedroom windows open, as I'm extremely sensitive to light and sound when falling asleep. And it's distracting when I'm trying to focus on coding or gaming or just about anything.

I could open some other windows, not those in the bedroom, but honestly I don't think air would circulate much - bedroom door is always just slightly ajar for cat's sake, to keep bedroom as dark and quiet as possible. Closing them fully would generate cat scratching on door sound, which also negatively affects sleep.


So an obvious idea is to get some houseplants. It's a bit of a hassle, and the cat would probably damage them a bit. But mostly I have no idea how much CO2 would they really remove. I suspect the numbers would be really low for any realistic amount of plants, making it not worth it. Especially at night, when the light is understandably off.

Or is there any other trick I'm missing?