aliens

Author Topic: Does personal light affect visibility of soldiers at night?  (Read 627 times)

Offline Alpha Centauri Bear

  • Colonel
  • ****
  • Posts: 466
    • View Profile
Does personal light affect visibility of soldiers at night?
« on: December 03, 2023, 11:38:49 pm »
Does personal light affect visibility of soldiers at night? I.e. should I turn it off to make it more difficult for aliens to see my soldiers?

Online Yankes

  • Commander
  • *****
  • Posts: 3210
    • View Profile
Re: Does personal light affect visibility of soldiers at night?
« Reply #1 on: December 05, 2023, 11:26:18 pm »
Does personal light affect visibility of soldiers at night? I.e. should I turn it off to make it more difficult for aliens to see my soldiers?
yes

Anyone can elaborate on blastRadius and FixRadius?

Does setting blastRadius to 0 means it is not an explosion and everything else is?
Is it same with FixRadius? Why it has different name? Is it direct override or have its own meaning?
If blast radius is set to fixed value, does it mean the blast power reduces outwards but it is just cut out at this radius so regardless of explosion power, unit won't be damaged outside of the radius?
And if it is auto calculated it is extended as far as explosion still has power at edges?
yes.
`blastRadius` is exactly same as `damageAlter.FixRadius`, first exist for backward compatibility reasons.
This radius is hard power cut. No explosion propagation outside this limit.

Offline Kozinsky

  • Captain
  • ***
  • Posts: 93
  • Sorry for my bEd English
    • View Profile
Re: Does personal light affect visibility of soldiers at night?
« Reply #2 on: December 07, 2023, 01:37:52 pm »
Does personal light affect visibility of soldiers at night? I.e. should I turn it off to make it more difficult for aliens to see my soldiers?
yes

Is this really true? Now I've done some tests (in debug mode, passing the turn to the enemy side) to see if personal lighting affects whether the enemy can see my soldiers. I came to the conclusion that it doesn't. I took into account the lighting level of the terrain and ran tests at different distances from the activated Electro-flare. When the lighting level was 6 or higher, the player's soldier was seen as "at daytime", and when the lighting level was 0-5, he was seen as "at night". For the tests I used XCF 3.1 and OXCE 7.9.8.

EDIT:
Never mind, I found the answer to my question:
Spoiler:

Hopefully the new features with personal lighting will eliminate such questions :)
« Last Edit: December 07, 2023, 02:53:42 pm by Kozinsky »

Offline psavola

  • Commander
  • *****
  • Posts: 636
    • View Profile
Re: Does personal light affect visibility of soldiers at night?
« Reply #3 on: December 07, 2023, 03:15:42 pm »
Since 7.9.17 and as changed in 7.9.21, personal lighting has affected the visibility even with the value 5 in other contexts as well (for example, when covered by smoke and otherwise in darkness), see: https://openxcom.org/forum/index.php/topic,11622.0.html

Offline Alpha Centauri Bear

  • Colonel
  • ****
  • Posts: 466
    • View Profile
Re: Does personal light affect visibility of soldiers at night?
« Reply #4 on: December 07, 2023, 05:35:21 pm »
https://www.ufopaedia.org/index.php/Night_Missions

Quote
Personal light carried by soldiers illuminates enemies up to 9 tiles away, but aliens can still see 20. Aliens always see the full 20 (and night missions can end in disaster!) Anything you do to improve lighting only affects you. Your flares do not make you more obvious to aliens, etc. - aliens can always see just fine.

Offline Alpha Centauri Bear

  • Colonel
  • ****
  • Posts: 466
    • View Profile
Re: Does personal light affect visibility of soldiers at night?
« Reply #5 on: December 07, 2023, 06:26:10 pm »
Based on this https://openxcom.org/forum/index.php/topic,11622.msg159496.html#msg159496.
Personal light mechanics changed in OXCE. So looks like this question belongs to this thread.

Is there a documentation on how it works (alone and in conjunction with other effects) and how does it affect visibility (of aliens within the radius and soldiers themselves)?

Offline Alpha Centauri Bear

  • Colonel
  • ****
  • Posts: 466
    • View Profile
Re: Does personal light affect visibility of soldiers at night?
« Reply #6 on: December 07, 2023, 07:07:53 pm »
Modification request regarding personal light and flare light.

According to this https://www.ufopaedia.org/index.php/Night_Missions the light visible effect dims out away from center for pure cosmetic purposes. Internal mechanics, though, does not take shade of lights into account. Specifically, any light source illuminates a circle of certain radius with exactly same amount of light. Meaning that any alien/person within this circle is visible and outside is not. That is very confusing on battle scape. Difficult to understand if tile away from center is lit or not.

Would it be possible to rework this UI display to match lightning mechanics exactly? I.e. to show equal lighting within the circle and pitch dark outside? Or something of the sort just to be able to determine how far the light actually extends. Thank you in advance.

Online Yankes

  • Commander
  • *****
  • Posts: 3210
    • View Profile
Re: Does personal light affect visibility of soldiers at night?
« Reply #7 on: December 08, 2023, 01:13:47 am »
Modification request regarding personal light and flare light.

According to this https://www.ufopaedia.org/index.php/Night_Missions the light visible effect dims out away from center for pure cosmetic purposes. Internal mechanics, though, does not take shade of lights into account. Specifically, any light source illuminates a circle of certain radius with exactly same amount of light. Meaning that any alien/person within this circle is visible and outside is not. That is very confusing on battle scape. Difficult to understand if tile away from center is lit or not.

Would it be possible to rework this UI display to match lightning mechanics exactly? I.e. to show equal lighting within the circle and pitch dark outside? Or something of the sort just to be able to determine how far the light actually extends. Thank you in advance.
could you stop spreading misinformation? Where this article claim "same amount"?? Even if twas true for OG its not for OXC and even more for OXCE.
Every light is real, and every value CAN affect visibility, using script each unit can have different threshold when change Day/Night visibility range (and currently you can change global threshold for this).


Offline Alpha Centauri Bear

  • Colonel
  • ****
  • Posts: 466
    • View Profile
Re: Does personal light affect visibility of soldiers at night?
« Reply #8 on: December 08, 2023, 02:51:05 am »
Sorry. Didn't meant to spread anything. Thank you for enlightening me!

Did I understand correctly that OXCE lighting and visibility is absolutely realistic? I.e. unit staying closer to the flare is better lit and, thus, visible from farther distance? If so, is there some documentation on this mechanics? I am browsing ruleset but there is not many explanation there. Thank you.

Offline Vakrug

  • Colonel
  • ****
  • Posts: 277
    • View Profile
Re: Does personal light affect visibility of soldiers at night?
« Reply #9 on: December 08, 2023, 11:38:22 am »
Did I understand correctly that OXCE lighting and visibility is absolutely realistic? I.e. unit staying closer to the flare is better lit and, thus, visible from farther distance?
No, it is absolutely unrealistic. Unit is either lit (and visible like during daytime) or not. Exact light level is irrelevant. And you cannot tell by a glance if a unit is lit or not! This is considered as a feature, not a bug: https://openxcom.org/forum/index.php/topic,10898.msg150927.html

Online Yankes

  • Commander
  • *****
  • Posts: 3210
    • View Profile
Re: Does personal light affect visibility of soldiers at night?
« Reply #10 on: December 08, 2023, 12:49:22 pm »
Sorry. Didn't meant to spread anything. Thank you for enlightening me!

Did I understand correctly that OXCE lighting and visibility is absolutely realistic? I.e. unit staying closer to the flare is better lit and, thus, visible from farther distance? If so, is there some documentation on this mechanics? I am browsing ruleset but there is not many explanation there. Thank you.
No, if you use stock settings then darkens (aka `15 - light`) values over 9 are consider night and use night vision range, if is less then use day vision range.
To have no "binary" switch then you can use script that read directly target shade and calculate proportion between both.

Another place where exactly values of light matter is when you have objects blocking light (most mods OXCE use it), then even if target is close than in classic light propagation should be visible (from only distance darkens should be `8`) but shadow cast by object or smoke (add `2` more darkens) make unit go past threshold  (`8 + 2 > 9`).

@Vakrug this answer is for you too, light level matter, but Nigh/Day switch have fixed threshold.


Offline Alpha Centauri Bear

  • Colonel
  • ****
  • Posts: 466
    • View Profile
Re: Does personal light affect visibility of soldiers at night?
« Reply #11 on: December 08, 2023, 03:39:35 pm »
could you stop spreading misinformation? Where this article claim "same amount"?? Even if twas true for OG its not for OXC and even more for OXCE.
Every light is real, and every value CAN affect visibility, using script each unit can have different threshold when change Day/Night visibility range (and currently you can change global threshold for this).

No, it is absolutely unrealistic. Unit is either lit (and visible like during daytime) or not. Exact light level is irrelevant. And you cannot tell by a glance if a unit is lit or not! This is considered as a feature, not a bug: https://openxcom.org/forum/index.php/topic,10898.msg150927.html

Err. I am terrible sorry, guys. Not stating anything myself, just trying to understand OXCE mechanics. Which one of the above is actually true???
😕



I think I got my answer from the last post above this one. Thank you!
« Last Edit: December 08, 2023, 03:48:39 pm by Alpha Centauri Bear »

Offline Mathel

  • Colonel
  • ****
  • Posts: 285
  • Do not mistake Muton for mutton.
    • View Profile
Re: Does personal light affect visibility of soldiers at night?
« Reply #12 on: December 08, 2023, 04:27:47 pm »
Technically, both.

Light sources (units, items, objects, fire) have a defined power. This can be 0 to 15.
The light power of any particular light source falls by one with each transparent ortogonal tile of distance from that light source.

Any tile is lit with the greatest light power shining on it from any particular source. Ambient lighting has constant power through the map.

By default (this can be changed by "maxDarknessToSeeUnits" setting) any unit on standing on a tile lit with 9+ light is considered lit. Otherwise, the unit is considered shaded. There is no in-between state.

Units (or more precisely, armors) each have a set distance at which they see lit units and a set distance at which they see shaded units.

Offline Alpha Centauri Bear

  • Colonel
  • ****
  • Posts: 466
    • View Profile
Re: Does personal light affect visibility of soldiers at night?
« Reply #13 on: December 08, 2023, 04:34:56 pm »
Aha. The light source degrades gradually outward but it is combined with ambient light so the resulting lit radius could increase with higher ambient light? Say with 0 ambient light flare illuminates 9 tiles and with 1 ambient light it illuminates 10 tiles? Did I get it right?

Online Yankes

  • Commander
  • *****
  • Posts: 3210
    • View Profile
Re: Does personal light affect visibility of soldiers at night?
« Reply #14 on: December 08, 2023, 07:15:13 pm »
Aha. The light source degrades gradually outward but it is combined with ambient light so the resulting lit radius could increase with higher ambient light? Say with 0 ambient light flare illuminates 9 tiles and with 1 ambient light it illuminates 10 tiles? Did I get it right?
"ambient light" is specific mechanic that create shadows and dark interiors of buildings during day, and it is constant from whole map unless it reach some objects when its propagate from top of map.
do not mix "ambient light" with "flare light".
Mathel is correct if you do not consider scripts or complex map geometry.