-
Notifications
You must be signed in to change notification settings - Fork 73
Description
#772 moved the DLC2 HL from component approach to the main CHL mod. Such approach greatly simplifies both developer tooling and the need for player to manually resolve which pieces of CHL they need. The idea was that if nothing specifies +NonNativePackages=DLC_2 in config, then the package will not be loaded. This assumption is correct, and properly holds under "only CHL should behave same as base game" mantra for both DLC owners and non-owners.
In practice, it turns out, there are more ways to load a script package. If a mod script package references classes from DLC_2.u (even in optional functions), then there is a build-time dependency which the engine dutifully attempts to load when loading the dependency, just like with assets.
Normally, this would silently fail (and crash if the functions with DLC references are called) since there is no DLC_2.u to load anywhere, but with #772 merged suddenly there is one. The result is that non-DLC-owners suddenly get the DLC code active, without the assets, localization and even a "formal" DLC identifier, so they get the (empty, cuz no localization) popup about installing the DLC into the existing campaign when loading a save:

Clearly this situation is unacceptable. Furthermore, it appears that reverting to the components approach is the only way to resolve this, despite all the associated downsides.
When implementing the components, I see two main areas to be considered:
- Developer tooling
- Player-perceptive dependency mess
Here are my thoughts:
- Developer tooling:
- Workshop IDs for main and beta versions
- Build tasks for DLC2HL (debug/release/workshop stable release)
- Build script for DLC2HL to include the main CHL on top of SrcOrig
- Build tasks for main CHL to include DLC2HL for version checker
- (CHL-dependant mods) Build script to include DLC2HL source into SrcOrig
- Player-perceptive dependency mess
- Require the DLC2HL when both main CHL and DLC2 are installed
- This way, individual mods don't need to include "also requires DLC2HL if you own DLC2" and players are guaranteed to receive the fixes made in DLC2HL
- Require the main CHL when the DLC2HL is installed (otherwise crash due to use of
XComLWTupleand potentially other main CHL things)
Also I suggest merging #790 and #793 before reworking to components approach (to prevent the need to rebase and rework theses PRs)
cc @robojumper what do you think?
cc @cannonfodder1 one of affected non-DLC2-owners
This needs to be fixed before 1.20 release to prevent BC issues
