Arioh-Pedal_Bike icon

Pedal Bike

A single-rider timber bicycle: 37 km/h pedaling, 42 km/h sprint, smooth cornering and hill assistance. Includes an 8-slot rear chest and automatic mount recovery. WASD + Shift controls, with no custom speed HUD.

By Arioh
Last updated 35 seconds ago
Total downloads 48
Total rating 0 
Categories Building Crafting AI Generated Mods
Dependency string Arioh-Pedal_Bike-0.1.7
Dependants 0 other packages depend on this package

This mod requires the following mods to function

ValheimModding-Jotunn-2.30.2 icon
ValheimModding-Jotunn

Jötunn (/ˈjɔːtʊn/, 'giant'), the Valheim Library was created with the goal of making the lives of mod developers easier. It enables you to create mods for Valheim using an abstracted API so you can focus on the actual content creation.

Preferred version: 2.30.2
denikson-BepInExPack_Valheim-5.4.2351 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.2351

README

Pedal Bike 0.1.7

A single-rider timber bicycle for Valheim with a rear chest, stamina-powered pedaling and assisted handling. Build it with Wood x20 + Bronze Nails x5 using the normal Hammer's Crafting category, within Workbench range.

Version 0.1.7

Version-number update requested by the author. Includes the same movement repair and behavior as 0.1.5; no additional gameplay changes. Manifest and compiled plugin versions both match 0.1.7. All multiplayer peers must use this matching version.

Movement repair in 0.1.5

This update addresses the reported case where the pedals animate but the bicycle stays stationary.

  • Recheck the current owner's dynamic/gravity mode every physics tick and before native synchronization, rather than only when ownership first changes.
  • Keep an occupied bicycle awake, with sleeping disabled only for that bicycle while occupied. Empty bicycles regain their original sleep threshold.
  • Deliver the bounded drive correction as a physics velocity-change impulse, waking the body before applying force. Native collision response, braking, slope assistance and the 42 km/h ceiling remain active.
  • Refresh the native ZSyncTransform cached kinematic/gravity mode when switching between owner simulation and remote position replication. This prevents the bicycle's sync path from treating a kinematic replica as a dynamic velocity-driven body.
  • Log actual sampled position movement after pedaling. If it remains blocked, diagnostics include distance, requested speed, velocity, body mode, sleeping, constraints, ground support and parking state. No custom HUD is added.

The local log confirms 0.1.4 was loaded and the profile uses 37/42 km/h. Kinematic-velocity warnings were present, but those generic warnings do not identify the bicycle by themselves. The native cached-mode mismatch and missing repeated wake/body-role enforcement were confirmed in code. Live movement with this repair still needs verification.

New riding behavior

  • 37 km/h normal pedaling and 42 km/h Shift sprint targets on level, unobstructed ground.
  • Turning and mild hills reduce the powered speed target by at most 2 km/h combined: approximately 35-37 km/h normal or 40-42 km/h sprint. The penalty is smooth and uses the larger of the turn and hill penalties, rather than adding them.
  • Steering rotates existing momentum into the new travel direction. It no longer loses speed through the sideways tyre scrub or forward-vector projection used by the old drive.
  • Paid pedaling compensates for gravity along the slope. Either tyre contact or sufficiently close independent ground support can keep the drive working across small contact gaps.
  • The suspension chassis stays upright while the visible frame, wheels, grips and rider lean into corners. The front wheel and handlebars still turn up to 45 degrees. Turn rate is limited at high speed.
  • Low tyre placement guards are disabled while occupied so they do not snag a mild rise; they remain available while empty and during placement.
  • No custom speed or stamina HUD. A short controls message appears when mounting. The game's own stamina display remains.

These are handling targets for an unblocked route while pedaling with stamina. A wall, tree, substantial obstacle, steep/unsupported terrain, braking, stamina exhaustion or lost control input can still slow or stop the bicycle. Physics collisions remain active; the bicycle does not teleport through obstructions or hover over missing ground.

Controls

Input Action
E at the saddle Right the bicycle and mount
W Pedal forward
S Brake forward movement, then backpedal slowly after stopping
A / D Steer left / right
Shift + W Sprint pedal using more stamina
Release W / S Coast
E while riding Dismount
E at the rear chest Open cargo while unoccupied
Mouse / mouse wheel Look around / adjust camera distance

Normal pedaling costs 3 stamina per second and Shift pedaling 7 per second, before world stamina modifiers. Coasting and braking do not spend pedaling stamina. Exhaustion removes powered acceleration and hill assistance; coast to recover. Backpedaling target is 3 km/h. The ground-speed ceiling is 42 km/h.

Build and cargo

Recipe: Wood x20 + Bronze Nails x5. One rider only. The rear chest has 8 slots (4 x 2), using the native inventory and save system. Dismount before opening it. Mounting and cargo use are mutually exclusive. Empty the chest before dismantling.

The centered straight handlebar, timber frame, spoked wheels and recipe are retained. Native meshes and materials are referenced from the installed game, without distributing game assets.

Standing, parking and mounting

The chassis is protected from simulated toppling from placement onward. An unoccupied bicycle locks parking only after it is upright, sufficiently stationary and supported. The parking lock releases for riding or when support disappears; gravity remains active while unsupported.

Every authorized mount runs recovery before the player attaches to the saddle, including a fallen parked bicycle already owned by the same peer. The saddle hierarchy is refreshed immediately, stale control/brake state is cleared, and gravity/dynamic simulation are restored. Existing fallen bicycles also recover when their simulation owner begins after a world reload. Recovery retains cargo, heading and X/Z position, with a bounded upward clearance adjustment. Tight geometry can still obstruct clearance.

Installation and updates

Close Valheim. In Thunderstore Mod Manager, select the Valheim profile and install BepInExPack_Valheim by denikson and Jotunn by ValheimModding.

For this ZIP use Settings > Profile > Import local mod and select PedalBike-0.1.7.zip without extracting it. Do not use Import profile. If asked for metadata, use Pedal_Bike, author Arioh, version 0.1.7. Keep one active copy of PedalBike.dll, then launch Modded.

For a published release, install/update Pedal_Bike from Get mods. For manual or dedicated-server installation, replace:

BepInEx/plugins/PedalBike/PedalBike.dll

Install the dependencies separately and reload the world after updating. Existing bicycle prefab identity and cargo save data are retained.

The first 0.1.4 launch migrates the old speed settings to 37 / 42 km/h once. You do not need to delete the old configuration. Later custom speed settings are preserved within the supported ranges.

Multiplayer

Use the same Pedal Bike version on every player's profile and on the host/dedicated server. Start Server hosts launch their modded game. Friends may import the same local ZIP; public hosting is not required to play together. Matching patch versions are required through Jotunn.

The authorized rider owns simulation. Other peers receive movement, steering, wheel/pedal animation and the visible bank. Native inventory persistence, ward permissions, owner-validated requests, one-rider reservation, control watchdog and rider leases are retained. Remote peers do not apply duplicate drive forces.

Configuration

File created on launch:

BepInEx/config/arioh.valheim.pedalbike.cfg

Setting in Pedaling Standard default Meaning
CruiseSpeedKmh 37 Normal powered target, range 4-37 km/h
SprintSpeedKmh 42 Shift target, range 6-42 km/h; effective target is at least the normal target
PedalStaminaPerSecond 3 Normal pedaling cost
SprintStaminaPerSecond 7 Sprint cost; effective cost is at least the normal cost

Host/admin tuning is synchronized. The Compatibility / RideModelRevision entry records the one-time speed migration; it is not a riding control. Steering is capped at 45 degrees, visual lean at 45 degrees, and starting health is 600.

Publishing

The same ZIP works for local import and public upload. Upload it under the same team/name Arioh / Pedal_Bike in the Valheim community to add version 0.1.7. It has not been published automatically. Later versions must increment the DLL/plugin and manifest versions; changing only CHANGELOG.md does not update the code.

Validation and current limits

Built against installed Valheim 1.0.20, Unity 6000.0.75, BepInEx 5.4.23.5 and Jotunn 2.30.2 references. Release compilation, native API resolution and compiled integration checks pass. Offline production-rule tests cover 37/42 speed targets, a maximum combined 2 km/h handling penalty, steering, stamina and authorization. Production drive/stability tests use numerics/rigidbody/ground adapters to exercise sustained left/right turns, mild slopes, slope entry, gravity compensation, post-impact acceleration, recovery and speed limits. The compiled release contains no custom HUD.

The player reported stationary pedaling in 0.1.4; the 0.1.5 repair has not yet been tested in a live Valheim session or with two connected players. Adapter tests do not execute Unity PhysX, real terrain contacts, loaded-world migration or actual multiplayer interpolation. In-game handling, obstacle clearance and visual rider alignment still require verification.

Check BepInEx/LogOutput.log for Pedal Bike ready or Pedal Bike registration failed if the piece is missing. No Valheim, Unity, BepInEx or Jotunn DLLs, extracted game meshes or textures are bundled.

Diagnostic messages are written to BepInEx/LogOutput.log: Drive moved includes measured position displacement; Drive stalled records a low-displacement attempt. They are diagnostic data, not proof of a successful test performed by the author.