• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Victoria 3 - Dev Diary #68 - Patch 1.1 Changelog (part 4)

16_9.jpg

Hello and welcome to the final dev diary on the subject of patch 1.1! The release date for this patch is Monday December 5th, at 10:00 Central European Time. Your existing save games should be compatible* with 1.1, but as usual we will backup the old 1.0.6 version as a Steam beta branch you can rollback to if needed (e.g. for mod compatibility).

This is a chonky update so I'm not going to go over the entries in detail, but to get a more in-depth look at a few of the major things that have been added or changed to 1.1, you can take a look at our previous dev diaries.

Let's dig into it!

features.jpg

- Reworked Morale to inflict a base loss for every round of battle, modified by the difference in casualties inflicted between the sides as well as various other modifiers
- Reworked Legitimacy to provide bonuses and penalties to countries at different Legitimacy levels
- Added a new Legitimacy modifier based on Votes in Government
- Replaced Legitimacy Penalty from Government Size with a Legitimacy Penalty from Ideological incoherence
- Treaty Ports will no longer function if the owner's Power Rank isn't greater than the market owner's, ensuring Great Powers cannot use them to get access to the markets of other Great Powers

balance.jpg


- Rebalanced Legitimacy across all Laws
- Added Authority bonus to High and Very High Government Wages
- Added Morale Recovery and Power Projection bonus to High and Very High Military Wages
- Added Power Projection penalty to Low and Very Low Military Wages
- Lowered Training Rate penalty for Very Low Military Wages
- Lowered the positive and negative approval from Government/Military Wages
- Buildings will now only raise wages if they are either competing for wages or are below their minimum wage target; the target is based on employees' Expected Standard of Living to prevent too much active radicalization
- Building wage targets are lowered in unincorporated states (e.g. colonies) and for discriminated pops
- Laws that restrict cultural / religious tolerance now give a decrease to radicals and increase to loyalists from accepted cultures / religions - the more restrictive the law, the higher the effect
- Pops in Unincorporated States now have their voting power reduced according to current Incorporation level
- Mass migration now only targets incorporated states, to avoid colonies being the main target of mass migration rather than e.g. the New World
- Unincorporated states now have a lower expected standard of living than incorporated states
- Rebalanced potential Oil and Rubber deposits around the world
- Rebalanced Power Plant production method
- Reduced the impact of Artillery Commander traits
- Rebalanced Port production methods to (generally) increase Convoy production
- Rebalanced technology unlocks for potential Port levels to increase sizes over time
- Replaced Cape Colony with Persia as a recommendation for the Learn the Game objective
- USA no longer immediately starts losing its Interest in the Great Plains on game start

ai.jpg


- AI will not begin unifying Canada or Australia until Pan-Nationalism is researched
- Australian and Canadian confederation no longer forces the annexation of a player
- AI acceptance for white peace now increases over time the longer a war goes on
- AI is now less inclined to pursue annexation of subjects with whom they have good relations
- AI is now more willing to settle wars that are going nowhere with a white peace
- AI now also takes into account bankruptcy when considering peace desire, neutrality and confidence, not just debt level
- AI will now properly stop enacting a law to avoid revolution if it calculates this to be in its best interest
- AI will now properly use its investment pool when it can cover the entire construction cost, despite being in deficit
- Fixed native uprisings not mobilizing due to not being able to calculate their conscripts' power projection
- Improve the AI's understanding of when it should produce more military goods of a certain type
- Make the AI more interested in switching to more productive PMs, and less interested in switching to less productive ones unless there is a very good reason to do so
- Great Powers are much more likely to declare an interest in Arabia while the Ottomans are trying to reclaim Syria
- Liberia now begins independent, to discourage US colonization of Africa and to better reflect Liberia's de facto situation
- Changed incorrect check in Powerful Protectors that compared army size to country rank instead of army size
- Fixed some cases where the AI would use the wrong define for computing heuristics

interface.jpg


- Improves the Pop Details Panel with tabs and Consumed Goods
- Added a Good's current Trade Routes to the Goods Panel's Market tab
- Added a delay to opening map tooltips. The amount of delay is controlled by a new setting.
- Added pop consumption goods needs display to Economy and Consumption pop tabs
- Added "show more" button to the Population panel to display all categories, inspired by the "Complete Pop List" mod by Ron Swanson
- Make the Construction Queue building list items say their State as well as making the list items smaller, inspired by the "Construction Queue with States" mod by Seppiya
- Multiple changes to which notification types display as Toasts (middle of the screen) versus Feed (bottom right)
- Show usable manpower involved on each side of a battle in addition to the number of battalions
- The volume for Music Stingers and Background Music can now be adjusted independently in the Audio Settings screen
- Inactive Treaty Ports are now displayed as such, with a tooltip explaining why
- Active Production Methods are now non-clickable and more distinguishable from the rest
- Game rules are now visible even before you select a Player Objective in the New Game Interface
- Moved the Timed Modifiers higher up in the change Production Method tooltip
- The amount of unrealized taxes are now displayed in the country budget tooltip
- Transfer of Power information is now displayed better
- The outliner now shows the number of currently active unpinned Player Objective challenges and Journal Entries
- Update to the construction queue’s page buttons visuals
- Establish Trade Route Map List Panel can now sort markets alphabetically by name
- Updated text for convoy raiding order to better represent information to the player
- Right-align the Consumption tax cost in the add Consumption tax menu for better readability
- Removes decimals from Legitimacy modifier types

content.jpg


- Added decision to cancel surveys of Panama/Suez
- Added event greatly weakening the Shogunate if Japan is forced to open its market
- Skyscraper now has a Trade Nexus base PM as an option for Bureaucratic Nexus
- Changed the requirement for completing the Reading Campaign to only require 95% literacy.
- Made several repeating events fire less often
- Fixed various issues in 1848 content
- Expanded the name lists for North German, South German, North Italian, South Italian, and Thai cultures
- Added some variant unifier flags for Germany and Italy
- Germany's default flag is now the Black-Red-Gold tricolor
- Italy's default flag is now the Green-White-Red tricolor without the House of Savoy's coat of arms
- Conservative IGs such as the Landowners, Devout and Rural Folk now tend to be significantly stronger at the start of the game in most countries
- Fixed the large starting unemployment in several Decentralized Countries
- Reduced Hokkaido's population to historical levels
- Made events that strengthen abolitionism rarer in the USA
- Manifest Destiny decision now requires an Interest in the Pacific Coast
- Manifest Destiny now provide claims on the colonized split states of Mexico
- Alaska Purchase decision now has significantly easier requirements
- American West Expedition is now significantly easier to complete
- "The Dream" event for gold rushes no longer has one unequivocally better option
- Sub-Saharan African states now have more cultural homelands assigned to them
- Amended Great Qing flavor text to better fit its historical situation
- Reduced the urban center requirements for the Underground Railway Journal Entry from 30 to 20, and made the completion goal valid for cases where the country's capital and the country's market capital are in different states
- People's Springtime is now correctly triggered by a powerful Radical IG, not only through insurrection
- tanzimat_events.10 now requires Napoleonic Warfare
- migration_laws.6 now displays pop names correctly
- "A Tale of Hope" event no longer targets a null state
- "An Economic Prison" event no longer applies trade route effects to isolationist countries
- "Devout Scandal" no longer has a sentence starting with a lowercase letter
- "Elevating Our Situation" journal entry has been made less convoluted
- "Expand the East Indies Administration" is now visible whenever the Dutch East Indies exists
- "Mutually Beneficial" event now applies the correct popularity modifiers.
- "The Rogue Imperialist" event can no longer cause a diplomatic incident with yourself
- Austrian-formed Germany no longer has the Matter of Hungary Journal Entry
- Fixed many issues in cultural_homelands_events
- China now re-incorporates the states of the Heavenly Kingdom upon defeating the rebellion.
- Commanders can no longer cheat with their own spouses
- Defeat in the Opium Wars will now remove opium bans and opium ban Authority cost
- Countries with the Free Trade law can now remove trade bans but not add them
- Doctrine of Lapse decision for the British East India Company now has a proper cooldown of two years
- Elitist ideology now has a stance on theocracy
- Ethiopia now requires at least two fully controlled states to form
- Poland now requires only 5 Polish states to form rather than 7
- Event "Campaign Financing" now requires active parties to fire
- Expand Productive Building tutorial challenge now tests if the player can actually expand the target building an additional level before selecting it as a target building
- Italian nations classified as minor powers may now participate in Risoregimento
- Efficient Home Affairs modifier is now actually efficient
- Made the "Good Word of the Revolution" event less spammy
- Mustard Gas no longer permanently applies modifiers to states
- North German Federation, South German Federation, and Italy are now formable if all completion requirements are achieved before Nationalism is researched
- Numerous law enaction events will now fire properly, and not auto-cancel
- Paying for school supplies now costs bureaucracy instead of benefiting it
- Philip Sheridan's birth date is now correct
- Presidents in Republics now die less frequently
- Railway research bonus in the Atmospheric Engine tech event now requires all railway prereqs to be unlocked
- Resolved edge case where native_resettlement.4 has no options
- Resolved issue with error spam when China was annexed
- The Free States of America's name now shows up in its secession event
- The Ripper can no longer be a child or toddler
- Tooltip for "How to Reform your Government" tutorial will no longer flood the error log
- West America expedition now removes event tracking variables properly
- Bureaucracy tech no longer uses the same localization key as bureaucracy concept

modding.jpg


- Cleaned up defines to remove unused ones
- Renamed some defines to be more precise about what they do
- Exposed several parameters of character life expectancy calculation as defines

majorbugfixes.jpg


- Fixed font atlas not notifying the map system when textures where recycled, leading to garbled map names especially frequent in Chinese, Japanese, and Korean languages
- Enabled new logging system that prevents log files from growing too large
- Fixed overflows in politics related math that could lead to weird values for political strength of pops, or amount of votes in elections, and other such things
- Fixed an issue that led to most characters having a natural lifespan in excess of 90 years
- Fixed computation error that made it possible to have two highly profitable routes trading the same good back and forth between two markets
- Fixed an issue that made the "force open market" and "ban slavery" wargoals forbid the affected country from changing policy for 60 years instead of 60 months
- Fixed an overflow in gold reserves limit
- Fixed a bug that would cause garrison units to not recover morale
- Ensures that angry IGs always leave the government if able to do so, even when in a party
- Fixed an issue where tariffs would incorrectly be paid out to market owner from tariff-exempt trade routes
- Revolutionary and seceding countries can no longer engage in colonization until the civil war is over
- Discriminated Pops now have their Political Strength reduced by 90% as intended
- Pops in Unincorporated States now get a 50% penalty to Political Strength as intended
- Battalions are now assigned to battles in order of descending usable manpower (including Morale)
- Countries can no longer make progress on colonies in regions without maintaining an active Interest there
- Subjects no longer have to ratify a peace deal if their overlord does, even if they have diplomatic autonomy
- Expedition leaders are now always properly returned to service upon expedition conclusion
- Expeditions no longer automatically fail after turning back on the Niger River
- Expedition modifier for expedition taxes now removed upon expedition end
- Fixed general travel exploit that would allow to teleport generals by alternating orders towards the same destination
- Fixed a general travel duration exploit that was possible when giving several orders targeting different destinations, causing GENERAL_TRAVEL_OVERSEAS_SCALE to sometimes not be applied
- Fixed a bug where making a general return to a previous location during travel would sometimes apply GENERAL_TRAVEL_OVERSEAS_SCALE
- Military buildings are now unable to provide more Battalions or Flotillas than their level can support
- Fixed the bug when Cut Down To Size wargoal would liberate conquered states regardless of when they were acquired
- Fixed a bug that would cause only one admiral to be able to defend against naval invasions
- Fixed a bug that allowed an admiral to be able to naval invade a state that has no passable coastal provinces controlled by the enemy
- Fixed an issue that caused secessionist countries to not being able to be targeted by diplomatic plays even after they win the secession war
- Fixed a bug where Treaty Ports could give you access to markets in states outside the same state region
- Fixed bug where market access was not updated in states split due to ceding a Treaty Port or gaining independence
- Fixed the bug when status of convoy raiding wasn't displayed on the map nodes
- Combat unit allocation between commanders is now recomputed if a commander loses their role
- Failed or timed out Journal Entries won't be triggered by an Objective again unless marked as repeatable
- Fixed an error that caused the building tooltip to display incorrectly and produce error log spam when the building was built in a state with an apostrophe in its name
- Fixed commonly occuring crash caused by offscreen GUI VFX not being cleaned up properly
- Fixed crash when running out of cloud storage space for save files
- Fixed OOS for Elections when hot-joining
- Fixed a crash that would happen when the same peace deal is accepted at the same time in multiple wars
- Fixed crash when listing saves
- Fixed crash arising from cultural_homeland_events.1
- Fixed crash during commander generation

minorbugfixes.jpg


- Fixed issue with displaying country names for civil war countries
- Ensures the correct number of Battalions are reported for both Regulars and Conscripts on various panels and tooltips
- Death notifications no longer fire upon the retirement of a politician
- Fixed an issue in prediction tooltips where Peasant goods consumption was incorrectly calculated, causing price predictions to be wrong for certain goods
- Fixed an issue where price predictions for pop-consumed goods would get increasingly inaccurate the longer the game went on due to old data not being properly cleared
- Fixed flickering map mode in the culture panel
- Fixed front map markers not showing up correctly in Observer Mode
- Fixed overlapping text of the options in the Sway Country Panel
- Fixed overlapping text on the Nation Formation panel to not overlap
- Fixed text overlapping and alignment issues on the War Panel
- Fixed the Diplomatic Play title text to not overlap the flags when very long
- Fixed 'You' label being visible for other players in the War Panel in a Multiplayer game
- Fixed invalid diplomatic relations expandable tooltip
- Fixed wrong scope provided to on_sway_offer_rejected
- Added missing localization for is_direct_subject_of
- Fixed a missing texture that would appear in the war tooltip when the initiator of a diplomatic play had obtained all of their declared war goals
- Fixed an issue that made it possible to change government or military wage rates when the country wasn't actually paying any government / military wages
- Fixed incorrect text that would appear in the war tooltip when either side of a diplomatic play had obtained all of their declared wargoals
- Fixed notifications accidentally appearing twice when closed
- Fixed typo in Pop Properties tutorial lesson
- Fixed missing text for Annex Subject Diplomatic Play Tooltip
- Korean officers now wear clothes
- Male Academics and Capitalist pops no longer carry parasols
- Dinka slave pops are now properly naked
- The final fallback for character clothing is now peasant's clothes instead of a birthday suit
- The Confederate States of America should now always be called such during the American Civil War
- Taiping Rebellion war name is now properly localized
- Corrected spelling issues with Australian hubs and Theodore Roosevelt
- Commanders-in-Chief now use the correct Character background on their Character Panel
- Fixed unlocalized string in the load game button in the multiplayer game over screen
- Resolved several typos in the country flavor text for Parma, Modena, and Krakow
- Fixed spelling of "Van Diemen's Land", "Concepción", and "Legazpi"

* A known issue with loading 1.0.6 save games into 1.1 is that the Bureaucracy tech will be "forgotten" and has to be re-researched. If you don't want to do this in-game, you can fix it by running your game with the debug console enabled in the launcher, loading up your save game, opening the console, and typing 'research tech_bureaucracy'.

We hope you enjoy this update! Please continue to provide your feedback and make sure to let us know if you run into any other bugs so we can continue to improve the game for the next free patch 1.2. We will return to discuss our next plans for the future next Thursday!
 
Last edited by a moderator:
  • 167Like
  • 75Love
  • 14
  • 2
Reactions:
Are there any current ideas for changes to supply chain logistics in buildings based on distance from their inputs? It feels really weird to have something like iron mined in Australia to be just as efficient for a factory in Britain to use rather than iron mined either in the same province or nearby.
I think they are looking at giving a bonus for inputs from the same state.
 
  • 1
Reactions:
In negliable numebrs and not scaling with the transported goods/orders.
It is weird that convoys aren't serving as "sea infrastructure" even if the ocean is treated as "one province".

(Likewise what happened to capping railways at the level of raillines connected to the market capital? It seems a really easy and communicatable thing that a big rail line 50 over needs a long supply chain.)
 
  • 1
Reactions:
I've set up a game and a desmos project to clear up this confusion.
Thank you for the additional visualization. There is already a Desmos project by @Ekcrbe in another thread which can be accessed. At least from my perspective there really is no confusion here. I only was unsure whether the wiki formulas were correct or not. But @lachek fortunately cleared this up. I think I understand the results with the wiki formulas quite well. At least well enough to solve the integral, which takes a long time to compute, by hand and not only for one trade route but also for an arbitrary number of trade routes between an arbitrary number of markets.
(Have to use dots because integrals take a long time to compute).
Maybe you could solve the integral analytically (either by hand or with something like mathematica) and plot the resulting function directly.
I guess the root of the problem is the way trade routes expand - way beyond maximum trade route profit. This would not be solved by using "true profit" since it's pretty close to the current formula. The new formula seriously underestimates trade route profits, but will make routes converge more realistically, i.e. before price inverse point
I would not say that this is the root of the problem. But it is definitely part of it. This is exactly what happens when you take the discrete derivative in the way it is currently implemented.

A good overview is the following:
Currently there are two problems:
(I) The point of maximum profit is at a point of price inversion. In your example it is something like 400 while the price difference is 0 at approximately 320. The numbers are a bit hard to guess from the attached screenshot. But if you provide your pre-trade buy and sell orders, I can give you the exact numbers.
(II) The profit optimization algorithm is not exact. It overshoots the point of maximum profit. In your case this is 480.


If you just fix the optimization, (I) will remain the same but you will get exactly this value. You will still be at point of price inversion though. Also note that this is non-trivial to do when multiple trade routes are involved. Although you could use a slightly modified version of the optimization algorithm I posted for post-trade prices.


If you just calculate the accumulated ("true") profit correctly, point (I) will be fixed. The point of maximum profitability will be exactly at the point where the final price difference is zero (assuming no costs). You can clearly see this in your project. It is also guaranteed by a mathematical theorem. So it cannot get any better in terms of protection. The assumptions for the fundamental theorem of calculus are clear in your very easy example with just one trade route. With arbitrary many trade routes you have to be more careful. But if you are smart about the ordering of trade routes, everything works out fine. If you account for costs, the maximum will be exactly where the final price difference is equal to the costs, i.e. there is no marginal profit to be made. In your screenshot this seems to be approximately 320.
But we are both correct insofar as (II) will remain a problem. The current optimization will not be able to exactly find this point in (I) and might overshoot. My point was that this is the only thing that can go wrong as explained in the post you quoted. In your example this will probably be somewhere between 330 and 405. Note that this is very difficult to estimate, as it depends very closely on the discretization. Therefore, the large range given. In order to give you the exact number for your example, I would need the exact market condition pre-trade and the size of your level 8 and 9 trade routes.

The good thing though is that in the case of the accumulated profit the condition for maximum profitability is very easy to state. In fact we already know where it is maximal by the fundamental theorem of calculus. Therefore, it is easy to just replace the current imprecise optimization by a correct one. You just need to check how final price difference relates to cost. Two values which are already easily available in the current economic system. Therefore, one can also fix (II) with very little additional work and get a system where price inversions are impossible. This is the reason why I always proposed to also change optimization, if one uses the integral calculation. In this case (II) is really the minor problem of the two, as the integral calculation for multiple trade routes is a lot more difficult than the optimization.


If you for some reason want to keep the current imprecise optimization algorithm, you need a more robust profit formula. In fact one can show that it is necessary to have a formula which fulfills the property that the profit is smaller or equal to zero at any point of price inversion. Using post-trade prices is obviously one option. But in fact there is a class of infinitely many functions which give you more profit than post-trade prices but still fulfill this property. Suitable for application in Vic3 are the weighted harmonic means of pre- and post-trade price differences of a given trade route. These have the advantage that they are easy to implement, as you just have to change the profit formula. They protect from price inversions but still give quite a bit more revenue and a higher amount of traded goods than just post-trade prices. Therefore, they are a good candidates, if post-trade prices are insufficient but one does not want to implement something as complicated as the integral solution.
 
  • 2
  • 1Like
Reactions:
- AI acceptance for white peace now increases over time the longer a war goes on
Am playing as indian and was so close to get the very hard at achievement, at start i use the FRE as a backer.
But now i have a war whit the USA for 2 states, and the FRE has some of the state ind the war. so they get % tik = white peace :`(
dont know why, they dont have any states taken from them :(


old pic.
20221203125044_1.jpg
 
The pricing function is linear, ranging from 0.25 to 1.75 of base price and reaching those bounds when sell / buy is 2:1 and 1:2 vice versa and progressing linearly based on the ratio between buy and sell orders in between. Not sure where the claim to a concave pricing function is coming from, this is pretty well outlined in both tooltips and the defines file (the PRICE_RANGE and BUY_SELL_DIFF_AT_MAX_FACTOR defines in particular).


This is incorrect, the pricing function is not linear.

ratio = (buy - sell)/min(buy,sell), clipped between -1 and +1.
Market Price = base * (1 + 0.75 * ratio)

Because buy, sell are in the denominator of that ratio, the price function is not linear, it is curved in buy and sell orders (yes it is linear in the ratio, but the fact that it is ratio makes it non linear in the things inside the ratio). The `correct' average which would model the process of traders buying incrementally causing a gradual price movement from x -> y is obtained by performing an integral of this function, and it is not an arithmetic mean of x and y because of the non-linearity. It is a piecewise function that contains linear and logarithmic terms. It is not an arithmetic mean, but it is something that could easily be coded and efficiently calculated if desired. I am happy to provide the maths, though it was also in the threads that @durbal linked. If the price function used the 'correct' average, then a trade from an expensive market to a cheap one could never be maximally profitable if only two countries are involved (on the other hand, most of the issues in the past were coming when lots of countries were in involved in the trading rather than when there were only two participants, and in that case my feeling is that the only pricing based solution is to use market price, see my post after this one). The arithmetic mean allows for trades from an expensive to a cheap market to be maximally profitable, it is a pure mathematical fact that can be proven (and has been proven in these other threads) just from the pricing function, regardless of what other changes have been made to the way that routes grow and shrink. It also allows the mathematical possibility of profitable circular trades, even though the situation has otherwise been apparently resolved in a different way in the trade growth/shrinking mechanics.

Edit: I should have replied to @lachek instead.

Edit2: Sorry, I just caught up with the thread and saw this was already discussed by @Tempscire

While I'm here, I just want to plug the side suggestion that I think max would make a lot more sense in that function than min, and probably give better gameplay results. It would be great if these things were modable.
 
Last edited:
Thank you for the additional visualization. There is already a Desmos project by @Ekcrbe in another thread which can be accessed. At least from my perspective there really is no confusion here. I only was unsure whether the wiki formulas were correct or not. But @lachek fortunately cleared this up. I think I understand the results with the wiki formulas quite well. At least well enough to solve the integral, which takes a long time to compute, by hand and not only for one trade route but also for an arbitrary number of trade routes between an arbitrary number of markets.

Maybe you could solve the integral analytically (either by hand or with something like mathematica) and plot the resulting function directly.

I would not say that this is the root of the problem. But it is definitely part of it. This is exactly what happens when you take the discrete derivative in the way it is currently implemented.

A good overview is the following:
Currently there are two problems:
(I) The point of maximum profit is at a point of price inversion. In your example it is something like 400 while the price difference is 0 at approximately 320. The numbers are a bit hard to guess from the attached screenshot. But if you provide your pre-trade buy and sell orders, I can give you the exact numbers.
(II) The profit optimization algorithm is not exact. It overshoots the point of maximum profit. In your case this is 480.


If you just fix the optimization, (I) will remain the same but you will get exactly this value. You will still be at point of price inversion though. Also note that this is non-trivial to do when multiple trade routes are involved. Although you could use a slightly modified version of the optimization algorithm I posted for post-trade prices.


If you just calculate the accumulated ("true") profit correctly, point (I) will be fixed. The point of maximum profitability will be exactly at the point where the final price difference is zero (assuming no costs). You can clearly see this in your project. It is also guaranteed by a mathematical theorem. So it cannot get any better in terms of protection. The assumptions for the fundamental theorem of calculus are clear in your very easy example with just one trade route. With arbitrary many trade routes you have to be more careful. But if you are smart about the ordering of trade routes, everything works out fine. If you account for costs, the maximum will be exactly where the final price difference is equal to the costs, i.e. there is no marginal profit to be made. In your screenshot this seems to be approximately 320.
But we are both correct insofar as (II) will remain a problem. The current optimization will not be able to exactly find this point in (I) and might overshoot. My point was that this is the only thing that can go wrong as explained in the post you quoted. In your example this will probably be somewhere between 330 and 405. Note that this is very difficult to estimate, as it depends very closely on the discretization. Therefore, the large range given. In order to give you the exact number for your example, I would need the exact market condition pre-trade and the size of your level 8 and 9 trade routes.

The good thing though is that in the case of the accumulated profit the condition for maximum profitability is very easy to state. In fact we already know where it is maximal by the fundamental theorem of calculus. Therefore, it is easy to just replace the current imprecise optimization by a correct one. You just need to check how final price difference relates to cost. Two values which are already easily available in the current economic system. Therefore, one can also fix (II) with very little additional work and get a system where price inversions are impossible. This is the reason why I always proposed to also change optimization, if one uses the integral calculation. In this case (II) is really the minor problem of the two, as the integral calculation for multiple trade routes is a lot more difficult than the optimization.


If you for some reason want to keep the current imprecise optimization algorithm, you need a more robust profit formula. In fact one can show that it is necessary to have a formula which fulfills the property that the profit is smaller or equal to zero at any point of price inversion. Using post-trade prices is obviously one option. But in fact there is a class of infinitely many functions which give you more profit than post-trade prices but still fulfill this property. Suitable for application in Vic3 are the weighted harmonic means of pre- and post-trade price differences of a given trade route. These have the advantage that they are easy to implement, as you just have to change the profit formula. They protect from price inversions but still give quite a bit more revenue and a higher amount of traded goods than just post-trade prices. Therefore, they are a good candidates, if post-trade prices are insufficient but one does not want to implement something as complicated as the integral solution.


One issue that these analyses don't really cover is the case of multiple trade participants, rather than only two. And in practice, this is usually how the problems were emerging in my games, many countries are piling on. Are there any solutions other than using final market price that are robust under multiple importers? I don't imagine that there can be any such solution.

Consider country B imports from A, driving the price in A from 10 -> 30, with a buy price of 20 under the arithmetic mean, or say x under some other mean. Another country C with market price anywhere between x and 30 can come along and engage in a profitable trade from an expensive market to a cheap one. The only thing that would forbid this using a purely pricing mechanism is if x=30, no?


If the game excluded only one trade route at a time from the calculation of the pre-trade price, rather than all the exporting or all the importing ones, then the various other price-based solutions would be applicable. And to be honest, I imagine that change in of itself would in practice resolve a lot of the expensive -> cheap trade route issues that I am seeing even without pricing mechanism changes.

Also, I think it's worth commenting on this:

(I) The point of maximum profit is at a point of price inversion. In your example it is something like 400 while the price difference is 0 at approximately 320. The numbers are a bit hard to guess from the attached screenshot. But if you provide your pre-trade buy and sell orders, I can give you the exact numbers.

There is also the question on whether a route maximizing profit is the correct objective, or maximizing trade volume subject to the constraint of positive profit. The latter is the more realistic objective for a competitive market, but can only give a realistic outcome I think using post-trade prices. For a monopoly, the first makes sense, but then how are the competing interests of multiple countries to be taken into account?

It might be that using post trade prices but having routes grow to maximize volume subject to positive profit constraint might give gameplay results that the devs want. Currently it is a little closer to maximizing profits, but not quite. Routes grow until a further growth would cause more than a 10% drop in profit (among a couple of other requirements)
 
Last edited:
i hope they don't slap *another* throughput bonus
Maybe they could give a slight rebate in purchase costs of local input material (since the market prize includes average worldwide shipping, and in-state material needs to get shipped less distance) - so building steel mills in coal/iron regions would be slightly more profitable?
 
  • 3Like
Reactions:
Maybe they could give a slight rebate in purchase costs of local input material (since the market prize includes average worldwide shipping, and in-state material needs to get shipped less distance) - so building steel mills in coal/iron regions would be slightly more profitable?
Market access multipliers for goods would make it that way (steel having a higher market access than iron since it is easier to carry)
 
Well, this patch is a start. I'm very glad to see attention paid to the economy-breaking trade issue, and I'd like to see how the fix so far is working.

Unfortunately, as long as the construction costs exploit is extant, I can't bring myself to even try to play. Maybe that'll be fixed in 1.1.1 ? https://forum.paradoxplaza.com/foru...s-free-construction-100-reproducible.1552282/

Then maybe I will be able to even look at the military situation.
 
One issue that these analyses don't really cover is the case of multiple trade participants, rather than only two. And in practice, this is usually how the problems were emerging in my games, many countries are piling on. Are there any solutions other than using final market price that are robust under multiple importers? I don't imagine that there can be any such solution.
Actually all my suggestions cover the cases of arbitrarily (finitely) many trade routes. At first I just looked at one route, as the easy case is required to get some form of intuition for the system. But I spent most of the analysis on many trade routes, as this is the far more interesting case. I just illustrated this in an example with one route, as I replied to a post regarding an easy one route example.
Consider country B imports from A, driving the price in A from 10 -> 30, with a buy price of 20 under the arithmetic mean, or say x under some other mean. Another country C with market price anywhere between x and 30 can come along and engage in a profitable trade from an expensive market to a cheap one. The only thing that would forbid this using a purely pricing mechanism is if x=30, no?
I think you need to be cautious here when you take the mean. As the harmonic mean is no longer linear this makes quite a difference. My suggested implementation would not allow C to make any profits. Lets calculate, take for example a price of 30 in C, this should rule out your worries:
The price difference before any trade between A and C is 20, the price difference without just the A->C route is 0. The post-trade price difference is negative, as the A->C route increases the price in A and decreases it in C. Lets say it is -y, with y>0.
There are two options: Either compare with the first or with the second price:
(i) Here we have P(A,C)=harm(20,-y) per convention this is -2/(1/20+1/y) which is certainly a negative number. Therefore, the route makes a negative amount of profit even without any costs. Just like in the post-trade price case.
(ii) P(A,C)=harm(0,-y)=0 per convention. Therefore, the route makes zero profit.

In either case the route can not be profitable.

If the game excluded only one trade route at a time from the calculation of the pre-trade price, rather than all the exporting or all the importing ones, then the various other price-based solutions would be applicable. And to be honest, I imagine that change in of itself would in practice resolve a lot of the expensive -> cheap trade route issues that I am seeing even without pricing mechanism changes.
You should be careful with this however. This can lead to infinite loops with the arithmetic mean. Lets say we have A->B with 100 goods and B->A with 100 goods. A,B have base price. Then each of these routes has a positive price. If you just discard one route the other remains and gives you a positive pre-trade price. While prices in such a constellation should clearly be zero. The harmonic mean would clearly fix this.
There is also the question on whether a route maximizing profit is the correct objective, or maximizing trade volume subject to the constraint of positive profit. The latter is the more realistic objective for a competitive market, but can only give a realistic outcome I think using post-trade prices. For a monopoly, the first makes sense, but then how are the competing interests of multiple countries to be taken into account?
That is a good question. It probably takes quite a lot of testing what is better for the game and I obviously cannot give you an answer to this just from mathematical knowledge. I guess it is very hard to tell what is the most realistic solution and probably up to the devs to decide which is the best for the game. I can just say that profit optimization is the hardest to do and it is quite easy to make the algorithm worse at optimization to obtain something which comes closer to maximizing volume.
It might be that using post trade prices but having routes grow to maximize volume subject to positive profit constraint might give gameplay results that the devs want. Currently it is a little closer to maximizing profits, but not quite. Routes grow until a further growth would cause more than a 10% drop in profit (among a couple of other requirements)
The problem here might be that profits get very low, as post-trade prices give relatively low profits and the worse your optimization is, the worse the profits get. This is maybe the reason the devs used average prices in the first place. So if such a solution is sufficient is probably up to the post-trade testing which is currently done.
 
I think you need to be cautious here when you take the mean. As the harmonic mean is no longer linear this makes quite a difference. My suggested implementation would not allow C to make any profits. Lets calculate, take for example a price of 30 in C, this should rule out your worries:
The price difference before any trade between A and C is 20, the price difference without just the A->C route is 0. The post-trade price difference is negative, as the A->C route increases the price in A and decreases it in C. Lets say it is -y, with y>0.
There are two options: Either compare with the first or with the second price:
(i) Here we have P(A,C)=harm(20,-y) per convention this is -2/(1/20+1/y) which is certainly a negative number. Therefore, the route makes a negative amount of profit even without any costs. Just like in the post-trade price case.
(ii) P(A,C)=harm(0,-y)=0 per convention. Therefore, the route makes zero profit.

In either case the route can not be profitable.

My apologies, I misunderstood your solution and thanks for the clarification.

I was thinking of a buy price, which is averaged between initial and final prices in the exporting market, and a sell price, which is averaged between initial and final prices in the importing market, and take a difference, as the game currently handles this.

But if I have understood you correctly, you mean to take an average between initial price difference and final price difference. I suppose this makes more sense as a model of a trader buying and selling small batches.

I guess it is very hard to tell what is the most realistic solution and probably up to the devs to decide which is the best for the game

For realism, I would just open up a history book and look whether trading routes tended to be operated by monopolies that had power to suppress competition or by collections of smaller self-interested entities. For best for the game, I think the discussion below is relevant.


The problem here might be that profits get very low, as post-trade prices give relatively low profits and the worse your optimization is, the worse the profits get. This is maybe the reason the devs used average prices in the first place. So if such a solution is sufficient is probably up to the post-trade testing which is currently done.

Well there were two comments by wiz that we are eternally speculating over, one about trade profits, the other about trade volumes and prices getting pushed to base everywhere. My own parsing of the comments was that the impact on trade volume and goods prices was the core issue, and the insufficient profits was diagnosed as the reason, which makes sense if you take as a given that trade centers are acting as monopolies and are only trying to maximize profit rather than volume. It also makes more sense to me, if I put myself in the devs shoes, to be more concerned about the impact of trade on the wider goods economy, rather than be fixated specifically on how much money traders are making as an end in itself. But we can only read the tea leaves on this.

The goods pricing issue though is a puzzling one to me, because if the original problem was 'prices always too close to base', I can't fathom why 'make prices even higher in the exporting country and lower in the importing one' is regarded as a solution, it just pushes the problem further in wrong direction. The two statements that were made in that dev diary also seem to conflict 1. "There was insufficient trade" and 2. "Prices would equalize to base for all goods everywhere". The latter would be a result of maximal trade, in a system where trading is priced realistically and there are no transport costs. Somehow it seems preferable for trade volumes to go higher than maximal, in order to cause price inversions that allow prices to differ substantially from base, just in a direction that doesn't really make much sense. This is honestly how I read it. The prices are more 'interesting' in the current system, and that in of itself is treated as good.

The other aspect that was mentioned was making exporting economies more attractive. But this isn't actually done with trade profits, because all the trade profit goes to traders in the country that set up the route, which in practice is usually the importer. The manner in which the currently implemented system aids exporters (or hurts, depending on your point of view) is by increasing the price of the good in their market beyond what realistic trade could achieve which gives their producing industry more profit. This is a feature of trade volumes becoming excessive and going into price inversion territory. So again it all seems mostly trade volume motivated at core, with trade revenue being mostly a dial that goes into that calculation.
 
Last edited:
Maybe they could give a slight rebate in purchase costs of local input material (since the market prize includes average worldwide shipping, and in-state material needs to get shipped less distance) - so building steel mills in coal/iron regions would be slightly more profitable?
This was actually my original idea, but as of now, the only way for the price of something to be different is to lose market access, so I'm not sure if making it so prices could be set separate from the market would be an easy change or break something else with the economy. The reason why a throughput bonus is usually suggested is because it's one of the only modifiers in the game ATM that benefits both the input good producer (more demand) and input good user (less employees required for same output) with the justification being that less employees are needed to handle the input goods since it's so close by.
 
  • 1Like
Reactions: