Author Topic: [DONE][Suggestion] Remember the Light  (Read 4593 times)

Online Delian

  • Commander
  • *****
  • Posts: 500
    • View Profile
[DONE][Suggestion] Remember the Light
« on: June 27, 2022, 01:05:37 am »
I'd like to propose two QoL features.

1. When toggling Personal Light, I'd like it if game remembered the setting. This would make the game experience better because:
- players wouldn't have to keep turning it off every time they start a night mission
- players wouldn't have to turn it off every time they load the game
- it's strategically detrimental; a spotter can see your units because of light, but you can't start a mission with your lights immediately off, so you get wrecked by the cheating snipers

2. When using Night Vision or Toggle Brightness, I'd like it if the game remembered the setting.
Most of the battles I do are night battles. I don't like playing with Night Vision because monochrome colors make environments look bad. So, I much prefer using Toggle Brightness (visual only). The problem is, again, that I have to toggle it all the time, so it would make my life easier if the game simply remembered what the Night Vision/Toggle Brightness setting was. Technically, the "Auto Night Vision threshold" setting could be removed if the game remembered what light setting the player uses in night battles.
« Last Edit: July 15, 2022, 11:58:36 am by Meridian »

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: [Suggestion] Remember the Light
« Reply #1 on: June 27, 2022, 01:56:43 am »
- players wouldn't have to turn it off every time they load the game
Probably this on its own should be enough to consider this functionality.

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: [Suggestion] Remember the Light
« Reply #2 on: June 28, 2022, 10:53:34 am »
A bit an off topic, but I will still ask it here - what about checking craft tiles when create the craft map, that have light source > 0. Then adding a control to turn them off and on (for example, in extended state) if those tiles are still alive.

Example case - dragonfly craft in xcom files has lights on it, that does not helps at all if you want stealth through the night mission.

Online Delian

  • Commander
  • *****
  • Posts: 500
    • View Profile
Re: [Suggestion] Remember the Light
« Reply #3 on: June 28, 2022, 01:01:16 pm »
A bit an off topic
Entirely off topic. Other than opening doors and destroying tiles, the battle game engine does not support interacting with the environment and it would be too much work to change it. If light tiles on a certain craft bother you, then edit the craft map file and change those tiles.

Offline Rangerh

  • Colonel
  • ****
  • Posts: 126
    • View Profile
Re: [Suggestion] Remember the Light
« Reply #4 on: July 03, 2022, 12:58:04 pm »
I'd like to propose two QoL features.

1. When toggling Personal Light, I'd like it if game remembered the setting. This would make the game experience better because:
- players wouldn't have to keep turning it off every time they start a night mission
- players wouldn't have to turn it off every time they load the game
- it's strategically detrimental; a spotter can see your units because of light, but you can't start a mission with your lights immediately off, so you get wrecked by the cheating snipers

2. When using Night Vision or Toggle Brightness, I'd like it if the game remembered the setting.
Most of the battles I do are night battles. I don't like playing with Night Vision because monochrome colors make environments look bad. So, I much prefer using Toggle Brightness (visual only). The problem is, again, that I have to toggle it all the time, so it would make my life easier if the game simply remembered what the Night Vision/Toggle Brightness setting was. Technically, the "Auto Night Vision threshold" setting could be removed if the game remembered what light setting the player uses in night battles.

That would be amazing, as maybe i'm not very lucky but most of my battles are also taking place at night and i wish the game would remember when i set Toggle Brightness instead of having to do it manually for each battle.
Maybe an ON/OFF setting in the Video or Battlescape options ?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9092
    • View Profile
Re: [Suggestion] Remember the Light
« Reply #5 on: July 06, 2022, 12:22:10 pm »
I'd like to propose two QoL features.

1. When toggling Personal Light, I'd like it if game remembered the setting. This would make the game experience better because:
- players wouldn't have to keep turning it off every time they start a night mission
- players wouldn't have to turn it off every time they load the game
- it's strategically detrimental; a spotter can see your units because of light, but you can't start a mission with your lights immediately off, so you get wrecked by the cheating snipers

2. When using Night Vision or Toggle Brightness, I'd like it if the game remembered the setting.
Most of the battles I do are night battles. I don't like playing with Night Vision because monochrome colors make environments look bad. So, I much prefer using Toggle Brightness (visual only). The problem is, again, that I have to toggle it all the time, so it would make my life easier if the game simply remembered what the Night Vision/Toggle Brightness setting was. Technically, the "Auto Night Vision threshold" setting could be removed if the game remembered what light setting the player uses in night battles.

1. Personal Light: ok

2a. Night Vision: ok

2b. Brightness toggle: I could easily do that too, but I don't want to. Many modders started creating and using (in my opinion) very dark terrains and even darker default global mission shade. To the point when I just don't enjoy playing anymore. That's why I did this semi-hidden feature... out of frustration. I'd much rather see a change in the mods and be able to even remove this "feature" in the future.

Online Delian

  • Commander
  • *****
  • Posts: 500
    • View Profile
Re: [Suggestion] Remember the Light
« Reply #6 on: July 06, 2022, 01:42:09 pm »
Thanks a lot for implementing this~

2b
The dark templates frustrate me too, but, I'm not sure how not implementing this part would force anyone to use different templates. Wouldn't it be better if you simply... wrote direct feedback to the mod authors?

It's a shame because of these suggestions, that's the one I wanted to see implemented the most. I use it at the half-way setting, so that the dark atmosphere remains and I can still easily see which tiles are in the light to avoid them (btw, I'd prefer it if the half-way setting worked a bit differently - if globalshade was above 7, then it would treat it as 7 instead of halving it).
Anyway, you may not like Brightness toggle, but I genuinely think it's great and the best way to treat dark environments, so please let it stay~. It's inline with how (with few exceptions) most other games treat darkness - instead of a perfect darkness, a slight illumination is added so that you can still see where you're going.

Offline Rangerh

  • Colonel
  • ****
  • Posts: 126
    • View Profile
Re: [Suggestion] Remember the Light
« Reply #7 on: July 09, 2022, 11:48:27 am »
Too bad for the brightness toggle, that's the most useful honestly to make the game more readable with night.
But if the shade can be modded, that's then no problem
« Last Edit: July 09, 2022, 11:53:05 am by Rangerh »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9092
    • View Profile
Re: [Suggestion] Remember the Light
« Reply #8 on: July 09, 2022, 06:17:51 pm »
Added 3 entries into options.cfg:

Code: [Select]
  oxceToggleBrightnessType: 0
  oxceToggleNightVisionType: 1
  oxceTogglePersonalLightType: 1

You can change the values manually to change the behavior:
0 = toggles are not persisted (as until now)
1 = toggles are persisted for the duration of the battle
2 = toggles are persisted for the duration of the campaign

Example above shows the default values.

Pls test if it works: https://lxnt.wtf/oxem/builds//Extended/Extended-7.5.19-b20f33153-2022-07-09-win64.7z

Online Delian

  • Commander
  • *****
  • Posts: 500
    • View Profile
Re: [Suggestion] Remember the Light
« Reply #9 on: July 09, 2022, 08:23:58 pm »
Toggle lights
- mission persistent: works
- campaign persistent: works
- counter spotters: works

Toggle night vision:
- mission persistent: works
- campaign persistent: works

Toggle brightness:
- mission persistent: works (for all 3)
- campaign persistent: works (for all 3)

Bug: The night vision settings are applied in normal daylight missions are well. They should only be applied when it's actually night (globalshade > maxDarknessToSeeUnits, or oxceAutoNightVisionThreshold... not sure which one is better). Or at least I think no one wants to play day missions with Night Vision on.

That said, I think instead of the 3 options.cfg options, a single one would've been enough. Simply called "oxcePersistLightSettings", with similar values, 0 1 or 2 that would control all three.
As for the togglePersonalLight, toggleNightVision and toggleBrightness, I think toggleNightVision and toggleBrightness could be merged, since they're mutually exclusive. For instance, a property called "nightVision" with values 0 (off), 1 (on - night vision), 2 (on - half brightness), 3 (full brightness)
« Last Edit: July 09, 2022, 08:28:48 pm by Delian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9092
    • View Profile
Re: [Suggestion] Remember the Light
« Reply #10 on: July 09, 2022, 09:02:49 pm »
thanks for the testing

Bug: The night vision settings are applied in normal daylight missions are well. They should only be applied when it's actually night (globalshade > maxDarknessToSeeUnits, or oxceAutoNightVisionThreshold... not sure which one is better). Or at least I think no one wants to play day missions with Night Vision on.

There's a million opinions on what is too dark and what is not.
I spent literally years trying to automate it, with heavy resistance from both modders and players after every change (in any direction).
The outcome is that the player must decide whether they want to use Night Vision or not.

I of course also don't want to play day missions with Night Vision on, that's why my preferred setting is "persisted during the battle"; or even "not persisted" since I don't reload anyway.

That said, I think instead of the 3 options.cfg options, a single one would've been enough. Simply called "oxcePersistLightSettings", with similar values, 0 1 or 2 that would control all three.
As for the togglePersonalLight, toggleNightVision and toggleBrightness, I think toggleNightVision and toggleBrightness could be merged, since they're mutually exclusive. For instance, a property called "nightVision" with values 0 (off), 1 (on - night vision), 2 (on - half brightness), 3 (full brightness)

One is not enough for me.
I want them set differently when I play.

Online Delian

  • Commander
  • *****
  • Posts: 500
    • View Profile
Re: [Suggestion] Remember the Light
« Reply #11 on: July 09, 2022, 09:17:14 pm »
>There's a million opinions on what is too dark and what is not.
Then go with oxceAutoNightVisionThreshold, since that one is configurable in game.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9092
    • View Profile
Re: [Suggestion] Remember the Light
« Reply #12 on: July 09, 2022, 09:39:03 pm »
What problem are you trying to solve exactly?

If you're using `oxceAutoNightVisionThreshold`, the game will automatically turn night vision on/off as specified... you don't need to persist anything at all.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9092
    • View Profile
Re: [Suggestion] Remember the Light
« Reply #13 on: July 09, 2022, 10:09:31 pm »
I have now added a fix for a situation when the player enables both Persisted NV and Auto NV at the same time.

In such case, the Auto NV wins.

https://github.com/MeridianOXC/OpenXcom/commit/95dc83dfdb9153b0251487c398e39fb73117177e

Online Delian

  • Commander
  • *****
  • Posts: 500
    • View Profile
Re: [Suggestion] Remember the Light
« Reply #14 on: July 09, 2022, 11:29:16 pm »
I'm trying to use
oxceTogglePersonalLightType: 2
oxceToggleBrightnessType: 2
oxceToggleNightVisionType: 2

And with these settings I want all the night missions (globalshade > maxDarknessToSeeUnits) to start with personal lights off and night vision / toggle brightness on, while all the day missions (globalshade <= maxDarknessToSeeUnits) to start with night vision / toggle brightness off.

But, let me think...
Personal lights aren't a problem in day missions, so we can ignore those.
I also don't really use Night Vision (I set oxceAutoNightVisionThreshold to 15), so that's actually not a problem. For people who use Night Vision, as you said, oxceAutoNightVisionThreshold could technically solve it (unless that setting is removed).
Toggle Brightness, in night missions would persist ok, but in day missions... well, in those, brightness makes little difference, but still, there is a difference. Even with globalshade=0, buildings and walls still leave some small shadows I think, and brightness removes those, which is visually a bit detrimental. I guess what I was proposing was that, for the game to determine if it's night, it could do a globalshade > oxceAutoNightVisionThreshold comparison and only process the toggle brightness setting if so... wait, that would never work because night vision would override the brightness then.

Well, nevermind, I think it works fine then. The lights and toggle brightness is remembered, so as far as I'm concerned, shit's lookin' good.

This last fix, if autoNV turns NV on, then it doesn't get saved, right? That's good, because you wouldn't want it to keep turning NV on, and then persisting it through subsequent missions.