Orbiter-Forum  

Go Back   Orbiter-Forum > Projects > ORBITER: 2010-P1 > Feature
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

"DataDir" setting for system / gbody configuration files Issue Tools
issueid=812 07-26-2011 06:42 PM
orb orb is offline
O-F Administrator
Ninja
"DataDir" setting for system / gbody configuration files
A setting that would change the default search sub-paths for system/planetary dependent files.

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:
  1. 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.
  2. To make user made planetary systems no longer overwrite the default Star.dds, but enable them to have their own directory for their textures.
  3. To make that feature request obsolete.
  4. 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.
Issue Details
Issue Type Feature
Project ORBITER: 2010-P1
Status Request
Priority 5 - Medium
Suggested Version 111105
Implemented Version (none)
Votes for this feature 4
Votes against this feature 0
Assigned Users (none)
Tags (none)

08-22-2011 03:22 AM
Issue Changed by orb
  • Applicable version changed from 101016 to 110822
10-05-2011 01:57 AM
Issue Changed by orb
  • Applicable version changed from 110822 to 110824
10-31-2011 08:43 PM
Issue Changed by orb
  • Applicable version changed from 110824 to 111029
12-31-2011 06:14 AM
Issue Changed by orb
  • Applicable version changed from 111029 to 111105
Reply

Issue Tools
Subscribe to this issue

All times are GMT. The time now is 10:23 PM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2007 - 2012, Orbiter-Forum.com. All rights reserved.