Developer Diary 10

This developer diary was first posted in the M&T forum here, and team members answered some questions in the thread. It was further posted on the M&T subreddit here, and team members also commented there.

Dev Diary #10 - Institutions
I must confess that institution is one of my favorite parts of EU4. It’s a fascinating system that provides an organic and compelling way of making some regions to be more technologically advanced than others. It’s also a nice source of some alternate history vibe, such as embracing renaissance as an east asian country. It provides good gameplay, and is overall very fun.

However, as much as I like it, I still had some issues with it. My main complaint was that once someone spawns some institution, others were barred from reinventing it in their own lands. Therefore, when it became time to work on institutions in 3.0, I had one clear object in my mind, which was to make institution reinvention be a thing. All other changes made on institutions that I will also talk about are stemmed from that goal.



The idea was quite simple. Basically, there’d be a set of conditions which when satisfied would give some institution progress gain to some provinces. The gameplay would be in setting up your nation to satisfy those conditions.

However, my idea quickly faced one major problem, which was that no progress could be given to an institution that is not yet enabled. If an institution was to be enabled, then it incurred a tech cost penalty on every country that did not embrace it. Obviously, having something like a +1000% tech cost penalty from game start was not very desirable to say the least.

To remedy that, I removed the tech cost penalty from all institutions and instead greatly increased the tech cost malus from tech advancement. That made it so that as you advance through tech, advancing to the next level becomes more and more costly. Then, as a final touch, I made all institutions give tech cost reduction when embraced.



This had many advantages. One was that I could now enable all institutions from the start without having to worry about giving countries a ridiculous amount of tech cost penalty. That basically enabled the whole institution system for me.

Another advantage is its fluidity. It makes it so that low level techs can be accessed even by countries that lack some vital institution. More institutions become necessary only as you reach higher techs.



Once this new model was implemented, it didn’t take much more to implement the institution invention system. It works like this.


 * 1) Every institution has a global condition, which must be true before any country can start inventing it.
 * 2) Every institution also has a country condition, where only the countries that satisfy them can invent it.
 * 3) Lastly, every institution has a province condition, which the province must satisfy.
 * 4) For every institution whose global condition is true, every province that satisfies the province condition whose owner also satisfies the country condition will begin to gain institution progress.
 * 5) When the institution progress reaches 100%, the institution becomes present in the province, like how it’s done in vanilla.
 * 6) Provinces ability to reinvent what is already invented is not in any way hampered by other provinces having invented it first. The progress does not go away, and the province can still continue to invent it.
 * 7) Every province that meets the ‘spread’ conditions for an institution can receive the institution through an enhanced vanilla spread model, using border-to-border spread, trade center based spread (in any direction, if a merchant is present or its a home-node), and overlord to colonial spread.

That’s about it for today. Peace.