Skip to content

Conversation

@Iridar
Copy link

@Iridar Iridar commented May 24, 2021

Changes implemented by this PR:

  1. Mod project is recreated using a new mod name: X2WOTCCommunityPromotionScreen, in line with X2WOTCCommunityHighlander.

  2. Mod project now includes NPSBD's script package, copied without any alteration from the current workshop version of the NPSBD. That will allow CPS to read config that was intended for NPSBD, and also make CPS able to do this without having NPSBD as a requirement and without conflicting with it. This means it's technically possible to have CPS and NPSBD active together, although it would be completely redundant, as CPS overrides and disables NPSBD by neutering its UIScreenListener, used by NPSBD to inject its promotion screens. This is done specifically so that people that don't read mod description can use CPS without causing issues.

  3. All of the new functionality added by CPS is moved into a separate script package.

  4. NPSBD uses an IgnoreClassNames config array so it can be configured not to replace specific promotion screens. CPS will necessarily have to ignore that config, because we always want to replace both regular and hero promotion screens by default, but NPSBD ships IgnoreClassNames config that would make us not replace the hero promotion screen. It makes sense for NPSBD to do so, since it uses a Mod Class Override to replace that promotion screen anyway.

Currently, CPS is set up to always replace both regular and hero promotion screens, but if other contributors deem it necessary, a couple of bool flags can be added to let the CPS user or modmaker disable either regular or hero promotion screen replacement, although the usefulness of such flags is questionable.

  1. CPS uses an Event Listener to replace promotion screens, so it will replace NPSBD's MCO'd hero promotion screen anyway, but CPS ships XComEngine.ini that may or may not disable NPSBD's MCO, depending on config load order. This is more of a "just in case" things.

  2. Since CPS will be incompatible with RPGO by default (either by breaking RPGO promotion screen, or by being broken by RPGO promotion screen), CPS includes XComGame.ini config that will use the Highlander to inform the user that RPGO is incompatible with CPS via popup window.

@Iridar
Copy link
Author

Iridar commented May 26, 2021

  1. This PR also adds basic framework for displaying a warning popup about using NPSBD with CPS being pointless, though text is not finalized and not localized yet, and the "disable popup" doesn't actually do anything yet, I intend to connect it to MCM once support for it is added.

@Iridar Iridar marked this pull request as ready for review May 26, 2021 03:24
@Iridar
Copy link
Author

Iridar commented May 26, 2021

I'll merge the PR for now so that the work in CPS can continue; features added by this PR will be further developed in the future, likely in the master branch.

@Iridar Iridar merged commit 7ed222c into master May 26, 2021
@Iridar Iridar added this to the 1.0 milestone Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants