I'd like a new configuration setting implemented for planetary system / gbody, which would be set in their configuration files (e.g. in "Sol.cfg", "Sun.cfg", "Earth.cfg", etc.), that would change the default search sub-path for the dependent files (inside appropriate "global" directory for the type of the resource), like additional planet's configuration/data files, planetary textures, or planetary mesh.
To explain better how I'd like to see it working, let's name that setting "
DataDir".
With the
DataDir set, the default paths for the system or body would be:
- Default configuration search path for "Base", "Data", "Marker", "Atmosphere.cfg" in:
$(ConfigDir)\$(DataDir)
- Default mesh search path (MaxPatchResolution = 0) in:
$(MeshDir)\$(DataDir)
- Default texture search path (.tex, .dds for surftiles, .bmp for legacy MapMFD) in:
$(HightexDir)\$(DataDir)
$(TextureDir)\$(DataDir)
Without the
DataDir set, paths would be just like they were:
- Default configuration search path for "Base", "Data", "Marker", "Atmosphere.cfg" in:
$(ConfigDir)\$(Name)
- Default mesh search path (MaxPatchResolution = 0) in:
$(MeshDir)
- Default texture search path (.tex, .dds for surftiles, .bmp for legacy MapMFD) in:
$(HightexDir)
$(TextureDir)
I.e. a value of DataDir would be used for a subdirectory in Config if DataDir was set, and if it wasn't, then the body's Name (like currently); resources in other folders (Textures, Meshes) would use the body's Name for file names, like they currently do, but if DataDir is set, those files would be searched in a subdirectory of the resources' folder pointed by DataDir.
An example (with default ConfigDir, MeshDir, TextureDir, HightexDir):
Quote:
- Sol.cfg:
Code:
; === Configuration file for solar system ===
Name = Sol
DataDir = TestSol
Star1 = Sun
Planet1 = Mercury
Planet2 = Venus
Planet3 = Sol/Earth/Body
Earth:Moon1 = Sol/Earth/Moon/@
- Markers: .\Config\TestSol\Marker\*.mkr
- Sun.cfg:
Code:
; === Configuration file for star Sun ===
Name = Sun
Module = Sun
DataDir = TestSol/Sun1
...
- Data: .\Config\TestSol\Sun1\Data\*
- Atmosphere: .\Config\TestSol\Sun1\Atmosphere.cfg
- Textures: .\Textures\TestSol\Sun1\Star.dds
- Mercury.cfg (no DataDir set):
Code:
; === Configuration file for planet Mercury ===
Name = Mercury
Module = Mercury
...
- Data: .\Config\Mercury\Data\*
- Atmosphere: .\Config\Mercury\Atmosphere.cfg
- Markers: .\Config\Mercury\Markers\*.mkr
- Bases: .\Config\Mercury\Base\*.cfg
- Textures: .\Textures{2}\Mercury*.tex
.\Textures{2}\Mercury*.bin
.\Textures{2}\Mercury*.dds
.\Textures{2}\MercuryM.bmp
- Venus.cfg:
Code:
; === Configuration file for planet Venus ===
Name = Venus
Module = Venus
DataDir = Sol/Venus
MarkerPath = Config/MarkersOfVenus
...
- Data: .\Config\Sol\Venus\Data\*
- Atmosphere: .\Config\Sol\Venus\Atmosphere.cfg
- Markers*: Config\MarkersOfVenus\*.mkr
- Bases: .\Config\Sol\Venus\Base\*.cfg
- Textures: .\Textures{2}\Sol\Venus\Venus*.tex
.\Textures{2}\Sol\Venus\Venus*.bin
.\Textures{2}\Sol\Venus\Venus*.dds
.\Textures{2}\Sol\Venus\VenusM.bmp
- Sol\Earth\Body.cfg:
Code:
; === Configuration file for planet Earth ===
Name = Earth
Module = Earth
DataDir = Sol/Earth
...
BEGIN_SURFBASE
DIR Earth\Base
END_SURFBASE
...
- Data: .\Config\Sol\Earth\Data\*
- Atmosphere: .\Config\Sol\Earth\Atmosphere.cfg
- Markers: .\Config\Sol\Earth\Markers\*.mkr
- Bases*: .\Config\Earth\Base\*.cfg
- Textures: .\Textures{2}\Sol\Earth\Earth*.tex
.\Textures{2}\Sol\Earth\Earth*.bin
.\Textures{2}\Sol\Earth\Earth*.dds
.\Textures{2}\Sol\Earth\EarthM.bmp
- Sol\Earth\Moon\@.cfg:
Code:
; === Configuration file for moon Moon(Earth) ===
Name = Moon
Module = Moon
DataDir = TestMoon
MaxPatchResolution = 0 ; use explicit mesh
...
- Data: .\Config\TestMoon\Data\*
- Atmosphere: .\Config\TestMoon\Atmosphere.cfg
- Markers: .\Config\TestMoon\Markers\*.mkr
- Bases: .\Config\TestMoon\Base\*.cfg
- Mesh: .\Meshes\TestMoon\Moon.msh
- Textures: .\Textures\TestMoon\MoonM.bmp
* - Directory set by different setting, like MarkerPath or DIR directive for surface bases.
Why:
- To add capability of having different sets of textures/vector maps/configurations for bodies using the same name in different planetary systems, or different sets of configurations for systems placed in different configuration files, but having the same name.
- To make user made planetary systems no longer overwrite the default Star.dds, but enable them to have their own directory for their textures.
- To make that feature request obsolete.
- To make me able to recreate fully hierarchical configuration for planetary system I had in Orbiter 2002/2003 (when there were no data folders for systems and celestial bodies directly in Config directory), e.g. to have all the configuration for Moon in "Config/Sol/Sun/Earth/Moon" directory.
