火车容量调整Train capacity adjustment

火车容量调整Train capacity adjustment v2.0.0

by wtmxhyy (蜂功伟业)

自定义火车车厢容量、站点模块容量和吞吐量<br>2026年6月11日15:17:23 设定最高上限1万,用户可以自定义<br>Customize the capacity of train carriages, station module capacity and throughput<br>15:17:23, June 11, 2026. The max

Stable 10 days ago CoI-Keep No source
Game versions: 0.8.5
Save-game: Add Remove
69%
3

自定义火车车厢容量、站点模块容量和吞吐量<br>2026年6月11日15:17:23 设定最高上限1万,用户可以自定义<br>Customize the capacity of train carriages, station module capacity and throughput<br>15:17:23, June 11, 2026. The max

2%NLE}{LR`$MLLH]VY]JH57.png

`K10JQLNXOM5%MJX%)VYULG.png

`M~$25Y72YZUD7(~YEIWJWQ.png

This mod has no dependencies.

No other mods depend on this mod yet.

加入速度和功率修改配置 Add configuration for speed and power modification

Jun 15, 2026 v2.0.0

TrainCapacityTweaksMod.cs 功能增强 Enhanced Features for TrainCapacityTweaksMod.cs

新增速度修改和安全乘法方法 Added speed adjustment and safe multiplication methods

config.json 配置更新 新增 8 个配置项 Updated config.json with 8 new configuration items

TrainCapacityTweaks.dll 重新编译 包含所有修复 Recompiled TrainCapacityTweaks.dll with all fixes included

  • 启用溢出保护 :建议保持 protect_overflow 为 true ,可避免意外错误

  • 煤水车特殊处理 :煤水车的速度和功率倍率建议保持 100%,避免不必要的修改

  • 高倍率谨慎使用 :虽然支持高达 500% 的倍率,但建议根据实际需求调整,过高的倍率可能影响游戏平衡性

  • 修改后重启 :修改配置后需要重启游戏才能生效

  • Enable Overflow Protection: It is recommended to set protect_overflow to true to prevent unexpected errors.

    Special Handling for Tenders: It is advised to keep the speed and power multiplier of tenders at 100% and avoid unnecessary modifications.

    Use High Multipliers with Caution: Multipliers up to 500% are supported, yet you are suggested to adjust them according to actual needs. Excessively high multipliers may disrupt game balance.

    Restart After Modification: Restart the game for configuration changes to take effect.
    TrainCapacityTweaks MOD 更新修复报告

    📅 更新日期

    2026年6月15日

    📋 更新概述

    本次更新针对 TrainCapacityTweaks MOD 进行了功能增强和关键问题修复,主要包括火车速度参数调整功能的添加以及 Fix32 数值溢出问题的彻底解决。This update brings feature enhancements and critical bug fixes to the TrainCapacityTweaks MOD, mainly including the addition of the train speed parameter adjustment function and the complete resolution of the Fix32 numeric overflow issue.

    🔧 一、新增功能

    1.1 火车速度参数调整 Train Speed Parameter Adjustment

    根据用户反馈,新增以下可调整参数:

    参数名称 默认值 可调范围 说明 机车速度倍率 100% 10% - 500% 调整所有机车最大速度 机车功率倍率 100% 10% - 500% 调整发动机输出功率 启动牵引力倍率 100% 10% - 500% 调整机车启动牵引力

  • Based on user feedback, the following adjustable parameters have been added:

    Parameter Name Default Value Adjustable Range Description
    Locomotive Speed Multiplier 100% 10% - 500% Adjust the maximum speed of all locomotives
    Locomotive Power Multiplier 100% 10% - 500% Adjust the engine output power
    Starting Tractive Force Multiplier 100% 10% - 500% Adjust the starting tractive force of locomotives

    1.2 物理参数调整 Physical Parameter Adjustment

    参数名称 默认值 可调范围 说明 空气阻力倍率 100% 10% - 500% 越低火车越快 坡度难度倍率 100% 10% - 300% 越低上坡速度损失越小 滚动阻力倍率 100% 10% - 300% 越低加速越快 转弯速度惩罚降低 0% 0% - 100% 降低转弯时的速度限制

  • Parameter Name | Default Value | Adjustable Range | Description
    Air Resistance Multiplier | 100% | 10% - 500% | The lower the value, the faster the train runs
    Gradient Difficulty Multiplier | 100% | 10% - 300% | The lower the value, the less speed loss when climbing slopes
    Rolling Resistance Multiplier | 100% | 10% - 300% | The lower the value, the quicker the acceleration
    Turn Speed Penalty Reduction | 0% | 0% - 100% | Reduces the speed limit during turns

    1.3 配置开关 Configuration Switch

    参数名称 默认值 说明 修改火车速度 启用 全局开关,控制是否应用速度修改 车厢容量修改 启用 原有功能开关 站点容量修改 启用 原有功能开关 吞吐量修改 启用 原有功能开关

  • Parameter Name | Default Value | Description
    Train Speed Modification | Enabled | Global switch to control whether speed modification is applied
    Carriage Capacity Modification | Enabled | Switch for original function
    Station Capacity Modification | Enabled | Switch for original function
    Throughput Modification | Enabled | Switch for original function

    🐛 二、问题修复 Issue Fix

    2.1 Fix32 数值溢出问题(关键修复) 问题描述

    Fix32 Numeric Overflow Issue (Critical Fix) Problem Description

    当倍率设置过高(如 500%)时,MOD 在修改机车参数时会产生 Fix32 数值溢出错误:

  • When the multiplier is set too high (e.g., 500%), the MOD will trigger a Fix32 numeric overflow error while modifying locomotive parameters:

    此错误会导致:

    • 游戏日志持续写入错误信息

    • 可能触发官方自动反馈系统上报

    • 长期运行可能影响游戏稳定性 问题原因
      Fix32 是游戏使用的定点数类型,其最大值为 2097151 (约等于 2048)。以下类型的机车速度值已经接近最大值:

    • LocomotiveT1Tender(煤水车)

    • LocomotiveT2Tender(煤水车)

    • LocomotiveTurbineTender(涡轮煤水车) 解决方案

      This error will result in:

      Continuous logging of error messages in the game logs

      Possible activation of the official automatic feedback system for error reporting

      Impaired game stability during long-term operation

      Cause of the Issue

      Fix32 is a fixed-point data type adopted by the game, with a maximum value of 2097151 (approximately equivalent to 2048). The speed values of the following locomotives are close to this maximum limit:

      LocomotiveT1Tender (Coal Tender)

      LocomotiveT2Tender (Coal Tender)

      LocomotiveTurbineTender (Turbine Coal Tender)

      Solutions\

      方案一:安全乘法机制

    新增 SafeMultiply 方法,在乘法运算前进行溢出检测:

    方案二:Tender 车辆独立配置

    煤水车(Tender)作为特殊车辆类型,新增独立配置项:

    参数名称 默认值 最大值 说明 煤水车速度倍率 100% 200% 限制煤水车速度修改范围 煤水车功率倍率 100% 100% 通常煤水车功率为0 煤水车牵引力倍率 100% 100% 通常煤水车牵引力为0

    方案三:溢出保护开关

    新增 protect_overflow 配置项(默认启用),允许用户选择是否启用溢出保护。

    Solution 1: Safe Multiplication Mechanism
    Add a new SafeMultiply method to perform overflow detection before multiplication operations.

    Solution 2: Independent Configuration for Tender Vehicles
    As a special type of vehicle, the tender is equipped with new independent configuration items:

    Parameter Name Default Value Maximum Value Description
    Tender Speed Multiplier 100% 200% Limits the adjustable range of the tender's speed
    Tender Power Multiplier 100% 100% The tender generally has zero power
    Tender Traction Multiplier 100% 100% The tender generally has zero traction

    Solution 3: Overflow Protection Switch
    Add a new configuration item named protect_overflow (enabled by default), allowing users to toggle overflow protection on or off.

    📊平衡配置方案 Balanced Configuration Scheme

    为获得最佳游戏体验,建议使用以下配置:

    此配置可以实现:

    • 机车速度提升 50%

    • 机车功率提升 50%

    • 空气阻力和滚动阻力降低 50%

    • 自动防止数值溢出

    • For the best gaming experience, the following settings are recommended:

      These settings will deliver the following effects:

      50% increase in locomotive speed

      50% increase in locomotive power

      50% reduction in air resistance and rolling resistance

      Automatic overflow prevention

    • {
      "locomotive_speed_multiplier": 150,
      "locomotive_power_multiplier": 150,
      "locomotive_tractive_effort_multiplier": 150,
      "air_drag_multiplier": 50,
      "rolling_resistance_multiplier": 50,
      "tender_speed_multiplier": 100,
      "protect_overflow": true
      }

支持火车dlc Support train DLC

Jun 14, 2026 v1.0.1

感谢 中国玩家 流香(815765217) 多次反馈BUG,提供日志.

通过远程玩家游戏,在客户机上进行现场演示展示了mod无法修改的问题.排查后确认是用户加载了火车dlc

而作为设计者的环境是没有加载火车dlc的,所以可以确认,v1.0.0版本可以在无加载dlc情况下正常起效.

因为dlc加载级别永远高于mod,所以所有数据都被覆盖,自定义数据无法起效.

解决方案:

1,将参数名改为 snake_case
2,增加遍历修改实例逻辑

3,由常量修改,改为实例修改.

V1.0.1版本已经测试,可以在火车dlc加载情况下完成车厢容量和模块容量修改.

Thanks to Chinese player Liuxiang (815765217) for repeatedly reporting bugs and providing logs.

We remotely accessed the player's game and conducted an on-site demonstration on the client, which revealed the issue that the mod failed to work properly. After investigation, we confirmed the problem occurred because the player had enabled the Train DLC.

Our development environment did not have the Train DLC activated. Therefore, we verified that version v1.0.0 functions normally when no DLC is loaded.

Since DLCs always take higher loading priority than mods, all related data gets overwritten, causing custom data from the mod to become ineffective.

Solutions:

  1. Rename parameters to snake_case.
  2. Add logic to iterate over and modify instances.
  3. Change the modification method from constant editing to instance editing.

Version v1.0.1 has been fully tested. It can successfully modify carriage capacity and module capacity even when the Train DLC is enabled.

v2.0.0

Latest
Game version 0.8.5
Released Jun 15, 2026
File size 7.1 MB
License CoI-Keep
Save-game: Add Remove

No changelog available for this mod.

Loading forum…