Xeio / MassFarming

Mod to assist with large scale farming in Valheim
MIT License
8 stars 7 forks source link

Handling of Piece.m_randomInitBuildRotation #19

Closed Perdjesk closed 3 months ago

Perdjesk commented 1 year ago

Version 0.217.14 introduces a new field for pieces that randomizes the rotation at two different times when Piece.m_randomInitBuildRotation=true (which seems to be the case for all plants/seeds) :

Patch note https://valheim.com/news/patch-0-217-14-hildir-s-request/:

You now have better control over growing plants as they will now grow into approximately their sapling’s rotation, but they start with a random rotation when planting

Thus the square/rectangle drawn by MassFarming rotates randomly after every place or cultivator equip action, which is a bit weird in general, and annoying when placing several square/rectangle in a row.

Even considering vanilla, since the build rotation is shared for every kind of objects, the randomization will affect other building elements. For example

  1. equip hammer and align the rotation to X for Wood wall
  2. you equip the cultivator with carrot (or any plant/seeds) already selected
  3. equip hammer to continue building expecting rotation X, when in fact the rotation has been randomized at step 2.

Player feedbacks:

Exploring a fix in MassFarming for that behavior the question arise whether to provide a general deactivation of this randomization regardless whether the hotkey is activated or to scope a stable rotation while using the hotkey and let the randomization happens when not using the hotkey.