TF3TF3 Mod PortalTransport Fever 3 · erweitert um Community-Checks
mod.io · Mod 6480207

Better Rename Strategy (Auto-apply)

von superzhuzhuVersion 1.0Aktualisiert 25.10.2026Rev. 86,1 KiB
Bitte ModManager zuerst starten. Dadurch wird der Installations-Link unter Windows registriert.

Beschreibung

更好的命名策略 (自动应用) / Better Rename Strategy (Auto-apply)

这个MOD具有激进性,会在加载存档之后慢慢地自动更新所有线路名称 (不用担心性能的问题,它是分批次进行的,几乎无感) 如果你不想使用激进的MOD,可以考虑使用手动版 Better Rename Strategy (Manual)

功能介绍

  提供与手动版相同的线路命名方案。首次加载旧存档时为现有线路执行一次性追溯命名。

  之后在车辆到达线路站点且路径变化时自动更新;改名任务在后续更新阶段每轮最多应用10条。

  线路名称以星号(*)结尾时跳过自动修改。

工作原理

  我们的触发机制与众不同,目前主流的方案应该是主动轮询式,但是我更喜欢基于事件驱动。

  所以我设计当车辆到达站点时,触发事件通知MOD,MOD再检测该线路是否被变更过,如果是新建或者被修改过的线路,则再去执行改名。

  这个功能比较复杂,且暂时没有获得官方的支持。我做的折中方案就是事件入队,延迟提交,以提升性能。

版权声明

  这是非官方社区项目,附带 MIT 开源许可证。我们与 Urban Games 无隶属关系。《Transport Fever 3》及其原始资源归其权利人所有。

需要帮助?

  Bilibili: https://space.bilibili.com/57509816

Better Rename Strategy (Auto-apply)

This mod is aggressive: after loading a save, it will gradually automatically update all line names. (Don't worry about performance—it processes in batches, so it's almost unnoticeable.) If you don't want to use an aggressive mod, consider the manual version: Better Rename Strategy (Manual).

Feature Overview

Provides the same line naming scheme as the manual version. When an old save is first loaded, it performs one-time retroactive naming for existing lines.

After that, it updates automatically when a vehicle arrives at a line stop and the route changes; rename tasks apply at most 10 per round in subsequent update phases.

Automatic modification is skipped when a line name ends with an asterisk (*).

how It Works

Our trigger mechanism is different. The mainstream approach is probably active polling, but I prefer event-driven.

So I designed it so that when a vehicle arrives at a stop, it triggers an event to notify the mod, and the mod then checks whether the line has been changed. If it is a newly created or modified line, it then performs renaming.

This feature is relatively complex and does not yet have official support. My compromise is to enqueue events and submit them with a delay to improve performance.

Copyright Notice

This is an unofficial community project, distributed under the MIT open-source license. We are not affiliated with Urban Games. Transport Fever 3 and its original assets belong to their respective rights holders.

Need Help?

Bilibili: https://space.bilibili.com/57509816

Bilder