Releases: Daotie/CS2-RouteFilter
Release list
RouteFilter 1.0.5
RouteFilter 1.0.5
English
RouteFilter 1.0.5 keeps the mod running on game 1.6.0f1, where mods are initialized on a background thread and the Input System throws inside key binding registration.
Fixed
- On game 1.6.0f1, mod
OnLoadcan run on a thread-pool continuation. The Input System's Temp allocator fails there, so resolvingToggleRestrictionTool:<Keyboard>/ninsideInputBindingResolver.AddActionMapthrewArgumentNullException: destinationand aborted the whole mod (the same failure also breaks other key-binding mods). Key binding registration is now retried on the main thread, where the same registration succeeds. - Even when every registration attempt fails, the mod still starts: the shortcut key is skipped gracefully and the top-left panel button remains the way to open the panel.
- Systems that poll the shortcut actions tolerate a missing action map instead of throwing every frame.
Compatibility
Save payload version stays 2. Saves from RouteFilter 1.0.1 and earlier still load and keep their per-entity restriction data.
中文
RouteFilter 1.0.5 保证在游戏 1.6.0f1 上正常运行。该版本会在后台线程初始化 mod,输入系统在按键绑定注册时会抛异常,此前会导致整个 mod 启动失败。
修复
- 游戏 1.6.0f1 中,mod 的
OnLoad可能在后台线程执行;输入系统的 Temp 分配器在该线程必然失败,解析ToggleRestrictionTool:<Keyboard>/n时在InputBindingResolver.AddActionMap内抛出ArgumentNullException: destination,导致整个 mod 初始化中止(其他注册快捷键的 mod 也以同样方式失败)。现在按键绑定注册会在主线程重试,同一注册在主线程可以成功。 - 即使所有注册尝试都失败,mod 仍会正常启动:快捷键被优雅跳过,左上角面板按钮始终可用。
- 轮询快捷键的系统在动作映射缺失时不再每帧抛异常。
兼容性
存档数据版本仍为 v2。RouteFilter 1.0.1 及更早版本的存档仍可正常读取并保留逐实体限制数据。
RouteFilter 1.0.4
RouteFilter 1.0.4
English
RouteFilter 1.0.4 fixes the occasionally incomplete vehicle catalog, enlarges the asset panel, and moves the per-frame enforcement scan off the main thread.
Fixed
- The vehicle catalog was built only once, so modded assets that finished loading afterwards were permanently missing. The catalog now rebuilds once after each save finishes loading and whenever vehicle prefabs or content availability actually change; opening the panel never triggers a rebuild.
- The manual refresh button used the "↻" character, which is missing from the game UI font and rendered as a box; it now uses a proper icon.
- The panel is taller and adapts to the screen size and UI scale, showing more asset rows while reserving the game's top bar and bottom toolbar so the panel edge never covers them.
- The tool system no longer runs a net raycast every frame while the tool is inactive, and no longer overwrites the vanilla tool selection while it should not run.
Performance
- Enforcement scanning now runs in a parallel Burst chunk job that returns only matching vehicles; the main thread cost no longer scales with the whole city.
- The pathfinding pipeline is skipped entirely while no detour barrier is active.
- Restriction badges are drawn by one batched parallel job instead of one job per restricted target.
- The restriction index rebuild reuses its allocations, keeping steady-state rebuilds garbage free.
Compatibility
The save payload version stays 2. Saves from RouteFilter 1.0.1 and earlier still load and keep their per-entity restriction data.
中文
RouteFilter 1.0.4 修复了偶发的车辆目录不完整问题,扩大了资产面板,并把每帧执法扫描移出主线程。
修复
- 车辆目录原先只构建一次,之后才加载完成的模组资产会永久缺失。现在每次存档加载完成后自动重建一次,并在车辆预制件或内容集实际变化时重建;打开面板不会触发任何重建。
- 手动刷新按钮原使用游戏字体缺失的“↻”字符而显示为方框,现改用正规图标。
- 面板更高,随屏幕尺寸与 UI 缩放自适应,能显示更多资产行,同时预留游戏顶栏与底部工具栏区域,面板边缘不再遮挡它们。
- 工具未激活时不再每帧进行射线检测,也不再覆盖原版工具的选中状态。
性能
- 执法扫描改为并行 Burst 分块任务,只把命中的车辆交回主线程,主线程开销不再随城市规模增长。
- 无绕行屏障时寻路系统完全跳过 pathfind 管道。
- 禁行标牌由单个批量并行任务绘制,不再按目标逐个调度任务。
- 限制索引重建复用已有集合,稳态重建零垃圾回收压力。
兼容性
存档数据版本仍为 v2。RouteFilter 1.0.1 及更早版本的存档仍可正常读取并保留逐实体限制数据。
RouteFilter 1.0.3
RouteFilter 1.0.3
English
RouteFilter 1.0.3 is a performance and reliability release. It removes the per-frame scanning bottleneck behind the reported FPS drops, makes saved restrictions carry the exact forbidden asset lists, and cleans up vehicles that cannot reroute.
Fixed
- Reworked exact-asset enforcement into inverted lookup indexes: vehicles whose prefabs are not restricted anywhere are skipped with a single set lookup, and lane ownership is resolved from a precomputed map. This eliminates the per-frame O(vehicles × lanes × owner depth × forbidden assets) scan that caused severe CPU load and FPS drops.
- Save payload upgraded to version 2: forbidden asset lists are stored as stable prefab names and re-applied after loading, so reloading a save restores both the restricted locations and the exact restricted assets.
- Vehicles that still have to cross a restricted target after rerouting, or that stay stopped past the ~1 second reroute timeout, are removed through the game's built-in cleanup instead of retrying forever.
- Mod settings and key bindings are now loaded before bindings are registered, so option changes persist across game restarts.
Added
- While the RouteFilter tool is active, restricted nodes and segments show a flat prohibition tag floating above the target, sized close to the selection highlight.
Compatibility
The save payload version is now 2. Saves from RouteFilter 1.0.1 and earlier still load and keep their per-entity restriction data; new saves store the forbidden asset lists inside the versioned payload.
中文
RouteFilter 1.0.3 是性能与可靠性版本:消除导致 FPS 骤降的每帧扫描瓶颈,让存档完整保存被禁行的具体资产,并清理无法绕行的车辆。
修复
- 将逐资产拦截改为反转索引查询:与任何禁行清单都无关的车辆每帧只需一次集合判断即可跳过,车道归属改为查预计算映射,消除了每帧 O(车辆数 × 车道数 × 层级 × 禁行资产数) 的扫描。
- 存档数据升级为 v2:禁行资产清单以稳定的 prefab 名称保存并在读档后重新解析,重载后恢复的不只是禁行位置,还有具体禁行资产。
- 重规划后仍必须经过禁行处、或超过约 1 秒绕行超时仍停驻的车辆,交由游戏自带清理机制移除,不再无限重试。
- 选项与按键绑定改为先加载后注册,重启游戏后设置不再丢失。
新增
- 工具启用时,有禁行的节点与路段上方显示平面禁行标签,大小接近选择高亮框。
兼容性
存档数据版本升级为 v2。RouteFilter 1.0.1 及更早版本的存档仍可正常读取并保留逐实体限制数据;新存档会把禁行资产清单写入版本化数据块。
RouteFilter 1.0.1
RouteFilter 1.0.1
English
RouteFilter 1.0.1 is a maintenance release focused on keeping the complete restriction workflow visible and unambiguous across supported viewport and UI scales.
Fixed
- The panel now reserves enough flexible space for the bottom application controls, preventing Apply list to selected target, Clear target restrictions, and Cancel selection from being clipped.
- The version label stays on one line beside the localized RouteFilter title.
- The forbidden-selection notice now states only: “Selected assets will be blocked.”
Compatibility
This release does not change restriction behavior or save data. Cities and target-specific asset restrictions saved by RouteFilter 1.0.0, 0.5.0-beta.1, and 0.4.0-beta.1 remain compatible.
Please report reproducible UI issues with the game version, display resolution, UI scale, RouteFilter version, and a screenshot.
中文
RouteFilter 1.0.1 是维护版本,重点确保在受支持的视口与 UI 缩放下,完整禁行操作流程始终可见且语义明确。
修复
- 面板现在为底部操作区域保留足够的弹性空间,避免“应用到所选目标”“清除目标限制”和“取消选中”按钮被裁切。
- 版本号固定在本地化 RouteFilter 标题旁单行显示。
- 禁行提示精简为:“选中的资产将被禁止通行。”
兼容性
本版本不更改禁行逻辑或存档数据。RouteFilter 1.0.0、0.5.0-beta.1 和 0.4.0-beta.1 保存的城市及逐目标资产限制保持兼容。
报告可复现的界面问题时,请附上游戏版本、显示分辨率、UI 缩放比例、RouteFilter 版本和截图。
RouteFilter 1.0.0
RouteFilter 1.0.0
English
RouteFilter 1.0.0 is the first stable release of the exact vehicle-asset access tool for Cities: Skylines II road and rail networks.
Player-facing changes
- Opening the RouteFilter panel now activates the selection tool immediately. The redundant in-panel tool activation button has been removed, and closing the panel closes the tool.
- The default remappable panel shortcut is now
Ctrl+Shift+N. - The panel uses viewport-aware top and bottom boundaries. The target selector, asset list, paging controls, and application buttons remain on one screen; only the asset list scrolls.
- Maximum speed is displayed in km/h, with acceleration and braking available on asset hover.
- Each selected node or segment loads its own saved forbidden list. Bulk selection changes remain pending until the player explicitly applies them to that target.
- Road and rail catalogs are filtered by target compatibility, and recognized engines, carriages, and trailers can be controlled as a group or individually.
Restriction enforcement
- Exact prefab matching covers the vehicle controller and all recognized assets in its consist.
- Detection checks current lanes, upcoming navigation lanes, underlying path elements, and restricted node endpoints.
- Enforcement runs after road and rail navigation updates but before vehicle movement.
- Matching vehicles request a new path while the selected target is temporarily presented as unavailable to the native pathfinder.
- If a fixed transit route or disconnected network offers no valid detour, the matching vehicle is stopped and may retry instead of continuing normally through the restriction.
- Outside traffic is evaluated through the same exact-asset path.
Save compatibility
Version 1.0.0 retains the asset-level V1 save schema used by 0.4.0-beta.1 and 0.5.0-beta.1. Existing restrictions created by those RouteFilter versions remain structurally compatible.
Please report reproducible compatibility issues with the game version, active traffic/network mods, reproduction steps, and Player.log.
中文
RouteFilter 1.0.0 是首个正式版本,为《都市:天际线 II》道路与轨道路网提供精确到车辆资产的通行控制。
玩家可见改动
- 打开 RouteFilter 面板时会立即启用选择工具,不再显示重复的“打开工具”按钮;关闭面板时工具也会关闭。
- 默认且可重新绑定的面板快捷键改为
Ctrl+Shift+N。 - 面板根据视口上下边界自适应,目标选择、资产列表、分页和应用按钮保持在同一页面,只有资产列表内部滚动。
- 最高速度以 km/h 显示,悬浮资产时同时显示加速度和制动减速度。
- 每个节点或路段会加载自己保存的禁行清单;批量选择仅修改待应用清单,明确点击应用后才写入目标。
- 道路与轨道资产会按目标兼容性筛选,已识别车头、车厢和挂车可分组或逐项控制。
禁行执行
- 准确预制资产匹配覆盖车辆控制实体及编组内所有已识别资产。
- 检测覆盖当前车道、前方导航车道、底层路径元素和受限节点端点。
- 执行顺序位于道路、轨道导航更新之后以及车辆实际移动之前。
- 命中车辆请求新路径时,目标会短暂以不可用状态提供给原生寻路系统。
- 固定公共交通线路或断开路网没有有效绕行路线时,匹配车辆会停车并可能重试,而不是继续正常穿过限制。
- 过境交通使用相同的逐资产检测链路。
存档兼容
1.0.0 保留 0.4.0-beta.1 与 0.5.0-beta.1 使用的逐资产 V1 存档结构,这些 RouteFilter 版本创建的限制在结构上保持兼容。
报告可复现的兼容性问题时,请提供游戏版本、当前交通/路网模组、复现步骤和 Player.log。
RouteFilter 0.5.0-beta.1
RouteFilter 0.5.0-beta.1
English
This beta rebuilds the asset panel for responsiveness and clarity. The catalog is now sent only when it changes, while the list uses a game-compatible scrollable flex layout instead of unsupported grid CSS.
Nodes receive a red circular hover outline and segments a dashed highlight. The panel filters road or rail assets according to the hovered target, clearly states that selected entries are forbidden, and shows maximum speed in km/h, acceleration, and braking when an asset is hovered.
Where the game exposes an explicit fixed-trailer or multiple-unit relationship, RouteFilter groups carriages beneath their tractor or engine. A collapsed group action applies to the engine and listed carriages; expanding it enables individual selection.
Target editing now follows an explicit select, configure, and apply workflow. Left-click selects a node or segment, right-click cancels that selection, and panel actions apply or clear restrictions only on the selected target. Panel input is isolated from world clicks, segment hits resolve through owned lanes, and the asset list adds pagination alongside scrolling. Catalog-wide allow/forbid actions always affect every asset.
Selecting a target now loads only that target's saved forbidden list, while bulk controls remain pending until the explicit apply action. Enforcement checks current and upcoming navigation lanes, underlying path elements, node endpoints, and every prefab in a vehicle consist. It runs before vehicle movement so road vehicles, fixed-route trains, and outside traffic cannot continue normally through a matching restriction.
This remains a beta release. Verify scrolling, target detection, grouping, node and segment application, detours, and save/reload behavior on a backed-up city.
中文
本 Beta 重构了资产面板的响应与表达。资产目录只在内容变化时发送,列表使用游戏 UI 引擎兼容的可滚动 Flex 布局,不再采用不受支持的 Grid CSS。
节点现会显示红色圆形悬浮线框,路段显示虚线高亮。面板会根据悬浮目标筛选道路或轨道资产,明确提示“选中即禁行”,并在悬浮资产时显示以 km/h 为单位的最高速度、加速度和制动减速度。
当游戏提供明确的固定挂车或动车组关系时,RouteFilter 会将车厢归入牵引车辆。折叠状态下操作分组会同时作用于车头及所列车厢;展开后可以逐项选择。
目标编辑现采用明确的“选择、配置、应用”流程:左键选中节点或路段,右键取消选择,面板中的应用或清除操作只作用于所选目标。面板鼠标输入已与地图工具隔离,路段命中会从子车道追溯到所属路段;资产列表在滚动之外增加分页兜底,全部禁行/放行始终作用于完整目录。
选中目标时只加载该目标保存的禁行清单,批量操作在明确点击应用前仅修改待应用清单。执行检测现覆盖当前及前方导航车道、底层路径元素、路段端点节点和车辆完整编组,并在车辆移动前运行,使道路车辆、固定线路列车和过境交通都不能继续正常穿过匹配的限制目标。
本版本仍处于 Beta 阶段。请在有备份的城市中验证滚动、目标识别、分组、节点与路段应用、车辆绕行及存读档行为。
RouteFilter 0.4.0-beta.1
RouteFilter 0.4.0-beta.1
English
RouteFilter now provides asset-level access control. Its searchable in-game catalog discovers every currently available vehicle prefab and lets players restrict any combination at a node or across an entire road or rail segment.
Restrictions use an explicit V1 save schema containing prefab entity references. A vehicle is affected only when its exact PrefabRef matches an entry saved on the target. Matching vehicles promptly request another route through RouteFilter's short-lived, reference-counted pathfinding barrier.
This is a beta release. Start with a new city or a clearly identified save backup, then verify node restrictions, segment restrictions, asset matching, and save/reload behavior before using it on an important city.
中文
RouteFilter 现已支持逐资产通行控制。游戏内可搜索目录会发现当前全部可用车辆预制资产,玩家可任意组合选择,并对节点或整段道路、轨道路段设置限制。
限制数据采用明确的 V1 存档结构并保存预制实体引用。只有车辆的准确 PrefabRef 与目标上保存的条目一致时才会受限。匹配车辆会通过 RouteFilter 的短时引用计数寻路屏障立即请求其他路线。
本版本仍处于 Beta 阶段。请从新建城市或明确标记的存档备份开始测试,并在重要城市中使用前验证节点限制、路段限制、资产匹配及存读档行为。