A curated forum for compatible and maintained mods. Users are unable to create new topics in this forum but can reply to existing topics. Please message a moderator to have your mod moved into this forum area.
/// <summary>
/// Replaces the heightmap buffer in the WoodsFile with a 1000x500 version of the Interesting Terrains heightmap.
/// </summary>
public static void InitializeWoodsFileHeightmap()
{
var woodsFile = DaggerfallUnity.Instance.ContentReader.WoodsFileReader;
var original = woodsFile.Buffer;
originalHeightmapBuffer = new byte[original.Length];
for (int i = 0; i < original.Length; i++)
{
originalHeightmapBuffer[i] = original[i];
}
var alteredHeights = new ComputeBuffer(original.Length, sizeof(float));
var cs = UnityEngine.Object.Instantiate(InterestingTerrains.mainHeightComputer);
var k = cs.FindKernel("CSMain");
cs.SetFloat("newHeight", Constants.TERRAIN_HEIGHT);
cs.SetFloat("maxTerrainHeight", 2308.5f);
cs.SetFloat("scaledOceanElevation", 27.2f);
cs.SetFloat("baseHeightScale", 8f);
cs.SetFloat("noiseMapScale", 4f);
cs.SetFloat("extraNoiseScale", 10f);
cs.SetVector("terrainSize", new Vector2(WoodsFile.MapWidth, WoodsFile.MapHeight));
cs.SetVector("terrainPosition", Vector2.zero);
cs.SetTexture(k, "BiomeMap", InterestingTerrains.biomeMap);
cs.SetTexture(k, "DerivMap", InterestingTerrains.derivMap);
cs.SetBuffer(k, "Result", alteredHeights);
InterestingTerrains.instance.csParams.ApplyToCS(cs);
cs.Dispatch(k, WoodsFile.MapWidth / 10, WoodsFile.MapHeight / 5, 1);
var floatHeights = new float[original.Length];
alteredHeights.GetData(floatHeights);
alteredHeightmapBuffer = Utility.ToBytes(floatHeights);
woodsFile.Buffer = alteredHeightmapBuffer;
baseHeightmap = new Texture2D(WoodsFile.MapWidth, WoodsFile.MapHeight);
baseHeightmap.SetPixels32(ToBasemap(alteredHeightmapBuffer));
baseHeightmap.Apply();
alteredHeights.Release();
alteredHeights.Dispose();
}
==> Interesting Terrains: No tileData found for map pixel 381x83
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 39)
NullReferenceException: Object reference not set to an instance of an object
at Unity.Collections.NativeArray`1[T]..ctor (System.Byte[] array, Unity.Collections.Allocator allocator) [0x00001] in <e0319199624e47f2b61fa4f72ffdb9ee>:0
at Monobelisk.InterestingTerrainTexturer.ScheduleAssignTilesJob (DaggerfallWorkshop.ITerrainSampler terrainSampler, DaggerfallWorkshop.MapPixelData& mapData, Unity.Jobs.JobHandle dependencies, System.Boolean march) [0x0001d] in <ae659302a68f4d1a8b5756d508b5fb1f>:0
at DaggerfallWorkshop.DaggerfallTerrain.BeginMapPixelDataUpdate (DaggerfallWorkshop.ITerrainTexturing terrainTexturing) [0x00115] in <137da0d09ba34683a2f7e617c5ec363c>:0
at DaggerfallWorkshop.StreamingWorld.UpdateTerrainData (DaggerfallWorkshop.StreamingWorld+TerrainDesc terrainDesc) [0x0004a] in <137da0d09ba34683a2f7e617c5ec363c>:0
at DaggerfallWorkshop.StreamingWorld.InitPlayerTerrain () [0x00033] in <137da0d09ba34683a2f7e617c5ec363c>:0
at DaggerfallWorkshop.StreamingWorld.Update () [0x00093] in <137da0d09ba34683a2f7e617c5ec363c>:0
(Filename: <e0319199624e47f2b61fa4f72ffdb9ee> Line: 0)
Entering new map pixel X=381, Y=83
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 39)
I get a black screen and no response from the keys, including Escape (I can use the console to kill my character, though).
Strange, I thought maybe it would be the mod load order, but that wasn't it. Then I thought maybe it's that specific location, but that wasn't it either. Here I am at that exact coordinate:
What other mods do you have? And can you send me your save file?
Can you try using the mod files compiled for Windows instead of the ones for Linux? I managed to get your issue by using the Linux ones. It should still work despite the mismatch. If it works, I may have to just package only the Windows .dfmod.
Distant terrain + Interesting Eroded terrain produce these white lines in a square manner. I dont know which mod is the reason, so I will report it here as well.
DaggerfallUnity_2021-11-06_13-30-50.jpg (557.27 KiB) Viewed 1370 times
King of Worms wrote: ↑Mon Nov 15, 2021 12:12 pm
Distant terrain + Interesting Eroded terrain produce these white lines in a square manner. I dont know which mod is the reason, so I will report it here as well.
DaggerfallUnity_2021-11-06_13-30-50.jpg
Happens to me with Mountains and Hills + Distant Terrain as well. I am suspecting that Distain Terrain is the culprit here.