Author Topic: [DONE][Suggestion] Making ufopaedia article hidden by default  (Read 735 times)

Offline WarStalkeR

  • Captain
  • ***
  • Posts: 56
  • Repensum Est Canicula
    • View Profile
[DONE][Suggestion] Making ufopaedia article hidden by default
« on: September 08, 2024, 08:50:39 pm »
By default, all ufopaedia articles are assigned default visibility flag. The 'ufopediaRuleStatus' entry is only modifiable during gameplay via ufopaedia list (by right mouse button click on the entry).

Option to make specific article hidden by default will make possible to add proper ufopaedia entries for damaged/ruined facilities that will open, once you're clicking middle mouse button, but won't appear in the list nor will show up, when you switching to the next or previous ufopaedia entry.

So far I haven't found anything that allows me to make ufopaedia entry hidden on initialization or tech unlock.

Is there any chance to add something like this?
« Last Edit: September 09, 2024, 10:32:44 pm by WarStalkeR »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: [Suggestion] Making ufopaedia article hidden by default
« Reply #1 on: September 08, 2024, 09:12:04 pm »
I will gladly consider adding modding features if modders ask for it.

PS: hiding pedia articles is a user feature, not a modder feature. Whatever the requirement is here, the solution would be different than proposed.

Offline WarStalkeR

  • Captain
  • ***
  • Posts: 56
  • Repensum Est Canicula
    • View Profile
Re: [Suggestion] Making ufopaedia article hidden by default
« Reply #2 on: September 08, 2024, 10:05:36 pm »
I will gladly consider adding modding features if modders ask for it.
While making submod for XPZ, I was thinking it is a shame that all ruined versions of the facility can be seen only in debug mode, because they are hidden behind unresearchable technology (to avoid filling ufopaedia list and articles with unnecessary spam I assume).

PS: hiding pedia articles is a user feature, not a modder feature. Whatever the requirement is here, the solution would be different than proposed.
This idea is something like this:
Code: [Select]
ufopaedia:
  - id: STR_HANGAR_DAMAGED
    type_id: 6
    section: STR_BASE_FACILITIES
    requires:
      - STR_HANGARS_TECH
    text: STR_HANGAR_DAMAGED
    defaultUfopediaStatus: hidden
    listOrder: 19171
And article is in the 'hidden' category by default. Player doesn't see it, once technology in 'requires' was researched, but can do MMB click on relevant facility in the basescape to open relevant ufopaedia article. Of course, if player wants - it can be seen in hidden category and can me changed to always visible.
« Last Edit: September 26, 2024, 09:48:21 am by WarStalkeR »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: [DONE][Suggestion] Making ufopaedia article hidden by default
« Reply #3 on: September 22, 2024, 02:57:32 pm »
Done.

Sample ruleset:

Code: [Select]
startingBase:
  ufopediaRuleStatus:
    STR_CANNON_UC: 2
    STR_PISTOL: 2
    STR_PROXIMITY_GRENADE: 2
    STR_SMALL_RADAR_SYSTEM: 2

Offline WarStalkeR

  • Captain
  • ***
  • Posts: 56
  • Repensum Est Canicula
    • View Profile
Re: [DONE][Suggestion] Making ufopaedia article hidden by default
« Reply #4 on: September 26, 2024, 09:43:22 am »
Done.

Sample ruleset:

Code: [Select]
startingBase:
  ufopediaRuleStatus:
    STR_CANNON_UC: 2
    STR_PISTOL: 2
    STR_PROXIMITY_GRENADE: 2
    STR_SMALL_RADAR_SYSTEM: 2
It will help a lot by hiding duplicate articles at start of damaged/ruined variants of buildings at start, but making them accessible via direct MMB click on facilities.

The issue with this, is when new technology gets added mid-game (during one of XPZ patches for example), it will have no effect, unless new game start.

I've implemented crutch like this to avoid this issue: https://github.com/WarStalkeR/OpenXcomExMore/commit/8e9a2d7c7c93766b4995feacdd1047e4f82e6770
« Last Edit: September 26, 2024, 09:49:03 am by WarStalkeR »