So, the research code is rewritten... it should be relatively easy now to add this feature.
extraStrings:
- type: en-US
strings:
STR_DISABLED_BY: "Disabled by:"
STR_DISABLES: "Disables:"
research:
- name: STR_NEW_TOPIC
cost: 500
disables:
- STR_OLD_TOPIC1
- STR_OLD_TOPIC2
When STR_NEW_TOPIC is researched (or more specifically when it's added to "discovered" list):
1. STR_OLD_TOPIC1 and STR_OLD_TOPIC2 are removed from "discovered" list, i.e. un-researched/revoked
2. STR_OLD_TOPIC1 and STR_OLD_TOPIC2 are removed from "currently being researched" list, in all bases
3. STR_OLD_TOPIC1 and STR_OLD_TOPIC2 are marked as "NEVER allow research of this topic again", which means:
a/ they won't be available in the New Research GUI ever again
b/ they won't be given to you for free via getOneFree/getOneFreeProtected
c/ they won't be given to you for free via zero-cost unlocks
d/ they won't be given to you for free via mission bounty
e/ if they are getOneFree or zero-cost unlock for some other topic, they will be ignored
- e.g. if Alien Infiltration is disabled and it's the only remaining undiscovered getOneFree for Sectoid Navigator, Sectoid Navigator will not be researchable... since you can't get Alien Infiltration anyway
Additionally keep in mind that:
4. any topics that were (previously) directly or indirectly unlocked via STR_OLD_TOPIC1 or STR_OLD_TOPIC2 remain untouched
- we disable/revoke only those 2 topics... not everything else that depended on them somehow
5. this whole concept will be completely ignored in the "New Battle" simulator
There are two possible uses of this feature I can think of right now:
A) Ability to make things obsolete (e.g. hide all small guns when big guns are researched)
research:
- name: STR_PLASMA_WEAPONS
disables:
- STR_LASER_WEAPONS # no need for small guns when you have big guns... no matter what modders say/think :P
B) Ability to choose a path in the research tree and block other paths
research:
- name: STR_RED_PILL
dependencies:
- STR_MEET_MORPHEUS
disables:
- STR_BLUE_PILL # after taking the red pill, can't take the blue pill anymore
- STR_NORMAL_FOOD # no more steaks for you Neo... reality sucks!
unlocks:
- STR_SUPERPOWERS # booyeah!
- name: STR_BLUE_PILL
dependencies:
- STR_MEET_MORPHEUS
disables:
- STR_RED_PILL # after taking the blue pill, can't take the red pill anymore
- STR_LOVE # steaks are better than Trinity anyway, no?
Disclaimer #1:
---------------
List of permanently disabled topics is saved in the save file.
That means if you (as a modder) change your decision what disables what between mod versions... the changes won't be applied retrospectively when the player upgrades the mod during a campaign.
So think twice before you start disabling things randomly!
Disclaimer #2:
---------------
The game can't check everything, you can create inconsistent situations... try to keep it simple!
For example:
a/ if topic A gives topic B for free... don't put topic B into "disables" of topic A... makes no sense, right? In this case, the game will actually give you topic B, because getOneFree topic is always processed before the core topic
b/ if topic A gives topic B for free... don't put topic A into "disables" of topic B... this makes even less sense... and in this case after researching topic A, you will get the free topic B, but you will NOT get the core topic A (because it will already be disabled after processing topic B)
So again... use... not abuse!