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

Friday, September 19, 2014

Fun and Balance mod for EU4 - Shattered Europe support and huge mission pack

Cat by Moyan_Brenn from flickr (CC-ND)
Fun and Balance started as a collection of workarounds for the worst issues in vanilla, but it expanded a lot since then - and this is the biggest expansion ever. I'm keeping everything modular, so you can cherrypick whichever parts you like, but if there's demand I might start releasing lite version with just bugfixes separately from full version with extra content.

For detailed explanations of everything else the mod does, check older posts. This is just the new stuff.

Direct downloads:

Mission pack

Anyway, missions in EU4 suck. A few countries - mostly big ones - get some cool early game missions, but most people don't want to play France or Muscovy every time, and in any case even these missions run out real fast. Generic missions tend to be boring, and their rewards are often extremely underwhelming.

Now it's all fixed!

Generic missions now get meaningful rewards. There are no more generic missions which reward you with just some prestige or advisors. You'll get some monarch points or legitimacy/republican tradition at minimum, sometimes even more like stability or base tax in mission province. (I count free CBs on selecting mission as part of reward, so these missions didn't get any extra bonuses)

Most tag-specific missions would make just as much sense for another country in same geographical situation - so that's what happens now! For most countries if you get that country's lands, their missions enter your mission pool! This means you get new missions in the pool even very late game if you expand to some new place, so you'll rarely be limited to just generic ones.

For small countries requirement is simply taking their historical capital. For larger countries, condition is usually a few key provinces and minimum size requirement - for example you'll get Polish missions if you control Krakow and Warsaw, Ottoman missions if you control Edirne, Constantinople, and have minimum of 20 cities, and so on.

Some missions require original country not to exist - nobody gets Timurid or Mughal missions if either of them exists. For a few countries I used different alternative conditions instead of using same geographic condition for all of them. More tweaking is definitely possible here.

Many missions already have extra requirements which have not been removed - for example Genoa's missions all require you to be a merchant republic, so if Venice or Hansa takes over Genoa's capital they'll get them in the pool, but Milan wouldn't unless they change government type.

In testing this rarely led to any crazy results - sometimes mission text sounds a bit silly, but that's already the case with some vanilla missions (try forming Russia as anybody but Muscovy etc., or change your religious group - you'll be getting a lot of nonsensical missions).

Missions which mention another country in any way can't activate for that country.

As an extra bonus you can get Byzantine missions for rebuilding Roman Empire if you're Holy Roman Empire and control both Rome and Constantinople. Go crazy! Ulm can into Roman Empire.

AI fixes

AI in EU4 is really dumb, I can't really fix it completely, so I just added a few small fixes:
  • Length of war unwillingness to peace out goes from -30 to -0, instead of -45 to -0 (in five years). Vanilla value were ridiculously high, and nobody would white peace out of the war ever no matter how hopeless it was - every OPM would fight to their bitter end. I don't want to go all the way to CK2 situation where wars are over at 100% warscore before the opponent had chance to even gather their armies, but EU4 is just crazy, and this is a fairly mild fix - as they still get unwillingness points for strength of alliances, allies in war, controlling their capital etc.
  • Willingness to peace out due to high War Exhaustion increased from 1/level to 2/level. War Exhaustion actually matters in the mod unlike in vanilla where it's just dip point leak.
  • Number of Great Power Allies penalty reduced from -50 to -25. With everybody getting twice the number of diplo relations as in vanilla, it makes sense that they're not just with OPM.
I also reduced +0.7% missionary strength bonus for positive stability back to vanilla value of +0.5% now that missionary strength is fully rebalanced.

Shattered Europe version

There's now also a version that works with Shattered Europe (direct download).

It supports every feature of Fun & Balance mod, except new missions added by Shattered Europe are still tag-specific to Iberian Muslim states. The mod also fixes a few bugs in Shattered Europe code (all reported upstream).

Extended Timeline version

The mod still supports Extended Timeline (direct download). This release does only a few minor tweaks (like AI fixes) over previous release.

Extended Timeline version doesn't currently include extra features like mission pack, religions, partial westernization, holy sites - it's just a rebalance mod. The only new feature included is return subject cores CB.

I might port some of the extra features to Extended Timeline at some point too, especially holy sites.

Technical information

This section is of interest only to other modders.

While pretty much every other mod is written by hand, nothing in this mod was. Everything is done by building or transforming abstract syntax trees using open source software I developed for this.

Benefits of this include much reduced chance of making mistakes, much less effort required to make similar changes in multiple files, ability to generate multiple versions of the mod, and much lower effort required to adapt it to new patches.

This also makes some complex transformations possible - mission code required first replacing all references to original tag with ROOT (which might require collapsing some OR nodes if mission is already for two tags like CAS/SPA), then finding other tags referred in the mission code to exclude them, then building exclusion condition based on original tags, excluded tags, and alternative conditions.

Doing this by hand or by regular expressions... There's a reason nobody bothered to even try before as far as I know.

Now that tools for this exist, some really cool coding could start happening.

Everything is optional

As much as possible, every feature of this mode is independent from every other feature. You can take mission pack, or rebalance bits, or any selection you want and quite easily throw away the rest.

The only major exception is religion-related stuff which applies far too many changes to a single file to disentangle it easily.

Special thanks to Don Sjerven for help with testing. I can only do so much testing myself, so all kinds of bug reports are very welcome.

If you'd like to see Fun & Balance version for other EU4 mods, this is pretty easy to do, so request away.

No comments: