taw's blog

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

Sunday, September 07, 2014

Fun and Balance mod for EU4 Extended Timeline

Anabel Leocádia Moreira Pinheiro by Márcio Vinícius Pinheiro from flickr (CC-NC-ND)
The most common request I'm getting for Fun and Balance mod is using it with other mods.

Unfortunately EU4 does not make it easy to run multiple major mods together (to be fair, pretty much no game does, good support for a single mod at a time is already pretty good).

This could always be achieved with manually merging files, and some people did just that, but that's fairly tedious, especially to update it every single time new version comes out. Even for vanilla Fun and Balance it was a bit of a chore to update it for every EU4 hotfix.

Fortunately I already wrote parser for Paradox mod file format, and one thing led to another and Fun and Balance is now a set of transformation scripts I can apply to any mod I want with little effort.

This isn't completely trivial, since some things that make sense in vanilla don't make sense in mods, but progress from applying hundreds of edits with text editors (and hoping I made no typos on the way) to just selecting which mod I want as base, and which features I want to include with a script like this is an amazing improvement.

So the first release - Fun and Balance for EU4 1.7.3 and Extended Timeline v0.10 (here's direct download in case Steam Workshop doesn't work, like on OSX).

Here's Fun and Balance download.

Included features

The following changes from Fun and Balance mod for vanilla are also included in version for Extended Timeline:
  • no truce scaling
  • diplo annex cost 15/bt to 1/bt
  • max active policies 5 to 10
  • policy cost 0
  • rebel support gives +6RR
  • no westernization slowdown due to income
  • accepted culture gain/loss threshold both at 10%
  • monarch point pool up to 15000
  • building mp cost 5 (in mod this is modified by era)
  • moving trade port cost reduced to 100dip
  • culture change reduced 40->15 (instead of vanilla 25->10 reduction - it makes sense for this to be higher due to longer timelines, but baseline cost was crazy high already)
  • double core/claim expiration time
  • no protectorates
  • vassals can fabricate claims
  • vassals will buy provinces up to 50% OE
  • no vassalization base tax cap (just regular quadratic penalty)
  • no WE reduction at war
  • double diplo relations limit
  • positive stability gives 0.7% missionary strength (I'm not totally sure this is needed in either the mod or vanilla these days, it made a lot more sense a few patches ago)
  • revolt risk due to non-accepted culture +4RR
  • revolt risk due to lack of religious unity up to +5RR scaled
  • EU3 style elections - 3 random candidates, 30% republican tradition cost for reelection, no skill gain from reelections
  • buildings not destroyed on ownership change
  • return subject cores CB
  • peasant war conditions made more reasonable
  • faster AE decay
  • annexed vassal opinion capped at -100
  • cleansing of heresy CB gives 25% forced conversion cost instead of discount on conquests
  • imperial ban CB at 10% AE for banned provinces
  • improve relations mission gives meaningful reward
  • no naval attrition
  • reduced religious center penalty to conversions from -5% to -2%
  • HRE member religion change affects IA
  • bad events due to high OE scale smoothly with OE instead of having sharp 101% OE cliff
  • no Burgundy inheritance
  • Burgundy capital in HRE
The following are excluded:
  • always display policies if at least one (mod uses different policy system)
  • form Byzantium decision condition fixes so Ottomans and HRE can do it, extra reformable countries (this would need redoing due to extended history)
  • partial westernization (mod uses different tech groups)
  • extra religious conversions, religious conversion rebalance, and pagan coring modifiers (mod has very different religions)
  • holy site system (this could totally work, I'd just need to go through all of mod's religions and select good holy sites for them)
  • advisor cost increase slowdown (already rebalanced by mod to support playing up to 9999)

Technical notes

Because of the way EU4 loads mods alphabetically, mod name " Fun and Balance for Extended Timeline" starts with a space so it can override files in "Extended Timeline" mod.

Automated build process throws away all comments and formatting in affected files (except defines.lua where it keeps them). I want to make it smarter, so it only does that in changed portions of a file instead of entire file, but that's future work.

Building Fun and Balance versions for other mods - or customizing version of the mod for your experience - is now relatively straightforward - especially if you know a little Ruby.

Build system is not Fun and Balance specific in any way - it could easily be used for other mods, it could probably even be used with other Clausewitz engine games with minor modifications.

If there's any other mod you want to use with Fun and Balance, but you don't know how to use build system, feel free to ask me and I'll take a look.

I did something similar before with Concentrated Vanilla mod for Medieval 2 Total War, but that was messy pile of regexp hacks instead of the much cleaner parser-based approach I'm using here.

Thursday, August 14, 2014

Beeminder resolution problem

Cute squirrel monkey by **Mirm** from flickr (CC-NC-SA)
Beeminder tries to be two distinct things at once:
  • quantified-self system - helping you tracking relevant information about yourself
  • self-improvement system - nudging you towards better behaviour
These two tasks are highly entwined - you can't nudge yourself meaningfully without tracking your progress; and things you want to track tend to be things you care about improving, or at least maintaining at certain level, so it ought to make sense to have one tool for both.

The primary reason it doesn't work all that well in practice is that optimal resolution for tracking is drastically different from optimal resolution for commitment.

You generally want to track things at high resolution, but commit at low resolution. What you want to commit to is "getting enough exercise". What you want to record are things like "10 km on a bike", "30 minutes on a treadmill", or "10 sets x 10 reps with dumbbells". It's common to make the mistake of setting each such activity as a separate goal, enforced every week, which inevitably leads to mass derailing pretty quickly, even if you are getting decent amounts of exercise.

Instead, what you need do is throwing these data points all together into a single "exercise" commitment goal. They don't come in the same units, so you need to convert them somehow - to hours, intensity-adjusted hours, some kind of per-exercise point system, daily did/didn't exercise points, or something more creative. Whichever way to aggregate them you pick, what you want to commit to is low-resolution aggregate of high resolution tracking data.

This kind of aggregation is not supported too well by beeminder. What if you want to change from one way to aggregate data to another? Editing data for current goal is not only tedious manual process, it will most likely retroactively derail you. Or you could archive current goal and start a new one, eventually ending with "exercise-17" goal. There are ways within the system, but it's not helping you.

This might not be a huge deal if all you want from beeminder is some help with akrasia - for this past data is not a huge deal since it's already done its job nudging you. If you care about long term data, your choice is messiness of manual aggregation, or huge number of microgoals with frequent derailing.

I used "exercise" as an example, but that's actually one the easiest goals to aggregate. What if you wanted to commit to "work", "education", "doing new fun things" or some other difficult to measure goal? Hours of effort, which work tolerably for exercise, are really bad measure for most other goals, and point systems will require frequent tweaking. (I wonder how many programmers have "lines of code written" as beeminder goal - it might still be less crazy than "hours spent coding").

Resolution is not the only case where what you want to track is not what you want to commit to. For just about any area of life you'd like to improve, you want to commit to effort, and track outcomes. It's a miserable experience if you commit to an outcome like weight loss, school grades, earnings, or whatever else you're concerned with, put serious effort into it, and derail anyway because of one unlucky week.

On the other hand what good is committing to certain number of hours of effort, if you're not getting results you want even long term?

Beeminder is trying to do something new, and even in its imperfect state it's still highly useful. It still has very long way to go.

Thursday, August 07, 2014

Fun and Balance mod for EU4 1.7.3

6381 by 阿 light from flickr (CC-NC-ND)
Previous version of Fun & Balance mod works perfectly fine with 1.7.3 hotfix since it's an exe-only change and should be compatible with all the mods, but I'll use this opportunity to release a few minor features.

For complete list of changes, check this post for previous version. For reasoning behind them, check all the previous posts about the mod - however you're the final judge and you can selectively pick and choose whichever chances from the mod you like.

You can download it here.

Balance tweaks

Building monarch point cost reduced from 10 to 5. 10 was sensible if all these conditions were met:
  • Your empire was at most medium sized (like Scandinavia)
  • You had no extra sources of income (like with trade ideas)
  • You had no significant discounts on build cost (like with economic ideas)
If any of these conditions were true, and especially if two or more were true, then building instead of being about equally constrained by money and monarch points became purely monarch-point constrained and money became irrelevant. Changing cost down to 5 seems reasonably balanced for most countries, and you can get it further down to 4 if you take quantity ideas.

Partial westernization (going up to Muslim tech) now requires no rebel-occupied provinces. Apparently Ming somehow manages to get required stability +2 even while half of it is occupied by peasants.

Return Subject Core CB

Coming right from Crusader Kings 2 - if another nation occupies cores which rightfully belong to your subject (vassal, junior PU partner, or colonial nation), you now get CB on them, at the end of monthly tick.

CB is relatively weak if you want to use it for anything else than returning subject cores. It gives 0 dip cost for full annexation, since that's the only one you can get subject cores from OPM, you'd still need to have your vassal occupy their capital to get the whole deal for 0 dip.

There's no way to press any other subject CBs like fabricated claims, holy wars etc.

More reformable countries

Almost every culture's primary country is now reformable. Conditions are pretty strict:
  • you must have the right primary culture
  • you must own and have cores on every single province of that culture
  • admin tech at least 10
  • not subject, not tribal, not at war, at least 3 provinces
  • country you want to switch to isn't already formable in some other way (then use whichever way is already provided by the game)
  • your current country isn't on blacklist (Holy Roman Empire, Papal State, Hindustan, Mughals, Spain, France, Germany, Byzantium, Bukhara, Italy, Russia, Scandinavia, Persia, Great Britain, Polish-Lithuanian Commonwealth, Egypt, Vijayanagar) - it's here to prevent cycles of tag switching and other weirdness
  • you can't form Muscovy, which is technically Russian's primary culture - you should try to form Russia instead
  • you can't form Shun or Zhou - technically primary cultures of Han and Cantonese cultures - that would just feel really weird
Changing tag this way gives you centralization modifier for 20 years (+1 revolt risk, +10% tax), switches your idea group, and gives you 25 prestige. It's quite weak reward relative to effort, it's mostly here if you want to roleplay unusual scenarios.

Existing tag changing decisions are divided about switching idea group or not, and for some switches it makes more sense to go one way or the other. Here I'm switching it every time to provide you with a way out in case you start as someone with generic or otherwise really awful ideas.

AI will take this decision as well if condition are met. This doesn't happen often since conditions of controlling every province of given culture is pretty strict, but it happens from time to time. Naples forming Sicily is probably the most likely one to happen - and it makes a lot of sense as they were literally calling themselves "kingdom of Sicily" the whole time.

Everything is optional

As usual, all changes are independent from each other as much as possible, so you can cherrypick whichever changes you like and disregard the rest.

Compatibility with other mods

The mod is currently only guaranteed compatible with UI-only mods.

I've been asked multiple times about compatibility with CK2 imports, EVE, Extended Timeline, and other mods. Right now it requires manual merging, which shouldn't be too much work, and people have successfully done so.

I might someday write a script to merge these automatically and provide packages with both, but that's just a vague plan for now.

Thursday, July 17, 2014

Fun and Balance mod for EU4 1.7.0

~Cookiecat Green Eyes~ by ~Sage~ from flickr (CC-NC-ND)
The new patch is in, and the new version of my mod to fix everything about it follows!

Full list of changes this mod does with brief explanations follows. For more extensive discussion refer to posts for older versions.

You can download it here. (link updated, original release missed one election event and it was giving vanilla republican tradition penalty)



  • Truces last 5 years period.
  • Coring time independent of size
  • Bad events due to OE scale with OE instead of hard cliff at 101% OE


  • Can't reduce WE while at war
  • WE affects defensiveness and morale like it used to
  • AE decay restored to 4/year
  • No naval attrition due to time at sea, since AI already doesn't get any. You still get some from being at open sea.


  • Claim and core expiration times doubled
  • Foreign rebel support increased from +4 RR to +6 RR
  • Improve relations mission gives meaningful rewards, not just 3 prestige


  • No hard base tax max for diplovassalization, just regular squared penalty
  • Baseline free diplomatic relations doubled from 4 to 8
  • All ideas giving +1 diplomatic relations increased to +2
  • Emperor diplomatic relations bonus increased from +1 to +2
  • Annexed vassal penalty capped at -100 to avoid creating eternally unannexable vassals
  • Diploannexation cost lower to 1/bt since it's the last thing we want is making everything rely on monarch points more than it already does
  • Vassals can fabricate claims
  • Vassals willing to go up to 50% OE buying provinces they want, just like other AI countries
  • No protectorates ever


  • CK2-style holy sites system - if someone of your religion holds its holy site, you get +0.2% missionary strength modifier. It's extra +1% missionary strength and +1 prestige/year if all 5 sites are in hands of countries of your religion. You can conquest mission on holy sites if they're hold by your neighbour or if you have religious ideas.
  • Religious conversion rates rebalanced into flat +2% heretic, +1% heathens, +4% pagans instead of really complex systems that make it easier to turn Catholics into Sunni than Shiites into Sunni and was generally awful.
  • 50% discount on enemy core creation on pagans restored
  • Cleansing of heresy CB gives 25% cost for forced conversion so you can convert country of any size with 100% warscore, but it no longer any discounts on taking provinces
  • Religious center down from -5% to -2% missionary strength
  • Religious conversions allowed between all branches of Christianity, all branches of Islam, all branches of Eastern, and cross-group between Hindu and Buddhist (you can chain Sikh-Hindu-Buddhist-Shinto if you really want to). As in vanilla Muslim conversions cost stability, others just prestige.
  • Missionary strength bonus from stability increased from 0.5% to 0.7%
  • RR due to lack of religious increased from +2 to +5, scaled proportionally


  • Culture gain/loss threshold both at 10% instead of 20% gain/10% gain, so it's more predictable
  • Non-accepted culture revolt risk increased from +2 RR to +4 RR
  • Culture conversion cost reduced from 25/bt to 10/bt


  • Imperial Ban CB lowers AE to 10% for imperial provinces
  • HRE members converting to and from emperor's religion affect IA


  • "Ruler of Burgundy dies" nonsense killed completely
  • Burgundy capital moved so it starts in HRE like it did in EU3 and real history, and doesn't get crushed by France immediately every campaign


  • Muscovy no longer gets free colonists from national ideas, they need to take expansion or exploration for it


It tested well with previous EU4 versions where republics were ridiculously weak, I'm not sure if this plus 1.7 / Res Publica changes won't make republics a bit too powerful.
  • Republican annexations cost only -3 tradition not -10
  • EU3 style elections - random instead of fixed candidates, reelections don't give any stat boost, but only cost -3 instead of -10 tradition.


  • Steppe horde bonuses increased to +100% manpower, +100% force limits, -50% land maintenance (it sounds like much but they still lose hard most of the time, since they never get new units, tech slowly, and have massive succession problems)
  • Manchu can form Qing, Timurids can form Mughals, and hordes with correct culture can form Persia even if tribal - then they become despotic monarchy
  • Other hordes can reform government without any idea groups (since AI is hardcoded not to take them ever, so basically AI never reformed horde government). Stability 3 requirement lowered to stability 2 at admit tech 8.

Rest of the World

  • Westernization time does not depend on country size
  • Advisor cost increases 0.5%/year not 1%/year, it was too brutal for non-Western countries
  • Partial Westernization decision - you can go Muslim tech if you neighbour Muslim or higher tech nation, and have stability 3 (or stability 2 at admin tech 8+), at cost of 10 years of Western influences, -5 stability, and -250 of each monarch point.


  • Potential policies are displayed when (UI only change)

Choose your own destiny

  • If you want to form Byzantine empire as Ottomans, or HRE, the game will no longer stop you

Country management

  • Policies don't cost monarch points and you can have up to 10 of them active, to make them more relevant and to help AI which picks them at random.
  • Moving trade port reduced from 300 to 100 dip since many countries start with trade ports in wrong places
  • Peasant war trigger conditions made more meaningful
  • Level 1-4 buildings are not destroyed on conquests

Monarch points

  • Monarch power pools increased to 1500 to reduce micromanagement around ahead of time penalty

Everything is optional

As much as possible, each change in the mod is independent from everything else, so if you like you can cherrypick changes you want while keeping vanilla values, or values of your own choosing otherwise.

Thursday, July 03, 2014

Fun and Balance mod for EU4 1.6.2

Here's the new update. You can download it directly here.

For full list of changes read 1.6.1 (b) and 1.6.1 (a) release notes.

Philosophy of this mod is to move focus towards mechanics which lead to fun gameplay without requiring overly gamey tricks from the player, and to restore balance by helping the too weak, more than nerfing the too strong.

Other than taking away Muscovy's free settler (which isn't even a huge deal, since AI Muscovy takes exploration ideas first), there aren't really any outright nerfs included.

Helping Burgundy

Burgundy starts in extremely perilous position between hostile HRE and extremely powerful France, and even with event that magically split it between France and the emperor (at 0 AE, free cores etc.) removed, it still rarely succeeds.

To give it better chance, the mod now moves Burgundy's capital to Franche-Comte, so it's a legal HRE member.

Historical situation is somewhat ambiguous here as feudal relations were complex, but making Burgundy HRE member as it vas in EU3 should greatly increases its chances of early survival against the Big Blue Blob without making it too powerful.

Helping Republics

Integrating a vassal no longer costs any republican tradition, only legitimacy. Tradition is extremely hard to get compared with legitimacy, penalties for it start as soon as you go below 100% (instead of only below 50%), and republics are really weak even with the mod reversing the most extreme nerfs, so there's no reason to punish them in another way by making significant vassal annexations impossible.

Helping AI

Advisor cost increase by year cut in half. It was extremely brutal, especially to non-Western tech countries, as incomes increase with tech level not with time, and not that fast even then. Even relatively sizeable non-player Western-tech countries had trouble paying for advisors, so only players with their vast and optimized empires were able to afford good advisors.

And now it's possible to have up to 10 active policies (instead of up to 5), and they no longer cost any monarch points. That's mostly here to help AI, as most policies are borderline worthless (-1 dip/month for -10% shipbuilding time etc.) and AI picks them basically at random, but it makes sense to reward different combinations of idea groups instead of making policies so expensive (in terms of most important resource - monarch points) that they'd almost never see any gameplay.

Deemphasize Unfun Mechanics

The mod uses 1.6.1's AE decay values (4/year), not 1.6.2's (2/year). It's easy to get very high AE levels now that vassalization generates huge amounts of AE, but at least decay was quite fast, so it balanced out somewhat.

With high AE from vassalizations with slow decay the game would end up with permanent global coalition against the player like it did in many previous patches, and that's not a fun place to be.

Emphasize Religion

Negative consequences of less than full religious unity increased from +2% revolt risk to +5% (+100% stability cost remains where it was), scaled proportionally. Conversion is usually (not for everyone) slightly easier in this mod due to missionary strength rebalance, and in recent patches there are many ways to increase religious unity even without conversion, so it's much easier to achieve high religious unity than it used to. In my experience religious unity is one of more fun mechanics, and its vanilla values are just too low, so it deserves a big boost.

And to give player more control over their destiny, more religious conversions are possible. Orthodox and Coptic can convert to and from all other Christian denominations. Eastern religions (Shinto, Confucianism, Buddhism) can convert to each other, and additionally Hinduism and Buddhism can convert to each other crossing religious group divide (so you can build a chain Sikhism-Hinduism-Buddhism-Shinto if you really want to).

Muslims can also now convert to each other, except the cost is -100 piety and -2 stability instead of -100 prestige, in line with already existing decisions to flip between Shia and Sunni (which has unnecessarily difficult preconditions).

Pretty much all the conversions enabled here happened multiple times historically, and they just give more gameplay options without breaking balance.

I tried to make sure that religion-specific country modifiers which ought to clear do clear, but it's very likely that I missed some of them. If you see a country modifier remaining which should be gone after conversion, just report it as a bug.

Emphasize Other Fun and Underused Mechanics

Mechanics which lead to interesting gameplay but don't see much action got emphasized.

War Exhaustion now reduce morale and defensiveness as it did before pre-1.6. In vanilla 1.6 War Exhaustion has no military significance whatsoever, it's basically just revolt risk increase, and that makes its offensive use basically pointless.

Culture conversion cost is lowered to 5/bt from previous values of 10/bt (which was still too high) and vanilla's completely insane 25/bt. I still don't expect it to be used much.

Improve relations mission gives 10 prestige and 25 diplo instead of just worthless 3 prestige. It might be a little much, but then insult rival mission is way easier and gives similar amounts, and a mission without meaningful rewards is just wasting mission slot - you should always have 3 meaningful missions to choose from.

Other Tweaks and Fixes

Vassal annexation relationship penalty capped at -100, as it led to far too many ridiculous situations at -200, where vassals became pretty much permanently unannexable and had to be released from vassalage , annexed, and released as new vassals if you ever wanted to annex them.

Various bugs in tribal government reforms should now be fixed.

Everything is optional

I isolated each change as much as possible, so you can pick whichever parts of it you like and skip the rest. Pretty much the only part that's a bit harder to isolate is rebalancing missionary strength, but even that is not that hard.

The mod is not tested for compatibility with any other mod. It should work with UI-only modes, but it will probably require manual fixing for anything more complex.

Saturday, June 28, 2014

Fun and Balance mod for EU4 1.6.1 - now with holy sites and partial westernization

Tired white tiger cub by Tambako the Jaguar from flickr (CC-ND)
So I just finished full campaign as Dai Viet with this mod, and while I liked a lot of things, a few really need changing, so I'm releasing new version of the mod.

I'm not sure if I should keep calling it "minimod" since it's getting more and more content with each patch, but I'm still trying to keep the spirit "like vanilla except fixed", not going into totally different experience, but I'm not above stealing good ideas from EU3 and even occasionally CK2.

You can read about previous version here.

For just download click here.

Minor changes

First, a bunch of minor bugfixes, balance tweaks, and in particular reverting ridiculous westernization nerfs the 1.6.x patch introduced.
  • Correctly got rid of protectorates this time.
  • Forming Qing/Persia/Mughals now changes government to despotic monarchy.
  • Peasant War trigger conditions made more relevant. Now if it happens it's really your fault, not just the game being mean to you.
  • Neighbour bonus increased to -5%/tech level (1.5 levels), with max increased to -50% (to make westernization worthwhile)
  • Completely removed size-based westernization speed penalty
  • Tribal government reform stability requirement moved from +3 to +2 (effect does -5) - AI can't plan to get to +3, so it wouldn't do that even if it ought to.

Religion rebalancing

1.6 introduced separate missionary strength bonuses against heathens and heretics, so it's now finally possible to fix a lot of ridiculousness of vanilla - like Catholics being trivially easy to convert to Sunni, but Shia to Sunni being pretty much impossible.

All ad-hoc per-religion missionary bonuses are thrown away. Previously base values were:
  • Pagans 4%
  • default 2%
  • Orthodox, Sikh 1%
  • Muslim, Shinto, Coptic 0%
Now base strength modifiers are:
  • Pagans 4%
  • Heretics 2%
  • Heathens 1%
which improves gameplay basically everywhere different religions meet, while making far more sense.

Some other tweaks to conversion rates:
  • Important religious center is only -2% penalty, not -5% like vanilla (already in previous versions of the mod, just repeating it here for context)
  • Positive stability gives +0.7%/level, up from +0.5%/level, so if you really want to burn your admin points to speed up conversion, you're welcome.

Holy Sites

And most of all - EU4 now has holy site system very similar to CK2. Each holy site religion controls gives +0.2% to missionary strength. If a religion has all its holy sites, all countries of that religion get +1.0% missionary strength and 1 prestige/year on top of that (that is 0.0%, 0.2%, 0.4%, 0.6%, 0.8%, 2.0% going from 0 to 5).

Getting all five is not supposed to be easy - more a serious mid-game goal. Bonuses for partial control should give you interesting reasons to support other countries of your religion in their fights against infidels - something that vanilla EU4 was severely lacking, unlike CK2.

All sites are intended to have some level of historical plausibility while leading to some interesting gameplay. I'm definitely looking for suggestions, but gameplay takes priority over historical plausibility every time.

All Muslims:
  • Mecca
  • Jerusalem
  • Cordoba
  • Constantinople
  • Karbala
Medina is a pretty obvious one missing, but it would be too easy and sitting next to already existing holy site. Since Constantinople falls within first few years of the game anyway, including Mecca, Medina, Jerusalem, and Constantinople (as we'd like) would get really close to completing the set with very little effort, so for gameplay reason one of them needs to go, and Medina it makes most sense to cut Medina.

Karbala is a Shiite holy city, so it would lead to some fun Sunni-Shiite conflict. Cordoba is included to make Muslims somewhat interested in face of Granada and reconquista - something that was completely irrelevant usually.

All Christians share Jerusalem, Rome, and Constantinople for obvious reasons, and additionally:

  • Macedonia (Mount Athos)
  • Kiev (mostly for gameplay reasons)
  • Alexandria (for gameplay reasons)
  • Tigray (location of Ark of the Covenant)
Catholics, Protestants, and Reformed:
  • Galicia (Cathedral of Santiago de Compostela)
  • Kent (Canterbury, mostly to give Protestants something to do here)
I don't see how any Christians could not have Jerusalem and Rome as holy sites, and Constantinople is really good for both historical plausibility and gameplay, but the remaining two are a bit random. Choosing Protestant and Reformed sites also runs into a problem that reformation in game can start in very different places than it historically did.

For Hindus/Sikhs I just picked some plausible shared sites (based on just a bit of Wikipedia research) with a bit of geographical spread:
  • Jaunpur (Varanasi - Hindu)
  • Coromandel (Chidambaram - Hindu)
  • Gujarat (Palitana - Jain)
  • Siem Reap (Angkor Wat - Hindu and Buddhist)
  • Punjab (Harmandir Sahib - Sikh)
And likewise for Buddhist/Confucians/Shinto:
  • Bihar (Bodhgaya - Buddhist)
  • Shandong (Qufu - Confucian)
  • Owari (Ise Jingu - Shinto)
  • Siem Reap (Angkor Wat - Hindu and Buddhist)
  • Gyeongsang (Bulguksa - Buddhist)
I'm definitely looking for better ideas here, and they don't need to share same sites with other religions in their group. However, remember that gameplay wins over historical plausibility, so we don't want 5 Shinto holy sites all in Japan.

Pagans don't get any, since "Animist/Shamanist/Totemist" are not real religions, just some loose agglomerations of vaguely related beliefs.

You can get missions to conquer holy sites held by infidels if you're neighbour of their holder (even if you don't neighbour the site directly) or you have Deus Vult religious idea. AI in tests has been fairly bad at doing such missions, but then AI can't usually even get its cores back.

Partial Westernization

And for the second big change - any country with less than Muslim tech can now partially westernize up to Muslim tech as long as it has Muslim or higher tech neighbour, loads of points and stability it's willing to lose, and is willing to take 10 years of Western influences (+10% revolt risk, +50% advisor cost). Nomads can't use it as they have their unique "Reform the Government" decision which also upgrades them to Muslim tech, and works along very similar lines.

It doesn't matter if you're ahead or behind on tech - that part never made much sense to me, and nomads can already move to Muslim tech without any such conditions by reforming their government, so I don't see why others couldn't.

Muslim tech means you no longer suffer from -1 or -2 monarch point production penalty, just tech penalty, and that's huge. Going from Muslim, Eastern, or Ottoman up to Western will require regular westernization - or you could just go for full westernization without intermediate steps if you prefer.

AI is surprisingly good at using this decision. Sometimes it collapses to rebels, but often it manages to survive rebellions and use its new tech group to its serious advantage.

Everything is optional

Different changes in the mod are isolated as much as possible, so if you like only some of them and not others you'll be able to cherry pick to your liking relatively easily.

Saturday, June 14, 2014

Samsung Galaxy Note 10.1 2014 Edition first impressions

Galileo by Erick Nava Riefenstahl from flickr (CC-NC)
It's not a serious review, just a collection of observations from two day with the tablet.

We need to stop designing for mobiles. When I did some browsing on it, far too many websites autoredirected me to their "mobile" domain which was awful shit compared to the desktop version. There's an option in the browser to make it request desktop version, but it doesn't always work. Every year "mobiles" get closer and closer to desktop quality. Instead of wasting all the time designing "for mobiles" just wait and the problem will solve itself. Remember garbage like WAP early adopters of mobile web did? All gone. Remember all low-resolution designs? All mid-level or higher phones and tablets are 200ppi+ these days, usually closer to 300ppi. 10"+ tablets should be treated the same as laptops today, end of story. For smaller tablets or high-end mobiles it makes some sense to have special mobile version, but the win isn't really that big for most sites. Low-end or old smartphones still sort of need those mobile sites, but unless you're targeting Nigerian market, just wait couple years and everybody will upgrade their phone to something decent.

Samsung should just reassign to another position whoever is coming up with names like "Samsung Galaxy Note 10.1 2014 Edition" before they release "Samsung Galaxy Note 10.1 Early 2015 Edition Gangnam Style Special Deluxe Edition".

It's insane how many passwords I have to enter to get everything running. I'm so grateful for each app which I can just authorize via my Google account. Of course when everything on the Internet can be accessed via Google authorization, NSA won't even have to bother to hack everyone, they'll just hack Google (or find a hole in oauth2) to authorize themselves as you to everything.

VLC for Android does exactly what I want, that is fast playback with pitch correction (you need to turn on pitch correction in settings). I know I probably sound obsessed about that, but there's only 24 hours in a day, and the last thing I want to use them on is slow narrators.

Maximum sound volume of the tablet is surprisingly low, and VLC doesn't go over 100%, which it very much should if the source is encoded at very low volume (like most stuff off youtube).

It's confusing that it's charged via USB cable, but I need to use special charger, not a PC or a regular charger. I understand technical reasons - USB puts limits on how much current devices can request, and tablet's huge battery just wants a lot more - but it's extremely annoying. Wasn't USB3 standard supposed to fix this?

Twitter's Android app is phone-only and doesn't work with tablets, and they don't have official tablet app. That's so weird. I'll have to give all the unofficial client apps a try.

I'll need to get myself some kind of folding case like Kindle Fire has, so I can watch stuff in bed while eating with one hand and petting the cat with the other. That's sort of why I got myself a tablet.

I wanted to read comic books on the tablet, but a lot of scans are very low res, so on high res screen I can see JPEG artifacts better than text itself. Fairly disappointing.

It is way better for reading PDFs (mostly research papers, which tend to be high quality PDFs, not low quality scans) than epaper Kindle I tried for it before.

Airdroid is pretty bad at transferring big video files over wifi, and doesn't know how to resume. It's just faster to connect the damn USB cable than retrying a few times.

XCOM for Android is confused by high resolution and keeps zooming up far too close. It looks like an OK game, but I can't get myself to play with it - not only due to lack of Enemy Within, mostly due to lack of Second Wave options I unlocked ten fucking times on desktop (Steam) version. Absolutely Critical (should be unlocked!!!) and Aiming Angles (unfortunately Enemy Within only) double tactical depth of the game. I wish there were more games on that - most genres don't map that well into tablet interface, but strategy games like Civilization 5 would be just awesome.

My cat likes the tablet a lot more than the laptop. I still need to hold the tablet is awkward positions sometimes for cat's convenience, but it's better than trying to watch something on a laptop while the cat is sitting on its warm keyboard.

SwiftKey keyboard is much less convenient to use than on the phone - on the phone gestures are relatively fast and require just finger movement, but swiping your fingers through tablet keyboard requires moving the whole hand, and it's not great.

Rockbox - just another Open Source UX design failure

Two freebies with my shipment from Xerox (Cosmo and Wanda) by cseeman from flickr (CC-NC-SA)
Rockbox is an Open Source replacement for various "digital music players" I tried on my Sansa Clip Zip recently.

Their choice of words here is interesting - originally these devices were fairly accurately known as "mp3 players", but it got a bit silly since they could play audio files in a lot of other formats.

Wikipedia simply calls them digital media players, which is very sensible since many of them can play video as well (usually badly), but since it's a fringe use and they're generally used for just audio, why not call them "digital music players"?

Because audio is not just music. And Rockbox is designed as if it all was.


And that's a single word summary of everything that's wrong with Rockbox - audiobooks. It doesn't have dedicated audiobook mode like stock Sansa, or pretty much every other media player these days. And the reason a player would need an audiobook mode is that while from technical point of view playback of an audiobook chapter file is pretty much the same as of music file, UX has nothing in common.

In audiobook mode:
  • You absolutely need high speed playback, pitch correction being highly desirable
  • You absolutely need automatic per-audiobook resume function
  • You never want random navigation - it's always whole audiobook start to finish
  • You probably want filesystem navigation
  • You want UI lock while it's in your pocket, since it's a massive pain if one click resets you to start of the chapter or even audiobook
  • For podcasts it's the same except you might want per-chapter instead of per-audiobook resume if you're listening to multiple podcasts from the same source simultaneously
In music mode:
  • You absolutely need to play at normal speed and pitch
  • Nobody cares where you were last
  • You probably want shuffle most of the time
  • You might want playlists, including on the go playlist you can add things to while they play
  • You might want per-song repeat
  • You might want per-artist per-album or per-genre navigation
  • You probably want per ID3 tag navigation, not filesystem navigation
  • You don't care about accidental keypresses
  • If you go shuffle, you want your entire music collection, but you definitely do not want audiobooks and podcasts in the mix
In Rockbox by default everything is set up for playing music. If you decided to start listening to some audiobooks instead you'll need to spend a minute in menus to fix all settings (shuffle/repeat off, speed 150%) then manually create bookmark when you want to stop listening to an audiobook at do something else. Now that bookmark thing is totally insane, so fortunately I found some way to make them autoresume.

It still seems to lack functional lock system (Sansa's lock by short press on power button does not work any more), no pitch correction (there were some patches, never merged, no longer apply), it resets speed settings to 100% when it goes to sleep sometimes, and I just gave up on using it as music player ever.

The only reason stopping me from just restoring stock firmware is that Rockbox can go to higher playback speeds than Sansa's "Fast" (about 140%), and that's probably worth slightly more than having audiobook player also play music, but I'll probably end up doing that anyway.

It's Open Source, why don't you fix it?

Well, I have neither time, nor any desire to touch C code unless I absolutely have to. And even if I did, how many times an Open Source project accepted third party fixing their UX design? I can't think of a single such case.

Monday, June 09, 2014

UK income tax bands

Presenting His Royal Highness King Milo the First! by Malingering from flickr (CC-NC-ND)
You'd think that a question like - what are the income tax bands and rates in UK - would have an extremely straightforward answer you can check on government websites or Wikipedia. And you'd be wrong.

Between income tax, National Insurance (second income tax), and personal allowance phaseout the rates are nothing like what they seem at first (20%, 40%, 45% - yeah right).

Here are the rates I calculated:
  • £0-£7955 - 0%
  • £7955-£10,000 - 12%
  • £10,000-£41,860 - 32%
  • £41,860-£41,865 - 22% (yes, it's a £5 wide tax band)
  • £41,865-£100,000 - 42%
  • £100,000-£120,000 - 62%
  • £120,000-£150,000 - 42%
  • £150,000+ - 47%
In other words - WTF?

The tiny 22% tax band is an artifact caused by the primary income tax being calculated based on annual income, and the second income tax based on weekly income. Assuming 52 work weeks a year, their bands are just slightly misaligned, but if you work fewer weeks a year, this band can widen and you could be paying a lot less in taxes. I'm not entirely sure how that works in practice.

Conversely, 12% band is due to much larger misalignment between two income taxes, and it could widen a lot if you have high weekly wages, but work less than full year, so you'd end up paying no income tax, but lot of NI.

Even weirder case is the 62% band. It's regular 40% rate + 2% NI rate + 50% reduction of personal income allowance which gets retaxed from 0% rate into 40% rate, which is de facto third income tax of 20% applicable only for income between £100k and £120k.

Now, there are many legitimate arguments against income taxes in general, including:
  • high income taxes (especially that 62% rate) generate serious disincentive to work
  • taxing annual income means self-employed people whose income changes from year to year end up paying a lot more than people with stable income
  • taxing income instead of wealth means rich people can technically have low "incomes" and pay very little, while people with just salary and no wealth whatsoever and paying a ton
  • tax bands make no adjustment for cost of living depending on region - so a person living in London will end up in higher tax band at standards of living much lower than a person living in the middle of nowhere - resulting in another way how London subsidises the rest of UK
  • bankers making millions are probably all paying much lower rates than the middle class since they can hire some tax avoidance lawyers and there are convenient tax shelters located just next to the UK.
But even ignoring all that, why the hell can't we just fold three taxes all into a single tax, with monotonic bands?

In all these calculations I'm ignoring 4th income tax - employer's NI contribution, as it's technically not part of gross wages, even though economically it doesn't matter what numbers are printed on the payslip, only how much employer pays before taxes, and how much employee receives after taxes.

And a bonus question for behavioural economics exam: Would marginal income tax rates be more or less disincentivizing if people have no idea how much tax they're paying because taxes are so damn complicated?

Monday, June 02, 2014

Fun and Balance minimod for EU4 1.6.1

Wild Kitty 5, 30 May 14 by Castaway in Scotland from flickr (CC-NC)
Here's updated version of the Fun and Balance minimod. 1.6.1 introduced a lot of changes to the game, unfortunately also breaking it in half. Here I'm trying to salvage whatever is good about it while fixing the rest as much as possible.

The goal of this minimod is not to make any sweeping changes - just do the least necessary to make the game balanced and fix unfun mechanics.

I sometimes feel I do more balance playtesting of my minimod than Paradox does of their patches (as in - some is more than zero).

Download link.

New changes in this version

  • Coalitions - previous versions of the mod removed them, but I'm going to keep them this time. AE levels got totally rebalanced, and they seem to be much less excessive, so it might be worth a try. If they turn out to be still broken, AE could be tweaked, or they could just go away completely again.
  • Free relations increased from 4 to 8 (previously 6), all bonuses which got nerfed from +2 to +1 in the patch back to +2. Even increased it was pretty low, and the patch makes acquiring and keeping vassals more expensive than before.
  • Diploannexation costs reduced from completely ridiculous 15/bt to 1/bt
  • Cost to move primary trade port reduced from 300 to 100 dip, mostly because so many countries start with misplaced trade ports (and moving capital is only 200 adm)
  • No diplovassalization base tax cap - since penalty is quadratic in size, it's very hard to abuse this.
  • Muscovy/Russia does not get free colonist from national ideas. They got massive boost by annexing Perm a lot faster, which ends up in them colonizing all of Siberia much earlier than in previous patches. This somewhat balances that out, but even with the nerf Muscovy is still way too strong way too early.
  • You don't need any idea groups to reform tribal government, just 200 adm, 90 legitimacy, and +3 stability. Forming Mughals / Qing / Persia also reverted to not require reformed tribal government. It was already extremely hard for AI to do that.
  • Pirates who annoyed me so much are no longer there, replaced by the new privateer system! (well, if you have all the DLCs at least)

What I couldn't fix about the new patch

I wanted to make diploannexation to take longer (that why I want it cheap and with high limit - so you keep more vassals longer instead of mass annexing them ASAP), but that's hardcoded. This isn't really a huge deal, and if annexing vassals turns out to be too easy vassal annexed diplomatic penalty can simply be tweaked higher to make things right.

I also wanted to allow wider selection of rivals, but that's hardcoded as well. I really like power projection system, the only problem with it is how narrow and forced rival selection is. If you could choose from more potential rivals, it would be really good, but right now it only gets halfway there.

Previous changes

Detailed explanation in older posts - 1.5.0, 1.5.1.
  • Buildings level 1-4 not destroyed on change of ownership
  • Important religious center penalty reduced from -5% to -2% missionary chance
  • Steppe Horde bonuses increased to +100% manpower, +100% land force limit, -50% land maintenance.
  • Non-accepted culture penalty increased from +2RR to +4RR - this might be too much with new nationalism system
  • Can't reduce war exhaustion while at war
  • No naval attrition due to time at sea at any tech
  • Cleansing of Heresy CB doesn't allow any province taking, but allows forced conversion at 25% cost
  • Imperial Ban CB only generates 10% AE for illegally held provinces
  • EU3 style republican elections (3 random candidates + incumbent, no skill changes or tradition loss on reelection)
  • No Burgundian inheritance events
  • High OE events increase with OE smoothly instead of massive cliff at 101% OE
  • Foreign rebel support increased to 6% (3% in old patches, 4% in current patch)
  • Accepted culture gain/loss thresholds both 10% for greater predictability
  • Monarch point pool increased to 1500 to reduce tech micromanagement
  • Culture change cost reduces from 25/bt to 10/bt
  • Cores and claims last twice as long
  • Coring time does not depend on size (supposedly new patch already does it)
  • No protectorates, can vassalize anyone
  • Vassals allowed to fabricate claims
  • Vassals will buy provinces from overlord if they would as independent countries (it seems new patch already has that)
  • Vassals will buy provinces up to 50% OE just like independent countries (limit was bugged in previous patch and they'd buy at any OE)
Enjoy. I fixed what I could, but for truly balanced experience we'll need a lot more modding support from Paradox.