You are viewing a potentially older version of this package. View all versions.
j1gA-StationSpeed-0.2.2 icon

StationSpeed

Speed multipliers for smelters, kilns, cooking stations, fermenters, beehives, sap extractors and plant growth. Fermenters and plants stay consistent for players without the mod.

Date uploaded 2 days ago
Version 0.2.2
Download link j1gA-StationSpeed-0.2.2.zip
Downloads 483
Dependency string j1gA-StationSpeed-0.2.2

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2350 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.

Preferred version: 5.4.2350

README

StationSpeed

Speed multipliers for the working stations: smelter, blast furnace, charcoal kiln, spinning wheel, windmill, eitr refinery, cooking stations and the oven, fermenter, beehive, sap extractor, crops and saplings. One multiplier per kind, optional overrides per prefab. The server's settings apply on every client with the mod.

A smelter with a speed multiplier From planting to harvest in seconds
A smelter with a speed multiplier From planting to harvest in seconds

What makes it different from other speed mods is how it treats players without the mod:

  • Smelters, cooking stations and collectors advance on the client that owns them (the nearest player). With the mod on that client they run faster; everyone sees the right items and fuel either way. Fuel per product stays as in vanilla (for the oven, see ScaleOvenFuel).
  • The fermenter and plants store only a start time, and every client computes readiness from it with its own copy of the duration. Changing the duration would make a modded and a vanilla client disagree about the same barrel. So this mod leaves the duration alone and moves the start time once, when the item is added: the vanilla formula then gives the same answer on every client.
  • What a player without the mod adds or plants is shifted by the host a few seconds later: the host walks the world's objects and moves any fresh, not-yet-shifted start time itself. Works on the hosting player or on a dedicated server with the mod.
  • The server sends its settings to every connecting client with the mod, so all owners agree on the speed. Changes apply to loaded stations at once.

Console: stationspeed status, stationspeed rescan. Config in BepInEx/config/j1ga.stationspeed.cfg.

Install on every client that plays with mods and on the host; optional on a dedicated server (for the host shift and the settings). Players without the mod join as usual.

Compatibility

Tested with Valheim 1.0.16 (network version 40), BepInEx 5.4.23.5 (BepInExPack_Valheim 5.4.2351).

Who needs it

Who What
Players with the mod stations they own run at the configured speed
Host recommended: shifts barrels/plants of players without the mod and sends its settings
Dedicated server optional, for the same two things
Players without the mod join as usual; barrels and plants stay consistent for them

Known conflicts

  • Other mods that change station or growth speed (Valheim Plus, OdinsQOL and similar) — the multipliers stack or fight. Use one of them for each kind of station.
  • Mods that change a fermenter's duration or a plant's grow time on one client only break the same thing this mod avoids: vanilla clients disagreeing about readiness.

Bugs and feedback

GitHub Issues: https://github.com/tbsj1ga/StationSpeedValheim/issues — please attach BepInEx/LogOutput.log.

More mods by j1gA

Mod
LivingMap LivingMap — Your buildings, roads and cleared forest on the map and the minimap.
WeaponArts WeaponArts — One key, one active ability per weapon: stagger, taunt, heals, berserk, crits.
ExtendedBosses ExtendedBosses — Raid-style boss fights: phases, adds, nests, shields, marks — built from vanilla parts.
HostOwner HostOwner — The host takes ownership of stations and bosses near it, so its mods work for everyone.

CHANGELOG

Changelog

English · Русский

The version is set in one place — StationSpeedPlugin.Version in src/StationSpeedPlugin.cs.

0.2.2

  • Package page: the crops animation now runs from planting to harvest; HostOwner is a link to its Thunderstore page. No code changes.

0.2.1

  • Package page: a gallery of animations and screenshots, and a section with the author's other mods (icons, one line each, links). No code changes.

0.2.0

  • The host shifts other players' loads. The host (or a dedicated server with the mod) walks the world's ZDOs every HostScanInterval seconds, split over several frames: a barrel or a plant whose start timestamp is fresh and differs from our mark in the ZDO was just loaded by a player without the mod and is shifted from the host. The mark (j1ga.stationspeed.shifted, the start timestamp after the shift) is now set on every shift, by the owner too, so nothing is shifted twice; a new load into the same barrel is a new timestamp that differs from the mark. The grow time of a plant with no instance is computed like Plant.GetGrowTime (seed from the ZDO or from its id, as in Plant.Awake); on the first planting on an owner both values are compared, a mismatch is logged once, and then the host leaves plants alone. Section 07 Host.
  • Settings from the server. A second after a client joins (and on every settings change) the server sends its multipliers, ByPrefab, ScaleOvenFuel and Enabled through its own routed RPC j1ga.stationspeed.config; a client with the mod uses them instead of its own file while connected. Packets not from the server or with another format version are ignored. Without the mod on the server — your own file. Section 08 Sync, switched off on the server.
  • Recalculating loaded stations. Multipliers of ticking stations are now computed from the prefab's value instead of dividing the current one, so they can be applied again: on any settings change, when settings arrive from the server and with stationspeed rescan every loaded smelter, cooking station, beehive and sap extractor gets the new values without rejoining. An object with no registered prefab is divided in place in Awake, as before.
  • Crops and saplings separately: Plants is replaced by Crops and Saplings. A sapling is a plant that grows into a tree (TreeBase on the grown prefab); everything else is a crop.
  • Oven fuel: ScaleOvenFuel (on by default) divides m_secPerFuel too, so wood per bread stays as in vanilla — smelters do this by themselves because they burn fuel in fractions of a product. The value is an integer, seconds are rounded.
  • Windmill: checked in the IL that m_secPerProduct is the main limit and the wind strength multiplies the timer step on top; the multiplier works together with the wind.
  • Numbers in the log use a dot whatever the system language.
  • Enabled=false now returns loaded stations to vanilla speed at once (through the recalculation).

0.1.0

  • First version. Multipliers for the smelter, blast furnace and charcoal kiln, spinning wheel, windmill, eitr refinery, cooking stations and the oven, beehive, sap extractor, fermenter and plant growth; per-prefab override.
  • Ticking stations: time per product is divided in Awake (applies on the owner).
  • Fermenter and plants: a one-time shift of the start timestamp on the owner, so a player without the mod sees the same readiness as one with it.
  • Console command stationspeed status.
  • Build build.ps1, reference check check-refs.ps1 (including Harmony patch targets).