1. Victoria 3
  2. News

Victoria 3 News

Dev Diary #78 - Update 1.2 changelog Part 1



Hello and welcome! Today I will be going through, or perhaps more accurately infodumping, everything that has happened for Update 1.2. Many of you will have already experienced 1.2 in our Open Beta and will recognize many of these new features, improvements, and bug fixes, but there's a substantial number of things in here that were not in any of the three beta releases (or which were too niche for most to notice), so I expect that even beta players will find a few gems in here!

The planned release date for the update is Monday March 13th, at 10:00 Central European Time. Our testing shows a promising amount of compatibility with savegames created on 1.1.2, but as usual we cannot guarantee flawless compatibility between versions, so for safety we recommend you start a new campaign on the new build. We will of course backup the old 1.1.2 version as a Steam beta branch which you can rollback to if needed (e.g. for mod compatibility).

It is worth noting that this changelog reflects only the changes between 1.1.2 and 1.2.3 (which will be the release version of 1.2), and interim changes between beta releases are omitted to avoid confusion. In practice this means that if you experienced a bug or balance problem in a feature new to the beta build, this document won't explain whether it's been fixed or not.

If you're looking for more detail on the biggest changes coming to 1.2, take a look at our previous dev diaries.

Now, without further ado…



  • Autonomous Investment: when the game rule is enabled, Pops will automatically start new private construction projects based on available funds in Investment Pool
  • Buildings can now have Government Shares, which will pay money (or subtract losses) directly into the treasury relative to building profits and government ownership share
  • The investment pool is now disabled under Command Economy. When Command Economy is enacted, all funds in the investment pool are seized for the treasury and all private construction projects are turned into government construction projects.
  • Added new economic law Cooperative Ownership, which requires Council Republic and now unlocks Workers' Co-ops production methods instead of Council Republic doing so directly
  • Strategic Objectives that can be designated by the player, encouraging Generals to capture specific states
  • Command Economy now makes it so all private sector buildings have only government shares, and only pay out government dividends
  • In-Game Music Player
  • Defeating a Native Uprising no longer instantly annexes them, but instead creates a Colonization Rights pact which speeds up colonization of that country for 5 years
  • New Lens interaction and context menu options to reset the Production Methods of a state, building, or building type to national standards
  • New Journal Entry, Decisions, and events pertaining to Russo-Chinese Border conflicts, the Beijing Treaty, and the Chuguchak Protocol
  • Complete overhaul of the Taiping Rebellion / Heavenly Kingdom event chain, including a new Journal Entry and event, a custom government form, historical characters, unique Interest Groups, new law setup, and plenty of fixes and balance changes
  • Markets now have a Land Trade Capacity, which allows trade routes between adjacent markets to trade a limited number of goods without needing to use convoys




  • Trade Routes now trade using market price, rather than a computed difference between pre- and post-trade prices. Trade routes now cannot be profitable unless the price is lower in the exporting market than in the importing market.
  • Secondary war goals added in a Diplomatic Play can now be locked in at the cost of Infamy and Maneuvers, causing them to be yielded if the target backs down
  • Numerous improvements to battle initiation, including picking which units should be involved and how many units each side can bring
  • It is no longer possible to colonize a state where another country both has a claim and maintains an interest, unless you also have a claim there
  • Several claims have been added to colonizable regions where other powers should not be able to start colonies, such as Hokkaido for Japan
  • Worldwide rebalancing of Arable Land, with land generally reduced in Europe/Asia and generally increased in the Americas
  • When a Native Uprising starts, they now only get conquer wargoals on states in state regions where the Native country owns land, instead of all adjacent states
  • We now print a list of any missing DLC or mods when attempting to load a game, but let you try to load the game anyway
  • Low Legitimacy is now communicated through an Alert (or an Important Action, depending on the severity)
  • Added a Game Rule for whether Investment Pool is autonomously used by pops or directly controlled by the country
  • Interest Groups are now much more likely to spread out across multiple available parties, reducing the risk of ideological incoherence within parties
  • Maintaining additional Convoys in excess of what is needed now provides a bonus to Trade Route Competitiveness
  • Unrecognized Powers now get a special Journal Entry for becoming Recognized during the Hegemon objective
  • Colonial Clash event now triggers considerably less aggressively
  • Notifications can now be dismissed in Observer mode
  • Naval Invasions are no longer limited to using Admirals and Generals from the same HQ, but can use Generals from any HQ with coastal access
  • If a front is resolved, any Generals at that front will now only automatically reassign themselves to a nearby front if it will take at most 30 days to reach it. In case of travel durations longer than that, the General will instead Stand By in their current location
  • Battles currently in progress no longer get manpower reinforcements from newly trained servicemen. Reinforcements will arrive once the battalions leave their current battle.
  • Battle Conditions now have a chance to update after having been active for several days, ensuring the tides can turn during battles
  • The Offense/Defense bonus enjoyed by Colonial Uprisings has been halved
  • You now get to choose to recruit one of 3 (instead of 2) Generals and Admirals
  • Certain Diplomatic Plays such as Annex Subject are no longer blocked by having too good Relations with the target
  • Interest Groups will no longer forget all about slavery as soon as it's abolished, but will retain their former ideals for some time
  • New Alert for when a country does not produce enough construction to fully utilize the money coming into its investment pool
  • Farmers and Shopkeepers now reinvest a small portion of their earned dividends into the Investment Pool
  • Only slave states can now revolt with the Confederate States of America, and only free states with the Free States of America
  • When the American Civil War breaks out, USA now gets claims on all states of the seceding country, and the seceding country gets a Revoke All Claims wargoal
  • Unincorporated states now cost less Infamy and Maneuvers to claim than incorporated ones
  • Reduced Fertilizer production from Intensive Grazing Ranches
  • The most powerful Interest Group in a party is now considered the Party Whip, letting them moderate the impact of ideological incoherence among groups that do not agree with them
  • GDP is now measured by subtracting the cost of input goods used in manufacturing, which is more true to life and doesn't unfairly rewards manufacturing economies over resource economies
  • Buildings will now raise wages only if they have considerable profits and they have employees below minimum expected Standard of Living, or if they have reasonable profits, are trying to compete for labor, and have
  • Buildings will now lower wages or lay off employees if they are running a deficit and have 33% above the minimum expected standard
  • Generals will now be more aggressive and consistent about pursuing war goals, even when those war goals are far away
  • Improved national dissolution events for China and India
  • Revolutionary or Seceding countries are no longer able to engage in Colonization, as this would cause orphaned colonies upon their destruction
  • Auto-Expand trigger conditions have been altered to ensure very expensive buildings don't block new buildings from being added
  • First Aid Production Method now requires Liquor and Fabric rather than Opium, while Opium is only required by Field Hospitals PM
  • When a country splits due to a revolution, any gold reserves or debt it has will be split between them in accordance with GDP. When one country annexes another in a revolution, gold reserves / debt will be recombined.
  • It is now possible to use the Take Treaty Port wargoal on a treaty port where you already own part of the state even if the holder is of higher or equal power rank
  • Earnings prediction when expanding buildings has been made less confusing by only displaying the earnings of the prospective level and ensuring Economy of Scale is factored in
  • Serfdom now reduces the amount of Infrastructure states get from their population
  • Junior countries in a Customs Union will now get Trade Centers for their own trade routes
  • Investment Pool contribution balance revisions to ensure the pool can be relevant for all countries and to not radicalize investors when they increase their investments
  • Command Economy now requires Autocracy or Oligarchy to enact
  • Postal Savings technology now increases the efficiency of Shopkeeper and Farmer investment
  • Council Republic now increases the Clout of the Trade Unions instead of the Political Strength of Farmers and Machinists
  • If the outcome of a battle would result in a tiny pocket with its own irrelevant front, it will be handed over to the winner instead, reducing the number of fronts created in wars overall
  • Rebalanced employment numbers, trade volume and economy of scale for Trade Routes to work better with market price trading
  • Added a warning for negative productivity trade routes
  • Improved overall profitability of Vineyards
  • Laissez-Faire now disallows any downsizing of private sector buildings
  • Unacceptable legitimacy level now slow down the enactment of laws
  • Righteous legitimacy level now impact enactment speed a bit less
  • Mass migration targets are now selected in two steps, first country then state, increasing the reliability of migration waves to the new world
  • Mass migration targets are now established by culture + country rather than culture only
  • Mass migration should now only occur from states considered homelands for that culture
  • Mass migration target limits based on cultural turmoil removed, replaced by a cooldown per culture + country pair from a specific country
  • Limited emigration to a percentage of the state's population + a percentage of unemployed Pops in the state each week
  • Adjusted some countries' cultural tolerance setup to encourage more new world migration
  • The Competitiveness of a trade route now increases the longer it's been established, making it harder for new routes to compete on limited supply
  • Rebalanced pop growth, including secondary factors like dangerous working conditions, to achieve stronger and more historically accurate compound pop growth
  • War Exhaustion from occupation now scales in a non-linear fashion against the amount of territory occupied, so that occupying just a small portion of a country now does not have much impact but fully occupying them still has a huge impact
  • Provinces are now selected for new battles according to more relevant parameters (e.g. distance to war goal)
  • Particularly severe goods shortages are now signaled to the player as Alerts rather than Important Actions
  • Italian and German flags now look different depending on which country formed them
  • Slower tech progression but with tech boosts from Journal Entries and events (from "Open Beta Tweaks" mod by One Proud Bavarian and Doodlez)
  • It is now possible to take Treaty Ports from Isolationist countries and trade with their market if you hold such a port
  • War Exhaustion from casualties is now scaled off military size rather than population size and increases by the relative amount of battles lost by a country's side of the wa
  • Colonizable Pacific Islands now have the Severe Malaria trait to discourage early colonization
  • Western Australia, New South Wales and Japan now start with Colonial Resettlement
  • Anarchism now requires the Cooperative Ownership economic law to be enacted, and disables all other economic laws
  • Interest Groups with a Slaver leader are now virtually guaranteed to join the Democrat Party while the 'Great Slavery Debate' journal entry is active
  • Interest Groups with an Abolitionist leader are now virtually guaranteed to join the Republican Party while the 'Great Slavery Debate' journal entry is active
  • Missouri Compromise now also gives additional voting power to Aristocrats and Farmers
  • Each level of Trade Route now generates a base number of Trade Center levels, and then one additional Trade Center per level, in order to better balance against sharper decline in per-unit profit from market price trading
  • "Protect Domestic Industry" tariff focus now gives a greater increase in export tariffs
  • "Encourage Exports" tariff focus now gives a greater increase in import tariffs
  • Very unhealthy characters may now die young
  • Industrial Barriers event has been rewritten to be more balanced and engaging
  • Music track now resets when exiting the game to the Main Menu
  • Command Economy no longer enforces mandatory subsidies, since deficits are covered by the treasury due to government shares anyway
  • Buildings will no longer raise wages to attract new employees if no qualifying employees exist
  • Increased radicals from being below minimum Standard of Living (from "Open Beta Tweaks" mod by One Proud Bavarian and Doodlez)
  • Poor pops are now more politically engaged at high literacy (from "Open Beta Tweaks" mod by One Proud Bavarian and Doodlez)
  • It is now possible to use "Revoke Claim" war goal to revoke claims that are not on your own states, e.g. colonial claims
  • Workers in unincorporated states are now generally paid lower wages, especially if they are discriminated and/or you have the 'Colonial Exploitation' law
  • Decentralized Nations no longer have Serfdom law active by default
  • "Independence" war goal now only requires you to hold your own capital in order to contest the war goal, rather than having to occupy your former overlord's capital
  • Console command "tweak debugworldpopulation" can now be used to log many interesting annual global statistics as .csv and Elasticsearch data
  • Agrarianism now allows whaling, fishing, logging and rubber plantations to be funded by the investment pool when using Directly Controlled Investment game rule
  • All workforce pops in Worker Co-ops now have an equal ownership share
  • Defeating the Shogunate in a Civil War will now complete the Meiji Restoration
  • Trade Routes will now always increase their size so long as they can maintain at least £10 productivity, and always decrease their size if they are unable to maintain at least £3 productivity
  • Markets are now considered adjacent if they have any land adjacency, not just if their capital areas are adjacent
  • Improved balance for Political Movement start chances
  • High and Very High taxation levels now slightly reduce the Pop attraction of the Interest Groups in power
  • Revolutionary uprisings now select their participating states with more precision
  • Changed completion conditions for the Declare Interest tutorial to lower the barrier for low-Prestige countries
  • Conscript troops and standing armies now have the same statistics when the same Production Methods are active
  • Whaling Stations now have a Simple Whaling Production Method that produces mostly Meat
  • Whaling Stations and Fishing Wharves now have Ownership Production Methods that are better aligned with other Resource industries
  • Arms Industries and Munition Plants now have Automation Production Methods
  • Indus Valley and Good Soil state traits now also include bonuses for Plantations
  • USA gets a claim on Texas from Manifest Destiny (from "Open Beta Tweaks" mod by One Proud Bavarian and Doodlez)
  • Construction Industries now have increased Laborer mortality (from "Open Beta Tweaks" mod by One Proud Bavarian and Doodlez)
  • Arc Welded Construction is now less efficient (from "Open Beta Tweaks" mod by One Proud Bavarian and Doodlez)
  • Rebalanced Radical gain in Subsistence buildings due to Expected Standard of Living
  • It is now much rarer to get an Obligation from Bankrolling a country
  • Russia now starts with Propertied Women law instead of Legal Guardianship
  • Party leader Popularity now has a much lower impact on Election Momentum
  • Decision to convert Japan to Shintoism now requires a less restrictive Church & State Law, and when taken, will instantly convert 40% of pops in the capital + 20% of all Japanese pops nationwide
  • Road Maintenance Decree now provides a boost to "Infrastructure from Population" instead of flat Infrastructure
  • Pops will no longer mass migrate away from a state to such an extent that it completely empties out all non-slave pops
  • Increased casualties generated by Offense/Defense compared to manpower
  • Reduced the throughput penalty Decentralized Nations are subjected to from 30% to 10%
  • If slavery is abolished and a civil war is then launched to restore it, the pro-slavery rebels will now re-enslave discriminated laborers working in agricultural buildings in former slave states instead of just accepting de facto abolition
  • Rebalanced start conditions to ensure several countries no longer start with negative weekly income
  • Subsistence buildings can now have the Government Run Production Method
  • Andrew Jackson now starts the game with Slaver ideology
  • Britain now starts the game with more agriculture and textile industries
  • Russia now starts the game with even more agriculture in Ukraine
  • Calling in a country to a Play by using an Obligation now costs 10 Maneuvers instead of 20
  • Rebalanced number of provinces conquered in battles
  • USA event option that annexes the Indian Territory will no longer be selected by the AI if the Indian Territory is controlled by a human player
  • The Suez and Panama Canal surveys now take less time to complete
  • All releaseable countries (e.g. Sudan, Inca) are now centralized
  • Transcaucasia is now a recognized rather than unrecognized nation
  • Ottomans now start with Line Infantry tech and some barracks with it active (from "Open Beta Tweaks" mod by One Proud Bavarian and Doodlez)
  • Ottomans now start with a longer truce with Egypt (from "Open Beta Tweaks" mod by One Proud Bavarian and Doodlez)
  • Tanzimat: Army Reform no longer requires expanding the army to 250 units, only 150 (from "Open Beta Tweaks" mod by One Proud Bavarian and Doodlez)
  • Germany & Italy now get a bunch of claims on unowned states when formed (from "Open Beta Tweaks" mod by One Proud Bavarian and Doodlez)
  • Heavenly Kingdom event will now trigger at Standard of Living
  • Bolivian event option that annexes Peru will no longer be selected by the AI if Peru is controlled by a human player
  • Improve Rank tutorial is now adapted to not auto-complete for Unrecognized countries
  • Tanzimat: Literacy requirement reduced from 35% to 20%
  • Very small pops that would otherwise be merged into larger pops will now remain intact if they are likely to have recently arrived to their state via migration
  • Western Australia now has a Claim on New Zealand instead of on New South Wales
  • Clicking on either the Unhealthy Economy or Stockpiling Gold Important Actions will now open the Budget panel
  • FMOD audio middleware updated to 2.02.03
  • Lower effect of Standard of Living on Qing for opium obsession, and higher for having lost opium wars (from "Open Beta Tweaks" mod by One Proud Bavarian and Doodlez)
  • Reformed Mughal is now Muslim (from "Open Beta Tweaks" mod by One Proud Bavarian and Doodlez)
  • India doesn't get any Iranian cultures as primary (from "Open Beta Tweaks" mod by One Proud Bavarian and Doodlez)
  • Britain now starts with additional Declared Interests
  • "Visitors from Colonies" event now has a longer cooldown before it can reoccur
  • Colonization of a claimed state will not be blocked if the country with the claim can't reach the state
  • English: fixed a broken reference to concept_subsidizing in Trade Route tooltip
  • No more Scottish people in India at game start (from "Open Beta Tweaks" mod by One Proud Bavarian and Doodlez)
  • British Gambia now starts with a Port, ensuring it's not isolated from the British market




  • AI will now never remove the last level of port in a state
  • AI will now refrain from constructing more ports than it could support financially
  • AI "Bravery" is now renamed to "Recklessness"
  • AI will now better balance its forces between defending home HQs and sending troops to overseas fronts
  • Technologies now have scripted AI weights to fine-tune the AI's decision making when selecting new research
  • High Recklessness will now cause the AI to overestimate its military strength in Diplomatic Plays, thereby increasing Confidence
  • AI is better at responding to political movements (from "Open Beta Tweaks" mod by One Proud Bavarian and Doodlez)
  • AI is now less likely to back down in diplomatic plays where there are numerous primary demands arrayed against them, especially if they will be annexed on backing down
  • Tweaked unification AI strategies to make the AI better at using the journal entry systems to absorb minor countries
  • AI will no longer downsize government buildings while in a civil war
  • AI will now hire enough Generals to effectively garrison their HQs (e.g. to repel naval invasions)
  • Ensured wars between AI countries do not stall due to neither side ordering their generals to advance
  • AI is more keen to do reforms to avoid civil war, especially if a subject (from "Open Beta Tweaks" mod by One Proud Bavarian and Doodlez)
  • AI now values institution spending higher and in accordance with its Strategies
  • Improved AI's ability to manage Infrastructure levels across their market
  • Improved AI's ability to reform its government to maintain reasonable Legitimacy levels
  • AI will now handle their Generals better, ensuring they are assigned to advance or defend fronts as is appropriate
  • Adding more primary demands now increases sympathy for opposing side
  • AI now sets tariff policies on goods according to their interests
  • AI should no longer offer or accept a white peace when the odds are overwhelmingly in their favor
  • AI now values the war goal of revoking Treaty Ports more consistently in Diplomatic Plays
  • AI no longer gets stuck in a spiral of low infrastructure due to underemployed railways
  • AI is now better at prioritizing construction and usage of Logging Camps
  • AI will not try to form Germany/Italy until they have nationalism (from "Open Beta Tweaks" mod by One Proud Bavarian and Doodlez)
  • AI, including the Autonomous Investment AI, now correctly assesses the effects of Economy of Scale when determining where to expand a building
  • Countries will now tend to maintain Generals on stand-by in important coastal HQs to protect from naval invasions
  • A revolutionary country that has already won the revolution will now be willing to make a white peace with remaining countries in the war
  • AI is now less likely to take sides in diplomatic plays without a good reason to do so
  • Fixed a bug that was causing DIPLO_PLAY_BOLDNESS_WEAK_ARMY_FACTOR not to be included in the calculations, AI should now be more likely to back down and less likely to intervene in plays if their own army is very weak
  • Reduced the overall aggression levels of the AI, as it was overtuned to compensate for (now fixed) bugs listed below
  • AI is now more aggressive against ideological enemies, and a bit less aggressive against ideological allies
  • AI is now generally better at constructing peace deals that might end up ceding wargoals to both sides
  • AI now has an improved understanding of which wargoals are more important than others to press and not have pressed on themselves
  • AI is now less random about who it has sympathy for in a Diplomatic Play, and more inclined to support allies and subjects
  • Fixes a bug where AI was miscalculating countries that are likely to declare neutrality as potential enemies, causing it to be far too passive with starting plays in regions with a lot of interests
  • AI is now less inclined to overbuild railroads in states that have free infrastructure
  • Fixed a bug where AI Generals were getting stuck on fronts
  • AI should no longer get into a state where it constantly moves generals back and forth between fronts
  • AI is now better at understanding how lucrative Gold Mines are
  • The AI must now wait for a cooldown period before resending an offer the player rejected
  • Fixed a bug that caused AI peace desire from military strength to be reversed
  • Fixed reversed check in achievable wargoals that was causing a country that was winning to peace out too early
  • Fixed a bug where the AI did not understand that potential allies may not be able to join them due to truces and launched potentially suicidal plays as a result
  • Fixed a bug where allies of the initiator could sometimes ignore truces with the target
  • AI now looks at the relative power of the two sides' militaries when deciding how much it wants to make peace
  • AI will now never abandon allies and subjects in diplomatic plays where they're not actually at risk due to very weak enemies, etc
  • AI should now understand Construction Efficiency maluses better and use this knowledge while queueing new constructions
  • AI is now much more interested in using Automation methods, particularly when the cost of the needed goods is low
  • AI should now be unwilling to invest in ports if it already has a lot of free convoys and the port wouldn't connect any new states to its market
  • Fixed an inconsistency in AI memories where sometimes it was tracking time by days and other times months
  • Fixed an issue where Generals standing by in non-home HQs were considered to be garrisoning their home HQ
  • AI now completes expeditions more regularly
  • AI now places higher importance on conquering land-adjacent states
  • AI is now more aggressive against Council Republics if they are themselves not a Council Republic
  • AI is now more aggressive against countries with radical economic laws (Worker’s Co-ops and Command Economy) if they themselves do not have a radical economic law
  • AI values obligations from irrelevant countries less (from "Open Beta Tweaks" mod by One Proud Bavarian and Doodlez)
  • Russia is better at expanding in Central Asia (from "Open Beta Tweaks" mod by One Proud Bavarian and Doodlez)
  • AI should now be better at establishing Electrics Industries in the mid-game
  • AI may now choose event option with AI weight 0 as a fallback if all other options are disabled due to failed trigger
  • AI is now less willing to agree to peace if there are wargoals their side is likely to achieve through capitulation that aren't part of the peace
  • Increase AI's tendency to be neutral in native uprisings
  • "Powerful Protectors" diplomatic approval malus is no longer applied when the powerful protector is the country making the offer
  • USA is now much more keen to map the western frontier (from "Open Beta Tweaks" mod by One Proud Bavarian and Doodlez)
  • Italian minors are more aggressive about pursuing unification (from "Open Beta Tweaks" mod by One Proud Bavarian and Doodlez)
  • AI will no longer demand Treaty Ports or Open Market war goals from countries in their own market
  • AI will no longer demand an Open Market if they already have or are demanding a Treaty Port of the country in the same Play
  • AI now considers plentiful gold reserves to be less important for deciding when to peace out
  • Fixed a bug that made the AI reluctant to side against secessions due to risk of spreading when they should actually be reluctant to side with them
  • European Powers will not take full states in China while Fragile Unity is active unless another European Power has already done so (from "Open Beta Tweaks" mod by One Proud Bavarian and Doodlez)
  • British India will not rebel, to avoid being shattered (from "Open Beta Tweaks" mod by One Proud Bavarian and Doodlez)
  • Increased Britain's recklessness in the Opium Wars a bit


Continued in Part 2!

Dev Diary #76 - Performance



Hello and welcome to this week's Victoria 3 dev diary. This time we will be talking a bit about performance and how the game works under the hood. It will get somewhat detailed along the way and if you are mostly interested in what has improved in 1.2 then you can find that towards the end.

For those of you who don’t know me, my name is Emil and I’ve been at Paradox since 2018. I joined the Victoria 3 team as Tech Lead back in 2020 having previously been working in the same role on other projects.

What is performance

It’s hard to talk about performance without first having some understanding of what we mean by it. For many games it is mostly about how high fps you can get without having to turn the graphics settings down too far. But with simulation heavy games like the ones we make at PDS another aspect comes into play. Namely tick speed. This metric is not as consistently named across the games industry as fps is, but you might be familiar with the names Ticks Per Second or Updates Per Second from some other games. Here I will instead be using the inverse metric, or how long a tick takes on average to complete in either seconds or milliseconds. Some graphs will be from debug builds and some from release builds, so numbers might not always be directly comparable.

What exactly a tick means in terms of in game time varies a bit. In CK3 and EU4 a tick is a single day, while on HOI4 it's just one hour. For Victoria 3 a tick is six hours, or a quarter of a day. Not all ticks are equal though. Some work might not need to happen as often as others, so we divide the ticks into categories. On Victoria 3 we have yearly, monthly, weekly, daily, and (regular) ticks.

If you thought 1.1 was slow you should have seen the game a year before release…

Content of a tick

Victoria 3 is very simulation driven and as such there is a lot of work that needs to happen in the tick. To keep the code organized we have our tick broken down into what we call tick tasks. A tick task is a distinct set of operations to perform on the gamestate along with information on how often it should happen and what other tick tasks it depends on before it is allowed to run.

An overview of some of the tick tasks in the game. Available with the console command TickTask.Graph.

Many of the tick tasks are small things just updating one or a few values. On the other hand some of them are quite massive. Depending on how often they run and what game objects they operate on their impact on the game speed will vary. One of the most expensive things in the game is the employment update, followed by the pop need cache update and the modifier update.

Top ten most expensive tick tasks in our nightly tests as of Feb 15. Numbers in seconds averaged from multiple runs using a debug build.

As you can see from the graph above many of our most expensive tick tasks are run on a weekly basis. This combined with the fact that a weekly tick also includes all daily and tickly tick tasks means it usually ends up taking quite long. So let’s dive a bit deeper into what’s going on during a weekly tick. To do this we can use a profiler. One of the profilers we use here at PDS is Optick which is an open source profiler targeted mainly at game development.

Optick capture of a weekly tick around 1890 in a release build.

There’s a lot going on in the screenshot above so let’s break it down a bit. On the left you see the name of the threads we are looking at. First you have the Network/Session thread which is the main thread for the game logic. It’s responsible for running the simulation and acting on player commands. Then we have the primary task threads. The number will vary from machine to machine as the engine will create a different number of task threads depending on how many cores your cpu has. Here I have artificially limited it to eight to make things more readable. Task threads are responsible for doing work that can be parallelized. Then we have the Main Thread. This is the initial thread created by the operating system when the game starts and it is responsible for handling the interface and graphics updates. Then we have the Render Thread which does the actual rendering, and finally we have the secondary task threads. These are similar to the primary ones, but are generally responsible for non game logic things like helping out with the graphics update or with saving the game.

All the colored boxes with text in them are different parts of the code that we’ve deemed interesting enough to have it show up in the profiler. If we want an even more in depth we could instead use a different profiler like Superluminal or VTune which would allow us to look directly at function level or even assembly.

The pink bars indicate a thread is waiting for something. For the task threads this usually means they are waiting for more work, while for the session thread it usually means it is blocked from modifying the game state because the interface or graphics updates need to read from it.

When looking at tick speed we are mostly interested in the session thread and the primary task threads. I’ve expanded the session thread here so we can see what is going on in the weekly tick. There are some things that stand out here.

First we have the commonly occurring red CScopedGameStateRelease blocks. These are when we need to take a break from updating to let the interface and graphics read the data it needs in order to keep rendering at as close to 60 fps as possible. This can’t happen anywhere though, it’s limited to in between tick tasks or between certain steps inside the tick tasks. This is in order to guarantee data consistency so the interface doesn’t fetch data when say just half the country budget has been updated.

The next thing that stands out is again the UpdateEmployment tick task just as seen in the graph above. Here we get a bit more information though. Just at a glance we can see it’s split into (at least) two parts. One parallel and one serial. Ideally we want all work to be done in parallel because that allows us to better utilize modern cpus. Unfortunately not all of the things going on during employment can be done in parallel because it needs to do global operations like creating and destroying pop objects and executing script. So we’ve broken out as much as possible into a parallel pre-step to reduce the serial part as much as possible. There is actually a third step in between here that can’t be seen because it’s too quick, but in order to avoid issues with parallel execution order causing out of syncs between game clients in multiplayer games we have a sorting step in between.

Closer look at the UpdateEmployment tick task.

Modifiers are slow

One concept that’s common throughout PDS games is modifiers and Victoria 3 is no exception. Quite the opposite. Compared to CK3 our modifier setup is about an order of magnitude more complex. In order to manage this we use a system similar to Stellaris which we call modifier nodes. In essence it’s a dependency management system that allows us to flag modifiers as dirty and only recalculate it and the other modifiers that depend on it. This is quite beneficial as recalculating a modifier is somewhat expensive.

However, this system used to be very single threaded which meant a large part of our tick was still spent updating modifiers. If you look at the graph at the top of this dev diary you can see that performance improved quite rapidly during early 2022. One of the main contributors to this was the parallelization of the modifier node calculations. Since we know which nodes depend on which we can make sure to divide the nodes into batches where each batch only depends on previous batches.

Closer look at the RecalculateModifierNodes tick task.

Countries come in all sizes

A lot of the work going on in a tick needs to be done for every country in the world. But with the massive difference in scale between a small country like Luxembourg and a large one like Russia some operations are going to sometimes take more than a hundred times as long for one country compared to another. When you do things serially this doesn’t really matter because all the work needs to happen and it doesn’t really matter which one you do first. But when we start parallelizing things we can run into an issue where too many of the larger countries end up on the same thread. This means that after all the threads are done with their work we still have to wait for this last thread to finish. In order to get around this we came up with a system where tick tasks can specify a heuristic cost for each part of the update. This then allows us to identify parts that stand out by checking the standard deviation of the expected computation time and schedule them separately.

One place where this makes a large difference is the country budget update. Not having say China, Russia, and Great Britain all update on the same thread significantly reduces the time needed for the budget update.

(And this is also why the game runs slower during your world conquest playthroughs!)

Closer look at the WeeklyCountryBudgetUpdateParallel tick task. Note the Expensive vs Affordable jobs.

Improvements in 1.2

I’m going to guess that this is the part most of you are interested in. There have been many improvements both large and small.

If you’ve paid attention to the open beta so far you might have noticed some interface changes relating to the construction queue. With how many people play the game the queue can end up quite large. Unfortunately the old interface here was using a widget type that needs to compute the size of all its elements to properly layout them. Including the elements not visible on screen.

New construction queue interface.

To compound this issue even further the queued constructions had a lot of dependencies on each other in order to compute things like time until completion and similar. This too has been addressed and should be available in today’s beta build.

Side by side comparison of old vs new construction queue.

One big improvement to tick speed is a consequence of changes we’ve done to our graphics update. Later in the game updating the map could sometimes end up taking a lot of time which then in turn led to the game logic having to wait a lot for the graphics update. There’s been both engine improvements and changes to our game side code here to reduce the time needed for the graphics update. Some things here include improving the threading of the map name update, optimizing the air entity update, and reducing the work needed to find out where buildings should show up in the city graphics.

Graphics update before/after optimization.

As we talked about above, the employment update has a significant impact on performance. This is very strongly correlated with the number of pops in the game. As in the number of objects, not the total population. Especially in late game you could end up with large amounts of tiny pops which would make the employment update extremely slow. To alleviate this design has tweaked how aggressively the game merges small pops which should improve late game performance. For modders this can be changed with the POP_MERGE_MAX_WORKFORCE and POP_MERGE_MIN_NUM_POPS_SAME_PROFESSION defines.

Another improvement we’ve done for 1.2 is replacing how we do memory allocation in Clausewitz. While we’ve always had dedicated allocators for special cases (pool allocators, game object “databases”, etc) there were still a lot of allocations ending up with the default allocator which just deferred to the operating system. And especially on Windows this can be slow. To solve this we now make use of a library called mimalloc. It’s a very performant memory allocator library and basically a drop in replacement for the functionality provided by the operating system. It’s already being used by other large engines such as Unreal Engine. While not as significant as the two things above, it did make the game run around 4% faster when measured over a year about two thirds into the timeline. And since it’s an engine improvement you can likely see it in CK3 as well some time in the future.

In addition to these larger changes there’s also been many small improvements that together add up to a lot. All in all the game should be noticeably faster in 1.2 compared to 1.1 as you can see in the graph below. Unfortunately the 1.1 overnight tests weren’t as stable as 1.2 so for the sake of clarity I cut the graph off at 1871, but in general the performance improvements in 1.2 are even more noticeable in the late game.

Year by year comparison of tick times between 1.1 and 1.2 with 1.2 being much faster. Numbers are yearly averages from multiple nightly tests over several weeks using debug builds.

That’s all from me for this week. Next week Nik will present the various improvements done to warfare mechanics in 1.2, including the new Strategic Objectives feature.

Victoria 3's Update 1.2 "Hot Cinnamon Spice" OPEN BETA is now available!

Hello everyone!

We have opened up an open beta for Victoria 3 Update 1.2, which after careful consideration by the entire team has been named “Hot Cinnamon Spice”!
We’ve been working on this update for a while now and we hope that it will provide a significant improvement to your experience with Victoria 3. Before we unleash it fully we’d like for you all to give it a go and provide us with feedback so that it can be the best it can be. The final release date of the full update will be revealed later.

How to opt-in to the Open Beta:
First of all we'd like to recommend everyone to start a fresh game and not use existing 1.1 save files. To opt-in you right click Victoria 3 in Steam, go to properties, click on the tab that says BETAS and in the dropdown list there you should be able to select the “1.2-beta”. Let the game update and you should be ready to go. If you wish to opt-out from the beta you repeat the above process but pick “none” in the dropdown list.

Step by Step Guide
1. Right click Victoria 3 in your Steam library
2. Go to Properties
3. Click "BETAS" on the menu to the left
4. Pick 1.2-beta in the dropdown list
5. Allow for your game to update
6. Start Victoria 3 as you normally would

How to report bugs and give feedback:
Our primary channel for communications will be the Victoria 3 Discord Server in the OPEN BETA section where you can post feedback and report bugs!
You can also file bug reports in the bug report forum (make sure you specify the bug is found in the 1.2 Beta build).
PLEASE NOTE THAT WE WILL NOT BE COLLECTING BUG REPORTS ON STEAM - ONLY ON DISCORD AND OUR OFFICIAL FORUM

Updates to the build:
We’ll be updating the open beta build on a regular basis and any updates will be communicated on Discord. Please note that updates may render your save file incompatible.

THREAD ABOUT KNOWN ISSUES CAN BE FOUND HERE!

Dev Diary #75 - Diplomatic Improvements in 1.2



Hello and welcome to another Victoria 3 Dev Diary about Update 1.2! By now the Open Beta is of course in full swing, and everything in this post will either already be available to try out or be part of one of the upcoming updates to the Open Beta in the following weeks. However, we still want to take the time to properly outline the changes we’re making to the game in 1.2 for those who either don’t want to opt into the Open Beta or are just interested in more detail and context. Today’s Dev Diary will be focusing on changes on the Diplomatic side of the game, both in terms of new functionality and AI.

The first improvement we’re going to go over today is Colonial Claims, which is a change to Colonization that is intended to prevent some of the more ahistorical nonsense we have going on in colonization at the moment, such as countries rushing for Hokkaido before Japan can get it or the United States setting up shop in Tierra del Fuego. Quite simply, what it means is that some countries now start with claims on states owned by Decentralized Nations, and any country which *doesn’t* have a claim on that state is blocked from colonizing it so long as the claiming state maintains an Interest there.

As an example, the Hudson Bay Company starts with a claim on Alberta in 1.2, while the United States of America does not, which means that the USA cannot start just colonizing into Canada without first forcing the HBC to revoke their claim through the use of a ‘Revoke Claim’ war goal. Similarly, Chile and Argentina have overlapping claims on some parts of Patagonia and thus are able to race each other for it, but won’t have it sniped away from them by a Belgium with grandiose Latin American ambitions.

While we’re on the topic of colonization, I should also mention that something else we’ve changed to improve how it plays 1.2 is how the Native Uprising diplomatic play works. In 1.1.2, a colonizer that defeats a Native Uprising would annex the entire native Decentralized Nation, which led to some weird pacing and balance issues. This has been changed to instead give the colonizer a special ‘Colonial Rights’ diplomatic pact with the defeated natives, which lasts for the duration of the truce. During this period, colonization speed is doubled and no further uprisings can occur from that particular Decentralized Nation.

It is no longer possible to simply snipe Hokkaido away from the Japanese Shogunate, as they start with a claim on the Ainu-controlled parts of the island

Next up is a change to Diplomatic Plays that allows countries to expand their Primary Demands in a play. An issue that has been repeatedly identified by players since release is that once they grow strong enough, the AI has a tendency to back down against them in plays, ceding one war goal at a time and setting in place a five-year truce before the next demand can be made. While this does fit with the design principle that there should be a reason to want to back down, the end result could end up unduly frustrating and wasn’t just an issue for the player, either, as the AI of the USA struggled to reach the West Coast when it could only take one state off Mexico at a time.

To address this in a way that directly tackles the problem while still ensuring that it still isn’t simply best to always take your chances with a war, we’ve changed the concept of Primary Demand (ie the first war goal added, which gets enforced when backing down) to Primary Demands, which will all be enforced when the enemy backs down, and Secondary Demands, which will only be relevant if the play escalates to war. Just as it works right now, the first war goal added on each side is always a Primary Demand, but there are now ways to add more Primary Demands beyond the first.

Firstly, any war goal targeting the main opponent (or any of their subjects) that is added by Swaying another country to your side will now automatically be a Primary Demand. In other words, if you’re launching a play against France and they’re being supported by Spain, any country you sway to your side with a war goal targeting France will have that war goal added as a Primary Demand, while war goals targeting Spain are Secondary Demands. The AI understands this and will place higher value on Primary Demands, since they are much more likely to actually receive what’s promised by the war goal in the end.

Secondly, any war goals you yourself add can be made into Primary Demands if they target the main opponent (or any of their subjects). However, doing so is considered less ‘justified’ than adding Primary war goals through swaying, and so will cost an amount of maneuvers and generate an amount of infamy proportional to the cost of adding the war goal in the first place. This means that while adding more Primary Demands for yourself ensures that you receive them if you end up making them back down, it isn’t free, and is done at the expense of adding additional war goals or swaying more countries to your side. The AI is also going to receive some tweaks here to make them less likely to back down if you keep piling on Primary Demands, as at a certain point the unreasonableness of the demands just becomes too much to take without making a fight of it.

The cost of expanding your Primary Demands is entirely relative to the cost of the wargoal, so in the case of taking the small and depopulated state of Utah, it’s quite low

On the topic of AI, we move on to the final topic for today’s dev diary: Peace AI and War Exhaustion mechanics. Both of these have received a bunch of improvements in 1.2, though most of these improvements have not yet made it into the Open Beta. War Exhaustion, of course, is the rate at which a country’s War Support drops towards -100, at which point they are forced to capitulate. In the 1.1.2 version of the game, the main driver of War Exhaustion is occupation of territory, particularly wargoals and the capital, leading to the much-maligned ‘just naval invade Berlin’ meta.

In 1.2, you still get War Exhaustion from occupation, but the amount gained from occupied wargoals/capital is less, and War Exhaustion from occupation of other territory now scales non-linearly, with severity increasing rapidly as the country approaches full occupation: a fully enemy-controlled Modena will still capitulate quickly, while a Russia that has lost control of a few states in the Caucasus is barely going to be affected. Instead, the primary driver of War Exhaustion is now casualties and battles lost. War Exhaustion from Casualties now scale against the total available manpower for the country instead of its Population, so a country with an army of 10,000 is going to be much more affected by 5000 casualties than a country with an army of 100,000, even if the two countries have the same overall population. For available manpower, all regular battalions are counted (whether mobilized or not), but conscripts are only counted once they’re actually called in - so calling up more conscripts can be a way to directly affect your War Exhaustion rate.

Furthermore, War Exhaustion from Casualties now scales against the % of battles (proportional to battle size, so a battle of 100 battalions vs 100 battalions counts more than one of 5 vs 1) that your side of the war has lost. What this means is that a country which keeps winning battles can absorb far more losses than one which keeps losing them, and allows for battlefield victory to play much more directly into achieving overall victory in the war.

Even though the amount of casualties relative to army size are fairly similar owing to the massive Qing army, the British are losing war support at a much slower rate due to their string of battlefield victories


The AI for making peace has also received some upgrades. In addition to now just being better at constructing equitable peace deals through a rewrite of the core logic behind AI-made peace deals, the AI has also been made to consider more angles when deciding whether or not a peace deal is acceptable. Firstly, a new factor has been added called ‘achievable wargoal’, where the AI looks at whether a war goal is likely to be gained by the side that holds it through the capitulation of the target if a peace deal is not signed. Such wargoals, if held by the AI, will make them far more reluctant to sign peace unless those wargoals are part of the peace, while they are simultaneously more likely to accept the enemy pressing wargoals against them that they’d just lose anyway if the war continued. Secondly, the AI now looks at more additional factors for peace (such as the relative military strength of the two sides) and other factors have been tweaked, for example the size of AI Gold Reserves now has less importance than it used to.

Even though the Qing are offering considerable concessions, the British AI will refuse this peace deal because they believe they can get everything they want anyway once Qing is forced to capitulate

That’s it for today! This is of course not an exhaustive list of everything that’s been improved diplomacy-wise in 1.2, and there are a number of improvements still planned for future Open Beta updates, particularly on making the diplomatic AI behave in a more plausible way and be better at sticking by important allies, but details on that will have to wait for another day. Next week, we continue talking about the 1.2 Update as our tech lead Emil will tell you all about the improvements we’ve made to Performance. See you then!

Victoria 3 1.2 open beta makes some excellent UI updates

The open beta for the Victoria 3 update 1.2 is now available, and even after keeping up with the grand strategy game's ongoing series of dev diaries, it's already feeling like a surprisingly transformational patch. Victoria 3's latest update covers the changes the dev team is making to the user experience, which includes all the menus, tooltips, and other interface features that keep you abreast of what's going on in the complex world of the 19th century.


Read the rest of the story...


RELATED LINKS:

Victoria 3 update 1.2 open beta starts next week

Victoria 3 patch 1.1 is here with a colossal amount of changes

Victoria 3 beginner's guide