The overlay¶
If you change fgdata directly, you lose the changes on the next update and it is hard to go back. An overlay is a second folder that mirrors fgdata through links and contains only the changed files as real copies. FlightGear starts with --fg-root pointing at this overlay, and the original stays untouched.
python3 "$FG_BASIS/werkzeuge/overlay_einrichten.py"
The script creates fgdata-overlay and installs the water fixes right away. With --ohne-wasser you get just the empty overlay. starten.sh uses the overlay automatically as soon as it exists.
Change a file yourself¶
Two steps: build the folder out of links, then copy the file in as a real file.
cd "$FG_BASIS/fgdata-overlay"
rm Effects && mkdir Effects
for e in ../fgdata/Effects/*; do ln -s "$(realpath "$e")" "Effects/$(basename "$e")"; done
rm Effects/water.eff && cp ../fgdata/Effects/water.eff Effects/water.eff
Warning
A changed file must really be a copy. FlightGear follows links to XML files and then takes relative paths from the original. That is how new textures of mine failed to load even though the overlay looked right.
Undo¶
rm -rf "$FG_BASIS/fgdata-overlay"
fgdata itself was never changed. After this, starten.sh starts with the original again.