Skip to content

ValheimRAFT v2.0.0

Compare
Choose a tag to compare
@zolantris zolantris released this 17 May 00:49
· 37 commits to main since this release
77d15e2

ValheimRaft (v2.0.0)

  • [v2.x.x] New Vehicles, Rendering Fixes, Plugin changes (#62) by @zolantris in #63

Noting that ValheimVehicles is (unreleased but the entire refactor of ValheimRAFT is within this namespace)

The ValheimRaft mod will utilize all of ValheimVehicles for now. Likely this will continue until Raft is no longer needed and ValheimVehicles can replace all the logic in a v3.x.x release (long way out).

Features

  • Adds rudder prefab without connecting it. Has snappoints for the connection part of the rudder.
  • Adds hull prefab without much logic attached to boat floation. Hulls are basically 3x6 planks but in a half cylinder. Has snappoints for all edges that match a 2x2 wood plank size.
  • Adds support for rendering V2.x.x ValheimVehicle WaterVehicle which is a V1 Raft replacement.
  • Steering direction is determined by the placement of the SteeringWheel (on v2 raft). This was a long time issue of raft. You make a raft and forget it sailed in a different direction then have to rebuild the raft again.
  • Steering wheels have been renamed including translations. Their prefabs will no longer exist. No reason for adding more porting code as this would be complicated.
  • Anchor symbol when anchored on the ShipHud. Yay finally 😭!
Commands
  • new
    • vehicle debug opens a debug menu for V1 raft and V2 raft to show colliders or rotate the vehicle. Most of the commands should work well for the new vehicle, but older vehicle may not work well with rotation.
    • If the commands do not work, make sure you are looking at the vehicle.
    • vehicle creative does same thing as raftcreative
    • vehicle upgradeShipToV2 will upgrade the V1 raft to a new ship. Please log out or go to another zone and reload the area.
    • vehicle downgradeShipToV1 will downgrade a v2 VehicleShip to a V1 Raft. Please log out or go to another zone and reload the area.
      • This command will likely disappear in future updates that drop support for V1 vehicles and force upgrade older ships.
  • compatible
    • raftcreative (works for both v1 and v2)
  • Incompatible:
    • raftrecover (does nothing for v2) (will add support later for this), previously did not fix rafts in v1 from what I saw.
    • raftoffset (does nothing for v2)
Rudder Speeds and Turning
  • Adds support for rudder speeds based on the Back, Slow, Half, Full speeds of base game
  • Rudder speeds are configurable
  • Rudder turn rates are increased significantly at lower speeds. (QOL fix). There is no toggle for speeds. Maybe in future updates.
New Prefabs and Tweaks
  • Many new prefabs added though they may not be available / ready for release 2.0.0.
    • Prefabs relate to hull
      • hull ribs
      • hull slabs
      • hull walls (snappoints are out of order as they are a rotation of hull-slabs, I'll fix this later)
      • hull keel (not enabled), to create the topmost hull sections.
    • rudder prefabs (basic, advanced, advancedtail).
      • Rudders turn with wheel direction. They do not account for turning speed (yet).
  • Updates unity to latest compatible with valheim.
  • Adds blender file for vehicle meshes and designs
  • Tweaks a bunch of textures to better render
  • Makes black marble texture compatible with moving vehicles (no world position)

Snappoints

  • Adds snappoints to rope anchor.
  • Adds snappoints for masts. Yes, they can now snap to the ship floor if auto is deselected (Press Q or E).
  • Adds snappoints to Raft Wheel.
  • Adds PrefabRegistryController which makes the prefab registry call for all prefabs. Each prefab will eventually have it's own file for organization to make it easier to find specific prefabs and fix their logic.

Bugs/Fixes

  • Keyboard now takes your command properly for anchoring.
  • Teleporting now does a check per frame to to until the ZoneSystem around the raft is loaded.
  • Fully fixes teleporting from boat to land, boat to boat etc. Try breaking it please! Fixes #12
  • Fixes ActivatePendingPieces. Likely resolve detached states of masts and steering wheels. Optimizes much of the raft re-renders. Whenever a raft instance currently exists it will active the pending
  • Moves all the updates into FixedUpdate so the ZDO position updating logic is not spamming per frame (this logic is required so the raft pieces do not get garbage collected when outside the area of the player).

⚠️ Translations (BREAKING changes) ⚠️

  • Many translations have been changed
  • Please open a pull request here to merge those translation fixes into future updates.
  • Noting that more translations will be needed for future prefabs, so please reach out if you are interested in supporting translations.
Flying
  • Flying logic has many new fixes
  • Flying Automatic ascend/descend toggle option for flight. Still no increase to speed (increasing speed causes massive friction, likely needs to be solved in it's own feature set)
  • Flying unrealistically uses the direction it is going instead of the wind push.
  • Flying can use the rudder instead of the sails. But sails will still unfurl. (not fixing that in this update)
Collisions
  • Collision logic works well
  • Adds Collider debuggers for the ship
  • Add logic to only set colliders for the ship hull to prevent topheavy ships from smashing obstacles due to their box collider invisibly hitting the rock in the sea.

Compatibility / Ashlands fixes

  • sails fixes for fading with Ashlands.
  • sails fade smoothly in Mistlands now. At 60 unit distant they will disappear if within the mist or the player is within the mist. They should only disappear to the individual, not the server (hopefully...needs validation).
  • IsValid and Zdo issues fixed for Ships and MBRaft and VehicleShip. Using a compatibility class.
  • Swapped out Sail for a prefab in unity. Most of the logic is there now instead of within component.
  • ⚠️ V2 raft does not take damage from ashlands. This is a known feature. In a future update this will be tweaked to apply damage to prefabs that are below the water, but in a more scalable way to so the raft does not drop in FPS. ⚠️
  • ❗V1 Raft does take damage, though it may not be destroyable even at 0 health. ❗

Sail Loading Optimizations

  • Sails now have a GetIsInitialized check to confirm they are initialized instead of using a static method which could in theory cause issues if the SailComponent was somehow accessed or shared. Sails now initialize with a ZDO so without this initializer it's harder to see if the sail was initialized and load the new data.
  • Sails will now save their initialization state after SaveZDO so any older sails will now contain this property after SaveZDO has been fired.
  • Sails no longer support rotation. Rotation never worked well. It needs to be moved to the mast...and that can be a different feature or skipped entirely.

Sentry Unity (not released, but now exists within this repo)

Makes the logging service extensible by making all Unity BepInEx packages considered a scoped package when registering with the framework. Incompatible with unity packages that directly call Sentry.Init. Sentry must be managed from this package otherwise the scope and delegation will not work unless Sentry.Init from this package is called last.

Features

  • Adds Sentry package for Unity projects error logging. The framework should allow for multiple projects to register error logging separately and not conflict. This needs more testing, but will be released for all valheim projects and potentially all UnityBepInEx projects... The Sentry package is builts as an opt-in logging service. ValheimRAFT and ValheimVehicles will not require it. If the user install it, it will be used, if they do not, it will not be used.

Full Changelog: ValheimRAFT-v1.6.14...ValheimRAFT-v2.0.0

  翻译: