Author Topic: Tiny help with tiny XPZ sub-mod  (Read 1845 times)

Offline Nilex

  • Colonel
  • ****
  • Posts: 316
    • View Profile
Tiny help with tiny XPZ sub-mod
« on: March 12, 2021, 07:36:28 pm »
Excuse me if I missed the right place to ask, feel free to move where appropriate.

Been trying to isolate Landing Alert from fixed user options and change it to "true" via my own sub-mod rather than changing core "Piratez_Globals.rul", in order to avoid editing the string every time XPZ gets updated. Sub-mod file content looks like this:
Code: [Select]
fixedUserOptions:
  oxceUfoLandingAlert: true
The problem is that engine uncharacteristically assumes I've deleted every other fixed entry and un-grays it from in-game advanced menu, free for user to change or even see what was fixed. Defo not what I want to do.

If I just dump the whole fixedUserOptions section while changing only Alert:true then it works as expected but two more undesired problems arise. If down the line Dio changes what is fixed option my sub-mod will override it, and if a completely new fixed option is created it will appear un-grayed as it wasn't part of the section when I created the sub-mod. I wouldn't notice any of that unless specifically comparing the core against my own section. I won't remember to look in couple of weeks let alone years when I come back to complete fully finished XPZ. Just want for everything to wait my arrival neatly organized so I don't have to worry about anything and re-learn all this stuff.

What's puzzling is for every other change I made it was sufficient to put section string followed by string I wished to change. Omitted strings were unaffected and taken from core. This is the only exception and I'm not sure what to do. How to keep the file minimalistic and future-proof, while having Alert:true grayed out along with other set fixed settings? Am I making sense?

Offline Yankes

  • Commander
  • *****
  • Posts: 3232
    • View Profile
Re: Tiny help with tiny XPZ sub-mod
« Reply #1 on: March 12, 2021, 08:37:05 pm »
Each configure node is loaded by different code and can behave differently, in some case behavior like this is preferred if you want' get ride of all original values.
I will check if I could option to override this behavior, in other places there was similar problem and I have already possible solution.

Offline Yankes

  • Commander
  • *****
  • Posts: 3232
    • View Profile
Re: Tiny help with tiny XPZ sub-mod
« Reply #2 on: March 12, 2021, 09:50:05 pm »
ok, I check code and apply this functionality I said before, in 7.0 you will be able to do:
Code: [Select]
fixedUserOptions: !add
  oxceUfoLandingAlert: true
This will override only `oxceUfoLandingAlert`
or
Code: [Select]
fixedUserOptions: !remove
  - oxceUfoLandingAlert

functionality like this will be enabled too for:
Code: [Select]
fixedUserOptions:
recommendedUserOptions:
hiddenMovementBackgrounds:
baseNamesFirst:
baseNamesMiddle:
baseNamesLast:
operationNamesFirst:
operationNamesLast:

Offline Nilex

  • Colonel
  • ****
  • Posts: 316
    • View Profile
Re: Tiny help with tiny XPZ sub-mod
« Reply #3 on: March 30, 2021, 01:03:14 pm »
Thank you, works perfectly now!