bmstune - vegetation cut for Falcon BMS 4.38
=============================================

Falcon BMS has no setting for trees. Vegetation is the largest single cost in
the frame - millions of billboards, most of them too far away to see clearly -
and it is the main source of shimmer on distant terrain.

bmstune is a d3d11.dll that sits between BMS and Direct3D and shortens the
vegetation draw calls before they reach the GPU. As shipped, it removes the
trees entirely. You can bring back any share of them.

It does not touch any BMS data file, so multiplayer is unaffected: what you
change is only what your own GPU draws.


Requirements
------------
- Falcon BMS 4.38, 64-bit Windows 10 or 11.
- Any GPU vendor. VR or flat screen.
- Nothing else to install.


Install
-------
1. Close BMS.
2. Copy d3d11.dll and bmstune.ini into the folder that holds Falcon BMS.exe:

       <your BMS folder>\Bin\x64\

3. Start BMS. There are no trees.

If that folder already has a d3d11.dll from another tool, see "Using it with
another d3d11.dll" below before overwriting anything.

Upgrading from bmsffr: overwrite d3d11.dll and delete the old bmsffr.ini.
bmstune.ini takes precedence when both are present, but leaving the old file
around only invites confusion.


Adjust
------
Open bmstune.ini in a text editor and change keepPercent:

    keepPercent=0      no trees (as shipped)
    keepPercent=25     a quarter of each batch
    keepPercent=100    untouched, as if the DLL were not there

Restart BMS to apply. To switch the cut off without uninstalling, set
enabled=0.

Changing the percentage changes which trees exist, not how far they reach.
The engine does not order trees by distance, so a partial cut thins
vegetation everywhere at once.


Uninstall
---------
Delete d3d11.dll and bmstune.ini from Bin\x64. Nothing else was created.


What it writes to disk
----------------------
Nothing. With this bmstune.ini the DLL creates no log, no folder, and no file.
Without any bmstune.ini it does nothing at all and the game runs as normal.


Using it with another d3d11.dll
-------------------------------
Only one file can be called d3d11.dll. If another tool already installed one
in Bin\x64, rename that file to bmstune_d3d11.dll and copy this d3d11.dll in.
bmstune loads bmstune_d3d11.dll when it finds one, so both stay in the chain.
To undo, delete d3d11.dll and rename bmstune_d3d11.dll back.


Troubleshooting
---------------
- BMS does not start: delete d3d11.dll from Bin\x64. The game is back to
  normal.
- Trees are still there: check that both files are in the same folder as
  Falcon BMS.exe, that the ini is named exactly bmstune.ini (Windows may hide
  a second ".txt" extension), and that enabled=1.
- Antivirus warning: the DLL is unsigned and intercepts Direct3D calls, which
  is what some heuristics look for. That interception is how it works.


Credits
-------
Function hooking by MinHook, Copyright (C) 2009-2017 Tsuda Kageyu. Its
licence is in LICENSE-MinHook.txt.
