Skip to content

Commit

Permalink
Release-175: Fix some doc typos in the autogenerated configs.
Browse files Browse the repository at this point in the history
  • Loading branch information
R-T-B committed Jul 23, 2023
1 parent da23ffd commit 91b0545
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 27 deletions.
10 changes: 3 additions & 7 deletions README.md
@@ -1,19 +1,15 @@
Kopernicus
==============================
June 22nd, 2023
June 23rd, 2023
* Created by: BryceSchroeder and Nathaniel R. Lewis (Teknoman117)
* Actively maintained by: Prestja and R-T-B.
* Formerly maintained by: Thomas P., NathanKell and KillAshley
* Additional Content by: Democat3457, Gravitasi, aftokino, KCreator, Padishar, Kragrathea, OvenProofMars, zengei, MrHappyFace, Sigma88, Majiir (CompatibilityChecker), blackrack/LGHassen (shaders/GPL'd scatterer code)
* Much thanks to Sarbian for ModuleManager and ModularFlightIntegrator

New in this latest version release-174:
New in this latest version release-175:

1.) New parameters added related to scaling Kerbal scale bodies automatically to real world densities (such as the stock system). Please see the config file or GUI for a description of each parameter. They are designed to be used alongside a rescale mod like Sigma Dimensions. If you don't want to play with a real world density system (most don't) you can just ignore this.

2.) Reorganize the GUI to be more sensibly arranged (boolean/checkbox options up top, always).

3.) In short, most the things added in this release are for pack authors to easily make "real world scale" systems, and the end users don't need to touch them, really.
1.) New parameter documentation in autogenerated Kopernicus_Config.cfg and GUI updated correcting some incorrect info.

Known Bugs:

Expand Down
Expand Up @@ -8,7 +8,7 @@
"MAJOR": 1,
"MINOR": 12,
"PATCH": 1,
"BUILD": 174
"BUILD": 175
},
"KSP_VERSION_MIN":
{
Expand Down
2 changes: 1 addition & 1 deletion src/Kopernicus/Constants/CompatibilityChecker.cs
Expand Up @@ -56,7 +56,7 @@ public class CompatibilityChecker : MonoBehaviour
#endif
internal const Int32 VERSION_MINOR_LOWER_LIMIT = 8;
internal const Int32 REVISION = 1;
internal const Int32 KOPERNICUS = 174;
internal const Int32 KOPERNICUS = 175;

public static Boolean IsCompatible()
{
Expand Down
4 changes: 2 additions & 2 deletions src/Kopernicus/Constants/Version.cs
Expand Up @@ -39,9 +39,9 @@ public static String VersionNumber
get
{
#if (!KSP_VERSION_1_8)
return "Release-174";
return "Release-175";
#else
return "LEGACY18_Release-174";
return "LEGACY18_Release-175";
#endif
}
}
Expand Down
25 changes: 16 additions & 9 deletions src/Kopernicus/Injector.cs
Expand Up @@ -304,16 +304,23 @@ public void PostSpawnFixups()
}
}
}
if ((!body.name.Equals("Sun") && Utility.IsStockBody(body)) && (RuntimeUtility.RuntimeUtility.KopernicusConfig.UseRealWorldDensity))
if ((!body.name.Equals("Sun") && (RuntimeUtility.RuntimeUtility.KopernicusConfig.UseRealWorldDensity)))
{
float realWorldSize = RuntimeUtility.RuntimeUtility.KopernicusConfig.RealWorldSizeFactor;
float rescaleFactor = RuntimeUtility.RuntimeUtility.KopernicusConfig.RescaleFactor;
float gpm = rescaleFactor / realWorldSize;
float massFactor = 1 / ((realWorldSize - rescaleFactor) + 1);
body.Mass *= massFactor;
body.gravParameter *= gpm;
body.GeeASL *= gpm;
body.scienceValues.spaceAltitudeThreshold *= gpm;
if ((!Utility.IsStockBody(body)) && (RuntimeUtility.RuntimeUtility.KopernicusConfig.LimitRWDensityToStockBodies))
{
//Do Nothing
}
else
{
float realWorldSize = RuntimeUtility.RuntimeUtility.KopernicusConfig.RealWorldSizeFactor;
float rescaleFactor = RuntimeUtility.RuntimeUtility.KopernicusConfig.RescaleFactor;
float gpm = rescaleFactor / realWorldSize;
float massFactor = 1 / ((realWorldSize - rescaleFactor) + 1);
body.Mass *= massFactor;
body.gravParameter *= gpm;
body.GeeASL *= gpm;
body.scienceValues.spaceAltitudeThreshold *= gpm;
}
}
// Event
Events.OnPostBodyFixing.Fire(body);
Expand Down
2 changes: 1 addition & 1 deletion src/Kopernicus/Properties/AssemblyInfo.cs
Expand Up @@ -13,7 +13,7 @@
[assembly: KSPAssemblyDependency("Kopernicus.Parser", 1, 0)]
[assembly: KSPAssemblyDependency("ModularFlightIntegrator", 1, 0)]
[assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyFileVersion("1.12.174.0")]
[assembly: AssemblyFileVersion("1.12.175.0")]
[assembly: LogAggregator("GameData/ModuleManager.ConfigCache")]
[assembly: LogAggregator("Logs/Kopernicus/")]
[assembly: LogAggregator("KSP.log")]
8 changes: 4 additions & 4 deletions src/Kopernicus/RuntimeUtility/RuntimeUtility.cs
Expand Up @@ -1182,8 +1182,8 @@ private void WriteConfigIfNoneExists()
configFile.WriteLine(" ScatterLatLongDecimalPrecision = 5 //Integer. Default 5. Higher values allow for smoother scatter/biome precision, at the cost of performance. Leave untouched if unsure.");
configFile.WriteLine(" UseOnDemandLoader = False //Boolean. Default False. Turning this on can save ram and thus improve perforamnce situationally but will break some mods requiring long distance viewing and also increase stutter.");
configFile.WriteLine(" UseRealWorldDensity = False //Boolean. Default False. Turning this on will calculate realistic body gravity and densities for all or Kerbolar/stock bodies based on size of said body. Don't turn this on unless you understand what it does.");
configFile.WriteLine(" RecomputeSOIAndHillSpheres = False //Boolean. Default False. Turning this on will recompute hill spheres and SOIs using standard math for bodies that have been modified for density in anyway by UseRealWorldDensity. Affected by LimitRWDensityToStockBodies bool. Leave alone if you don't understand.");
configFile.WriteLine(" LimitRWDensityToStockBodies = True //Boolean. Default True. Turning this on will limit density/HS/SOI corrections to stock/Kerbolar bodies only. Don't mess with this unless you understand what it does.");
configFile.WriteLine(" RecomputeSOIAndHillSpheres = False //Boolean. Default False. Turning this on will recompute hill spheres and SOIs using standard math for bodies that have been modified for density in anyway by UseRealWorldDensity. Global effect/Not affected by LimitRWDensityToStockBodies. Leave alone if you don't understand.");
configFile.WriteLine(" LimitRWDensityToStockBodies = True //Boolean. Default True. Turning this on will limit density corrections to stock/Kerbolar bodies only. Don't mess with this unless you understand what it does.");
configFile.WriteLine(" RescaleFactor = 1.0 //Float. Default 1.0. Set this to the rescale factor of your system if using UseRealWorldDensity, otherwise ignore.");
configFile.WriteLine(" RealWorldSizeFactor = 10.625 //Float. Default 10.625. This is the size the density multiplier considers a 'normal' real world system. Don't change unless you know what you are doing.");
configFile.WriteLine(" SelectedPQSQuality = " + PQSCache.PresetList.preset);
Expand Down Expand Up @@ -1234,8 +1234,8 @@ private void UpdateConfig()
configFile.WriteLine(" ScatterLatLongDecimalPrecision = " + KopernicusConfig.ScatterLatLongDecimalPrecision.ToString() + " //Integer. Default 5. Higher values allow for smoother scatter/biome precision, at the cost of performance. Leave untouched if unsure.");
configFile.WriteLine(" UseOnDemandLoader = " + KopernicusConfig.UseOnDemandLoader.ToString() + " //Boolean. Default False. Turning this on can save ram and thus improve perforamnce situationally but will break some mods requiring long distance viewing and also increase stutter.");
configFile.WriteLine(" UseRealWorldDensity = " + KopernicusConfig.UseRealWorldDensity.ToString() + " //Boolean. Default False. Turning this on will calculate realistic body gravity and densities for all or Kerbolar/stock bodies based on size of said body. Don't turn this on unless you understand what it does.");
configFile.WriteLine(" RecomputeSOIAndHillSpheres = " + KopernicusConfig.RecomputeSOIAndHillSpheres.ToString() + " //Boolean. Default False. Turning this on will recompute hill spheres and SOIs using standard math for bodies that have been modified for density in anyway by UseRealWorldDensity. Affected by LimitRWDensityToStockBodies bool. Leave alone if you don't understand.");
configFile.WriteLine(" LimitRWDensityToStockBodies = " + KopernicusConfig.LimitRWDensityToStockBodies.ToString() + " //Boolean. Default True. Turning this on will limit density/HS/SOI corrections to stock/Kerbolar bodies only. Don't mess with this unless you understand what it does.");
configFile.WriteLine(" RecomputeSOIAndHillSpheres = " + KopernicusConfig.RecomputeSOIAndHillSpheres.ToString() + " //Boolean. Default False. Turning this on will recompute hill spheres and SOIs using standard math for bodies that have been modified for density in anyway by UseRealWorldDensity. Global effect/Not affected by LimitRWDensityToStockBodies. Leave alone if you don't understand.");
configFile.WriteLine(" LimitRWDensityToStockBodies = " + KopernicusConfig.LimitRWDensityToStockBodies.ToString() + " //Boolean. Default True. Turning this on will limit density corrections to stock/Kerbolar bodies only. Don't mess with this unless you understand what it does.");
configFile.WriteLine(" RescaleFactor = " + KopernicusConfig.RescaleFactor.ToString() + " //Float. Default 1.0. Set this to the rescale factor of your system if using UseRealWorldDensity, otherwise ignore.");
configFile.WriteLine(" RealWorldSizeFactor = " + KopernicusConfig.RealWorldSizeFactor.ToString() + " //Float. Default 10.625. This is the size the density multiplier considers a 'normal' real world system. Don't change unless you know what you are doing.");
configFile.WriteLine(" SelectedPQSQuality = " + PQSCache.PresetList.preset);
Expand Down
4 changes: 2 additions & 2 deletions src/Kopernicus/UI/ToolbarButton.cs
Expand Up @@ -115,8 +115,8 @@ public void DrawKopernicusWindow(int windowId)
RuntimeUtility.RuntimeUtility.KopernicusConfig.ResetFloatingOriginOnKSCReturn = GUILayout.Toggle(RuntimeUtility.RuntimeUtility.KopernicusConfig.ResetFloatingOriginOnKSCReturn, "ResetFloatingOriginOnKSCReturn: Check this for interstaller (LY+) range planet packs to prevent corruption on return to KSC.", toggleStyle);
RuntimeUtility.RuntimeUtility.KopernicusConfig.UseOnDemandLoader = GUILayout.Toggle(RuntimeUtility.RuntimeUtility.KopernicusConfig.UseOnDemandLoader, "UseOnDemandLoader: Turning this on can save ram and thus improve perforamnce situationally but will break some mods requiring long distance viewing and also increase stutter.", toggleStyle);
RuntimeUtility.RuntimeUtility.KopernicusConfig.UseRealWorldDensity = GUILayout.Toggle(RuntimeUtility.RuntimeUtility.KopernicusConfig.UseRealWorldDensity, "UseRealWorldDensity: Turning this on will calculate realistic body gravity and densities for all or Kerbolar/stock bodies based on size of said body. Don't turn this on unless you understand what it does.", toggleStyle);
RuntimeUtility.RuntimeUtility.KopernicusConfig.RecomputeSOIAndHillSpheres = GUILayout.Toggle(RuntimeUtility.RuntimeUtility.KopernicusConfig.RecomputeSOIAndHillSpheres, "RecomputeSOIAndHillSpheres: Turning this on will recompute hill spheres and SOIs using standard math for bodies that have been modified for density in anyway by UseRealWorldDensity. Affected by LimitRWDensityToStockBodies bool. Leave alone if you don't understand.", toggleStyle);
RuntimeUtility.RuntimeUtility.KopernicusConfig.LimitRWDensityToStockBodies = GUILayout.Toggle(RuntimeUtility.RuntimeUtility.KopernicusConfig.LimitRWDensityToStockBodies, "LimitRWDensityToStockBodies: Turning this on will limit density/HS/SOI corrections to stock/Kerbolar bodies only. Don't mess with this unless you understand what it does.", toggleStyle);
RuntimeUtility.RuntimeUtility.KopernicusConfig.RecomputeSOIAndHillSpheres = GUILayout.Toggle(RuntimeUtility.RuntimeUtility.KopernicusConfig.RecomputeSOIAndHillSpheres, "RecomputeSOIAndHillSpheres: Turning this on will recompute hill spheres and SOIs using standard math for bodies that have been modified for density in anyway by UseRealWorldDensity. Global effect/Not affected by LimitRWDensityToStockBodies. Leave alone if you don't understand.", toggleStyle);
RuntimeUtility.RuntimeUtility.KopernicusConfig.LimitRWDensityToStockBodies = GUILayout.Toggle(RuntimeUtility.RuntimeUtility.KopernicusConfig.LimitRWDensityToStockBodies, "LimitRWDensityToStockBodies: Turning this on will limit density corrections to stock/Kerbolar bodies only. Don't mess with this unless you understand what it does.", toggleStyle);
GUILayout.Label("ScatterLatLongDecimalPrecision: Higher values allow for smoother scatter/biome precision, at the cost of performance. Leave untouched if unsure.", labelStyle);
try
{
Expand Down

0 comments on commit 91b0545

Please sign in to comment.