loup99 / BP

A Migrational Era Mod for CK3.
https://forum.paradoxplaza.com/forum/threads/wip-a-migrational-era-mod-for-ck3.1414709/
11 stars 10 forks source link

Ck v1.5 patch #74

Closed LT-Rascek closed 1 year ago

LT-Rascek commented 2 years ago
LT-Rascek commented 2 years ago

As of the "Reimport new volkerwanderung fixes", about 90-95% of errors have been fixed (or suppressed in the case of localization bugs) and at least temporary patches for the CTD issues have been implemented, so it should be safe to port back into BP.

LT-Rascek commented 2 years ago

With the latest commit I've gotten the 1.5 pretty much cleaned up. It now loads without crashing and I've nixed most of the errors that are immediately problematic.

There are two feature-ish changes included: All the graphics from #72 and #71 were imported WtWSMS hint overwrites were reimported.

Beyond that, all other code changes are either getting the code minimally working with 1.5 or bringing code up to coding standard.

Also included are a pair of files in _bp_development_utilities: _BP_known_errors.info - List of known errors caused by various vanilla overwrites; harmless but annoying for debugging remove_known_errors.sh - bash script for removing the errors listed in _BP_known_errors.info from error.log

Just put these two files in the CK3/logs/ folder and you can run the bash script to cull the error.log to only reveal unexpected errors. This will make it easier for developers to see the impact their particular changes have on CK3 without getting bogged down in various vanilla incompatibilities (e.g., achievements) that are easier to ignore then overhauling to remove (like overwriting vanilla files instead of just doing a soft overwrite to keep the change-set minimal). Now ready for merge.

LT-Rascek commented 2 years ago

For reference, I fully admit this PR is really large but it should sidestep most of the issues caused by PDX updating from version to version; I've replaced most of the hard overwrites with soft overwrites (where possible) [1], so there's very little overlap with vanilla code. That's what caused most of the CTDs when PDX updated to 1.5. I've also created some tools for tracking what PDX updates between versions, so I can track down version update CTDs faster in the future.

As I've said before: the only real change from master on that branch was the addition of a few illustrations from WTWSMS. The bulk of the additions/subtractions are the creation of proper soft overwrites for things that on master were hard overwrites. While some features (like barony names) broke for other reasons [2,3], I've mostly went the route of suppressing errors and fixing them in later PRs, as the goal of ck_v1.5_patch was to have something close to master that would no longer CTD. So in general, when something is commented out, it was to sort through the error log to find out why things were breaking.

I'll note that two directories exist in which I didn't do a full fixup in this PR are common/defines/ and common/on_action/, mostly because I could tell if soft overwrites would actually work (the former) and because documentation was lacking on how to do a proper soft overwrite (the later). Since February, I've gotten a glimpse of how to fixup common/on_action/ and common/defines/, but haven't pushed them to the PR to try to avoid making it longer and adding more code for you to review. OTOH, those fixes are relatively short; I can probably have it all written and bug-tested in an evening or two and would have the entirety of the BP code base rewritten on this PR to avoid vanilla collisions as best I can at the moment [1]. Let me know if I should push those changes or not.

EDIT: Implement fixes on c9b9d75 in PR 76, but probably better to merge into this PR instead (thematically at least).

[1] - events/ is a different beast entirely and often needs hard overwrites, from what I've gleaned from the CK3 modding discord and PDX's forums. But almost all of common/ should support proper soft overwrites in one way or another (on_actions requires a few more tricks as shown in by Vertimnus in his CCU on_action code [2] - In trying to trace down CTDs, I had to comment out a number of things that changed between 1.4.4 and 1.5.0, like barony name equivalents (as PDX moved name_lists to be semi-independent of cultures). Most commented out things are slated to be fixed eventually (as is the case for barony names, which got patched up with the culture refactor work). [3] - Other things, like cultures, were just stamped out with a common template for later updates; for example, I replaced the culture templates with proper culture implementations in PR #75)