Description
Backwards Compatibility Policy
The Community Promotion Screen is intended to be backwards compatible with New Promotion Screen By Default as much as possible, as long as it doesn't interfere with CPS's basic functions, or stands in the way of considerable improvements.
This post keeps track of the current backwards compatibility relationship and is updated as necessary.
Config Vars
IgnoreClassNames
- disregarded, see below for context.APRequiresTrainingCenter
- disregarded, set in Mod Config Menu now.RevealAllAbilities
- disregarded, set in Mod Config Menu now.ClassAbilitiesPerRank
- fully supported, though the purpose of having it configurable is dubious.ClassCustomAbilityCost
- fully supported and expanded: ifClassName
is left empty, the specifiedAbilityCost
will be used for all soldier classes, expect for those who do have class-specific custom ability cost.
NPSBD Script Package
To be able to access config vars meant for the NPSBD, CPS ships the entire NPSBD script package exactly as it is in the latest NPSBD workshop version. This means that both CPS and NPSBD can be active at the same time, CPS will just quietly kill NPSBD in its sleep and take over its functions.
This has a downside: if NPBSD is ever updated for any reason, its updated script package will clash with the NPSBD script package shipped by CPS, potentially causing all kinds of issues. For this reason we have added a pop-up message (#26 and #33) that will inform the player that they're ought to disable NPSBD while using CPS.
Building against NPSBD
The main CPS class, CPS_UIArmory_PromotionHero
, does not extend NPSBD_UIArmory_PromotionHero
, so it is not backwards compatible with any of its functions, such as GetCustomAbilityPointCost()
, which have a different function definition in CPS_UIArmory_PromotionHero
.
So in a hypothetical situation, where a mod was built against NPSBD to access current promotion screen as NPSBD_UIArmory_PromotionHero
, and then run some of its functions, then a mod like that would still be able to launch alongside CPS, thanks to CPS including NPSBD script package, but the mod would be unable to cast the current promotion screen to NPSBD_UIArmory_PromotionHero
. It's hard to come up with a legitimate use-case for doing something like this, though.