################################################################

######## Patch 1.5.1 "Cornflakes" ########

################################################################



##################################

# AI

##################################

- "Desperate AI" improvements, ai know does not switch escape provinces as long as last one valid and fixed a case where it can try to escape a province that is also desperate

- fixed a case where armor divisions were being allowed in defense fronts



##################################

# UI

##################################

- Fixed positioning of add army portrait btn.

- Fixed Zaibatsus Challenged tooltip issue.

- Fixed balance, tooltips, and events for ideology switching decisions.

- Fixed border clash focus icons lost gfx

- Added infantry tech level 3 3D model. Copies lvl 2 version.

- Fix construction showing more building levels to be repaired than what was constructed.

- fixed naval production gui not updating when you switch equipment

- fixed ui scaling no longer breaking tooltips

- added tooltip that explains increased capacity for garrison orders

- Fixed battle plan tools going behind army list stopping you from training on small screens

- Danzig for Guarantees now mentions getting Poznan as well.

- fix for minimap positioning with UI scaling

- fixed drag and drop not working with ui scale

- Division Designer > Better layout, with instant preview when mouse over the edited battalion.

- Aligned division count on badge in theatre view to match army badge.

- Right click on an army group leader portrait while having unassigned divisions, will assign them to it's sub groups in a smart way.

- Added bunch of generic focus icons.

- Added icons for German CV CAS tech level 3, with a flavour names.

- Fixed icon for generic focus for tank production.

- Added icon for attack switzerland focus.

- Minimap is now working with scaled interface.

- Fixed a missing picture in a stability event.

- Adjusted trade window resource quantity label to be large enough to show more than three digits instead of wrapping.

- Updated leader promotion message to clarify that the decrease in skills will be temporary.



##################################

# Modding

##################################

- Added cancel_trigger to all types of decisions. cancel_trigger will not run remove_effect when true.

- Missions now use cancel_trigger to abort before completion and remove_trigger to remove and run remove effect if the decision stays in the interface.

- Added modifier army_org_regain

- Fixed "random variables" being broken with tooltips

- fixed an issue where mods were loaded in wrong order and couldnt overwrite DLC

- When using the effect add_offsite_building in a wrong way, the error log will warn about it.





##################################

# Database

##################################

- removed a focus from PRC 1939 start that caused an error

- Fix for two wrong division name lists in the 1939 start

- Event pictures "communists cheer" and "American hunger strike" now have interface entries

- unlocked Chennault as adviser for manchukuo and reduced cost for him

- Reenabled generic tank manufacturer idea for countries without

- Returned Samoa to its (then) rightful owner

- "Forced loans" decision is now repeatable.

- Assertiveness focus now bypasses if manchukuo is already free.

- Communist Japan can now only call for Soviet Volunteers once

- Unaligned Germany's Anti-Comintern Pact no longer invites India and China and other Asian minors that don't border SOV.

- Blow the Suez Canal event now has correct localisation.

- "Object to Attachés" decision is now more limited and its effects now depend on relative strength of nations.

- AST and SAF no longer locked out of Appeasement tree by Germany opposing Hitler.

- Adjusted bypass requirements for "Danzig for Guarantees", "Safeguard the Baltic", and "Support the Finns".

- "Schlieffen Once More" is now available in case of Franco-British Union.

- Added some missing (and fixed some existing) text translations to Russian.

- Political advisors unlocked from PRC/CHI focus trees, are now available to warlords that take over the government.

- Fixed some missing event pictures in Japanese border war.

- Added plenty of missing texts translations in various languages.

- Added bypasses to the "Japanese Non-Aggression Pact" focuses.



##################################

# Balance

##################################

- Germany should no longer lose 50% of its equipment upon starting the Oppose Hitler civil war.

- Communist Chinese focus tree, now get's some infantry equipment production bonuses, for better gameplay balance.





##################################

# Bugfix

##################################

- Prevented exploit of tech swapping military doctrines by starting level 2 tech in the current branch before switching to a different branch.

- Fixed Chinese Industry Relocation decisions to check for control of state.

- Changed remove_trigger to cancel_trigger for Political Struggle decisions to avoid sudden influx of points when someone claimed national leadership

- Reinstate Imperial Possessions no longer removes core for Alsace from France.

- Fixed not creating combats while moving into provinces that has combats that you can't join (where both are enemies)

- Made "Triumph for X" decisions non-repeatable.

- fix for double inflation spirit appearing under certain circumstances

- their cores are no longer lost when you puppet a nation (fixes soups in peace deals when AI cant liberate for example)

- Now guarantees can be mutual (fixes a path in japanese focus tree)

- Fixed frontlines around wastelands sometime disappearing.

- JAP nuke surrender decision now clears global flags

- PRC that takes over through political struggle will not inherit negative spirits from China

- added bypass checks for Confrontation with the warlords focus

- blocked taking national leadership if subject or leader is subject

- Fixed a case which could prevent nations from ever surrendering

- Manchukuo now loses Kwantung Veto when released through the Japanese focus tree.

- Changed local_org_regain to army_org_regain for communist china's spirits

- added bypass checks to Finish the Fight focus for japan

- Fixed planes being engaged in combat in another region than the one they are assigned to

- Added recalculation of support points if a state involved in the struggle changes controller

- Fixed an issue where states would show as being part of the strugle, though they were controlled by an enemy nation.

- Fixed female unit leaders being converted to males on save/reload

- Surprise Attack Plan idea for civil wars is now functional.

- Creating a Manchurian Airforce focus will now bypass if MAN does not exist

- Enabled increase Airlift decision for a China that is in the United Front

- Fate of the Imperial Family no longer requires Manchukuo to exist.

- Decision to escalate to a border conflict is now cancelled if in faction with the target

- Fixed issue where decisions updating decisions to remove could skip an element in the array if one was supposed to be removed

- fixed an issue where Manchuko's Assertiveness branch broke if Japan went with support Kodoha (lost Puyi, lost special autonomy level)

- Forcefully removing support for opposition in a state now properly reduces the gloabl support for the leader of China

- Added bypass trigger to Japanese focus Triparte Pact if either Germany or Italy is not fascist or Japan is at war with either of them

- Secret CIA reference now actually works (maybe. but thats CLASSIFIED)

- Removed max trait limit from unit leaders

- Fix for awake and angry achievement not working

- fixed a US resource decision pointing to the wrong state

- Adjusted Wilhelm II and von Mackensen minimum/average death dates.

- Fixed the never ending "connecting..." message when you fail to connect to a multiplayer session. The max timeout is 30sec, but now it will finally say "Failed to connect".

- Fixed attaches adding ideas twice on save/load.

- Fixed a double-Stalin-bug. If a player right click on a country with a leader, and then on your own country that is missing a leader portrait, it still shows the previous country portrait.

- Battleplans > Fixed bug in defensive orders being auto merged when painting them.

- Fixed a number of issues with Romania in base game without DLCs enabled.

- Fix for wrong event being fired from SAF decision.

- "Fall of Cairo" event now gives correct Italian leader

- Fixed "replace_path" not working for mods downloaded from the workshop.

- Socialism with Chinese Characteristics no longer creates a faction if player is already in one.

- Fixed missing occupying country name in the tooltip.

- Various generals generated from focus trees (or other effects) now has correctly scripted skill levels.

- Overall garrison order improvements.

- Fixed a bug where strikes from demobilization would be impossible to remove by restarting demobilization mission immediately on timeout.

- German focus to "align Hungary or Romania", now bypass if the country does not exist or is already a subject of another country. Effect from focus to integrate them now only gives factories to the country that becomes a puppet of Germany.

- It is now possible to bookmark with Ctrl+(1-9), not only a divisions, but also a selected province or a strategic region.

- Reverted Nazi Germany getting back their old focus tree if they won the German Civil War (because it broke a lot of things).

- South Africa now has referendum decision available if they went "South Africa First".

- "Test the soviets" decision should no longer require split-second timing for it to work.

- Poland now more inclined to ally Germany, and less inclined to ally UK, after giving up Danzig for guarantees.

- The amounts of air wings being sent as volunteers are now updated properly, and should no longer go negative.

- Fixed typo in the tooltip of command power description.

- Fixed some division names in German historical name list.

- Referendum decisions now have proper triggers, and will correctly display after Political Discourse is Opened, or ideology support is above 60%.

- "Test the Soviets" will now only execute a negative effect for Soviet Union if they actually lose.

- Splitted demobilization missions into two separate decisions, to fix an issue with strikes spirit getting stuck.

- Manchukuo "Five People Armies" - spawned divisions are no longer locked.

- Fixed some XP gain problems for unit leaders. Multiple leaders can gain XP from same combats now and XP gain does not depend on number of units in army (it depends only on number of units in combat) which should increase overall XP gain.

- Fixed command_power_gain modifier (which are currently being used in inflitration) behaving unexpectedly and causing too much effect on daily command power gain.

- "Expand Civil Support" and "Expand Military Support" decisions, are now removed when a civil war starts, even if still active.

- JAP, RAJ, SAF, ITA, and SOV revolters will no longer get their 'old' focus tree back if they miraculously win the civil war, because it broke many things.



##################################

# Stability & Performance

##################################

- fixed an OOS that is caused by triggering same event twice

- added CTD safety checks to deployment destruction to avoid random crashes

- Prevented using the Continue button to load an old save from a previous and incompatible save version.

- Possibly fixed new game launch crash with modded initial state where it tries to instantly peace out countries at war

- Better handling of error messages from the DirectX function calls (so now if something goes wrong with rendering, we see what is it about).

- Fixed CTD when selecting planes on a non-owned carrier after a civil war.

- Fixed CTD related to the new division names system.

- Fixed CTD in our code responsible for parsing (searching) the folders and files.

- Fixed CTD when using event add_ofssite_building when it would put the building level below zero.

- Performance improvement caused by add_relation_modifier (seen especially when played with specific mods that use it a lot).

- Added extra safety checks to prevent potential CTDs when joining to a MP session.

- Filtered out superficial unit and country leader values when calculating checksum, to avoid false positive OOS.

- Fixed possible OOS cause when client and host have different sets of leader portraits or names (DLCs and MODs may cause that each player in the session has different portraits/names).

- Added hotjoin and error code details to telemetry for OOS events, which will help us with tracking OOSes that happens to the players.

- Fixed potential OOS if only some of the players are using mods with unit names (related to the ace generation).