You are viewing a potentially older version of this package. View all versions.
FlyingHose-Rotation-1.0.0 icon

Rotation

Set the build rotation step, and tilt pieces forward, back, and sideways. Client-side only.

Date uploaded 2 hours ago
Version 1.0.0
Download link FlyingHose-Rotation-1.0.0.zip
Downloads 13
Dependency string FlyingHose-Rotation-1.0.0

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2360 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.2360

README

Rotation

Part of FlyingHose's Modpack. Needs only BepInEx.

The hammer turns a piece in fixed 22.5 degree steps. This mod lets you pick the step, and adds two more ways to turn a piece: pitch (tip it forward or back) and roll (tip it side to side).

Keys

All keys can be changed in the config file.

Key Default What it does
Scroll wheel Turns the piece left and right, as in the base game.
Hold PitchKey and scroll Left Alt Tilts the piece forward and back.
Hold RollKey and scroll H Tilts the piece side to side.
StepUpKey Right Bracket ] Next larger yaw step.
StepDownKey Left Bracket [ Next smaller yaw step.
ResetKey Backslash \ Sets pitch and roll back to zero.

Each scroll notch tilts by the current step. With a 15 degree step, one notch of pitch is 15 degrees. A message in the middle of the screen shows the step when you change it.

The keys only work while you have a build tool (the hammer, hoe, or cultivator) out in build mode, and not while the piece menu, another menu, the console, or a text box is open.

Tilt stays until you reset it

Pitch and roll do not go back to zero when you pick another piece or put the hammer away. Every piece you place keeps the tilt until you press the reset key. Pieces that cannot be rotated in the base game ignore the tilt.

With pitch and roll at zero the piece is placed exactly as in the base game.

Snapping with a tilt

A tilted piece snaps less readily than a flat one. The game only snaps a piece when one of its snap points lands within half a metre of a snap point on a placed piece, and tilting a piece moves where it sits, so its snap points can end up farther away than that.

The game's own snap point cycling helps here. It puts a chosen snap point exactly where you aim, so the tilted piece can still line up.

Yaw step

The step is one of the numbers in Rotation.Steps, which holds 90,45,22.5,15,10,5,1 by default. When you change the step, the piece keeps the angle it had as closely as the new step allows. Going from 22.5 to 45 degrees at 67.5 degrees gives 90, because a half step rounds up.

The current step is saved in Rotation.Step, so it is the same next time you play. If you edit the list and the saved step is no longer in it, the nearest entry is used. Entries that are not numbers, or are zero or less, are skipped, and a list with no usable entries falls back to the default.

Client-side only

This mod works on any server, and the other players do not need it. It sends nothing over the network and does not check versions. The tilt is part of the piece's rotation, so everyone sees the piece the way you placed it. Every setting is yours; the server has no say in any of them.

After a game update

If a game update breaks the code this mod changes, pieces turn as in the base game and the mod writes the reason to the BepInEx log. If something goes wrong while you play, a message says "Rotation is off after an error", pieces turn as in the base game, and the mod stays off until you restart the game.

Do not combine with

Other mods that change how pieces rotate or that add a placement gizmo. They change the same game code, so run one or the other.

Config

File: BepInEx/config/com.yesucs.yesubuildkit.rotation.cfg

Key Default Who decides What it does
General.Enabled true you Master switch. Off means no patches. Needs a restart.
General.DebugLogging false you Detailed log lines.
Rotation.Steps 90,45,22.5,15,10,5,1 you Preset yaw steps in degrees. Bad, zero, or repeated entries are skipped.
Rotation.Step 22.5 you The current yaw step. Saved when you change it.
Keys.PitchKey LeftAlt you Hold while scrolling to pitch.
Keys.RollKey H you Hold while scrolling to roll.
Keys.StepUpKey RightBracket you Next larger step.
Keys.StepDownKey LeftBracket you Next smaller step.
Keys.ResetKey Backslash you Reset pitch and roll.

CHANGELOG

1.0.0

  • If the mod hits an error while you build, pieces turn as in the base game, one message and one log line say so, and the mod stays off until you restart the game. Before, an error that kept happening would repeat every frame.
  • The README now says who decides each setting (you, for all of them), that any build tool works, how a bad step list is handled, and what happens after a game update.
  • The Rotation.Steps description in the config file now says how bad entries are handled.
  • More in-game checks: the step is saved in Rotation.Step, and editing the step list moves the step to the nearest entry.

0.1.1

  • Keys are now read through the game's own input layer.
  • The default roll key is now H, because Z is used by the game's debug mode. Existing config files keep their saved key, so change Keys.RollKey by hand if you want H.

0.1.0

  • First release.
  • Yaw step is configurable, with preset steps you switch between by key. The piece keeps its angle when the step changes.
  • Pitch and roll while building: hold a tilt key and scroll. Tilt stays until you reset it.
  • Client-side only. Nothing is sent over the network and no version check is needed.