AiAeT-TerrainCustomiser_Fix icon

TerrainCustomiser Fix

Community rebuild of Snosz-TerrainCustomiser 0.3.2 for current PEAK (verified v2.6.b): custom biome maps work again, with old-save, multiplayer and storm fixes. | 地形定制器 0.3.2 社区修复重建版,适配当前 PEAK,含旧存档、联机与风暴修复。

By AiAeT
Last updated 4 hours ago
Total downloads 27
Total rating 0 
Categories Tools World All Clients AI Generated Gameplay
Dependency string AiAeT-TerrainCustomiser_Fix-1.0.1
Dependants 0 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack_PEAK-5.4.75301 icon
BepInEx-BepInExPack_PEAK

BepInEx pack for PEAK. Preconfigured and ready to use.

Preferred version: 5.4.75301
Snosz-PhotonCustomPropsUtils-1.1.0 icon
Snosz-PhotonCustomPropsUtils

Helps modders easily synchronize room/player properties across all connected clients through Photon's Custom Properties.

Preferred version: 1.1.0
Snosz-UBImGui-1.0.0 icon
Snosz-UBImGui

A plugin that allows mod developers to use Dear ImGui in Unity.

Preferred version: 1.0.0

README

TerrainCustomiser (Fix)

English | 中文

Community rebuild of Snosz-TerrainCustomiser 0.3.2 for current PEAK (verified on v2.6.b).

Create your own variant of each biome with the in-game level editor, then play it with friends. The map syncs to everyone in the lobby, so only the host needs the save file, but every player needs this mod, the same version.

The original mod stopped working with PEAK 1.65.a. This is an unofficial maintenance rebuild that makes it work again on current game versions, old map saves included. Update history is in CHANGELOG.md.

Requirements

  • BepInExPack_PEAK
  • Snosz-UBImGui
  • Snosz-PhotonCustomPropsUtils
  • Every player in the lobby on the same version of this mod

Remove the original Snosz-TerrainCustomiser, TerrainCustomiserCN and the old separate TerrainCustomiser_ZH patch before installing. This rebuild keeps the original plugin ID (com.snosz.terraincustomiser), so BepInEx would load only one of them, and the Chinese UI is now built in.

Usage

Map saves live in AppData\LocalLow\LandCrab\PEAK\TerrainCustomiser\Map Saves.

Opening the airport kiosk menu shows the TerrainCustomiser window with Play and Editor modes. The editor works offline only.

Play

  1. Pick a map save, then set the seed and whether the lobby bakes lightmaps. The bake option is only available when every player has EnableLightMapBaking on; if anyone has it off, the menu says so and nobody bakes.
  2. Press Play. The map data syncs to all players and the custom map loads.

Editor

  1. Hold right-click for the free camera (WASD to move, scroll wheel for FOV).
  2. Use Swap to choose the biome for an area, then C to choose the variant to start from.
  3. Select the created segment and edit it through the Hierarchy / Inspector / Resource windows.

What this rebuild fixes and adds compared to the original

Works on current PEAK

  • Follows the async terrain pipeline introduced in 1.65.a (RunAll / Execute / SpawnNew, PropSpawner subclasses, LightVolume moved to LightVolume.Runtime.dll, Unity 6). Resource bundles are embedded in the DLL.
  • Custom maps initialize completely: spawn tracking, respawn statue, segment disabling, wallNext and hasFinishedStartRoutine all run. A failed generation stops the run instead of leaving a broken map; an empty save produces a normal vanilla island.
  • Custom variants that no longer contain a scout statue get a fallback for both the current and the previous statue, so map initialization, spawning and the first campfire's quicksave no longer throw.

Old map saves load again

  • Out-of-range section/segment indexes are skipped with a logged reason.
  • Name-based prop / material / Transform references resolve again; shared references are not duplicated.
  • Saved random-scale values are kept, and a missing multiplier defaults to 1, so old props no longer shrink to nothing.
  • Dead prop references are skipped instead of failing the whole map; nested segments such as the Caldera/Volcano pair are found.

Multiplayer

  • Room properties use TC_-prefixed keys, so they no longer overwrite TerrainRandomiser's keys.
  • Network IDs of generated objects are allocated by the host and matched on clients by hierarchy path (TC_sv), with the original list order as a fallback. A count difference only drops the objects that don't match, instead of rejecting the whole batch and leaving everything stuck.
  • Scene objects keep their own scene IDs on every machine instead of being renumbered, so storms, statues and other scene objects stay in sync even if a client activates them early.
  • Each prop spawner runs on its own random stream (seed plus hierarchy path), so one physics difference on one machine no longer changes every spawner after it.
  • Storms: the host also publishes each Alpine snowstorm / Roots windstorm start and stop. A client whose copy of the game's storm toggle never arrived applies the host's state within a few seconds.
  • A slow client is no longer pulled back to the airport by a stale scene sync at run start, and a scene that is already loading is not loaded twice. Reloading the island during a run reloads the same custom map.
  • The host sends the run-start call only once, and an empty lobby RunId no longer crashes the game.

Storms and lighting

  • Lightmaps bake through the game's own LightVolume pipeline, without the HDR-compression log spam, once after generation while every segment is still active.
  • Without a local lightmap (baking off or failed), Alpine and Roots storm shelter is judged by short upwind raycasts against the terrain instead of the stale lightmap, so hiding behind rock keeps the cold and the push off. It stands aside when An0n Fair Storms is installed or during a TrueFinalAscent run.
  • Turning baking off is the fix for the long load freeze on the host and the Size overflow crash on integrated GPUs; the raycast shelter keeps storms fair without it.

Works alongside other mods

  • TerrainRandomiser: during a custom-map session its leftover random-map settings are cleared on every machine and switched off in the room and lobby, so clients no longer build a random island under the custom map. Its quicksave patch is guarded so lighting a campfire saves normally.
  • TerrainRandomiser 1.2.0: the unused visibilitycompute bundle is no longer loaded, which removes the asset-bundle conflict that broke its startup.
  • TrueFinalAscent: during a Final Ascent run the RNG isolation, storm sync and shelter fallback stand aside.
  • RandomTerrainEnhance: when it is installed, its own scene-load guard is used instead of this mod's. External mods can recognise this rebuild by the Plugin.RteFixMarker constant.

Interface

  • Chinese UI built in (tables ported from WUYACHIYU-TerrainCustomiserCN 0.1.2, item and biome names matching PEAK's official Simplified Chinese). It follows the game language by default.
  • The airport menu explains when nobody can bake because one player has baking off.
  • Internal "remember last choice" settings are hidden from ModConfig.

Diagnostics

  • [TC] log lines for skipped save entries, rebuild warnings, segment and geometry statistics, storm zones, storm start/stop and any storm correction. Startup should log [TC] Save formatters ready; a successful load logs [TC] Terrain generation completed and [TC] Custom map '<name>' ready.

Configuration

BepInEx\config\com.snosz.terraincustomiser.cfg, also editable in-game through ModConfig.

Section Key Default What it does
General Language Auto UI language: Auto follows the game, or force English / 中文. Restart to apply.
General EnableLightMapBaking true Allow this PC to bake the custom map's lightmap. Turn off if loading freezes or crashes.
General StormShelterRaycast true Upwind-raycast storm shelter when this PC has no lightmap for the map.
General StormShelterRayDistance 10 How close terrain upwind must be to count as shelter, in metres.
Multiplayer EnableViewIdAlignment true Match generated network IDs by hierarchy path.
Multiplayer EnableRngIsolation true Separate random stream per spawner. Everyone needs the same build.
Multiplayer EnableSceneGuard true Client-side guard against stale scene syncs at run start.
Multiplayer EnableStormSync true Apply the host's storm state when the game's own toggle didn't arrive.
Multiplayer EnableDebugLog false Verbose multiplayer diagnostics; turn on only when reproducing a desync.

Compatibility and known issues

  • UBImGui 1.0.0 is an old build; if ImGui rendering itself breaks, that needs a separate fix.
  • Baking runs over a few frames; a player spawning during those seconds may briefly see every segment.
  • The mid-generation bake was dropped, so modifiers that sample the lightmap during generation read the previous lightmap.
  • Unity asset references in saved fields (for example MeshCollider.sharedMesh) may not restore; [TC] Rebuild warnings point to them.
  • The whole map is stored in Photon room properties, so very large maps can time out while syncing (original design).
  • Storm sync and the storm/ID fixes from 1.0.1 still need confirmation in a long multiplayer run; please report [TC] Storm log lines from both host and client if storms differ.

Credits

  • Original mod: Snosz (Snosz-TerrainCustomiser 0.3.2)
  • Rebuild and fixes: AiAeT
  • Chinese translation tables: ported from WUYACHIYU-TerrainCustomiserCN 0.1.2
  • Storm shelter raycast: approach from An0n Fair Storms

Development

dotnet build -c Release -p:EnableDeployment=false                         # build only
dotnet build -c Release -p:EnableDeployment=true                          # build and copy to BepInEx\plugins\[玩法]地形定制器fix-TerrainCustomiser
dotnet run --project 验证\Regression\Regression.csproj -c Release          # isolated regression tests
powershell -NoProfile -File 验证\Verify-Release.ps1                        # release checks on bin\Release

References: Refs\UBImGui.dll, Refs\PhotonCustomPropsUtils.dll (snapshots); game assemblies via $(ManagedDir)*.dll with BepInEx AssemblyPublicizer. A copy of the original 0.3.2 DLL is kept at 备份\TerrainCustomiser_0.3.2_orig.dll.


地形定制器(修复版)

English | 中文

Snosz-TerrainCustomiser 0.3.2 的社区修复重建版,适配当前 PEAK(已在 v2.6.b 验证)。

用游戏内关卡编辑器为每个群系做自己的变体,做好之后和朋友一起玩。地图会同步给房间里所有人,所以只有房主需要存档文件,但每名玩家都必须安装本模组,而且版本一致。

原模组从 PEAK 1.65.a 起失效。这是一个非官方的维护重建版,让它在当前游戏版本上恢复可用,旧地图存档也能加载。更新记录见 CHANGELOG.md。

前置需求

  • BepInExPack_PEAK
  • Snosz-UBImGui
  • Snosz-PhotonCustomPropsUtils
  • 房间内每名玩家都装同一版本的本模组

安装前请删掉原版 Snosz-TerrainCustomiser、TerrainCustomiserCN 和以前单独的 TerrainCustomiser_ZH 汉化补丁。本修复版沿用原版插件 ID(com.snosz.terraincustomiser),BepInEx 只会加载其中一个;中文界面已经内置。

使用方法

地图存档位于 AppData\LocalLow\LandCrab\PEAK\TerrainCustomiser\Map Saves。

打开机场售票亭菜单会出现地形定制器窗口,有 开始(Play) 和 编辑器(Editor) 两种模式。编辑器只能离线使用。

开始

  1. 选择地图存档,再设置种子以及是否为房间烘焙光照图。只有所有玩家都开着 EnableLightMapBaking 时才能勾烘焙;有人关了,菜单会提示本局全员不烘。
  2. 按「开始」。地图数据同步给所有玩家后开始加载自定义地图。

编辑器

  1. 按住右键进入自由视角(WASD 移动,滚轮调视野)。
  2. 用「切换(Swap)」为该区域选择群系,再按 C 选择从哪个变体开始做。
  3. 点选做好的图段,在层级 / 检查器 / 资源窗口里编辑。

相对原版修复和新增了什么

适配当前 PEAK

  • 跟进 1.65.a 起的异步地形管线(RunAll / Execute / SpawnNew、PropSpawner 子类化、LightVolume 迁入 LightVolume.Runtime.dll、Unity 6);资源包内嵌在 DLL 里。
  • 自定义地图完整初始化:出生追踪、复活雕像、图段禁用、wallNext、hasFinishedStartRoutine 全部生效。生成失败会阻止开局,不会留下一张坏图;空存档会生成一张普通原版岛。
  • 自定义变体里没有雕像时,「当前雕像」和「上一段雕像」都有兜底,地图初始化、出生和第一次点篝火的快速存档都不再报错。

旧地图存档恢复可用

  • 越界的分区 / 图段索引安全跳过并记录原因。
  • 按名字保存的物件 / 材质 / Transform 引用能找回,共享引用不会被复制成多份。
  • 保留存档里的随机缩放值,缺失的倍率默认回 1,旧物件不再缩成零。
  • 失效的物件引用直接跳过,不会让整张图失败;火山这种嵌套图段也能识别。

联机

  • 房间属性改用 TC_ 前缀键,不再和 TerrainRandomiser 的键互相覆盖。
  • 生成物的网络 ID 由主机分配,客机按层级路径对号(TC_sv),对不上时才回退原版的按顺序对号。数量有差异时只丢掉对不上的那几个,不会整批拒收、全部卡住。
  • 场景自带的物件在每台机器上都保留自己的场景 ID,不再重新编号;客机即使提前激活了它们,风暴、雕像等场景物件也能保持同步。
  • 每个物件生成器用独立的随机流(种子 + 层级路径),某台机器上一次物理判定不同,不会再连带改变后面所有生成器。
  • 风暴:主机会把高山暴风雪、森蕈(树根)大风的每次开始和停止也广播出去;客机没收到游戏自己的风暴切换时,几秒内按主机状态补上。
  • 开局时慢客机不会再被过期的场景同步拉回机场,正在加载的场景不会重复加载;本局中途重载岛会重新加载同一张自定义图。
  • 主机只发一次开局指令;大厅 RunId 为空时不再崩溃。

风暴与光照

  • 光照图走游戏自己的 LightVolume 管线烘焙,不再刷 HDR 压缩日志;在生成完成、所有图段还激活时烘一次。
  • 本机没有光照图(关了烘焙或烘焙失败)时,高山和森蕈风暴的遮蔽改用几条朝上风方向的短射线判断,命中地形就算挡住,不再看那份对不上的旧光照图,躲在岩石后面就不会掉寒冷、不会被吹动。装了 An0n Fair Storms 或在 TrueFinalAscent 末日局里会让位。
  • 关掉烘焙可以避免主机加载时长时间卡死、核显 Size overflow 崩溃;有射线遮蔽兜底,不烘焙风暴也公平。

与其他模组共存

  • TerrainRandomiser:自定义图会话中每台机器都会清掉它残留的随机配置,并在房间和大厅里把随机开关关掉,客机不会再在自定义图下面先生成一张随机岛。它的快速存档补丁也做了保护,点篝火能正常存档。
  • TerrainRandomiser 1.2.0:不再加载闲置的 visibilitycompute 资源包,消除了导致它启动中断的资源包冲突。
  • TrueFinalAscent:末日局里随机流隔离、风暴同步和遮蔽兜底都会让位。
  • 随机地形增强:装了它时改用它自带的场景加载守卫。外部模组可通过 Plugin.RteFixMarker 常量识别本修复版。

界面

  • 内置中文界面(翻译表移植自 WUYACHIYU-TerrainCustomiserCN 0.1.2,物品和群系名对齐 PEAK 官方简中),默认跟随游戏语言。
  • 有玩家关了烘焙时,机场菜单会说明本局全员不烘。
  • 只用来记住上次勾选的内部设置不再显示在 ModConfig 里。

诊断

  • [TC] 日志记录存档跳过原因、重建警告、图段与几何统计、风暴区、风暴开始 / 停止和每一次风暴纠正。启动日志应出现 [TC] Save formatters ready;成功进图应出现 [TC] Terrain generation completed 和 [TC] Custom map '<地图名>' ready。

配置

配置文件 BepInEx\config\com.snosz.terraincustomiser.cfg,也可以在游戏里用 ModConfig 改。

分组 键 默认 作用
General Language Auto 界面语言:Auto 跟随游戏,也可强制 English / 中文。重启生效。
General EnableLightMapBaking true 允许本机烘焙自定义图的光照图。加载卡死或崩溃时关掉。
General StormShelterRaycast true 本机没有这张图的光照图时,用上风射线判断风暴遮蔽。
General StormShelterRayDistance 10 上风方向多近的地形算遮蔽,单位米。
Multiplayer EnableViewIdAlignment true 生成物网络 ID 按层级路径对号。
Multiplayer EnableRngIsolation true 每个生成器独立随机流,全员需同一版本。
Multiplayer EnableSceneGuard true 客机开局时拦住过期的场景同步。
Multiplayer EnableStormSync true 游戏自己的风暴切换没送到时,按主机状态补上。
Multiplayer EnableDebugLog false 详细联机诊断日志,只在复现不同步时打开。

兼容性与已知问题

  • UBImGui 1.0.0 是旧构建,若 ImGui 本身渲染失效需另行处理。
  • 烘焙会持续几帧,这几秒内出生的玩家可能短暂看到所有图段。
  • 已去掉生成过程中的那次烘焙,生成期采样光照图的修改器读到的是旧光照图。
  • 存档字段里的 Unity 资源引用(如 MeshCollider.sharedMesh)可能恢复失败,日志里的 [TC] Rebuild 警告会指出位置。
  • 整张地图存在 Photon 房间属性里,地图过大有同步超时的风险(沿用原设计)。
  • 1.0.1 的风暴同步和风暴 / ID 修复还需要一次长时间联机确认;如果主客机风暴不一致,请把双方日志里的 [TC] Storm 行发出来。

致谢

  • 原模组:Snosz(Snosz-TerrainCustomiser 0.3.2)
  • 重建与修复:AiAeT
  • 中文翻译表:移植自 WUYACHIYU-TerrainCustomiserCN 0.1.2
  • 风暴遮蔽射线:参考 An0n Fair Storms 的做法

开发

dotnet build -c Release -p:EnableDeployment=false                         # 仅编译
dotnet build -c Release -p:EnableDeployment=true                          # 编译并复制到 BepInEx\plugins\[玩法]地形定制器fix-TerrainCustomiser
dotnet run --project 验证\Regression\Regression.csproj -c Release          # 隔离回归测试
powershell -NoProfile -File 验证\Verify-Release.ps1                        # 对 bin\Release 做发布校验

依赖引用:Refs\UBImGui.dll、Refs\PhotonCustomPropsUtils.dll(快照);游戏程序集走 $(ManagedDir)*.dll + BepInEx AssemblyPublicizer。原版 0.3.2 DLL 备份在 备份\TerrainCustomiser_0.3.2_orig.dll。