Hi, this topic is likely relevant for VATSIM pilots that use the current FSLTL models in MSFS 2024.
I’ve posted in VATSIM discord but I guess it wasn’t the best channel to post it so here it’s again.
With the current sim patch 3 the FSLTL models and lights are mostly working but only the lightmap textures are shown, not the light bulb themselves. That causes aircraft to become invisible when they are far.
I’ve hacked my way around the .fx files to get some usable lights, it’s far from good or perfect but at least now it’s feasible to see traffic far away.
This is the issue before the fix:
And this is after the fix:
As you can see , the lights are small but very visible when the aircraft is far away.
To apply the fix, You will need Python installed.
- place the fix.py in the fsltl-traffic-base folder.
- run
py fix.py
- run
py build.py
( already supplied in the fsltl package ) - needed to regenerate the manifest.jsons otherwise the sim will not reload the changes.
Sharing in case someone will find it useful too, good luck!
import os
import re
def replace_last_color_number(text):
"""Replaces the last number in "Color Start" or "Color End" lines with 255.
Args:
text: The input string.
Returns:
The modified string with the last number replaced.
"""
lines = text.splitlines()
modified_lines = []
for line in lines:
match = re.search(r"(Color Start|Color End)=(\d+), (\d+), (\d+), (\d+)", line)
if match:
color, a, b, c, _ = match.groups()
modified_line = f"{color}={a}, {b}, {c}, 255"
else:
modified_line = line
modified_lines.append(modified_line)
return "\n".join(modified_lines)
def double_min_proj_size(text):
"""Doubles the value of MinProjSize.
Args:
text: The input string.
Returns:
The modified string with doubled MinProjSize value.
"""
lines = text.splitlines()
modified_lines = []
for line in lines:
match = re.search(r"MinProjSize\s*=\s*(\d+\.\d+)", line)
if match:
value = float(match.group(1))
modified_line = f"MinProjSize={value * 2:.1f}"
else:
modified_line = line
modified_lines.append(modified_line)
return "\n".join(modified_lines)
def process_fx_file(file_path):
"""Processes a .fx file, replacing color numbers and doubling MinProjSize.
Args:
file_path: The path to the .fx file.
"""
with open(file_path, 'r') as f:
content = f.read()
modified_content = replace_last_color_number(content)
modified_content = double_min_proj_size(modified_content)
with open(file_path, 'w') as f:
f.write(modified_content)
# Find the "effects" directory
effects_dir = os.path.join(os.getcwd(), "effects")
if os.path.exists(effects_dir):
# Process .fx files in the "effects" directory
fx_files = [os.path.join(effects_dir, f) for f in os.listdir(effects_dir) if f.endswith('.fx')]
for fx_file in fx_files:
process_fx_file(fx_file)
else:
print("Effects directory not found.")