Mars XML ref to LunaCliffsDiffuse in mods broken since v2025.11.10.2915

tomservo

New Member
Oct 16, 2025
2
0
Since v2025.11.10.2915 something has seemingly broken with XML data references by Id, specifically LunaCliffsDiffuse

All these variations used to work before this version, I suspect something unexpected broke with XML data cross referencing in the new XML refactoring

When loading a custom system from a mod like this, the game will crash
XML:
<?xml version="1.0" encoding="utf-8"?>
<System Id="GeneratedSystem">
  <DisplayName Value="GeneratedSystem"/>
  <LoadFromLibrary Id="Sol"/>
  <LoadFromLibrary Id="Rocket" Parent="Earth"/>
  <LoadFromLibrary Id="Gemini7" Parent="Earth"/>
  <LoadFromLibrary Id="Gemini6a" Parent="Earth"/>
  <LoadFromLibrary Id="Hunter" Parent="Earth"/>
  <LoadFromLibrary Id="Banjo" Parent="Earth"/>
  <LoadFromLibrary Id="Polaris" Parent="Earth"/>
  <LoadFromLibrary Id="Mars" Parent="Sol"/>
  <LoadFromLibrary Id="Earth" Parent="Sol"/>
</System>

Like this (Mars after Earth), the game starts but Mars is missing completely from the simulation

XML:
<?xml version="1.0" encoding="utf-8"?>
<System Id="GeneratedSystem">
  <DisplayName Value="GeneratedSystem"/>
  <LoadFromLibrary Id="Sol"/>
  <LoadFromLibrary Id="Rocket" Parent="Earth"/>
  <LoadFromLibrary Id="Gemini7" Parent="Earth"/>
  <LoadFromLibrary Id="Gemini6a" Parent="Earth"/>
  <LoadFromLibrary Id="Hunter" Parent="Earth"/>
  <LoadFromLibrary Id="Banjo" Parent="Earth"/>
  <LoadFromLibrary Id="Polaris" Parent="Earth"/>
  <LoadFromLibrary Id="Earth" Parent="Sol"/>
  <LoadFromLibrary Id="Mars" Parent="Sol"/>
</System>

And if you re-define Mars in a mod (see Gist, XML too big to include here), it blows up like this (again, this used to work):


Code:
System.NullReferenceException: TextureReference is null for 'LunaCliffsDiffuse'
   at KSA.ModLibrary.Get[T](String id)
   at KSA.TextureReference.Get()
   at KSA.BiomeMaterialsReference.GetTextureReference(TextureArrayType textureType, Int32 id, BiomeMaterialType materialType)
   at KSA.CelestialRenderData.<.ctor>g__PopulateTextureArray|31_0(CelestialRenderData data, AstronomicalTemplate bodyTemplate, TextureArrayType arrayType, BiomeMaterialType materialType)
   at KSA.CelestialRenderData..ctor(Astronomical celestial)
   at KSA.Astronomical.SetPbrMaterial() SetPbrMaterial (in C:\prototype-planet\KSA\Astronomical.cs:379)
System.NullReferenceException: TextureReference is null for 'LunaCliffsDiffuse'
   at KSA.ModLibrary.Get[T](String id)
   at KSA.TextureReference.Get()
   at KSA.BiomeMaterialsReference.GetTextureReference(TextureArrayType textureType, Int32 id, BiomeMaterialType materialType)
   at KSA.BiomeMaterialsReference.UpdateReferences()
   at KSA.PlanetRenderer..ctor(Renderer renderer, RenderPassState renderPassState, Int32 frameCount, CloudShadowsRenderer cloudShadowsRenderer)
   at KSA.Program..ctor(IReadOnlyList`1 inArgs)
   at KSA.Program.Main(String[] inArgs) .ctor (in C:\prototype-planet\KSA\Program.cs:300)
 
Last edited:
Upvote 0