OpenXcom Forum

OpenXcom Forks => OpenXcom Extended (OXCE) => OXCE Support => Topic started by: Alpha Centauri Bear on December 15, 2023, 01:59:26 am

Title: visibility algorithm
Post by: Alpha Centauri Bear on December 15, 2023, 01:59:26 am
Pardon the question that was probably asked many times but I didn't find an answer here.
How visibility is computed all variables accounted for: race, light, smoke, fire? Any comprehensive article or explanation? Thank you.
Title: Re: visibility algorithm
Post by: Alpha Centauri Bear on December 15, 2023, 02:05:30 am
Found my answer about smoke here.
https://www.ufopaedia.org/index.php/Smoke_Grenade#Visual_range

Apparently, its thickness degrades with time and it is not possible to tell how thick it is just by looking at it. Ugh.
Title: Re: visibility algorithm
Post by: Yankes on December 15, 2023, 11:03:43 pm
In recent version OXCE change how viability work, as previously some things do not stack with each other.
Now most things stack (camouflage, smoke, light).

Beside, you have full access to code you can see what happens there:
https://github.com/MeridianOXC/OpenXcom/blob/oxce-plus/src/Battlescape/TileEngine.cpp#L1843

Even more if you do not like current version you can mod it using y-scripts.