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

Tuesday, December 22, 2015

Review of The Manga Guide To Statistics by Shin Takahashi

It's been a long time since I last did any book reviews on this blog, or for that matter any other reviews. I usually just use Twitter or G+ for this as it's faster.

Here's a book I bought for the lulz - The Manga Guide to Statistics by Shin Takahashi and it turned out to be better than novelty value I expected.


The book follows a story: dad invites a cute coworker for dinner, who does some statistics at work for marketing reasons or something like that. The high schooler daughter wants to meet him again because he's cute, so she gets the idea in her head to ask her dad to get someone from work to tutor her in statistics (because she's totally interested in what dad is doing at work, honest) - and the dad obliges except getting some completely different dude as tutor. Basically it would be not out of place in any high school manga, but then again the last one I seriously followed was Aa! Megami-sama back when I was in actual high school million years ago, so what do I know.

The story is not breaking any grounds, but it's way more amusing that in any statistics textbook.

Also I'm reasonably sure that's already more plot than Mad Max: Fury Road had, and that was a really good movie.

Educational Value

The level of statistics in the book is fairly introductory, and unfortunately the book has some annoying mistakes, such as:
  • completely incorrect explanation of what it means to reject a null hypothesis (also knows as the most common error in statistics textbooks)
  • assuming normal distribution for data which is definitely not normally distributed such as normalized school test scores (also extremely common error)
Most concepts like histograms, distributions, correlations, etc. are explained relatively cleanly, but book's attempt at explaining what chi squared distribution is used for and what's the meaning of independence testing feels like a total miss, and I doubt anybody would have more than just a vague idea what the hell they are just read after that.

There's a bunch of math formulas, and I was not impressed by typography - with parentheses not being correct size to match enclosed content. Of course one could make a valid objection that this is a manga not a math textbook, and it was probably not typeset in TeX, which is fair enough I guess.

Am I the only one annoyed by bad typography here?

Of course this leads to obvious followup issue - is it even possible to teach non-Bayesian concepts like null hypothesis testing at this level beyond just "run this calculations, don't worry what they mean"?

Another problem with the book is that it probably focuses too much on the kind of silly content that predates spreadsheet software like formulas and looking up stuff in distribution tables.

Oh the books also has exercises for the reader and appendix on Excel, which are both potentially useful too.


Overall I'd say the book is probably not the most amazing textbook, but it'd be a pretty sweet novelty gift. Now non-Bayesian statistics is a particularly messy subject to teach, so I guess other books from the series might do better.

tl;dr 4/5 stars

Monday, December 07, 2015

Sublime Text plugin for highlighting Paradox file formats

Pet by !efatima from flickr (CC-NC)

Sublime Text is the best editor ever made #truefact, and as I edit a lot of text files from different Paradox games, I wanted to add syntax highlighting for that.

The package is now also available via Sublime's package manager, under name Paradox.

As Paradox files don't come with any unique file extensions (they're mostly .txt), you need to select it manually from menu at bottom right of the screen (or by choosing "Set Syntax: Paradox" from command palette).

Sunday, December 06, 2015

Fun and Balance mod for EU4 1.14.2 and Extended Timeline 1.14.1

Bow down to your king by travel oriented from flickr (CC-SA)

So who doesn't just love Paradox QA system, where instead of hiring people to QA the game before release they just release open beta without even labelling it as such, and players literally pay money to be their QA team. And then somehow many of the players are even grateful for how fast hotfixes come out.

Of course it would be totally unfair to single out Paradox here, as this seems to be more and more industry practice for most game companies.

Anyway, here's another updated version:

  • Fun and Balance for EU4 1.14.2 - Download. Steam Workshop
  • Fun and Balance for EU4 1.14.2 and Extended Timeline (0.14.1 version) - Download | Steam Workshop

  • The biggest change is that I moved to directory-based defines.lua overrides, so new version is much less likely to conflict with hotfix changes.

    I'd definitely recommend all mods to start taking advantage of this feature both Crusader Kings 2 and Europa Universalis 4 got recently - it not only reduces the need to make new mod release every hotfix, it greatly improves compatibility between different mods. Not long ago almost every mod (except for graphics-only stuff) had to modify defines.lua in one way or another, and it was biggest single source of conflicts.

    It's not even close to level of support for playing multiple unrelated mods together that games like Civilization 5 or Skyrim have, but Paradox games have made a huge progress over last few years.

    Here's Full feature list and links to older versions.

    Modern Times mod for Crusader Kings 2 - Dick Cheney release

    Go Canada Go...? by Little Cat Photography from flickr (CC-NC-ND)

    Here's new release of Modern Times mod for Crusader Kings 2 (Steam WorkshopDirect download).

    New Cultures

    There are 4 new cultures in this release:
    • Ukrainian - East Slavic group, has standard East Slavic mechanics. I'm still undecided what to do culturally with Belarus and Tartars, and for that matter all of Central Asia, so right now it's one of messier areas on the map. Adding Ukrainian culture is a step in right direction, but it's not even close to looking good.
    • American - West Germanic group, has Marines retinues and buildings, pure offensive heavy infantry
    • Canadian - West Germanic group, has Mounties retinues and buildings, with light cavalry / horse archers
    • Brazilian - Iberian group, has standard Iberian mechanics.
    They all got own list of given and family names as much as I could find them online. It's not a bug that a lot of Canadian names sound Chinese or Korean, that's actual Canadian demographics during Modern Times.

    If you have Sunset Invasion DLC disabled, that's it. You can use Ruler Designer to play as American king of Czechoslovakia, or Canadian Soviet Tsar, or Brazilian duke of Latvia.

    Sunset Invasion

    On the other hand, if you're ready for a bit more silliness, and you play with Sunset Invasion enabled, fun things could happen.

    You can of course still get vanilla Aztec / Mexican invasion. But are Aztecs the only people living on the other side of the Atlantic? I can think of at least 3 other major countries...

    To avoid spoilers I won't say anything else here. I think I've given you enough hints to figure it out. And don't think that just because you're not on Western edge of the map you're safe (check post title for some suggestions).

    Why no China?

    The most obvious followup question is why I didn't add China, or Japan, or someone new coming from the East. I'm mostly just waiting for next DLC announcement, there's good chance map will expand to East Asia, so we'll get that in Modern Times for free.

    If it turns out next DLC or two are about something else, I might add some kind of China / Japan Sunrise Invasion in the future.

    The mod is currently a one-person effort, so there's only so much I can do. If you're interested in joining development, contact my by email, or whichever other way is most convenient.

    Friday, December 04, 2015

    Fun and Balance mod for EU4 1.14.1

    Red Fox by AcrylicArtist from flickr (CC-BY)

    Fun and Balance is available updated for 1.14.1:
    Extended Timeline version is still not updated for the hotfix, but using pre-hotfix should work fine except for a small number of issues (especially compared with number of issues Extended Timeline generally has anyway):

    Wednesday, December 02, 2015

    Fun and Balance mod for EU4 1.14.0

    cat #1063 by K-nekoTR from flickr (CC-NC-ND)

    Fun and Balance is available updated for 1.14.0:
    It's just compatibility update, mod does just what it did before. Full feature list and links to older versions in case you want them are all here.

    Vanilla changed two settings to somewhere between old vanilla and old mod (custom nations max province distance and power projection from eclipsing rivals), but I'm keeping mod values as they were pretty good.

    One aspect of the game I found to be basically broken and unfixable by mods was how zones of control worked - that supposedly got a major rework in current patch. It would need a bit of testing to figure out if it's working well enough, unfortunately regardless of the result mods can't do anything to change this.

    Another aspect that demands more testing is new alliance/trust system. Fun and Balance has much higher diplomatic relations limit, and in my experience that did more to improve gameplay than any other change mod does. Higher relations limit probably interacts in complex ways with new alliance system, but only extensive testing can tell if anything there needs modding, and I wanted to have release as soon as possible.

    Oh by the way, if anybody has an idea for some mod picture for Steam Workshop, just send it over. Mod was originally zip-only so even after I set it up on Steam Workshop as well I never did the logo.


    Abby's String Theory by DirtBikeDBA (Mike) from flickr (CC-NC-ND)
    Have you ever heard a name of a card and wondered WTF is that? Or wondered WTF you're going to put into your new Commander deck? Worry no more, is there to answer all such questions you might have.

    It has more useful syntax than any other Magic search engine, cleaned up output unpolluted by foreign cards and reminder text accidentally matching the results, supports time travel to the past, can sort things by most recent Standard printing, and generally does everything I ever wanted Magic search engine to do.

    Except I didn't decide if I want to put pictures there yet, but hosting solution I decided to use makes it fairly simple, so I'll probably find some card pictures and put them there quite soon.

    As a bonus, here's some really nicely formatted and hyperlinked Comprehensive Rules.

    For some previous posts about this: one, two, three.

    The website should integrate with multiple search engines support in all major web browsers. If you ever visited it, your browser should let you search for cards by just typing "" or something similar.

    As for the name, I originally planned a more conventional one, but everything was either taken or way too long. Then I discovered newly opened .wtf TLD, and that was strangely appropriate for this project.

    Contact me any way you want with bug reports and feature requests - I'm pretty sure I'm available on all social networks ever invented. I have a few ideas for cool new things to add to the site, but let's start with what's there. I tend to respond to such very quickly.

    I'm not sure how well servers will handle the load. They should be just fine, but if it turns out they can't deal with it, I'll take a look at making things faster or getting bigger option from my hosting provider.

    Tuesday, December 01, 2015

    CK2 Modern Times: Greater Punjabistan AAR

    Post 1 - Originally published on Google+ on 2015-11-16 10:11:34 UTC

    Greater Punjabistan: Part 01: 1815-1827: Family is Hell

    Somehow I haven't played any Indians yet, and Modern Times has some interesting scenarios. Let's start with 1815 maharaja Ranjit Singh of Punjab (I even turned on local names for it). India starts about 1/2 British, 1/4 Maratha, 1/8 Mughals, 1/8 everybody else (Punjab, Sindh, and Portuguese Goa). The goal is to unite absolutely all of India and possibly a good chuck of lands West of it.

    We start as 34 year old ruler with 3 underage kinds. 10/16/5/9/4 isn't awful, but ambitious craven brilliant strategist is a weird combination.

    So time to arrange some marriages:

    • maharaja Ranjit - Mogubai Bhonsle, 27 year old sister of samrat pratap Singh of the Marathas
    • 14 year old son Kharak - princess Dandimahadevi, daughter of maharaja of Orissa (under British)
    • 13 year old daughter Ramo - prince Anavota, heir to Telingana (under British)
    • 7 year old son Sher - we'll figure something out

    I'm guessing there's decent chance British part of India will fall apart soon enough.

    Other than that build observatory, choose patron deity Ganga (+1 stewardship -1 martial), and tiger hunt time to maybe lose craven.

    That didn't work, so let's prove we're not craven some other way - like holy warring Afghanistan, Sindh, and Mughals at the same time.

    Troop numbers are pretty good:
    • Punjab - 8.4k
    • my ally Marathas - 10.7k
    • Afghanistan - 8.4k (and wrecked by Persian 11k)
    • Sindh - 6.9k
    • Mughals - 11.7k

    Counting every 1 Hindu as 2 Muslims we have an slight numerical advantage.

    And then I discovered the first problem - apparently all those 20+ martial mayors in my realm - I can't appoint any of them as commanders as they're vaishya caste not kshatriya. OK, so apparently the nerfs for everyone non-Muslim continues. Fine, I'll spend my initial gold stash on some mercs, especially since Mughals did the same.

    Afghans invaded, ignoring Persia completely, so I took them out, while Marathas crushded Sindh. Mughals just happily stood there with 15k stack.

    Anyway, Afghanistan got crushed, so I got two counties of Punjab they had. And then I noticed my oldest son is of Brahmin caste, because my script was not very smart about any kind of family caste consistency... So I can give him a temple, nothing more.

    And unfortunately Marathas had rebellion, so they abandoned almost finished siege of Sindh, and I was really low on money, so I had to disband mercs.

    There was also a problem with one butthurt duke who had almost as much power in the realm as me - I might be craven but fortunately I'm not content, so he had to go. And his son. Unfortunately his daughter was no more accommodating, but let's leave her for now.

    A much bigger crisis emerged - samrat pratap of Marathas died, and his 0 year old son does not think our alliance is valid even though I'm married to his aunt...

    Mughals figured out that's good time to strike, and without merc or allies, I really couldn't do shit, so I gave them 700 gold plus some prestige and karma as war reparations. Bad times.

    I somehow got myself out of debt, and managed to trim Marathas ruling family to just my wife, her brother, and second brother who was a brahmin and out of line of succession. Oh here's some fun - I made a baby with my wife who's heir to Marathas and an imbecile -8 to everything. Oh come on!

    Well, at least maharaja of Sindh died, so I can go there and remove some kebab.

    Oh and I discovered some real bullshit - I can no longer console switch to my landed son, arrange marriage as them, and switch back, somehow betrothal request would get canceled. So my son and heir Sher married rani Nihal of Gandhara who's #1 on my hit list - cancelling his previous betrothal and ignoring my console switched requests. For fuck's sake. It's India, it's feudal, marriages need to be double-arranged!

    Well, spy focus, and try to murder her. Well, that failed, only getting her wounded. Oh, she's plotting to kill me? Let's arrest her. Oh she even rebelled, how cute.

    Anyway, now the situation is:

    • my oldest son Kharak is a priest and out of succession - fortunately he's married to daughter of king of Orissa which just got independent, sadly not before going Protestant
    • my daughter Ramo is married to prince of Telingana (also unfortunately Protestant), which recently went independent
    • my second son Sher is married to this traitor bitch Nihal, who's in my prison, unfortunately they managed to had a baby daughter before I could intervene - so currently her daughter is in direct line of succession after me, which is disgusting. If I execute Nihal he might remarry and find himself someone nice - or some lowborn dwarf just to spite me.
    • my third son Bhaimani with Mogubai of Marathas is in line to inherit empire of Marathas - because of my plotting my brother in law never went out of hiding to marry. Unfortunately he's an inbecile and there's pretty much no way to overcome -8 to everything, -30 attraction, -10 vassal opinion, and -3 personal combat skill just to be sure. Mogubai is 39 years old and we probably won't have any more reasonable children
    • my fourth son Bhagwant with a concubine is currently not causing any problems, but he's only 1 year old so let's give him time.

    So that's the mess. I thought I'd have trouble with Muslims, instead it's my family which turned my life into hell. If only Mogubai had one more son...

    I'm tempted to make Bhaimani my heir anyway, because Sher is really pissing me off and politically that would me huge chunk of India. All he really needs to do is have some non-imbecile babies before he dies to first plot.

    In other news:

    • Portugal tried to holy war Marathas - it even seemed that they might succeed for a while as Marathas were busy with rebellion, but they ultimately failed.
    • Ottomans lost Greece to crusade led by king of Sicily
    • I'm trying to get castle of Sunni holy order. Apparently ticking warscore doesn't work for such wars, so I'm at 84% and I'm not terribly interested in going all the way to Arabia to their nearest castle.

    1815 start

    Post 2 - Originally published on Google+ on 2015-11-16 13:38:54 UTC

    Greater Punjabistan: Part 02: 1827-1839: Succession is still a mess

    So Nihal goes straight into oubliette with her duchy title revoked. She died soon afterwards, and now my granddaughter rules her 3 counties (I'm tempted to seduction focus her as soon as she comes of age, she's gay for some extra sin). Now if only Sher would remarry, hopefully someone less objectionable - and he got himself a lowborn Buddhist wench with no redeeming qualities.

    Seriously game, why can't I arrange marriages for landed children?

    Anyway, I'll try making some babies with my wife. I switched to family focus for that +25% fertility bonus to maybe have one more baby before my wife gets too old. I made her my spymaster so she'd get a better ambition - and she got "have a daughter". I gave her expensive gifts during Diwali festival as that's 30% chance of her becoming my lover.

    Unfortunately my wife decided to instead cheat on me with my chancellor, who got imprisoned and executed for it, but I still need that heir, so she's getting away with it for now.

    Finally after spending way too much money on festivals and gifts, we became lovers, but at age of 42 she's a bit old... And all got for my trouble was a daughter Lachmi. By the way Indian names are really cute somehow.

    Well, Sunni uprising happened, so I declared wars on Mughals and Afghanistan, called Marathas and Telingana into it (Orissa wouldn't even consider it)

    OK, time to focus. Heir to Marathas is nephew of current emperor. His brother was disqualified as temple holder, but he isn't.

    • bribe some vassals so everyone likes me
    • pass absolute cognatic
    • nominate Lachmi as my successor. Being a girl is bad, still better than being a drooling idiot.
    • press my wife's claim for Marathas - they have another independence rebellion over there and it's just regency

    During the war my wife's brother died, so it was war against his nephew. And a fun race - I was leading armies (he had more than me, even with mercs), and my wife and spymaster was leading spies.

    He did what AI loves doing, hired Hindu holy order against me, and with his illusory numbers decided to charge.

    Well, so my wife got the title, unfortunately our imbecile son is her heir - and I got crown authority revolt because everybody's pissed about raised levies and changed succession laws.

    Unfortunately the rebellion bugged out, rebel leader lost his title, and somehow my son duke of Bhakkar and another count became independent. The count accepted vassalization, but my son didn't. I can't stand this bullshit (how many patches did they introduce temporary faction titles? why are they still bugging out on regular basis) so I got him back by console.

    I repeated the same trick with raj of Multan - take away traitor's title, throw him into oubliette where he dies of natural causes, then give title back to his heir, for instant +100 relations.

    So, line of succession to Marathas is:

    • imbecile son Bhaimani - amazingly he's 1/10/3/0/0, I managed to get him competent at one thing at least
    • imbecile son's equally imbecile son Kharak
    • my daughter and heir Lachmi

    I'm seriously tempted to eugenics the hell out of this situation. If Bhaimani at least had a non-idiot heir...

    But first I needed to finish assassinating the rest of Bhonsle family. There's still two kids with claims - former emperor's nephew and son of former emperor who seems to have been born posthumously.

    Oh and Marathas are somehow agnatic-cognatic gavelkind now... I'm pretty sure they started primo.

    Post 3 - Originally published on Google+ on 2015-11-19 16:16:32 UTC

    Greater Punjabistan: Part 03: 1839-1850: Sorting Out Succession

    First, I eliminated two remaining nondynastic underage claimants to empire of Marathas, so now it was just a question of which dynasty member would inherit.

    And that left me with a huge problem, as line of succession to the Marathas looked like:

    • my imbecile son Bhaimani
    • Bhaimani's imbecile son Kharak
    • Bhaimani's healthy daughter Amro
    • my daughter and designated heir Lachmi

    Unfortunately apparently I can't plot against my children, so I couldn't just kill everyone and had Lachmi inherit it all - and I can't designate anyone except my children as heir, so I couldn't do anything cute like designating Amro. Oh well, I'll deal with it when time comes.

    I passed time making various minors who case out of shattered Afghanistan into my tributaries.

    My wife got into wars against various Protestant minors who came out of British India's shattering, losing one duchy and getting another. Protestants are also sitting on ticking warscore for Portuguese Goa, but it will take them a while.

    And that leads to modding question - is there any way to block this demand conversion? I don't want Indian vassals to hate British queen as that would mean India instantly shattering, but I don't want them to love her so much they accept conversion. Right now I got worst combination - everybody converted, then shattered anyway. Thresholds for accepting conversion and for not joining factions are just too close to each other. Unfortunately this is one of few special interactions CK2 had before they switched to more moddable system, so it's very painful to mod anything here. I could make them tributaries instead of vassals, but tributaries don't work sensibly (they never break by rebellion, but always break by succession).

    I'll leave modding for later. It's really time to fix succession or it will take forever to get anywhere.

    • my imbecile grandson Kharak needs to go, I can plot against my own grandchildren, so that's easy, except my attempt got discovered (but not actual murder).
    • my imbecile son Bhaimani, intrigue focus, spy on, abducted, oubliette - took him 5 years to actually get ill and die there

    And that somehow put my daughter Lachmi over Bhaimani's daughter Amro in order of succession. Seriously, succession part of this game makes no sense, even on primo. So as far as everybody is concerned there was zero kinslaying involved.

    So now it's just waiting for succession. I'm 68 and recently ended illness. My wife Mogubai is 61 and in hiding because apparently people try to plot on her life.

    Lachmi just turned 17 and married younger son of khan of Xinjiang matrilineally - he has weak claims on both of Xinjiangs kingdoms, but that's a bit far, and it would be very difficult to send armies there.

    Elsewhere what little was left of Ottoman Empire went Zikri, and Sunni caliph is some OPM relative of Ottoman emperor. This is the weakest performance by Sunnis I've ever seen- they're getting wrecked by Catholics, Shias, Zikri rebels, even Ibadi Oman. It was due to losing tons of holy wars and decadent caliph, which together stacked their authority to 0% somehow, making everyone go heretic.

    Hindus are not doing too great, we only hold two holy sites, but if Punjab and Marathas unity, that's going to be half of India, and it shouldn't be too hard to cleanup Protestant minors.

    Post 4 - Originally published on Google+ on 2015-11-19 18:37:17 UTC

    Greater Punjabistan: Part 04: 1850-1857: Seduction Based Government

    I want succession to come as quickly as possibly, so rulership focus and hope for depression.

    That did very little, but Ranjit died at age of 72, leaving Punjab to 21 year old Lachmi, whose popularity was:

    • -10 female ruler
    • -10 female heir (her niece for some reason)
    • -16 short reign
    • -10 medium crown authority
    • -20 large feudal tax
    • -20 incestuous adultress (for 20 years)

    Seriously, my heir managed to get into incestuous love affair? I understand me doing this, but my heir on her own, and I can't even see with whom?

    Well, that won't be easy. My husband's branch of family lost Xinjiang, and his stats were miserable, so I got him killed, and went seduction focus.

    I got pregnant by some kind of miracle with game having no idea with whom (before anybody even got seduced, but quite some time after husband got killed). That's the first time I see this. I guess it could be delayed pregnancy event from before I got in power?

    And of course there was inevitable lower crown authority revolt, which I crushed with my mother's help.

    My mother died mid-revolt, I got male heir (+10), Master Seductress trait for +50 attraction opinion with all male vassals, +25 crushed major revolt (in all my territories, not just Punjab), and I made one of major rajas my lover, stabilizing the realm very effectively.

    I also got my karma to -318 due to constantly getting caught in extramarital affairs, but apparently Gods consider +100 winning a holy war and -100 getting caught in illicit sex exactly karmically balanced. That's a suggestion how to proceed.

    Now there's an awkward problem, in that we're the only Hindu realm in the world, and the only Buddhist one is Xinjiang. No Jains. Every single country in India other than us is Protestant, so I can just holy war them quick.

    I'm wondering if I should maybe change to a different Indian religion, as being a Hindu doesn't seem to have much content so far. Other than Tiger Hunts and Diwali Festivals (which allow spending money for 30% chance of making spouse a lover, very useful) instead of Summer Fairs and Feasts, it's pretty much the same as any generic religion. For something that slows that the game so much I expected a bit more.

    Post 5 - Originally published on Google+ on 2015-11-20 12:43:33 UTC

    Greater Punjabistan: Part 05: 1857-1866: What Would Buddha Do?

    I thought about never marrying Lachmi to anyone, but annoyingly bastards have no caste, and that's a big deal for Hindus.

    Oh well, as realm was united by everybody being really hot for Lachmi, I gathered the troops and attacked Muslims of all kinds in Central Asia and East Persia. Strong Persia would be huge pain when inevitable rebellion comes once Lachmi hits the wall at age of 45.

    The biggest problem was coordinating all that, as total Muslim troops were more numerous than total my troops, I had to divide my armies due to supply limits, and there are apparently no rivers there to move quickly.

    I got a white elephant as a gift - which obviously was not meant to be accepted if you have good sense. And obviously I was getting one bad event after another because of it. I think I lost about 2000 gold on it. I bet that's where the Jews gets their money - white elephant business.

    The end result of white elephant was that I got independence revolt once my treasury was depleted to basically zero, and half my troops were gone from war against Persia. Well, ransoming traitors out was one way to get that white elephant fund back.

    Well, there was important business to fix. Marathas were agnatic-cognatic gavelkind, Punjab was true-cognatic primo, there's no way to sync them in one lifetime, but I could bribe vassals to let me switch Marathas to agnatic-cognatic primo at least. The only reason I went true-cognatic with Punjab was because my older brother was an imbecile.

    My nephew successfully used seduction focus on me - how could I refuse family? I guess I should switch religion to Zoroastrian or something, why even pretend? There are no Zoroastrians left in Modern Times? I guess Buddhist will do just fine.

    The choice is between Mahayana (+5 vassal opinion), Vajrayana (+1 health), and Theravada (+1 learning). Health bonus seemed much stronger than other two.

    Nearly all of my vassals converted almost right away with me - demand religious conversion is ridiculously overpowered like that, I wonder if it wouldn't be better to just disable it outright if I can't easily mod it to require a lot higher relations (closer to +80 than current +36).

    This leads to fairly unfortunate situation:

    • Buddhist get 1 county holy wars, which are fairly miserable
    • Everybody in India outside my empire is Protestant, and won't marry into my family (----- political concerns, even my damn nephew maharaja of Telingana won't marry his children), and claimants won't accept invitation
    • Internally empire is very stable, with little to do
    • Hindu or Buddhist, I'm not really getting any special Rajas of India content. Am I doing something wrong, or was there simply never much to do as Indian?

    Post 6 - Originally published on Google+ on 2015-12-01 08:43:26 UTC

    Greater Punjabistan: Part 06: 1866-1878: Scripted Endgame

    I wanted to have India campaign, but everybody went Protestant so it's just annoyingly like Europe all over again. Well, first fix, demand religion cost increased from 0 to 25 piety like it used to be in old CK2. I'd actually much prefer simply increasing acceptance threshold from >+35 to like >+75 or so, but that doesn't seem possible to mod.

    Unfortunately since at this point damage was already done, I also wrote a quick script to reverse it and convert every Protestant in India to randomly one of 3 Indian religions. That leaves Sunni Mughals and a few Protestant Englishmen (Portuguese Goa fell long time ago). I should have done that ages ago.

    Oh and while I was modding it, I already increased allowed number of commanders by a few. Game claims you can always have your marshal lead your troos, but that's a lie. Now dukes have 6 commanders (so 2 stacks), king 9 (so 3 stacks), and emperors 12 (so 4 stacks), meaning less silly reassignment. 8 commanders at emperor (so 2 stacks with all commanders and one with 2/3) was just silly.

    So, let's do some Indian affairs. Now that people were of my religious group, some marriage alliances were possible - and I could help another batch of Indian minors (mostly Bihar) get independence from Britain. I'm not sure they needed that, they seemed to be winning even without me, even if not very decisively.

    I got reduced to county level holy war, so I got Afghanistan's last county. And that's such a bad holy war it didn't even unland Muslim barons, I had to revoke them manually - or such an awesome CB if you want to milk them for +100 crushed for major revolt.

    Simultaneously with this, I pressed someone's claim to duchy held by Mughals - and somehow I couldn't land him with my new Afghan lands. He's casteless Hindu, so he can't get granted any land, even though I'm Buddhist and don't care. Except he can get his claims pressed, so it makes about zero sense...

    Well, other than that I just made a bunch of South Indian minors my tributaries. They were much stronger than they had any reason to be, and fighting in India is significantly harder than in Europe with lower base supply (a lot of jungles - at least it doesn't get winters) and longer average distance to coastline. At least I've been beelining military organization, so that's some decent supply limit bonus.

    I got kingdom of Assam by subjugation. I tried to get kingdom of Tamilakam by dynastic scheming, but that was taking forever so I just invited some claimants to kingdoms of Orissa, Telingana, and Tamilakam, and went for it.

    At this point India was completely dominated by me. There were a few minor things left over, but since challenge was nonexistent and I still wasn't getting any fancy Rajas of India content, I decided to just finish the campaign.

    Muslims are so wrecked Miaphysite Ethiopia took their holy sites

    Close enough to united India

    SQL-based Game of Life refactored

    a185991 sahara-2 by The.Rohit from flickr (CC-NC)

    A couple weeks ago I posted SQL-based Game of Life. It was rather ridiculous, with 3-levels of VIEWs, one of them including LEFT OUTER JOIN.

    I revisited the problem for some refactoring and it turns out solution is far simpler.

    Rules of game of life

    Standard rules are:
    • cell's neighbours are all cells next to the cell
    • cell is not its own neighbour
    • cell becomes live if it was alive and has 2 or 3 live neighbours
    • cell becomes dead if it was dead and has 3 live neighbours
    But I thought, what if we tweaked them a bit so every cell is considered its own neighbour as well? Mathematically tweaking definition:
    • cell's neighbours are all cells next to the cell
    • cell is its own neighbour
    • cell becomes alive if it was alive and has 3 or 4 live neighbours
    • cell becomes dead if it was dead and has 3 live neighbours

    That might or might not lead to simpler query. But those numbers are weirdly close, what if instead we did this:
    • cell's neighbours are all cells next to the cell
    • cell is 0.5 of its own neighbour
    • cell becomes alive if it was alive and has 2.5 or 3.5 live neighbours
    • cell becomes dead if it was dead and has 3 live neighbours
    Wait, doesn't that simply mean...
    • cell's neighbours are all cells next to the cell
    • cell is 0.5 of its own neighbour
    • cell becomes alive if it has between 2.5 and 3.5 live neighbours
    So it turns out we don't need to check alive/dead at all, leading to really simple code to which I'll get soon. Especially if we multiply weight by 2 to avoid floats - so cell counts as 1-weight neighbour and all cells around it count as 2-weight neighbours - and then we look for any total weight between 5 and 7.

    Does that work with other rules?

    For a while I thought it's a hack for standard Game of Life, and it wouldn't generalize to other types, but it totally would. If for example live cells stay live at 1, 6, or 7 neighbours, and dead ones at 2, 4, or 8, then we check for total in [3,13,15,4,6,16]. Or you could weight them at 10/1 instead of 1/2, then rules would be in [11,16,17,2,4,8].

    I didn't use this generalization is the code, as code is a tiny bit simpler for standard case, but it's really tiny difference.

    The code

    CREATE TABLE life(
      simulation string,
      generation int,
      x int,
      y int
    CREATE TABLE neighbour_coordinates(
      dx int,
      dy int,
      weight int
    INSERT INTO neighbour_coordinates VALUES
      (-1,-1, 2),
      (-1, 0, 2),
      (-1,+1, 2),
      ( 0,-1, 2),
      ( 0, 0, 1),
      ( 0,+1, 2),
      (+1,-1, 2),
      (+1, 0, 2),
      (+1,+1, 2);
    CREATE VIEW alive_next_generation AS
        generation+1 AS generation,
        x+dx as x,
        y+dy as y
      FROM life
      JOIN neighbour_coordinates
      GROUP BY simulation, generation, life.x+dx, life.y+dy
      HAVING SUM(weight) BETWEEN 5 and 7;

    Driver being exactly as before. That's ridiculously simple compared with initial solution.

    MongoDB rant

    And then I thought - how about doing this in MongoDB? And oh my god, that aggregation pipeline...

    MongoDB JSON-document model is the sweetest thing ever in the world of databases, and it's interface is OK for simple queries, but it seriously just needs a real query language. So far every time I had to do anything nontrivial in MongoDB I did it in Ruby on application side, and I'm not unusual here.

    SQL world is on the other end of the scale, with literally the worst document model ever invented, but fairly adequate query language. I wouldn't call SQL "good", but compared to monstrosities required by mongo for even fairly straightforward stuff...

    Did anybody ever manage to get best of both worlds with some document model based on JSON or similar, and adequate query language?

    I know some RDBMSs have JSON boltons but they're half-supported bullshit, and SQL is just adequate in comparison to what Mongo requires, not by any objective standard, so I'd rather not get there.

    Some NoSQLs like MongoDB for some reason feel they don't need any kind of real querying language, just some $-trees, but that doesn't get anywhere close to adequate even for rather simple uses and it just moves querying to application side hacks.

    I guess solr/lucene is sort of doing both sides decently, but it's a fairly special kind of NoSQL, and for many reason difficult to use as primary database. (don't even ask what kind of hackery I've done with it over years).

    Sunday, November 29, 2015

    Let's Play Civilization 5 as Jarad of Golgari Swarm - in Polish

    After my fun "Let's Play Civilization 5 as Poland in Polish" series I wanted to do one more series in Polish, and I also wanted to play one more Civ5 game on Ravnica, so I did both those things at once and started a Polish Golgari game.

    Here's playlist, and here's the first episode:

    As usual schedule is one episode per day, at exactly the same time of day.

    There are a few minor changes compared with Izzet campaign:
    • It's in Polish. For now I plan to keep the channel something like 80% English and 20% Polish, and all Polish stuff will be very obviously marked as such - as you can see from flag above.
    • I'm playing on Standard sized map with 8 civilizations, not obvious 10 civilizations on large map as before. 10 guilds is better flavor, but standard game speed is sort of balanced around standard map size, and increasing map size strongly implies bumping game speed to epic speed (or domination becomes really hard), which together would make campaign twice as long. I feel standard map speed/size lead to just better flowing campaign, at least as default.
    • I downgraded EUI to older version. New version unfortunately breaks a lot of mods. For some reason EUI authors don't provide links for downloading previous working version, in spite of new version being known broken, which goes very much against basic etiquette of all things software. I hereby denounce them for that. Fortunately I had old version saved locally.
    • As a result a few mods which were broken in Izzet campaign are working fine now - in particular More Luxuries mod.
    • I removed "Race for Religion" mod, as I'm playing with "New Beliefs Pack" mod, and it was silly to have both.
    • I manually fixed XP From Forts mod so it doesn't have crazy requirement that citizen needs to work citadel/fort tile (like that wasn't underpowered enough) and now I'm playing with it. It's been modestly useful, but nothing crazy.
    Here's all guild mods:
    Here's all other mods:

    Other things I want to do on the channel

    Right now the channel is fairly busy with 1 Factorio and 4 Civilization 5 series. Even counting Polish Civilization 5 as something separate, that's still a bit less diversity than I planned. Then again, I really wanted to play more Civilization 5 after that America campaign, and it's like the most recordable game ever.

    So I'm planning to do a few more series for games other than Civilization 5, and I also want to do some non-gaming content.

    An awkward side effect of this is that it's going to be a huge number of videos being published every day. Initially I just told youtube to autoannounce every video on my twitter, facebook, and google+ feeds, but that's getting a bit silly at this point due to volume of such automated announcements.

    On the other hand, it's not like I have a better idea. But you should totally subscribe if you like my videos.

    Oh and if anybody has any idea how to get channel art to be something more sensible than my Google profile pic + random landscape, please tell me.

    Tuesday, November 24, 2015

    Let's Play Civilization 5 on Ravnica as Niv Mizzet of Izzet League

    The first time I played Civilization 5 I thought it's OK game, but nothing special. Gradually my attitude changed to something like this:

    Yo dawg, I heard you like civ5...

    So without waiting for other series to finish getting published, here's another one! Just like my previous series (Poland in Polish, America on Great Plains map, and China on China map) it's just a tiny bit gimmicky: we're playing with all 10 guilds of Ravnica on a large fractal map.

    Here's episode one. Episodes will be released one a day at same time.

    The playlist where they'll all get published is here. Or you could just follow my channel on youtube.

    The goal is to take all 10 guild halls, get voted Supreme Ruler of Ravnica, or build a spaceship to Innistrad or some other plane. Well, technically culture victory is also a possibility, but it never seemed even remotely viable in any of my previous campaigns, so I don't normally give that much thought.

    Our guild is Izzet League, led by great dragon Niv-Mizzet. All 10 guilds seem to be extremely powerful, so they're sort of balanced against each other, but would be somewhat overpowered mixed with regular civs.

    Our uniques are:

    • All science buildings are upkeep free, give +1 gold, and +2 happiness
    • Izzet Boilerworks - factory replacement which doesn't require coal, and gives +4 science and +50% science
    • Hypersonic Dragon - basically medieval Helicopter Gunship, a Knight replacement with strength 20, movement 5, bonus vs mounted units, and hover. It can't take cities, and doesn't upgrade to anything.
    Sounds pretty strong? Just watch the series to see what other guilds get. Their uniques gave me more trouble than I had from uniques in any other campaign (my suffering in America campaign was mostly self-inflicted).

    In the campaign I play mostly decently (unlike in that America campaign...). There's a good deal of unwarranted arrogance which sometimes backfires, but I totally blame all that on roleplaying an elder dragon.

    The mods for guilds are:
    Other mods used:
    There were a few issues with these mods:
    • New version of Extended User Interface has some absolutely dreadful default behaviour with dialogs autoclosing, I wanted to roll back to old version but that's extremely unsafe with civ5 mods, and can easily result in corrupted campaign impossible to continue (my Germany campaign was lost this way). Fortunately after the campaign I figured out how to turn off silly behaviour.
    • I have two mods changing religions - Race for Religions, and New Beliefs Pack. I planned to just go for one of them, but somehow I messed it up and it's another campaign with both. It was actually surprisingly good due to some other choices I made, but I'll make sure to pick just one in the future.
    • I used different mod for unit promotions, and I'm still really tempted to just write my own. Unless you know of another I should give a shot first.
    • Units donated by militaristic city states with 0xp feel worthless. Is there any mod that lets them have higher XP? I tried one that was supposed to give units 1xp/turn from just sitting in a citadel (until some maximum based on your tech), but it never worked.
    • Are there any mods which change puppet cities priorities to something more sensible (production focus instead of gold focus would be a good start)?
    • Are there any mods which fix priorities for tile expansions? The algorithm is completely ridiculous choosing featureless ocean tiles and tundra leading nowhere over strategic/luxury resource tiles, which requires a lot of money, but also a lot of tile assignment babysitting, which is not part of the game I enjoy particularly much and prefer to leave automated 90% of the time.
    In any case, I had tons of fun, and I'll definitely start another civ5 campaign soon.

    Tuesday, November 17, 2015

    SQL-based Game of Life from Code Retreat 2015

    Maine Coon by George C Slade from flickr (CC-NC-ND)

    Last weekend I took part in my second Code Retreat event. The code is supposed to be deleted after the end, but like a good first world anarchist I saved one of them.

    So here it is - SQL-based game of life.

    Schema and test fixtures

    It's all SQLite.

    First we need a table to hold our simulations. It will be one table indexed by simulation name, generation number, x, and y listing all live cells.

    Grid has no bounds, and can potentially be as big as your database allows.
    CREATE TABLE life(
      simulation string,
      generation int,
      x int,
      y int

    To run simulation we feed it initial conditions. Here's some test data. Of course you'll use real data instead:
      ("line", 0, 0, 0),
      ("line", 0, 1, 0),
      ("line", 0, 2, 0);
      ("glider", 0, 1, 0),
      ("glider", 0, 2, 1),
      ("glider", 0, 0, 2),
      ("glider", 0, 1, 2),
      ("glider", 0, 2, 2);

    And now we need to code the game.

    Counting cell's neighbours

    It's tempting to do a double join over x and then y, but it's actually much better to simply create helper table and join that once:

    INSERT INTO neighbour_coordinates VALUES (-1,-1), (-1,0), (-1,+1), (0,-1), (0,+1), (+1,-1), (+1,0), (+1, +1);

    CREATE VIEW live_neighbours AS
      SELECT simulation, generation, x+dx as xx, y+dy as yy, count(*) as cnt
      FROM life
      JOIN neighbour_coordinates 
      GROUP BY simulation, generation, xx, yy;

    Isn't SQL great? We already have neighbour counts for every cell in the simulation with one or more neighbours.


    Now it's simple step - for cells which are alive we calculate them as alive if they have 2 or 3 neighbours in previously calculated view - for cells which are dead if they have exactly 3 neighbours. That's a simple JOIN on x and y... Oh wait, we're not joining data, we're joining existence or nonexistence of cell in life table, so we need a special kind of JOIN:

    CREATE VIEW current_status AS
        live_neighbours.xx as x,
        live_neighbours.yy as y,
        (life.simulation NOT NULL) as alive
      FROM live_neighbours
        life.x = live_neighbours.xx AND
        life.y = live_neighbours.yy AND
        life.simulation = live_neighbours.simulation AND
        life.generation = live_neighbours.generation;

    SQL is friendly and readable, am I right?

    What's alive next generation?

    Well, that's fairly straightforward:

    CREATE VIEW alive_next_generation AS
      SELECT simulation, generation+1 as generation, x, y
      FROM current_status
      WHERE (alive AND (cnt = 2 OR cnt = 3)) OR
            ((NOT alive) AND (cnt = 3));

    Where are my stored procedures?

    Unfortunately here we ran into a horrible tragedy, as SQLite doesn't support stored procedures, so we needed a tiny Ruby wrapper. Obvious Bobby Tables exploit included as a bonus:
    simulation = ARGV[0]
    generation = ARGV[1].to_i
    sql = "INSERT INTO life SELECT * FROM alive_next_generation WHERE simulation = '%s' AND generation = %d;" % [simulation, generation]
    IO.popen("sqlite3 life.db", "w") do |fh|
      fh.puts sql

    Querying database

    As Ruby code for updating database was ready, Copy&Paste Design Pattern was used to make it also work as data querying, if for some reason you don't want to do so from SQLite console:
    simulation = ARGV[0]
    generation = ARGV[1].to_i
    sql = "SELECT x, y FROM life WHERE simulation = '%s' AND generation = %d;" % [simulation, generation]
    IO.popen("sqlite3 life.db", "w") do |fh|
      fh.puts sql

    Test driver

    Of course everything was driven in a very  TDD way, more or less. Here's test driver Rakefile:

    def update(simulation, generations)
      generations.each do |generation|
        system "./update_simulation #{simulation} #{generation}"
    def query(simulation, generation)
      `./query_simulation #{simulation} #{generation}`.lines.sort
    task "init" do
      system "trash life.db"
      system "sqlite3 life.db <schema.sql
      system "sqlite3 life.db <fixtures.sql
    task "test" => ["init"] do
      update("line", 1..2)
      raise "Stayed the same" if query("line", 0) == query("line", 1)
      raise "Not back to original status" if query("line", 0) != query("line", 2)
      update("glider", 1..4)
      glider0 = `echo "select x+1 as x, y+1 as y from life where simulation = 'glider' and generation = 0;" | sqlite3 life.db`.lines.sort
      glider4 = `echo "select x, y from life where simulation = 'glider' and generation = 4;" | sqlite3 life.db`.lines.sort
      raise "Did not glide" unless glider0 == glider4

    What's next?

    Next step would obviously be ASCII-Artifying output instead of just dumping a list of X/Y coordinates as a table - and possibly similar ASCII-Art reader. Unfortunately 45 minute limit on the round prevented that from happening.

    I'd like to thank my coding partner for cooperation in writing this. For understandable reasons I'm not going to do any doxxing.

    Sunday, November 15, 2015

    Let's Play Civilization 5 as Wu Zetian of China

    My first Immortal difficulty campaign as America went to hell fast for self-inflicted reasons.

    I thought I can do a lot better so I started another campaign just as I was done with America - their publication will overlap as I want to keep all my series to one episode per day, and I don't particularly want to delay this one.

    So here's the new campaign as Wu Zetian of China. We're playing on China map, and I hand-picked three opponents - Sejong of Korea, Oda Nobunaga of Japan, Genghis Khan as Mongolia. Other four opponents are Casimir III of Poland, Montezuma of the Aztecs, Napoleon of France, and Nebuchadnezzar II of Babylon.

    That's my second campaign on immortal difficulty, and I'd say it went a lot better than the first one. There were some challenges and minor mistakes, but nothing on the scale of America campaign.

    If you want to follow the series, here's the playlist to which episodes will be published, or simply follow my channel.

    Mods used are nearly the same:
    As for modding changes:
    • This time More Luxuries is working, as it was incompatible with Great Plains Plus map used in America campaign.
    • I wasn't totally convinced about Reform and Rule mod, but I didn't find a good replacement. I'm open to suggestions, but I don't want to go back to vanilla.
    • It turns out Race for Religions massively nerfs religions by moving all the good stuff to reformation beliefs, so religions are pointless if you don't take whole piety tree. I didn't realize that in my America campaign when I had no shot at religion game anyway, but I'm pretty sure I won't be using this mod in the future. Religions are already very weak, they don't deserve more nerfing. And it already overlaps with New Beliefs Pack (which adds more options without nerfing religions), so there's no reason to use both.
    • Promotions Pack - it has really good promotions for mounted units (+1 movement per level), and decent promotions for archers (they can get up to +2 range on very high levels, so by the time Archers become Gatling Guns they remain useful) and siege units (similar to archers, except they rarely get very far with levels), but it's really miserable for all other unit types, especially to Swordsmen-line units who never get anything good, and Pikemen and Tanks who both get far worse upgrades than mounted units. I'm seriously considering writing my own mod here.
    Another minor thing - during America campaign I figured out how to make custom thumbnails for youtube videos. So now depending on game I might use that feature a lot. Civ5 really needs it, otherwise youtube just chooses diplomacy pics, which is fairly poor idea.

    Wednesday, November 11, 2015

    Victoria 2: Victorian America AAR

    Post 1 - Originally published on Google+ on 2015-11-09 13:59:24 UTC

    Victorian America: Part 01: 1836-1844: Manifest Destiny

    So I decided to learn how to Victoria 2, going with very easy mode - playing America, and pre-modding the game to remove all infamy and jingoism restrictions on adding wargoals.

    I still remember infamy minimization minigame from EU3 and what pain in the ass it was before I figured out how to sidestep it with proper technique (declaring 5 wars with Remove Kebab CB same day, then get some forward provinces to border as many different kinds of kebab as possible).

    If I end up liking this game (and my computer likes running it), I'll probably try playing with infamy and jingoism systems enabled, but first let's have an easy campaign.

    Oh and I'm going to use console for everything I don't like.


    • resolve any technical issues
    • figure out how to mod Victoria 2, because what's the point of playing unmodded games?
    • don't lose horribly
    • become #1 great power
    • annex Canada, and control in one way or another the whole Western hemisphere, and possibly Japan and parts of Africa
    • pass social and political reforms including obviously abolition of slavery
    • figure out how to industry

    So let's start by turning off the music, and getting something nicer on youtube instead. The main downside of recording video games is that I can't play any Christina Perri or Nightcore or anything else good or I'd get the video b& for copyright reasons, fortunately this campaign is not on the video, so I can play something good.

    Group armies and navies near Texas, send some settlers, influence random countries we're at good relations with, call new elections, research education tech, encourage clergy, nothing special.

    First thing I discovered is that watching Victoria 2 videos and playing a few other Paradox games did not prepare me for figuring out how attrition works in this one. Ships take attrition while docked because they're underfunded? Army "supply weight" is not equal to number of soldiers? What is this all even?

    Next question was what the fuck religious policy does? Game doesn't provide any information whatsoever, and wiki is just as worthless.

    I had to intervene with Mexico-Texas war on Texas side, admitting it afterwards as free state. Apparently unlike with Europa Universalis, I can't burn colonies in progress of countries I'm at war with, unless that option is somehow hidden somewhere.

    Next big problem was my textile factories unable to purchase any dyes - I failed to find them in game. Apparently the only production is in India (not that one), Dutch Moluccas (can I sphere them or something), and Mexico (let's wait for truces to expire first).

    I kept calling for new elections every 6 months, but not much actually changes - electoral events affect just one county, not even whole duchy.

    After colonization race with Mexico ended I disbanded all my wooden ships as waste of money, and built some steamer transports and commerce raiders instead.

    I passed decisions to get cores on Cuba and Western USA under Mexican occupation.

    Well, 5 year truce was up (imagine Victoria 3 with 15 year truces...), so it was time to get my cores back - and USCA provided surprisingly much help. By the way, game giving me +5 attack general and +5 attack admiral out of nowhere, what's up with that?

    I got 4/5 cores from Mexico. Of cores, I still need Arizona, in addition to Cuba, that one county in New England Canada holds.

    My sphere is expanding nicely, with Britain trying to compete for Venezuela, but leaving the rest of Americas to me unopposed. As for industry, capitalists are happily building it, but there never seems to be enough workers (I have interventionism, so I can't build factories, but I can subsidize them).

    I admitted all newly acquired states as free states, and there were a lot of them (by colonization, by war, by evolution of existing territories). This resulted in max consciousness of everybody in the South (including African slaves), and zero consciousness of everybody in the North.

    I guess it's time to have some fun in Africa while I wait for truce with Mexico to expire?

    Still one core, and they're making dyes there on the other side of Rio Grande, so it's like I plan to stop

    Way too much Mexico in this start

    Sphering a bit

    Post 2 - Originally published on Google+ on 2015-11-09 16:41:20 UTC

    Victorian America: Part 02: 1844-1852: Warscore nonsense is back

    About 1/3 of my armies were Dixie, so I sent them all to Africa, but I had to add some Yankee brigades as well. Since we're playing without silliness like infamy, it was time to bring liberty to everybody in Africa. Once I got some land I packed my army home and recruited some locals to fight future wars.

    Meanwhile I discovered some silly things:

    • reassigning commanders to different units while at war costs prestige, like WTF?
    • I accidentally had a rally point for ships in a county next to one with naval base, not one with naval base. That meant that tons of docked ships just sunk.
    • Every elections I get spammed by tons of messages about political issues, the choice is approximately irrelevant.
    • Without elections I still get spammed by tons of messages about political issues, the choice is approximately irrelevant.
    • Pop consciousness doesn't seem to be doing anything whatsoever
    • My population is supposedly huge, but max number of brigades I can support is consistently tiny

    Anyway, second Mexican war. I justified war for Chihuahua (as it had dyes and gold), then I wanted my core in Arizona and state of Durango (also with dyes and gold), but that was too much warscore, so I've chosen Sonora instead, which is fairly useless but would at least mean nice borders. Total warscore 98%.

    And somehow during the war it increased to 102%. All the horrible memories from EU3 are coming back... EU4 had that happen occasionally, but much less frequently. Well, I can skip Arizona, as it's a fairly worthless land, but it's a fairly bullshit way to lose 10% of my prestige and fall from #2 to #3 greatest power - the only thing holding me there is prestige anyway, my military is mediocre as my pops dislike being soldiers, and my industry is mediocre as my pops dislike being craftsmen.

    I'm not sure how I can convince my pops - I could use national focuses, but I'm trying to use them to make people read better.

    By the way, this only cost me some prestige, how annoying would it be if it cost me 10 years' worth of infamy as well...

    My impressions of the game so far are not amazing. It feels like they had a fun idea, but never polished it properly.

    That Arizona-sized hole cost me 10% of my prestige

    That Spanish Ethiopia should go if I want to do proper colonization, but my pops don't want to soldier, and Europeans don't want to ally me.

    Post 3 - Originally published on Google+ on 2015-11-09 18:11:35 UTC

    Victorian America: Part 03: 1852: Debugging Interlude

    I wanted to figure out why I'm not getting any soldiers - and the answer is game being stupid. I have 81.89k soldier pops, and that could be tons of brigades - unfortunately instead of using national manpower pool, or even duchy manpower pool, brigades come from individual counties.

    Even worse - soldier population in each county is divided into multiple nationality/religion combinations, every one of them having separate manpower pool. So county of Kano has Sunni Hausa, Protestant Hausa, Animist Hausa, and Sunni Fube - all of them to small to support even one brigade.

    Spain has 89.03k soldiers, just a bit more than me, but can support 31 vs my 14 brigades because they're in fewer counties and less diverse. Panjab has 77.40k and support for 27 brigades.

    This isn't gamebreaking for USA, as they get enough immigration coming, and enough assimilation of weird nationality/religion combination immigrant pops, that eventually their low density countries will be able to support brigades, but it's another example of "game came out without any QA" problem, and causes a lot of brigades not reinforcing or disappearing because their tiny pop base couldn't reinforce them, while most of my soldier pops take wages but don't contribute to anything because they're in manpower pools to tiny to do anything with.

    On the other hand, sailors don't use any kind of manpower, so it's much easier to be competitive on the sea.

    I'm not sure what would be a good mod fix - it's possible to relocate pops from one county to another by event (Trail of Tears decision relocated all my Cherokees this way), so maybe we should just move all soldier pops from various counties to duchy capital? I'm not sure how much that would mess with promotion/demotion system.

    By the way, I'm not sure if I'll ever have civil war at all. It needs John Brown's Raid (prerequisites - high consciousness in free state), Dred Scott Decision (prerequisites - high consciousness in slave state; and it already happened), and 40% liberals in upper house.

    As I'm adding free states only, free staters don't give a shit about slavery, so they shouldn't be any raid. As far as I can tell, taking either side consistently will avoid civil war. Unless it can trigger off consciousness in some colonial state, or in New Mexico where there's some unrelated silliness involving natives, or something like that.

    Not to mention I don't know why of 4 parties (conservative Democrats, reactionary Southern Democrats, liberal Whigs, recent liberal Free Soil Party), liberals should ever get 40%. I haven't been consistent in values I promote. Whenever there's a popup I try to go:

    • Protectionism (which Southern Democrats and Free Soil Party share)
    • State capitalism (Southern Democrats only)
    • Secularism (none of them)
    • Full Citizenship (which both liberal parties share).
    • Jingoism (which Democrats and Southern Democrats share)

    And yet conservative Democratic Party keeps winning huge majorities regardless of my choices, in spite of universal voting, secret ballots, free press etc. Presumably if someone actually wanted to avoid civil war, it would have been fairly easy.

    Not like there's much reason to avoid it - unless CSA somehow suddenly gets allies, it would have same problems I have except a third of my size, not even counting Africans, and no navy. It would probably only be a problem if it happened during some other war or serious crisis.

    Another thing - so far I'm not sure game has enough happening for someone located outside Europe.
    • I can't seem to be able to affect my country's politics in any way whatsoever in spite of trying my best.
    • I can't do any diplomacy as nobody bothers competing for my sphere (even Britain decided it's not worth it), and Europeans won't ally me because I'm too far.
    • Industry does what it wants on its own.
    • Research is mostly just tied to specific dates, so there don't seem to be any tricky choices here.
    • Major events so far were driven by scripted decisions and events.

    I guess I could try invading China or something?

    Maybe it's a lot more interesting as some minor power or as someone in Europe where the action seems to be.

    Post 4 - Originally published on Google+ on 2015-11-10 03:32:19 UTC

    Victorian America: Part 04: 1852-1858: Spanish-American War

    So I was actually wrong and election events operate on duchy not county level.

    I changed Panama / Suez canal decisions to make requirements visible in-game.

    I got correct tech to get Establish Protectorate CB, planning to use it against Morocco - turns out requirements were phrased in a dumb way Paradox titles use, as it "has less that 5 states" - key number being 5. Real criterion with sensible wording is "4 or less states".

    I need naval bases, so I attacked Oman. That got Egypt into war, which means I can add Sinai as wargoal (assuming I can peace them out separately, otherwise that's over 100%). And that somehow made Spain take over the war? No idea how. They're friendly with Egypt, but Egypt wasn't war target or even war leader (I think...). Oh and they were also allied with Abu Dhabi, but who cares about that.

    Of couse game did not consider it reasonable to inform me of it in any way.

    OK, I'll just call my sphere allies, they wanted to join my original war, but I didn't call them as it seemed pointless. Oh wait, everyone is at impossible. Why? Nobody knows. For fuck's sake, that's like worst parts of EU3 all over again.

    And they even landed in Florida without any kind of hint from the game. Fine, let's see what this mobilize button does and start blockade of Cuba.

    Then they landed in Hawaii, but I couldn't reall do much about it. So much for my naval base I'm building there.

    I assigned some general to peasant mobs, and cleared Florida invasion, then embarked them on ships and landed on small stack in Cuba. Why are they fighting like shit? Oh, when I said embark, 18/19 peasant brigades decided to embark ships as that's how much space there was, but general stayed with the last one. For fuck's sake game, how much crap like that is there going to be!

    Now for some weird reasons I can't separate peace Egypt, but I can separate peace Oman (but that wolud be 85% warscore). So I guess I need to attack Oman first to get them out of the war? Well, Yemen allied with them mid-war, but didn't join the war, and neither Yemen nor Nejd want to let my troops through. I guess I need to attack Yemen so it lets me through? That's going to be a big war.

    I sent all the peasants to Arabia, where I annexed Yemen, Oman (including its African ports which were what the war was really about), Abu Dhabi (just because screw them), I got Sinai from Egypt.

    During wars I changed research to some army techs - I have tech group which gives bonuses to culture/industry/commerce research and penalties to army/navy research, so I'm mostly prioritizing those, especially since some techs outside army tree also give army bonuses (mostly chemistry group), but that was sort of needed.

    Spain was sort of anemic, they mobilized like twice the army I could get even with peasants, but they mostly tried to send 1-2 transports all over the world. That actually worked with Hawaii (and it was not worth trying to recover it without Panama canal - peasants had much shorted way to Egypt), but nowhere else. Their navies were too small, so I could just do whatever I wanted. Well, whatever naval attrition allowed me to do.

    Now I have tons of places to build naval bases, which was the point of all this, but I got rather deep in debt with all this.

    To build canals I need two more techs - one in industry tree I'm going to do anyway, the other is Iron Steamers which unlock in 1860, so I guess these are going to be the only techs.

    So far no signs of John Brown's Raid, so Civil War might very well not trigger (in 1866 slavery debate modifier goes away and I can ban slavery by reform if I understand correctly).

    By the way what I did would have cost me:
    • up to 10 infamy for Oman (depending on when I'd get caught)
    • up to 10 infamy for Yemen (depending on when I'd get caught)
    • guarantees 10 infamy for Abu Dhabi
    • guaranteed 5 infamy for Sinai
    • 0 infamy for Cuba

    Which added together is Literally Hitler range, just for this one war.

    I can't say I feel this is reasonable. I've been somewhat aggressive, but nothing crazy. The game has this very strict infamy system, and then gives scripted infamy-free CBs, to get very rapid expansion, but only of the approved kind.

    For example Prussia into North German Federation into Germany is crazy fast expansion, and it would cost like 10 Hitlers worth of infamy if it didn't have supporting events. Same amount if you tried to get yourself colonial empire by conquest instead of by getting Sokoto/Ethiopia early and rushing colonization spree on the clock in 1870.

    Infamy feels like punishment for going off scripted path instead of punishment for rapidly expanding. I can't say I'm fond of this design. Even EU3 did it better.

    Post 5 - Originally published on Google+ on 2015-11-10 07:02:44 UTC

    Victorian America: Part 05: 1858-1863: Civil War after all

    Events that give everybody extra consciousness kept coming and coming at much faster rate, until I actually got John Brown's Raid. Also they're super annoying and spammy as hell. Just ask once, I'm going to answer the same way in every county, probably.

    No matter, I have unfinished business with Sokoto and Mexico. I called all my allies to my war with Mexico, all were "very likely" to accept, and not one of them showed up, which presumably means it's another one of those tooltip bugs.

    And I got civil war after all - with my stack liberating Mexico fighting each other, unfortunately CSA got teleporting +3 general and somehow they were defenders with +2 terrain and +1 dig-in bonus. And they start at same tech at me. Not that it helped them much in that battle, total stackwipe once my reinforcements from neighbouring province showed up.

    This is exactly the situation where civil war is most dangerous - they are big (as Cuba was admitted as slave territory, I can only make it free when it becomes slave, so they got Cuba), I'm in 2 other wars, with 1/3 of my army in Africa, and all my allies are lost because of game bug. Lovely.

    Time to press mobilize button for the second time. And after I blockaded their ports there's a decision that gives them a bit of monthly war exhaustion.

    In good news, my pacific fleet was blockading all of Mexico's fleets, and they attacked me, 15 on 30. Like I don't know something maybe? Turns out Mexico had reactionary rebels who sieged down just the province where their fleet was hiding.

    After Sokoto war ended, my spherelings decided to really me and some were willing to join war against Mexico - turns out allies can't join civil wars, but I could move all my troops to carpet siege CSA - as they would not take a hint otherwise.

    During civil war I passed Emancipation Proclamation abolishing slavery, Homestead Act adding +50% immigrant attraction (and again, game stuck prerequisite in wrong block, so I have no idea what the fuck enabled it), and built both Suez and Panama canals.

    After finishing war with Mexico in which I got two of their states, but not my Arizona, I disbanded all armies backed by understrength pops, recruited new armies (immigration is crazy fast), and paid Russia 72k for Alaska.

    So here's the question - how the hell can I get Canada? I'm #3 in the world, but that's really just prestige, my industry is 6th, military 12th, and probably seriously underteched compared with Europeans. Numbers #1 and #2 are Britain and Germany, and they're best buddies - everybody else in Europe is getting wrecked by their coalition.

    Spain and Portugal are allied to Britain, Netherlands are allied to Spain (so by chain to Britain) and France - so I can't really challenge any of them for colonies by force. I guess Ottomans aren't allied with anybody strong.

    I think I ran out of scripted content. The only decisions still on potential list are sign Geneva Convention (which seems awful), and restore the academia (which removes my bonuses to culture/industry/commerce techs and penalties to army/navy techs - I might do that late game if I need to catch up and once most techs are unlocked, right now it seems pointless). It's still possible that there's some scripted stuff which will come out of nowhere.

    So far I have all political reforms and zero social reforms except trinket minimum wage I started with. Sadly dreadful parties like Republicans (Laissez Faire) and Socialists (Anti Military) seem to have nearly half of the vote.


    First battle of the Civil War was fought in Mexico. After that CSA only had peasants.

    Arizona-shaped hole in warscore system

    Post 6 - Originally published on Google+ on 2015-11-10 15:19:10 UTC

    Victorian America: Part 06: 1863-1865: First Chinese War

    Weirdly non-military technologies are not in the ledger (unless they're somewhere I can't find them), only army tech, but I was curious how we do compared with other great powers.

    Here's in power order, army/navy/commerce/culture/industry:

    • Britain - 8/10/13/9/14 - total 54
    • Germany - 14/7/7/12/13 - total 53
    • USA - 8/8/11/16/12 - total 55
    • France - 10/9/12/11/13 - total 55
    • Russia - 8/5/8/11/6 - total 38
    • Belgium - 8/9/11/10/10 - total 48
    • Austria - 9/5/11/9/8 - total 42
    • Ottomans -  8/3/5/6/7 - total 29

    So unfortunately we don't have any kind of advantage over other top powers.

    By the way, I'd say Victoria 2's tech system is by far its best part. It's a gem of amazing game design - just a bit of extra complexity, but it's so transparent and offering so many meaningful player choices without bullshit like EU4's "I need extra military access, I guess my ships will suck now" mana-based research. I don't think I've seen a better tech system in any game.

    Oh and since no I have some kind of sensible army pools, it's time to get sensible army composition, which is supposedly 30k stack (operating in pairs if necessary) of:

    • 4 infantry + 1 hussar in front
    • 4 artillery + 1 engineer in the back

    So I got 4 such stacks, and 4 stacks of 10 steam transports + 10 commerce raiders to transport them around. Well, approximately. The game makes it unreasonably hard to figure out what's good army composition, and even harder to balance armies, with every brigade having separate one-pop manpower pool.

    Anyway, we can't really overcome European great powers with them with armies, research, or industry. We can win in prestige, that's what keeping us that high in the ranking, immigrant attraction, and thanks to zero infamy mod in rampant expansionism.

    Every independent country in Americas other than Mexico is already sphered. They barely put any effort to stop us.

    Najd was in Ottoman sphere, but Ottomans were just borderline great power, fell out, so I sphered them instead.

    Most of prime colonial lands are already taken. So pack 60k stack, get Brunei and Atjeh on the way, and on to fight Korea - protected by China. We need so much clay for naval bases, and if they make some of the stuff we're currently importing, so much better. With Panama and Suez canals, Asia looks so much closer than before.

    Now, war with China without researching much military tech was going to be hard. So step one is to find good generals to lead my armies - and oh god, this is the worst interface they ever made for any game. Well, not really, there's a lot of competition in this category, but it's fucking dreadful.

    Of course that's not the end of it - if you reinforce the army, another shittier generals can take over losing you all your defense bonuses because fuck you (fuck that shit, reload, try again etc.).

    And you lose prestige if you reassign generals at war, which would be a really fucking dumb idea if interface was actually working, and with this fucking UI mess, quit, mod that fucking shit out of the game, continue.

    OK, now that I got this silliness sorted out, and Korea is annexed, I need to figure out how to defeat China. I need to queue at least a few military techs, penalty be damned. After a few experiments it became clear that the best way is to get my +5 attack general (who's somehow still alive), make doomstack, ignore 5% monthly attrition, and wreck them for +10 warscore per battle. It seems battle warscore is scaled by just number of people who died, not relative to their army size - destroying all of CSA armies was like 5 warscore total, and here I get 10 for a battle that doesn't even reduce Chinese manpower by 10%.

    Chinese and Korean people just rushed to join my army. I'm actually quite competitive now in terms of manpower. Oh, and I have massive silk shortage - and there's a Chinese state just next to my borders which could help...

    So the plan right now is to wreck Mexico and China a few more times while they're still defenseless, sphere a few more countries nobody competes at like Dai Nam, and Persia, and then maybe sphere 4 Northern China substates? It would be helpful if Russia wasn't great power, as it currently sphered some of them, and it's not exactly that high on the list, so if I wrecked them a bit they'd lose their sphere - and even if they regained it later it would be too late.

    In terms of industry Britain, Germany, and France are in league of their own at 317-437 range, next are Belgium, Two Sicilies, and me at 98-108, then nobody else has more than 35. Without ability to manually setup what I want to build, I'm at mercy of capitalist AI, so I probably won't have much chance of breaking into top three anytime soon.

    In terms of military, if I did another round of Chinese expansion and got a few techs, I'd probably be able to match Britain alone on land, or block Germans from showing up thanks to naval superiority, but they're allied, so they'd dominate on land and sea.

    My population is now:

    • 40% Beifaren Chinese, 13% Korean, only 17% Yankee
    • 53% Mahayana Buddhist, 10% Sunni, only 32% Protestant

    Yeah, it just doubled in two years. Every soldier who died fighting in China meant ten new Chinese recruits.

    Oh by the way I'm not sphering Japan. Japan gets faster westernization speed if sphered, and when they westernize they'd become great power right away, so sphering them is basically pointless. Maybe I could invade them for some clay instead? It's not like it's far from Korea.

    Of course pretty much none of this gameplay would be possible with infamy enabled, even if I reduced infamy to a somewhat more reasonable levels from what base game wants.

    For some infamy calculations:

    • Prusssia has 15 spherelings
    • It needs Saxony, Baden, Wurtemberg, Holstein, at one state each
    • It needs Hannover, Bavaria, at two states each
    • It needs Alsace from France

    To form Germany without game help would take 21 conquests (22 infamy), and 3 acquire state (11 infamy), total of 495. As these CBs take 400 days to fabricate, expected number is something like 80% of that, so let's say 400. During entire game if you're at peace, you'd lose 0.1 infamy a month or 120 per game if you were always at peace.

    It's not even close to reasonable to get historical expansion without scripted stuff.

    China would actually be dangerous if they were allowed to westernize at full size

    Post 7 - Originally published on Google+ on 2015-11-10 19:32:00 UTC

    Victorian America: Part 07: 1865-1869: I'll just wait for Victoria 3

    I got a bit more clay from Mexico, zero trouble except I ran into even more bugs.

    I'm sitting on ridiculous amount of income and manpower. Colonization is starting next year, but getting two states from China is basically already winning the game and I feel it's pointless to continue.

    I can support 109 brigades, and this number keeps increasing very rapidly. If I went to second war with China that would be like 160. Germany with all its scripted blobbing gets 64. They have better tech, but not by much, and I could stop bothering with industry/commerce techs and just go for military ones - even setting poor/middle class taxes at half and spamming all infrastructure I can I'm just flooded with money.

    As for navies, I'd need to research fancier bases and ships, but once I get there I can afford bigger fleet than all other powers put together. My naval supply limit is now 482, only half of British 954, but it's really just a matter of time to match it, as I have no idea what else to spend all my money on.

    So, some conclusions:

    • Game feels like I'm playing some early access title. It's supposedly patch 3.03 and I'm not trying to exploit anything, and yet I keep running into new bugs all the time.
    • It has some promising aspects. Technology system is just amazingly well designed. Why didn't other Paradox games copy that, I have no idea. CK2 and EU4 could both use something like this.
    • There were loads of point systems like research, diplomacy, leadership, influence etc. but none of them felt bad like EU4 mana invariably does. Their inputs were logical, and outputs limited.
    • Interface is awful, worse than EU3 somehow, and EU3's interface was pretty bad.
    • Gameplay is just dubious. So many parts of the game that don't do anything. Like endless popups that can't be turned off (another province got +50% mining because we have proper tech - you're literally going to pop this up for every single county with a mine? and that's not the only one spam popup).
    • It's so infuriating that aspects of the game which could be most interesting like setting up your country's industry are locked out. It's like, who came up with this? This is the kind of area where player could make a difference and come up with some interesting plans (even simple like - I'll build this luxury clothes factory because I'm working on sphering a country producing silk - already way beyond AI capitalists), but nope, you can't do anything. If they want to lock out stuff, they should lockout boring stuff - like a party that prevents me from getting dumb popups. All strategy games have trouble coming up with engaging gameplay during peacetime, and they found something here, and decided to lock it out. I don't even.
    • So many bugs... Like generals tooltips showing wrong generals. Or artillery in battle not getting assigned anywhere so only infantry is fighting unsupported, somehow, sometimes. Sadly every single Paradox title has massive failures in design of their battles - they're always overcomplicated for no gain, and as a result have ton of poor interactions between mechanics, and usually tons of bugs as well.
    • Fog of war display indeed annoyed me. A bit less than I thought, but it was getting in a way a lot. Why do they fog of war when I'm trying to view what province produces or state borders.
    • There's this whole political system, but player's influence is so minimal. I put serious effort into influencing it, but it did absolutely nothing. Same party whole campaign, and they didn't even have majority of voters supporting them.
    • I know POP system is the big thing here, but I'm not really convinced it's worth it and if something simpler couldn't work just fine. So many things like soldier manpower pools, elections, weird national focuses etc. don't work well because they're tied to pops, and they'd probably get much better mechanics (national focus - encourage literacy) without pops.
    • There are so many unit types, I'm pretty sure game would be better off with half as many. Like why have 4 different cavalry types, just make cavalry upgrade to different cavalry when you unlock some tech or something if that's really needed for flavor reasons. Units change how they look and what their stats are based on tech anyway. Just inf/cav/art system would be fine, with cavalry upgrading to tanks at some tech, and uncivs having irregulars instead of infantry.

    I think I'll just wait for Victoria 3, even if the wait is long. Of course there's no guarantee that it will be any good, considering direction EU4 is taking.

    This font size really should be bigger

    One bug too many. Tooltip based interface, and tooltip displays information for wrong general...