Back to NxLabs

NxLabs / Vintage Story

VS Lumber

SBy ShaneDevsGames

VS Lumber deepens Vintage Story's tree-chopping with per-log voxel wedges.

Description

VS Lumber deepens Vintage Story's tree-chopping with per-log voxel wedges. Carve a notch one swing at a time until the trunk gives way.

Heads up - this mod is early in development. Vanilla and modded trees that extend the vanilla log via inheritFrom should work.  Back up your world before adding any mod to an existing save.

imageimage

Why this exists

I play on a server with some mates, where I'm the designated lumberjack. After chopping hundreds of trees, I got a bit jealous that the blacksmith got to play with voxels, so I decided to give wood-cutting it's own particle frenzy. Overall, doesn't change the behaviour from vanilla too much.

Features

Per-log voxel wedges

Each axe swing carves a notch based on the face and height you swing at. Aiming higher will start the chops higher, aiming lower will chop lower.

Structural collapse

Cut through enough of any slice and the trunk gives way, the vanilla tree fall behaviour still remains

Tree-size scaling

Bigger trees take a longer time per swing.

Tree regrowth

Walk away from a half-chopped tree and the wood slowly fills back in over a couple of in-game days.

Axe-tier scaling

Better axes carve wider wedges and bigger chunks per swing.

Dull-axe ragged cuts

 A worn-down axe leaves a noisy, rough cut surface. A fresh edge produces a cleaner V.

Compatibility

  • Universal mod: install on both client and server for multiplayer.
  • Hooks into the vanilla log blocktype, so modded woods that use inheritFrom: log should be picked up automatically. However, we don't play with any modded trees atm, so I havent tested with any.
  • Currently no required library dependencies.

 

Issues

  • Sometimes swinging speed and actual chops will get desynced, especially on servers. Letting go of swinging will fix temporarily. Not sure of a good solution right now, or if it would be worthwhile spending the time to do so at this moment.
  • Having more than one person hitting a tree at once, may feel a bit odd.

Configuration

Generated on first server start at %appdata%\VintagestoryData\ModConfig\vslumber.json. Tune things and restart.

Full configuration reference (click to expand)

Core

<table> <thead> <tr> <th style="width: 251px;">Key</th> <th style="width: 83px;">Default</th> <th style="width: 863px;">Notes</th> </tr> </thead> <tbody> <tr> <td style="width: 251px;">VoxelResolution</td> <td style="width: 83px;">16</td> <td style="width: 863px;">Voxels per log edge. Range [2..64]. Each chopped log keeps its creation resolution. Higher = finer cuts, more memory per log.</td> </tr> <tr> <td style="width: 251px;">IntegrityCollapseThreshold</td> <td style="width: 83px;">0.10</td> <td style="width: 863px;">The trunk collapses when any horizontal slice drops below this solidity fraction. 0.10 = "collapse when 90% of a slice is gone".</td> </tr> <tr> <td style="width: 251px;">MaxTreeNodes</td> <td style="width: 83px;">4096</td> <td style="width: 863px;">Cap on connected log blocks traversed when finding the tree for calculating swing speed.</td> </tr> <tr> <td style="width: 251px;">TickIntervalMs</td> <td style="width: 83px;">1000</td> <td style="width: 863px;">Server heal-tick cadence in real-time ms (min 1000).</td> </tr> <tr> <td style="width: 251px;">MeshDirtyDebounceMs</td> <td style="width: 83px;">200</td> <td style="width: 863px;">Combines re-tesselation jobs per log so rapid swings don't thrash chunk meshes.</td> </tr> </tbody> </table>

Regrowth / healing

<table style="height: 89px; width: 1197px;"> <thead> <tr> <th style="width: 252.203px;">Key</th> <th style="width: 82.0625px;">Default</th> <th style="width: 861.734px;">Notes</th> </tr> </thead> <tbody> <tr> <td style="width: 252.203px;">HealCooldownDays</td> <td style="width: 82.0625px;">1.0</td> <td style="width: 861.734px;">In-game days after the last hit before regrowth starts.</td> </tr> <tr> <td style="width: 252.203px;">HealPercentPerDay</td> <td style="width: 82.0625px;">20.0</td> <td style="width: 861.734px;">Percent of removed voxels restored per in-game day, regrows from existing voxels first..</td> </tr> <tr> <td style="width: 252.203px;">HealSaturationDaysCap</td> <td style="width: 82.0625px;">2.0</td> <td style="width: 861.734px;">A cap on how many in-game days of heal can credit in a single tick. Prevents a half-chopped tree from instantly healing when its chunk reloads after being unloaded for a while. Dunno if I'll keep this as on by default in the future.</td> </tr> </tbody> </table>

Axe tier and chop power

<table style="width: 1193px;"> <thead> <tr> <th style="width: 252.203px;">Key</th> <th style="width: 73.0469px;">Default</th> <th style="width: 866.75px;">Notes</th> </tr> </thead> <tbody> <tr> <td style="width: 252.203px;">TierLeniencySteps</td> <td style="width: 73.0469px;">3</td>
Read the full description on Vintage Story ModDB →

Ratings & reviews

No ratings yet

Sign in to leave a rating or comment.