Engine determine this and if engine will not expose this to mods then mod can't do any thing to solve it,
Oh, fantastic! Not only lighting level is obscured from player, but also from program! A was not wrong when I said, that game does everything to hide the truth.
Lighting from all sources in a tile sums up and if it is above a certain threshold you are seen as if it is day.
I really hope this is not how it works. Words "sums up" suggests that 1 soldier in darkness is fine, but 4 soldiers standing together combine their "personal lighting" and become visible. No, my experience shows this is not happening.
It is an issue for the OXCE forum. There are other mods that use Night Combat like XCF, I think Piratez for example.
Considering that that these mods exists for many years, and this issue with lighting is still present, I don't think something will changed in the future. But really strange that this discussion hasn't occurred earlier (I checked forum).
For problem at hand, script can detect this, and make unit lot darken when invisible, and more bright when visible.
Or we can see a different color arrow when pressing Alt. Lighter or darker soldiers is prone to errors.
Both solutions are bad. Player need to know about tile lighting before moving an agent in.
In any case, thanks for replys.