Skip to content

Configuration_EN

MIAOKATZE edited this page Jul 12, 2026 · 1 revision

Configuration Files

1. Configuration File List

GTSWN has 3 configuration files in the config/gtswn/ directory:

File Purpose
gtswn.cfg Basic configuration (MTE ID offset)
gtswn_network.cfg Network configuration (loss + HUD)
gtswn_ae.cfg AE2 configuration (sampling, monitored items, chart)

2. gtswn.cfg

Category: none (top-level)

Key Type / Default Range Description
metaIdOffset int = 0 [-5000, 5000] MTE ID offset

Note: The MTE ID base is 14600 (MetaTileEntityID.BASE); the offset is used to avoid conflicts with other mods' IDs. When an ID conflict occurs with another mod, adjust this offset.

3. gtswn_network.cfg

Category 1: general

Key Type / Default Range Description
DownlinkLossEU float = 0.15 [0.0, 10.0] Downlink loss (Grid → Machine), default 15%
UplinkLossEU float = 0.0 [0.0, 1.0] Uplink loss (Machine → Grid), default 0%

Category 2: hud

Key Type / Default Range Description
HudXOffset int = 0 [-500, 500] HUD X offset
HudYOffset int = 0 [-500, 500] HUD Y offset
HudScale float = 1.0 [0.2, 5.0] HUD scale

Notes

  • Downlink loss: the extra proportion deducted when a cover draws power from the grid (grid deducts more)
  • Uplink loss: the proportion deducted when a cover sends power to the grid (grid receives less)
  • Asymmetric loss design: downlink has loss, uplink defaults to no loss
  • HUD offset: positive X = right, positive Y = up (screen coordinate inverted)
  • HUD position formula:
    • X = screenWidth / 2 + 91 + hudXOffset
    • Y = screenHeight - 54 - hudYOffset

4. gtswn_ae.cfg

Category: ae2

Key Type / Default Range Description
aeSampleInterval int = 100 [1, 6000] AE sampling interval (ticks)
aeMaxMonitoredItems int = 64 [1, 256] Max AE realtime monitored items
aeMaxSamplePoints int = 61 [10, 120] Max AE chart sample points
aeChartEnabled boolean = true AE chart feature toggle

Notes

  • aeSampleInterval: AE data sampling interval, default 100t (5 s), synchronized with EU sampling
  • aeMaxMonitoredItems: maximum number of items in the AE realtime monitor list; cannot add beyond this
  • aeMaxSamplePoints: maximum points per time window for the AE chart, limited by the internal FIFO capacity of 61
  • aeChartEnabled: when disabled, the Network Info Panel does not show the AE tab

5. Configuration Examples

gtswn.cfg

# GTSWN basic configuration
# MTE ID base is 14600 (MetaTileEntityID.BASE); offset avoids conflicts with other mods
# Range: [-5000, 5000]
I:metaIdOffset=0

gtswn_network.cfg

# GTSWN network configuration

general {
    # Downlink loss (Grid -> Machine); grid deducts extra
    # Range: [0.0, 10.0]
    F:DownlinkLossEU=0.15

    # Uplink loss (Machine -> Grid); grid receives less
    # Range: [0.0, 1.0]
    F:UplinkLossEU=0.0
}

hud {
    # HUD X offset (positive = right)
    # Range: [-500, 500]
    I:HudXOffset=0

    # HUD Y offset (positive = up, screen coordinate inverted)
    # Range: [-500, 500]
    I:HudYOffset=0

    # HUD scale
    # Range: [0.2, 5.0]
    F:HudScale=1.0
}

gtswn_ae.cfg

# GTSWN AE2 configuration

ae2 {
    # AE sampling interval (ticks), default 100t (5 s), synchronized with EU sampling
    # Range: [1, 6000]
    I:aeSampleInterval=100

    # Maximum number of AE realtime monitored items
    # Range: [1, 256]
    I:aeMaxMonitoredItems=64

    # Maximum AE chart sample points per time window (limited by internal FIFO capacity of 61)
    # Range: [10, 120]
    I:aeMaxSamplePoints=61

    # AE chart feature toggle (when disabled, the Network Info Panel does not show the AE tab)
    B:aeChartEnabled=true
}

6. Hot-Reload Notes

  • Config hot-reload is not listened to currently
  • Read timing: configuration is read once during the preInit phase
  • Loss coefficients (DownlinkLossEU / UplinkLossEU): read in real time at runtime (on each cover operation)
  • HUD parameters (offset / scale): read in real time during HUD rendering
  • Effective method: after modifying the config, a game restart is required (except for loss and HUD parameters)

Note: The loss coefficients and HUD parameters are read directly from the config file on each use, so changes take effect without a restart; whereas parameters like the MTE ID offset and AE sampling interval are initialized at startup and require a game restart to take effect.

Clone this wiki locally