Wonderland
Strictly server-side Valheim 1.0 mod: automation, world governance, status effects, Discord notify, Zero client install, NOW WITH VANILLA CLIENT ENFORCEMENT! Full crossplay. See README.Changelog
1.12.2
Changed
- The store page was rewritten to the new layout and is now the same on every store, and the website link now goes to https://ravenirongames.com/. No change to the mod: the DLL is the same as 1.12.1.
1.12.1
Changed
- Rebuilt and checked against Valheim 1.0.21 (network version 41; world version 42, player version 47). No source change was needed.
An asmdiff of the 1.0.17 and 1.0.21 server assemblies was read against every Harmony target and game call the mod makes:
ZNet.RPC_PeerInfochanged only its network-version constant (40 to 41), so thePlayerCapGovernortranspiler still finds theGetNrOfPlayers()call and the literal after it, and thePeerJoinLeaveHook/ModEnforcementPatcheshooks still bind.CrossplayLobbyGuard:ZPlayFabMatchmaking.OnCheckJoinCodeSuccessand every field it uses (m_serverData,m_retries,ScheduleJoinCodeCheck,OnSessionUpdated(State.RegenerateJoinCode),JoinCode) are unchanged. The only PlayFab changes are the network-version filters inZPlayFabMatchmaking.ListServers,ZPlayFabLobbySearch.ToServerDataandServerListGui, which are client-side lobby-list code.ZDOMan.CreateNewZDO/RPC_ZDOData/RPC_DestroyZDO,ZDO.Deserialize/SetOwner,ZRoutedRpc.RouteRPC/HandleRoutedRPC/RPC_RoutedRPC,ZRpc.HandlePackage,ZNet.Disconnect/Shutdown/UpdatePlayerList/ServerLoadWorldand theZoneSystem/RandEventSystemhooks are byte-identical.- The cheat flag is now revisioned in the game (
ZDOVars.s_cheatedis an int that must equal 2; objects flagged under older versions count as clean). Wonderland never reads or writess_cheated;ZDOVars.s_cheatedQueued, which the production auto-supply writes beside a queued ore, is still a plain bool exactly asSmelter.QueueOrewrites it. - Container inventories are still read and written through the game's own
Inventory.Load/Save; the item-data version moved from 109 to 110, which older stored items load through unchanged. The Alice link needed nothing: Alice 0.12.1 is the matching rebuild.
- Website link moved to https://www.rossgilsonlabs.dev.
- Needs BepInExPack Valheim 5.4.2360.
1.12.0
Version jumps from 0.11.2 to 1.12.0 at Rohan's request.
Added
- The Alice link: server end of the optional PC client companion (
Subsystems/Companion/CompanionLink.cs,CompanionStations.cs,CompanionContainers.cs,WardAccess.cs,CompanionSubsystem.csnew;Subsystems/Security/RoutedRpcGate.csnew;Wonderland.csprojlinks..\ALICE\Protocol\*.csin asSubsystems/Companion/Protocol/, namespaceAliceLink;20 - Alice Link, all local keys - not ServerSync, because Alice players need not carry it).AliceLinkEnableddefaults to false and with it off the server runs exactly as 0.11.2: no session, no advertise, no reply, and the two Alice RPC hashes reach enforcement like any unknown hash. On, a player without Alice is unaffected: the only thing they ever receive is an RPC their client has no handler for, whichZRoutedRpc.HandleRoutedRPCignores (TryGetValuemiss, decompile line 83725). The wire contract isALICE/Protocol/{LinkCodec,LinkProtocol,LinkMessages}.cs(owned by the Alice project; both mods compile the same files; link protocol 1, 89 checks inALICE/tests/LinkTestson the client side).- Transport: two routed RPC names,
ALICE_S2CandALICE_C2S, oneZPackageargument each; the framed message (magic0xA1, kind byte) is that package's raw content (new ZPackage(bytes)out,ReadPackage().GetArray()in - checked against the game's ownZPackage/RoutedRPCDataat every start byRoutedRpcGate.SelfTest). The server speaks first: about 3 s after a non-console peer is ready it sendsAdvertise(4-byte per-connection nonce), repeating at +10 s and +20 s without aHello, then stops.Hello(nonce echoed, feature bits) is answered withWelcome(common protocol version, features = client AND server, theParamBag); no common version =Welcomewith proto 0, never a kick. Xbox, PlayStation and Switch peers (PeerPlatform.Label) are never advertised to. Requests before aWelcomeare dropped unanswered. - Features offered:
Production(needsAliceLinkProductionandProductionSupplyEnabled),ReliableOpen(AliceLinkContainers),ContainerRows(whenContainerRowsEnabledand the multiplier is above 1),CraftFromChests(AliceLinkCrafting) andBuildFromChests(AliceLinkBuildFromChests) - see the crafting entry below.VacuumCoop(AliceLinkVacuum, see the vacuum entry below). Not offered yet:ReportedStats,EnhancedChests(the client falls back to vanilla for each). ParamBag:StationRange(AliceLinkStationRange, 12 m),AreaRadiusMax(AliceLinkAreaRadius, 32 m),AreaMaxRows(AliceLinkAreaMaxRows, 128),OpenRange(AliceLinkOpenRange, 8 m),CraftRange(AliceLinkCraftRange, 20 m),ContainerSpecs= (prefab, width, height) for every player-built container fromContainerRows.GetGridSize. Settings are re-read every 2 s: a changed bag goes out asPush Config, a changed feature set as a freshWelcome(the client treats anyWelcomeas replacing its state), switching the link off sends every paired client aWelcomewith proto 0. - Ops (every distance is from the requester's character ZDO on the server; a request never names a position):
QueryStations(around the player or by id; nearest first, capped atAreaMaxRows, ids out ofAreaRadiusMaxreach are simply absent),SetStationPrefs(mask/values orToggle, withinStationRange),SetStationsInArea(AllOff,AllOn,KilnsOff,KilnsOnaround the player; one audit line per request),OpenContainer,RecoverCache,CraftReserve/CraftCommit/CraftCancel(below). Reply bodies onOk: station ops aStationStatuslist (one entry forSetStationPrefs, the changed stations forSetStationsInArea),OpenContainerempty,RecoverCacheau16stack count. Pushes:StationChanged(oneStationStatus) to paired peers within 128 m of the station, on any change including an emote. OpenContainermirrorsContainer.RPC_RequestOpen(decompile line 122040) for the one case vanilla cannot answer - the chest's owner is a far-away game, nobody, or the server itself, so the routed request is dropped unanswered. Checks, in order: the container prefab, the character withinAliceLinkOpenRange, the prefab'sm_privacy(Public opens; Private opens for the ZDO'screator== the character'ss_playerID; Group opens for nobody -Container.CheckAccess, line 121996), the guard stone when the prefab hasm_checkGuardStone(WardAccess: ward ZDOsenabled/creator/permitted+pu_id<i>, prefab radius, horizontal and strictly below the radius - vanilla only checks this in the client), no pendingHullBorrow. If a connected game that instantiates the zone owns the chest (ProductionSupplyEngine.PeerSimulates) the reply isStaleand Alice repeats the plain vanilla open, which that owner judges as before (in-use included); otherwiseForceSendZDOthenSetOwner(requester), in that order, replyOk. Zero item loss: from the hand-over until the new owner has opened and closed the chest (s_inUseseen at 1 then 0), disconnects, or 8 s pass,ZdoInventoryIO.IsBusyis true for it, so no engine (vacuum, supply, sort, rows anchor, integrity sweep, cache drain) writess_itemsin the window where the owner's game holds an older copy and would overwrite the write on its next save.RecoverCacheis the/comehereclaim on a key press (ItemCache.ClaimAt30 m, else everywhere):Ok+ stack count,NotFoundwhen the cache is empty,Insufficientwhen nothing could be dropped.- Abuse limits: per-player token bucket (
AliceLinkRequestsPerSecond20,AliceLinkBurst40), minimum intervals per op (QueryStations0.25 s,SetStationPrefs0.1 s,SetStationsInArea1 s,OpenContainer0.5 s,RecoverCache2 s,CraftReserve0.05 s;CraftCommitandCraftCancelare never limited), aRateLimitedreply at most twice a second, every reader bounded byLinkLimits. Malformed or misdirected messages (including a client-sentALICE_S2C) are dropped and audited at most once a minute per player ([SECURITY:AliceLink]), never a kick. Sessions end on disconnect (ModEnforcementPatches.Patch_ZNet_Disconnectprefix).
- Transport: two routed RPC names,
- Crafting, upgrading and building from the chests around the player - escrow only, no top-up (
Subsystems/Companion/CompanionCrafting.cs,CraftEscrow.csnew;CompanionSubsystem.cs; new local keys in20 - Alice Link:AliceLinkCraftingtrue,AliceLinkBuildFromCheststrue,AliceLinkCraftRange20 m (4-50),AliceLinkEscrowSeconds30 (10-120; an upgrade at the station takes about 8 s + 1 s per target quality, less with skill, so quality 10 at low skill is ~18 s and the hold must outlast it - decompilem_upgraderDuration; the hold only matters when a client vanishes without disconnecting, a disconnect hands back at once),AliceLinkBuildEscrowSeconds60 (20-300); all hot-reloaded, all inert whileAliceLinkEnabledis false). Rohan's rules, as relayed: building and crafting from nearby containers is a must have, NO TOP-UP, and NEVER LOSE OR DESTROY AN ITEM. A player without Alice, or an Alice that does not get the feature, crafts and builds exactly as vanilla.- The handshake.
CraftReserve(CraftReserveReq: station ref or none,CraftPurposeCraft / Upgrade / Build as a trailing byte - absent = Craft - and distinct shared-name tokens with amounts; a token must start with$) takes EVERY line out of the chests in one step and answersCraftReserveReply { Id, ExpiresSeconds, Taken }. The client never receives the items: it counts bag + escrow, spends its own bag share through vanilla when the recipe is paid, then sendsCraftCommit(the escrowed share was used - forget it).CraftCancel, the expiry, a disconnect, a server shutdown or the link being switched off hand the stacks back. Commit and Cancel are answered before the character lookup and are never refused for a disabled feature (a player who died mid-craft, or an admin switching crafting off, must not strand a reservation); both are idempotent (NotFoundthe second time). Replies:Ok;Disabled(feature not offered; Build and Craft/Upgrade are separate bits);BadRequest(empty, non-$token, zero amount, unknown purpose, a Build that names a station);NotFound(the station ref is not a crafting station);OutOfRange(the station is farther from the character than its ownm_rangeBuild+ 4 m, capped at 30 m);Insufficientwith the chests' total of every line as aCraftNeedlist (so the client can say "12 (+7 in chests)");Busywhen the shortfall could be a chest someone has open, or the player already has 8 tickets open. - Which chests. Containers within
AliceLinkCraftRangeof the crafting station (Craft, Upgrade) or of the character (Build, or a recipe with no station) that are player-built (ContainerRows.IsPlayerBuilt: never a tombstone, treasure, dungeon chest or cargo crate), that the player may open (ContainerAccess: privacy and guard stones, the same checks asOpenContainer), that nobody has open (ZdoInventoryIO.IsBusy, which includes a chest just handed over byOpenContainer, and a pendingHullBorrow) and that are not a hull a client is simulating. Which stacks (the same on both sides): stackable, quality 1, no crafter, not cheated, no custom data, world level not below the game's - whatInventory.CountItemscounts. Never a sword, never a stack a recipe could not have asked for. - All or nothing. Every line is planned against what the chests hold before anything is written; one short line and nothing changes. Nearest chest first, smallest stack first (a debit also consolidates). Pass 1 stops at the first chest that completes a line; pass 2 (the totals) runs only on a failure; at most 48 chest loads per request, and the names cache (
VacuumEngine.KnownToHoldAtMost) skips chests it knows lack the item. - Zero item loss. The escrow exists in memory AND in a journal file BEFORE the first chest is written; a failure part-way hands back only what was taken: the share of every chest whose write never started is dropped from the escrow first (
CraftEscrow.DropUntouched), because that chest still holds its items and a refund would add them twice; the one chest whoseSavethrew is kept, a duplicate beating a loss. A refund goes to the chest the stacks came from, else a sibling container within 25 m that has room AND that the ticket's player could have opened themselves (player-built,ContainerAccessprivacy and guard stones - never a tombstone, a treasure chest or someone else's private chest), else theItemCache(never refuses;/comehereor the Alice key brings it home). It never writes a chest a player has open: it waits up to 10 s, then moves on to the next place. A stack leaves the escrow only after the chest write that took it; a refund that cannot finish stays in the escrow and is retried. Expiry has a 2 s grace so a commit racing the timer wins. The ledger recordsCraftEscrow:Reserve. - Journal and crash recovery.
Wonderland.CraftEscrow.<world>.dat(config folder, rewritten whole on every change throughFile.Replaceso no instant has no journal, deleted when empty; if a crash still catches the older delete-then-move fallback between the two steps,Recoverreads the complete.tmp) holds each open ticket's stacks per chest with the UTC time of the debit, stamped with the moment the latest world save began (ZNet.WorldSaveStarted). At world-ready: an entry debited at or before the stamp is in the saved world, so it is refunded; one debited after it was never saved - the restored chests still hold the items - so it is dropped, because refunding it would duplicate. A shutdown refunds everything BEFORE the world save (ZNet.Shutdownprefix, whether or not the link is on). - Trust model.
CraftCommitandCraftCancelare the paired client's word. The server cannot see inside a client's craft, so a MODIFIED Alice could keep what it crafted and send Cancel (the materials return to the chests), and a Commit lost to a crash or disconnect duplicates one craft's escrowed share. Admins who run anti-cheat should treatAliceLinkCrafting/AliceLinkBuildFromChestslike any other client-trusting feature; both switches are hot-reloaded. Per its author, Alice 0.12.0 asks the game to save the character a few seconds after a craft that used chest materials (client configSaveAfterChestCraft, default on), narrowing the exposure of a client crash - which would otherwise leave the chests short while the character forgets the craft, the same as moving the items by hand - from up to the autosave interval to about 20 s. - Honest limits. A crash during a world save that never finished can refund an entry the older world still holds: a duplicate, by choice, never a loss. A craft committed in the instant the connection died is refunded when the escrow is not found committed: one craft's escrowed share duplicated, logged with player and items. A client that reserves and never spends is not a loss for anyone, but 8 uncommitted expiries in 10 minutes are audited (
[SECURITY:CraftEscrow]).
- The handshake.
- Vacuum cooperation with Alice: hand-over offers, the instant trigger, per-chest settings, "moved" toasts (
Subsystems/Companion/CompanionVacuum.csandSubsystems/ItemFlow/ContainerPrefs.csnew;VacuumEngine.cs,CompanionLink.cs,ItemFlowSubsystem.cs,WonderlandConfig.cs; new local keys in20 - Alice Link, all hot-read, all inert whileAliceLinkEnabledis false and all announced to paired clients through the existing Welcome /Push Configrefresh:AliceLinkVacuumtrue (master switch, needsVacuumEnabled; offersFeature.VacuumCoop),AliceLinkVacuumReleasetrue,AliceLinkVacuumNudgetrue,AliceLinkContainerPrefstrue,AliceLinkVacuumToaststrue). Wire: ops 48-51,PushEvent3-5,ParamKey7-9 (ALICE/docs/M3-VACUUM-WIRE.md); server semantics and the reasoning behind every line of the failure handling:docs/ALICE-M3-SERVER-SEMANTICS.md. A player without Alice, an Alice without the feature, and a server with any of these switches off are served exactly as 0.11.2: every stack the new code does not handle takes the unchanged claim-and-settle path.- Owner-originated hand-over (
CompanionVacuum.TryOffer,VacuumEngine.AcceptReleases). The claim-and-settle step exists because a client's pickup is entirely client-side and the server cannot veto it (VacuumEngine, "The settle step"). When the owner of a stack a chest wants is a paired Alice peer that negotiatedVacuumCoop, the server instead pushesReleaseOffer(up to 16{offerId, ZDOID}per push, at most 24 offers open per peer) and the owner's game - the only machine that can pick the stack up - decides in one frame (it refuses when its own auto-pickup would claim the stack, when the player pressed E on it, when it cannot judge) and otherwise callsSetOwner(server)+ForceSendZDOand answersReleaseAnswerwith theOwnerRevision(u16) andDataRevision(u32) of its copy after the call. The answer is a claim, the server's own ZDO copy is the proof: the stack moves only in the frame the server's copy showsowner == the server session,OwnerRevision >= the answer's(modular compare) andDataRevision >= the answer's(CompanionVacuum.Proven). The game applies a client's ownership change only when itsOwnerRevisionis strictly newer (ZDOMan.RPC_ZDOData, decompile 1.0.17ZDOMan.cs:1176-1184), so a client with a stale view produces a release that never proves and nothing moves. The answer usually arrives BEFORE the ZDO packet (the client batches ZDO sends, routed RPCs go out at once); both orders are handled, with a 1 s wait for the proof. On proof the stack is registered as an already matured hold and its chest is processed in that same frame: the existingTryTakeOwnershipsees a server-owned stack with a matured hold and moves it, the existing chest-first-then-destroy order applies,LatePickupPatchstays the backstop, and a chest that cannot take it any more (full, opened, destroyed, excluded meanwhile) leaves the existingReleaseHold->HandBackto give it to the nearest player - never frozen.ZDO.SetOwnerprefix: while an offer is open for a stack the server already owns, no passive hand-over (ReleaseNearbyZDOS) may take it before the move (a player's pickup grace still wins, as everywhere). - Every other ending is today's behaviour. A refusal (
PlayerOnIt/Gone/NotOwner/Busy), silence for 1.5 s, a missing proof, or another player winning the stack closes the offer and the stack is an ordinary stack for the claim path; the refusal only schedules the next OFFER (PlayerOnIt2, 4, 8, 16, 30 s escalating, reset by a release or 5 quiet minutes;Busy/NotOwner/ an expiry 4 s). Three unanswered or unproven offers in a row from one peer mute offers to it for 60 s. No offer is made for a stack within 2.75 m of the owner's character (position + 1 m up: the geometry of the client's own auto-pickup, which would ask the stack straight back); one path per stack at any time; offers live at most 2.5 s; a disconnect, the link going off or a switch drops them at once; nothing is persisted, so a server restart mid-offer leaves ordinary ground stacks. The ledger and the sanity guard see the move exactly as before (Vacuumtag). Counters ([Alice] vacuum cooperation so far: ...every 10 minutes while anything happened): offers sent, answered, moved on proof, refused, expired (without proof), taken by another player, nudges. VacuumNudge(op 49, min interval 0.2 s): up to 16 ZDOIDs of ground drops the client just created. A drop is accepted only if its ZDO exists (an id the ZDO packet has not delivered yet waits up to 1 s), is a loose item (not a placed feast, not a hatching egg), is owned by that peer and lies within 64 m of its character; the position the server looks at is the ZDO's, never the client's. Each accepted drop queues oneVacuumAroundpass (reach 3 m) in a pass of its own like the one that follows an auto-harvest sweep; at most 4 per frame and 20 per second server-wide, positions within 2.5 m coalesced. A nudge only causes a look: every vacuum rule still decides. ReplyOk+ the accepted count.- Per-chest settings (
ContainerPrefs, ops 50QueryContainerPrefs/ 51SetContainerPrefs, min intervals 0.25 s / 0.1 s):Vacuumon/off (off = the vacuum never puts anything in that chest; every other engine still visits it),ModeMatchOnly(today's rule and the default) /Filter(only the listed$item_*tokens, at most 16, even into an empty chest) /CatchAll(a sink: anything not onVacuumExcludedItemsthat no matching chest in reach wants),Radius(0 = the admin'sVacuumRadius, else clamped to [2, admin radius]). A sink ranks below every matching chest:VacuumAroundsweeps matching chests first and sinks second, and a sink leaves a stack alone while another chest in its reach is known to want it (its filter lists the item, or its contents at their currentDataRevisionin the names cache include the type) and was not found full for that type within the last minute; a chest whose contents are unknown does not make the sink wait (worst case an item lands in the sink instead of its matching chest, never lost).SetContainerPrefscarries a field mask (Vacuum 1, Mode 2, Radius 4, Filter 8; All = replace) and applies only the masked fields over what is stored, so two players editing one base do not clobber each other; the reply is the record as stored (clamped, de-duplicated, sorted); a record equal to the defaults is removed. Allowed for a player who stands withinAliceLinkOpenRangeof the chest and may open it (ContainerAccess: privacy, guard stone);BadRequestfor an empty or unknown mask, a token that does not start with$or is over 96 bytes, more than 16 distinct tokens, a NaN or negative radius, an unknown mode. State isWonderland.ContainerPrefs.<world>.dat(C @prefab;x;y;z V= M= R=andT @prefab;x;y;z tokenlines, rewritten throughFile.Replace, pruned of destroyed chests on every save, a.tmpleft by a crash is read) - a mod-side file keyed by the chest's prefab and exact position (never its ZDOID, which is renumbered on every world load - see Fixed), because a chest an owning client has open rewrites its own ZDO and a server write there can lose. WhileAliceLinkEnabled,AliceLinkVacuumorAliceLinkContainerPrefsis off the stored settings are NOT in force (every chest behaves as without Alice) and the file is kept, so switching back restores them.ContainerPrefsChanged(push 5) is not sent by this build. - Toasts (
VacuumMoved, push 4): the vacuum stages each stack it puts into a chest and releases the staged moves only after the chest write succeeded (an exception discards them); they are aggregated per chest and item for a second and sent to pairedVacuumCooppeers within 30 m of the chest (distance computed per recipient, at most 8 entries, real moved counts only). ParamBag:VacuumFlags(u16: Release 1, Nudge 2, Prefs 4, Toasts 8 - a bit is set only when its switch AND its precondition hold, e.g. Release only whenVacuumEnabled),VacuumRadius(f32, the admin'sVacuumRadius),PrefsFilterMax(u16, 16), present whenever the server offersVacuumCoop.
- Owner-originated hand-over (
- Three more BarrkBOT files, all OFF by default: player-reported statistics (Alice), server-measured activity, and the base (
Subsystems/BarrkBot/BarrkBotReported.cs,BarrkBotActivity.cs,BarrkBotBase.csnew;BarrkBotStats.cs,BarrkBotSubsystem.cs,CompanionLink.cs,CompanionReports.csnew,CraftEscrow.cs,ProductionSupplyEngine.cs,VacuumEngine.cs;17 - BarrkBOT Export, local keys:BarrkBotReportedExportfalse,BarrkBotReportMinSeconds60 (30-600),BarrkBotActivityExportfalse,BarrkBotBaseExportfalse,BarrkBotStockTopItems40 (0-100); wireALICE/docs/R2-REPORTED-STATS-WIRE.md). New files are default off on purpose: BarrkBOT's scanner picks up everybarrkbot_*.jsonand a new one is something it starts reading out; switching one off deletes it, and what was recorded stays in the registry. The mainbarrkbot_wonderland.jsonis unchanged (schema 3, every field where it was). RegistryWonderland.BarrkBot.<world>.datschema 1 -> 2, purely additive (newPlayerRowfieldsreported,distance_metres,sailing_seconds,biome_seconds,boss_fights,chest_materials_used,client; registry fieldsreported_since,activity_since,owner_releases_count,chest_materials_used_count,hourly_epoch_hour,hourly); a build that predates them ignores them, so a downgrade loses nothing but the new figures.barrkbot_wonderland_reported.json,..._activity.jsonand..._base.jsonfollow the contract's row rules (flat scalar rows withname, units and provenance in the names,*_alltime,null= not measured, single-string_notes, noonlineand no roster - one fact, one file - and nosession_started_at, since every figure is a lifetime total or a labelled snapshot). Measured against BarrkBOT's own reader (tools/barrkbot/barrkbot-render-probe.mjs, 6.1.x): twelve players compact to 4.6, 4.9 and 3.8 kB, under the local provider's 6,000-character slice, and all four files sync as separate exports with no errors. Reader behaviour to know before switching any of them on: a mod that publishes several exports is answered with an INDEX ("too large to return together, pick the file") for a bareget_valheim_mod_data({mod:"Wonderland"}), so once an extra file exists the model asks twice (index, then the file); the words "stock", "distance", "crafts", "kills", "biome" route straight to the right file.- Player-reported (
CompanionReports,BarrkBotReported; opsReportStats64 /ClearReportedStats65,ParamKey.ReportMinSeconds10,Feature.ReportedStatsoffered only whileAliceLinkEnabledandBarrkBotReportedExportare on and the registry is live): an Alice player who answered yes in Alice's consent window sends DELTAS of the game's own raw per-character counters since a baseline taken when it connected here (the counters span every world), at most once perBarrkBotReportMinSeconds(a sooner report isRateLimitedbelow 80% of it): crafts, pieces built, trees felled, boss last hits, enemy kills, boss kills (ReportedStat1-6; a number this build does not know is ignored), plus the top skill's name and level and the sum of all skill levels. Exported per stables_playerIDascrafts_reported_alltime,pieces_built_reported_alltime,trees_chopped_reported_alltime,boss_last_hits_reported_alltime,enemies_killed_reported_alltime,boss_kills_reported_alltime,skill_top_reported("Swords 54", null when none),skill_levels_sum_reported,reported_at. Judgement:Busywithout a stable id (the client keeps its baseline);BadRequestfor a delta over 1,000,000 or the same stat twice; a report over its per-minute ceiling for the window since the previous one (floor one minute: crafts 60, builds 300, trees 40, boss last hits 30, kills 200, boss kills 10 per minute) is dropped WHOLE, audited at most once a minute per player ([SECURITY:StatReport]) and still answeredOkso the client's baseline moves on - a dropped window is lost, not retried; skill names are accepted as letters, spaces, apostrophes and hyphens up to 32 bytes (anything else is stored empty and exported as null, so markup cannot reach a Discord line), levels clamp to 0-100 and the sum to 0-5000.ClearReportedStatsdeletes the player's block and leaves the rest of the row alone; a row otherwise survives reconnects (it is their past, not a live claim). The caps keep a leaderboard sane and are not a security boundary: a bag is client-authoritative, a cheater can fake far more than a counter. - Kills are not server-measurable (and are in no server-measured file):
Character.OnDeath(Character.cs:2938-2953, 1.0.17) runs on the creature's owner and credits the owner's own player with a LOCAL call (Game.RPC_RegisterKill(0L, ...), line 2946); only the other attackers get the routed RPC through the server (line 2951), so a server-side count would rank players by who happened to own the creature. Kills therefore come only from the player's own game, in the reported file. - Activity (
BarrkBotActivity, every 5 s from the existing registry sweep, tracked only whileBarrkBotActivityExportis on; counters start when it is switched on,tracking_since):distance_travelled_metres_alltime(horizontal ground covered between sweeps from the character ZDO; a step over 30 m/s is a portal, respawn or teleport and is skipped),sailing_seconds_alltime(seconds as the steering user of a hull -ShipAttachment.IsSteeringShip, thes_userfield),biomes_visitedandmost_time_biome(WorldGenerator.GetBiomeunder the character, seconds kept per biome in the registry),boss_fights_alltime(players within 60 m of where the boss was last seen alive when itsdefeated_*key is recorded: a fight, not a kill; a sweep looks for boss prefabs within 120 m of every player),chest_materials_used_alltime(items the server took from chests for that player's committed crafts, upgrades and placements -CraftEscrow.Commit; null for a player who never could),client("Alice 0.12.0" once paired; "vanilla" for a console player or after every advertise went unanswered; null while unknown or the link is off). No position, no kills. - Base (
BarrkBotBase,BarrkBotStockTopItems):stock= a snapshot of the player-built containers (ContainerRows.IsPlayerBuilt: chests and ship holds, never tombstones or world loot), by prefab name, most plentiful first (stock_by_item,stock_item_types,stock_items_total,stock_containers_counted,stock_measured_at= when the last FULL pass finished, null until one has). One resumable walk over every sector (ZdoSpatialQuery.PrefabSetSweeper) finds the containers; they are visited in slices of at mostSweepBudgetMsper frame; a chest the vacuum's per-DataRevisionnames cache already knows is counted without being loaded (VacuumEngine.TryGetCachedItemCounts), any other is loaded once per pass, and reading never writes so a chest a player has open is counted too. A pass starts every ten minutes; switching the export off drops the snapshot.production: counts of the station notes the auto-supply leaves per visit within the last ten minutes (stations_visited_recently,stations_fed_recently,stations_waiting_fuel,stations_waiting_input; since the server last started) andproduction_items_fed_last_24h.automation_last_24h:vacuum_items_moved_last_24h,auto_harvest_items_last_24h- rolling windows of 24 hourly buckets per ledger tag, kept in the registry (the newest, still running hour included, so 23 to 24 hours of history; a different period from the lifetime totals in the main file, with different names).companion:companion_players_online(null while the link is off),chests_with_vacuum_settings,catch_all_chests,stations_customised,vacuum_owner_releases_alltime(hand-overs that really ended in the chest),chest_materials_used_total_alltime. Not built:stock_by_base(stock grouped by guard stone and owner name; it names what a player's base holds).
- Player-reported (
- Fuel and ore supply can be switched separately (
Subsystems/ItemFlow/SupplySwitch.cs,ProductionSupplyEngine.cs).SupplySwitchnow holdsStationFlags(Enabled / FuelOn / OreOn); a station nobody switched has no entry and is fed exactly as before. The emote OFF clears Enabled only (finer fuel/ore choices kept); the emote ON resets the station to All, so a player without Alice, who cannot see the finer switches, always gets "fed" back. A fireplace only has fuel, so Enabled off and fuel off mean the same there; a smelter with fuel off still gets ore and the reverse. FileWonderland.SupplyOff.<world>.dat:user:id= off entirely (the only line 0.11.2 and earlier read),F user:id= fuel off,O user:id= ore off; a build that predates the F/O lines skips them, so a downgrade feeds those stations as it always did.Count(BarrkBOTstations_switched_off) still counts stations switched off entirely;PartialCountis new. - The auto-supply leaves a note per visit (
ProductionSupplyEngine.Record):Fed,Full,NoFuelSource,NoInputSource,KilnFilter,OwnerBusy, with the time; one dictionary write per visit, capped at 20000 entries and pruned with the ownership records. Alice words them in the player's language; the engine's behaviour is unchanged.OffandBlocked(engine switched off in section 3) are derived at query time.
Security
- A forged routed-RPC sender id is dropped (
Subsystems/Security/RoutedRpcGate.cs;12 - Security/RoutedSenderGuardEnabled, default true, read at use time). VanillaZRoutedRpc.RPC_RoutedRPC(decompile line 83707) never comparesRoutedRPCData.m_senderPeerIDwith the connection the packet arrived on, and three things trusted it:ModEnforcementPatches.Patch_ZRoutedRpc_HandleRoutedRPCresolvedZNet.GetPeer(data.m_senderPeerID)and kicked THAT peer for a non-vanilla hash - so a modded client could name an innocent player as the sender of an unknown hash and get them kicked while the real sender escaped; a sender id of 0 is treated as a local server RPC and skipped enforcement entirely; andWaterBuoyancyEngine(pickup requests) andVacuumEngine(auto-harvest picks) act fordata.m_senderPeerID. A vanilla client writes its own session id there (InvokeRoutedRPC, line 83652), which is also the uid it sent inRPC_PeerInfo(SendPeerInfowritesZNet.GetUID()==ZDOMan.GetSessionID(), line 80941) and so equalsZNetPeer.m_uid. One prefix onRPC_RoutedRPC(Priority.First) peeks the five header fields without allocating (message id, sender, target, target ZDO, method hash; position restored) and drops a packet whose claimed sender is not the connection'sm_uid; the REAL sender is audited as[SECURITY:RoutedSender] ... routed RPC 0x... claims sender N but arrived on connection M - dropped, at most once a minute per player with the count since the last line. A drop, not a kick: a false positive costs one packet, not a session. Adminlist admins are not checked (ModEnforcement.IsAdmin, the same bypass as every other guard). It is one prefix, not two: the Alice interception and the sender check share it, so no Harmony ordering between prefixes on the same method is relied on (TerrainGuard's recorder is a void prefix on the same method and runs as before). Fail-open canary: at startRoutedRpcGate.SelfTestserializes a realRoutedRPCDatawith the game's ownZPackage, checks the peek reads the sender and hash back and leaves the position alone, and checks the Alice framing round-trips throughZRpc.Serialize/ReadPackage/GetArray; if either fails the gate does nothing at all (and the Alice link stays dark) and an error says so, because a wrong offset would make every routed RPC look forged. Any exception inside the gate passes the packet to vanilla and is logged once.[RoutedRpcGate] self-test passed ...is the line to look for at boot.
Fixed
- Station switches, per-chest settings and the craft journal no longer key on a ZDOID (
Core/Data/ZdoPersistKey.csnew;Subsystems/ItemFlow/SupplySwitch.cs,ContainerPrefs.cs,Subsystems/Companion/CraftEscrow.cs).ZDO.Loadopens withm_uid.SetID(++ZDOID.m_loadID)(1.0.17ZDO.cs:1295-1298;ZDOID.SetIDalso sets the user part to the "unknown former user" key, 1): in a chunked-save world - every 1.0 world - each ZDO is renumbered, and loses the user id it was created under, every time the world is read off disk (ZDOMan.LoadChunks,ZDOMan.cs:474-592; libs-ToolsMASTER_IMPLEMENTATIONS.md, "A ZDOID is a session handle"). An id is stable while the world stays loaded and meaningless after the next restart, so a file keyed by one is orphaned, or applied to whatever ZDO now carries the number.SupplySwitch(Wonderland.SupplyOff.<world>.dat, since the emote switches shipped) wroteuser:id: the live files hold1:51759,1:44330,1:44452,1:87887... which, after the restarts since, name other pieces of the world - a station a player switched off was fed again, one nobody touched could have been switched off, and the save pruned only ids that no longer existed at all. The first cut ofContainerPrefs(Wonderland.ContainerPrefs.<world>.dat) and the escrow journal's chest id had the same flaw (after a crash a refund written toGetZDO(oldId)could have gone into a tree, or another player's chest). All three now persist the prefab hash and the exact position (ZdoPersistKey:prefabHash;x;y;z, round-trip floats; a placed piece never moves) and match back to the live ZDO within 0.25 m once the world's sector index can be queried (ZdoPersistKey.WorldReady); the tables in memory stay keyed by ZDOID, valid for the session.- Files.
Wonderland.SupplyOff.<world>.dat:@prefab;x;y;z(off entirely),F @...(fuel off),O @...(ore off).Wonderland.ContainerPrefs.<world>.dat:C @prefab;x;y;z V= M= R=andT @prefab;x;y;z token.Wonderland.CraftEscrow.<world>.dat: theHline still carries the chest's id (informational) and its position;Recoverignores the id and finds the container nearest to the recorded position, and a chest that is gone sends its stacks to a neighbour or the item cache. - Upgrading. Lines in the old
user:idform (with or without theF/Oletter) can no longer be matched to anything: each file logs one line saying how many it skipped, and the next save replaces the file. Stations switched off with the emote before this build have to be switched off again; chest settings and open escrows did not exist before 1.12.0. - Timing. Entries are matched 64 per frame once the world is up; while any are unmatched nothing is written (a save would drop them), a line whose piece is gone is dropped and the file rewritten.
CraftEscrow.Recoverruns fromOnUpdateonce the world's ZDOs are loaded, not from the world-ready hook (see the next entry). Until its lines are matched (a few frames after the world loads) a chest or station reads as unconfigured.
- Files.
- Crash recovery of the craft journal ran before the world's ZDOs were loaded (
Core/Data/ZdoPersistKey.csHook/WorldLoaded/WorldReady;Plugin.cs;Subsystems/Companion/CraftEscrow.csRecover). Found by a realkill -9after a world save, restarted on the same world (../WonderlandTests/crash-test): the log read[CraftEscrow] #N <name> (Build): handed back (recovered after a server restart) - 0 item(s) to their chest, 0 to a neighbouring chest, 30 to the item cacheand only afterwards[ItemCache] Restored 30x ... into container.Recoverran from the world-ready hook, a postfix onZNetScene.Awake;ZNet.Start- which loads the world,ServerLoadWorld->LoadWorld->ZDOMan.LoadChunks, synchronously (1.0.17ZNet.cs:432-464,1956-2000) - is a separate step, and on the testbed it runs on the next frame. There, at the hook, the world held no ZDOs, so neither the chest nor any neighbour existed, and the stacks went to the item cache (never lost: the vacuum drains the cache into a container near the recorded position, which is why an end-state check passed). The order is not something to rely on: the Alice live-test rig's 15,843-ZDO world read the journal of the previous build afterZDOMan.LoadChunks doneand refunded straight into the chest - the flaw depends on timing and world size, which is why it can pass on one world and fail on another, and why the cure does not assume either order. The ZDOID-keyed code before this build had the same dependence: it also askedGetZDOat the hook. Now every lookup by position and every file-to-ZDO match waits forZdoPersistKey.WorldLoaded: a ZDO has been numbered by the load (ZDOID.m_loadIDabove zero) or a frame has passed sinceZNet.Startbegan (ZNet.s_onZNetStart, hooked in the plugin'sAwake; a brand-new world loads nothing), with a 20 s timer if the event never fires. The same gate protects the station-switch and chest-settings files. A refund still takes the chest, then a neighbour within 25 m, then the cache, as before; the journal now logs per ticket whether its chest is in the loaded world ([CraftEscrow] #N: the chest at (x, y, z) is in the loaded world; 1 stack(s) to hand back.). Real run on this build: the refund goes straight into the chest found under its new id (... - 30 item(s) to their chest, 0 to a neighbouring chest, 0 to the item cache), the ticket debited after the save began is dropped (the restored chest already holds it), nothing is duplicated, nothing is parked in the cache. - Switching the Alice link off no longer gets an active Alice player kicked (
Subsystems/Security/RoutedRpcGate.csDecide,Subsystems/Companion/CompanionLink.csDeactivate/InEndedGrace/NoteCrossedPacket). Found by the Alice live-test rig (run 4, 2026-10-11): with the section 20 switch (AliceLinkEnabled) hot-edited off while a player held a building reservation, the server logged[Alice] link switched off - 1 paired client(s) told to go back to vanilla.and in the same second[SECURITY:ModEnforcement] ... sent unauthorized RoutedRPC hash 0x595D5E7B ... KICKING(0x595D5E7B=ALICE_C2S; the client saw "Incompatible version"). The cause is a race no client can avoid: a request Alice had already sent (while a piece is held she plans every 0.2 s) was on the wire whenWelcome(proto 0)went out, arrived after the link was off, fell through the gate - with the link off both Alice hashes were deliberately left to enforcement - andZRoutedRpc.HandleRoutedRPC's whitelist kicked a non-admin for an unknown hash. It hit 1 of the 3 rig runs that flipped the switch while she was busy. Any hot-edit of section 20 while someone builds, crafts or stands at a station could do it.- The window. When
Deactivateends the link it remembers every peer that had a session with a Welcome or an Advertise behind it (a Hello may be answering the Advertise) forEndedGraceSeconds= 30 s. Inside that window the gate consumesALICE_C2SandALICE_S2Cfrom that peer silently (the packet is never handled as an unknown hash and never relayed): one Info line per peer ([Alice] <name>: a link packet that was already on the wire when the link was switched off N s ago arrived after it - ignored (not a violation, not a kick ...)), a count, and a summary line when the window closes. Nothing is flagged and nobody is kicked. A conforming client stops sending the moment it processes the Welcome, so the real window is a round trip plus a frame. - What did not change. The sender check still comes first (a forged sender id is dropped and audited, window or not). Only the two Alice hashes are covered: any other unknown routed hash from the same peer still goes to enforcement. A peer that never had a link, one connected after the switch-off, one that was never spoken to, and any peer after its half minute are judged exactly as before - a server with the link off and nobody paired behaves byte for byte as it always did. The gate also looks at the hashes while
RoutedSenderGuardEnabledis off, so the window does not depend on that setting. A disconnect clears the peer's window. With the link switched back ON inside the window the live path consumes the packet as it always has (a stale one from before the re-pairing included). - Tests. New harness group
LinkEnd(../WonderlandTests/vacuum-test, L1-L11, 16 checks): link off with no history goes to enforcement; the paired and the advertised peer are inside the window afterDeactivate, a never-spoken-to peer and a stranger are not; a crossed request, a crossed Hello and a crossedALICE_S2Care consumed; any other unknown hash is not; the window holds with the sender guard off; a forged sender is still dropped inside it; the crossing packets are counted; after 31 s the window is pruned and the same packet goes to enforcement again; a disconnect clears it; with the link ON the gate consumes. The real thing needs a client with a piece in hand andset key=AliceLinkEnabled value=falserepeated (the rig's W3); confirmed live by the rig's run 7 on 2026-10-11.
- The window. When
Changed
ZdoInventoryIO.IsBusyis also true for a container the server has just handed to a player (seeOpenContainer); nothing else about it changed.ContainerRowsgainsIsPlayerBuilt(GameObject);ZdoInventoryIOgains the hand-over set (BeginHandover,OnPeerDisconnected,OnUpdate) used byOpenContainer.ProductionSupplyEnginegainsIsRunning,LastReason,TryDescribeStation,FindStations,PeerSimulates(read-only helpers for the link).
Verified
- Release build, 0 warnings from the new files. Two headless 1.0 dedicated-server boots (testbed profile
wl1120, throwaway world, Discord disabled,AliceLinkEnabled = true): BOOTED in 19 s,[RoutedRpcGate] self-test passed,Successfully applied Harmony patch set: Patch_ZRoutedRpc_RPC_RoutedRPC_Gate,[Alice] link ready; section 20 switch is ON, no exceptions. Harmony prefix ordering was NOT relied on and so not tested (HarmonyX 2.9.0 does not run on this machine's .NET 8; the question is moot with one prefix). - Escrow integration run (throwaway BepInEx test plugin in
../WonderlandTests/escrow-test/, kept out of this project so it cannot compile into the DLL; testbed profilewl1120, fresh world, Discord off, real ZDOs and Inventories,Wonderland.dllmd5 as shipped): 61 of 61 checks pass - reserve, cancel (idempotent), commit (idempotent, no refund after), all-or-nothing, a shortfall writes nothing, two chests with an exactTakenecho, busy chest skipped and a busy shortfall answersBusy, someone else's private chest never used and your own private chest used, build and craftDisabledwithout the feature, build-with-station / non-station / empty / non-token requests refused, quality-2, cheated and crafted stacks ignored, expiry refunds, disconnect refunds, a refund waits while the chest is open, a destroyed chest is rehomed to a sibling with nothing lost, a journal that survives a simulated crash hands the debit back - also when the world was reloaded and the chest has a new id (found by position, a decoy chest that would win the neighbour logic stays empty) and when the chest did not survive (the stack goes to the item cache), a debit after the last save is dropped rather than duplicated, a failure part-way through the chest writes hands back only the written chests' shares (no duplicate), a journal caught with only its.tmpis read and cleaned up, and a refund never lands in another player's private chest or a non-player-built one. - Vacuum cooperation integration run (
../WonderlandTests/vacuum-test/, same method as the escrow run, a fake Alice peer plugged in through the publicIVacuumHostseam, the engine's own passes switched off so every move happens because a check asked for it): 159 of 159 checks pass - the proof rule including theOwnerRevisionu16 wrap, answer-before-ZDO and ZDO-before-answer, no proof, a refusal leaves the claim path open, no offer within 2.75 m of the owner's character, foreign / duplicate / unknown answers, a stack another player was granted, theSetOwnershield, a chest busy or destroyed before the proof, three silent expiries mute the peer for 60 s, disconnect, a failed multi-offer send, the 24-open and 16-per-push caps, thePlayerOnItback-off, per-chest settings inside the engine (off, filter into an empty chest, a sink ranked below a chest known to want the item, radius, not in force while disabled), everySetContainerPrefsrejection plus mask merge, defaults removal, radius clamp, privacy / range / not-player-built answers and the save/load round trip, the nudge rules, the toasts only after the chest write, and persistence -ContainerPrefsandSupplySwitchfiles name pieces by prefab and position, never by id, settings and switches follow a chest or station replaced by a NEW ZDO at the same place (what a world load does to every id), olduser:idlines are skipped, pieces that are gone are dropped, nothing is written while lines are unmatched; and the link-end window (LinkEnd, see Fixed: a request that crossed the switch-off is consumed, a stranger and any other unknown hash still go to enforcement, the window closes and is pruned after 30 s, a disconnect clears it), and the late pickup (LatePickup, P1-P6: a client that picked a stack up in the instant the engine moved it into a chest reports itsDestroyZDOone trip late, and the engine takes that stack's worth back out of the chest; a duplicate report, an unrelated destroy and the server's own session change nothing; an open chest makes the take-back wait until it is free). Three seeded conservation soaks come out exact (loose + chests + picked up at the start = chests + ground + picked up at the end): 1426 = 1255 + 171 (77 offers, 29 moved on proof, 6 refused, 30 expired), 1313 = 1268 + 45 (110 / 51 / 11 / 32), 1385 = 1292 + 93 (145 / 78 / 16 / 32); the same soaks with every pick-up delivered the way a client delivers one (throughZDOMan.RPC_DestroyZDOfrom the owning peer, so the late-pickup check sees it) are exact too, three runs of three rounds each. The soak counts its ground stacks by ZDOID. An earlier version walked the ZDO objects it had created at the start; a destroyed ZDO's object goes back toZDOPooland is built into the next ZDO anyone creates, and on a freshly booted world that is the world generating its first zone - 45 of 45 objects had become_ZoneCtrlZDOs (44) and a Leviathan, each counted as a stack of 1, a constantdiff=45(32 in one full run) in a world whose chests, ground and item cache were exact (the cross-check lineSOAKALIASprints both counts every round). Test harness only; no engine change. - BarrkBOT integration run (
../WonderlandTests/barrkbot-test/): 64 of 64 checks pass - the player-reported file (every cap, a delta dropped whole is stillOk, the minimum gap, consent clearing, the registry round trip), the activity file (distance, portal and teleport jumps, sailing, biomes, boss fights credited from the latest sweep, chest materials, the client label, the rotating boss scan), the 24 h windows across an hour rollover, and the base file (stock pass in budgeted slices, the station census, the switch-off clearing the snapshot). The four files written for a populated registry were fed through BarrkBOT 6.1.20's own reader (tools/barrkbot/barrkbot-render-probe.mjs, and a multi-file variant): all four sync as separate exports, the three new ones at 4,553 / 4,880 / 3,807 compact characters (cap 6,000); the samples aretools/barrkbot/sample_{reported,activity,base}_populated.json. - Real crash test (
../WonderlandTests/crash-test, two phases on a throwaway world): two chests, a reservation, a real synchronous world save (ZNet.Save(true):WorldSaveStartedfires and stamps the journal), a second reservation after the save began, thenkill -9of the server's own process and a restart on the same world and config folder. 6 of 6: the ticket debited before the save is handed back straight into its chest, found by position under its new id (30 item(s) to their chest, 0 to a neighbouring chest, 0 to the item cache), the ticket debited after the save began is dropped (the restored chest already holds it), the second chest holds exactly its 100, no escrow is left open, no journal file, nothing in the item cache. It is the test that found the recovery-order flaw above. - Final regression, 2026-10-11, one build:
Wonderland.dllmd5d1c880fc86214afe643833a47e5f7c74(sha256763f28c618a31101f619138996d0d1af544f759b8c577860a644435128c83a96) - vacuum 159 / 0, BarrkBOT 64 / 0, escrow 61 / 0, crash test 6 / 0 (fresh world each, Discord off). - Live-test server (
../WonderlandTests/live-oracle/, throwaway): the same dedicated server with the oracle pluginLiveOracleand a settings seed for the first run against a real Alice client -start.shis ready in about 22 s, the fixtures (three chests, workbench, smelter, kiln, fire pit) survive a restart, andsnapshotreconciles to the item: with production supply running and nobody online, chests + ground + stations + escrow + cache + burning fuel stayed exactly at the starting 230 Wood / 100 Coal / 60 Copper ore / 60 Tin ore / 100 Stone / 50 Flint over 45 s while the engine moved items into the kiln and the smelter. Real restarts: chest settings and station switches stored through the mod, then the earliest-loading fixture destroyed and the server stopped and started - every later ZDO id shifted by one (1:85->1:84, smelter1:87->1:86) and every setting and switch was still on the same piece, matched by position. - Live rig (
ALICE/tests/e2e, written and run by the Alice project, not by a player: a throwaway dedicated server built from this folder'sWonderland.dllwith theLiveOracleledger plugin, one headless Alice 0.12.0 client logged in as a non-admin, run directories under~/valheim-testbed/alice-e2e-runs/). Several runs on 2026-10-11 drove the handshake and pairing, station ops, the vacuum release round trip against the real client (a pile of 20 stacks: 20 offers, 20 proofs by the server's own copy, 20 chest moves; the claim path for a stack at the player's feet), the nudge, the settings panel, the toasts, the player-reported statistics (and their removal on 'no'), crafting and building from chests with the escrow (reserve, commit, cancel), the link switched off while a reservation was held (it found the kick fixed above; its run 7 confirmed the fix live: the crossing request was ignored, the player stayed, the ledger was exact, the link was back 3.7 s later; 231 passed, 0 failed, 1 soft), a client killed with a ticket held (the stacks came back to the chest 30 s later, per-item totals exact), and a serverkill -9after a world save (journal recovery straight to the chest, totals exact). Every server-side ledger check - containers, ground, stations, escrow, item cache and the bag - was exact. Its V7 'race' round, in which a driver calls the game'sHumanoid.Pickupon random stacks every frame while the server hands a pile over, first counted 10 / 15 / 5 / 10 Wood too many in four rounds. The server log showed no grant and no late-pickup in those rounds: the driver was picking up objects whose ZDO the server had destroyed in that very frame (an invalidZNetViewmakesItemDrop.CanPickuptrue, andHumanoid.Pickupthen adds the cached item without sending anything; vanilla's auto-pickup and the E key both checkIsValid()first -libs-ToolsITEMDROP sheet, section 13). With the driver limited to stacks whose view is valid, all four rounds are exact on both witnesses (the client's count and the server ledger: +150 each), with 23 to 25 dying objects per round seen and left alone. No engine change came out of it. - Not yet exercised: the
ZNet.Shutdownrefund (the crash test kills the process; a clean stop with a ticket open was not driven), and every platform other than a PC player on Steam (console peers are never advertised to). - What to look for on the live box after deploying (first Alice player): a
[Alice] <name> (PC): paired with Alice ...line, then[SupplySwitch] ... via Alicelines when a station is switched, and for crafting[CraftEscrow] #N <name> (Craft): reserved ...followed bycommitted(orhanded back (...)) - a reservation with no closing line is the thing to look for. For the vacuum:[Alice] sent N hand-over offer(s) to peer P, then[Alice] hand-over offer N for <zdoid> to peer P: proven by the server's own copy ..., then[Alice] hand-over ended in the chest: 40x $item_wood (stack <zdoid>) is in chest <zdoid>.- the last line is what tells a hand-over move from a claim-path move ([ItemLedger] Vacuum movedis printed for both); the tally[Alice] vacuum cooperation so far: ...is logged every ten minutes while anything happens and once when the link stops. - The routed-sender check rests on the decompile facts above; it has not seen a real player's traffic. It can be switched off live (
RoutedSenderGuardEnabled = false) if anything unexpected shows up inwonderland_security.logas[SECURITY:RoutedSender]for an unmodded client.
0.11.2
Changed
- Rebuilt against Valheim 1.0.16 (client build 25527674 / dedicated server build 25527701, network
version 40, unchanged from 1.0.15) and re-verified: a static reference check against both the client
and dedicated-server assemblies, and a headless 1.0.16 dedicated-server boot. No source changes were
needed for compatibility — 1.0.16 removed only
ObjectDB.GetAllFoodItems()andButtonSfx.Start(), and this mod calls neither. - Dropped stale references to specific past Valheim patches (Steam build ids, network-version numbers, versioned-decompile citations) from the csproj, README and source comments; they now read version-agnostically ("Valheim 1.0", "the vanilla server decompile") since the mod targets whatever the current 1.0.x dedicated server is rather than one pinned patch.
0.11.1
Fixed
- A modded client was kicked for not having Wonderland installed — a server-only mod.
(
Plugin.csConfigSyncinitializer.) The plugin built itsConfigSyncwith aDisplayName,CurrentVersionandMinimumRequiredVersionand never setModRequired, which ServerSync defaults totrue(ServerSync.cs:1148). On the server sideGetFailedServercollects every check whereModRequired && !ValidatedClients.Contains(rpc)(ServerSync.cs:1248) and a client that does not carry the DLL never validates, so it was disconnected withConnectionStatus.ErrorVersionnaming Wonderland. This never showed up on a vanilla server: a client with no BepInEx has no ServerSync, sends no version list, and the check never runs — which is exactly why the same build has been serving vanilla clients without complaint. It only fires against a modded client, i.e. every player on a modded realm whose pack deliberately excludes the server-side mods.ModRequired = falseis now set explicitly.MinimumRequiredVersionis kept on purpose: the mod is not required, but a client that does load it must be on a matching version.
0.11.0
Added
- Terrain guard: bulk terrain edits from non-admin clients are undone and the client kicked (
Subsystems/Security/TerrainGuard.cs,TerrainGuardPatches.csnew;ModEnforcement.csKickClient;ItemFlow/WaterBuoyancyEngine.csZdoSetOwnerPatch;19 - Plant & Terrain Guard). Every terrain change a client makes ends in vanillaTerrainComp.Save(1.0.15TerrainComp.cs:114-156): the zone's whole modification set - the game's own op counter, the last op's point and radius, one bool per heightmap vertex (65 x 65 = 4,225 per zone) with a level and a smooth delta behind each set bit, one bool per vertex with an RGBA behind each set paint bit - gzipped and written to the zone's_TerrainCompilerZDO asTCData. The server applies that copy inZDOMan.RPC_ZDOData->ZDO.Deserialize(ZDOMan.cs:1150-1205,ZDO.cs:952-987; Deserialize has no other caller). The guard's prefix onDeserializekeeps the array the server held and whether the server knew the ZDO as a compiler (the packet's own prefab field is client-supplied), the postfix decodes both copies (no Heightmap needed - it is pure data; the decoder ignores the version int exactly asTerrainComp.Loaddoes, accepts only 4,225 height entries and 4,225 or the legacy 4,096 paint entries, and inflates through a bounded reader - 256 KB in, 512 KB out - so a crafted blob cannot balloon on the server; verified against 251 compilers of the live world) and counts vertices whose modified bit flipped either way, whose delta moved, or whose paint RGB moved by a texture step (alpha ignored: vanilla'soptterrainrewrites every alpha with no op). The sender is the peer whoseRPC_ZDODatacall is on the stack, never the ZDO's owner field. Per write the yardstick is the blob's own op counter: vanilla incrementsm_operationsonce per op (TerrainComp.cs:372) and an op marks at most a 3 m disc plus a 7x7 paint square (78; an Ashlands lava explosion 113 height; Deep North snow ops up to 454), so a write may change 130 vertices per op it records plus one op of slack (470 in the Deep North; the slack covers vanilla's own ownership hand-over race, which can un-modify one op's vertices while recording one), never more thanTerrainGuardMaxVerticesPerWrite(1500, about eight seconds of hoeing bundled by lag), never with an op radius above what vanilla registers (6 m; 10 m in the Deep North, decided by the zone AND by the op's own point so a hearth in a boundary zone is not misjudged -m_lastOpRadius, which an oversized MyDirtyHoe cannot hide), and a write with no op recorded may touch one edge row (the strip vanilla copies into the neighbouring compiler,TerrainComp.cs:660-678) - Infinity Hammer and World Edit Commands write the arrays directly and never touch the counter, so aterrain circle radius=50shows as "7,854 vertices rewritten with no op recorded (direct write)". Per player over a rolling minute:TerrainGuardMaxVerticesPerMinute15000 (a hoe's hard cap is 150 ops = ~11,700 marks counting re-touched ground),TerrainGuardMaxOpsPerMinute600 (a burning building adds an op per piece that catches),TerrainGuardMaxZonesPerMinute30 (~12 is the vanilla ceiling). In the Deep North the world itself paints terrain faster than any per-minute ceiling could sit above (a lit hearth melts a 441-vertex square five times a second on every client that has it; snow_walk fires every quarter metre; a sled is one op per half metre) - all of it paint - so there the per-minute ceiling counts HEIGHT changes only (a bulk edit needs heights; no world op there moves more than 13), ops per minute are not judged, and the per-write absolute cap is a whole zone (a stalled owner with lit hearths bundles dozens of melts into one write) while the per-op check (470 per op) and the 10 m radius still hold. The Deep North and Ashlands tests take the biome blend into account (Heightmap.GetBiomemixes corner biomes a zone past the radial cuts). Over any of them:TerrainGuardRevert(default true) takes the compiler (SetOwner(server) + previous bytes back, or an empty compiler for a zone that had none, prefab and persistence flag restored if the packet touched them +DataRevision += 4096, saturating +ForceSendZDO), which every client with the zone loaded reloads and pokes (TerrainComp.CheckLoad,TerrainComp.cs:158-169, no owner gate - the offender sees the ground snap back), the compiler is held server-side 4 s soReleaseNearbyZDOScannot hand it straight back (or handed straight back to an innocent owner), andTerrainGuardKick(default true) disconnects withTerrainGuardKickMessage.[SECURITY:TerrainGuard] <name> [SteamID: ...] - [STAMP] [DETECTED: bulk terrain edit: 4122 vertices rewritten with no op recorded (direct write) at zone (12,-7) (777, 30, -444), ground restored] Bulk terrain edit stopped ... - KICKINGin the log andwonderland_security.log; further writes by the same offender inside 10 s are undone with one throttled info line each, not re-kicked, and the offender's window is cleared on a flag so flag-only mode judges the next write fresh. Who is charged: an op placed in a zone whose compiler ANOTHER peer owns is applied and saved by that owner (RPC_ApplyOperationis owner-only), so every routedRPC_ApplyOperationthe server forwards is read (ZRoutedRpc.RouteRPCprefix; the wire carries the op position and the op prefab hash, nothing else) and classed through the server'sObjectDB: a hoe/cultivator/pickaxe op or a bomb is noted per compiler with the marks that op can make (from the prefab's own radii) and the owner's next write on that compiler (noted ops wait up to 30 s for it) credits each placer that op and its marks, the owner being judged on the rest - a build party cannot get its host kicked, a scripted client spamming a neighbour's zone is billed for it; a world-fired op is neither counted nor charged - the ones every client spawns for the same object (a house fire'sburn, a fireplace's snow melt, a snow log's) are dropped as duplicates of the owner's own, the rest (a walker's snow steps, a creature's, a sled's, lava) are forwarded and the owner's own op counter absorbs them; a snow op aimed outside the Deep North, a lava op outside the Ashlands, or a hash the game does not register at all (a modded tool's own op prefab - a vanilla owner would cancel it, a modded one would apply it; vanilla clients send one for a lit fire's child melt op, so this is never treated as evidence) is simply not forwarded. The sender of a routed op is the peer it arrived from (anRPC_RoutedRPCprefix), never the id inside the packet: a forged id is flagged and the op is not forwarded; nor is anything from a client placing more than 8 distinct tool placements in 2 s into someone else's zone (a vanilla tool manages 2.5 a second) - that client is stopped instead. A non-admin'sDestroyZDOnaming the sole_TerrainCompilerof a zone (RPC_DestroyZDOhas no owner check - the cheapest wipe of every edit in a zone) has that id removed from the batch inside the routed data - before the handler copies it and before the server broadcasts it, or forwards it to the one peer it was aimed at, so nobody else drops their copy either - the compiler's revision bumped and force-sent to everyone, and the client stopped; a vanilla client only destroys a compiler when its zone has two (TerrainComp.Awakeremoves the duplicate). Unreadable bytes (bad gzip, wrong count, trailing data) are reverted and flagged, never stored:Loadfails on them on every client and leaves the zone blank for whoever loads it next; a stored copy that does not decode (only possible from before this build) is not judged against - the write stands as the repair, once, logged. A compiler re-labelled as another prefab is put back with its previous ground; one sent non-persistent (dropped with its peer byRemoveOrphanNonPersistentZDOS) is pinned persistent on every write. Admins:TerrainGuardAdminBypass(default true) accepts every edit from an adminlist admin whatever client mod made it - Infinity Hammer blueprints, World Edit Commandsterrain/undo, an oversized hoe - andTerrainGuardLogAdminEditslogs the ones that would have tripped it:[TerrainGuard] admin Thorium Wubarrk (7656...): 4122 vertices rewritten with no op recorded (direct write) at zone (12,-7) ... - admin bypass, accepted.The adminlist check isZNet.IsAdminon the socket host name (a bare Steam64 on Steam, the platform-prefixed id on PlayFab; Server Devcommands' own admin override is honoured), neverZDOID.UserID. Discord:TerrainGuardDiscordNotify(local, default false) postsTerrainGuardDiscordTemplatethrough the section-14 webhook. Limits, stated: a modded client pacing itself under every ceiling can still edit at roughly a vanilla player's own maximum rate (about a zone a minute) - the guard removes the bulk stroke, not the hoe. Research behind the numbers:libs-Tools/TERRAIN-EDIT-DEFENCE-FACTS.md(vanilla 1.0.15: the 28 registered ops and their exact mark counts, pace, wire path, ownership and revert semantics),libs-Tools/1.0/thirdparty/terrain-mods-2026-09-22/TERRAIN-MODS-ANALYSIS.md(Infinity Hammer 1.84.0, World Edit Commands 1.76.0, MyDirtyHoe 2.1.2, Server Devcommands 1.113.0 decompiled) and the adversarial review-TerrainGuard-review-2026-09-22.md(five passes: 4 blockers and 8 should-fixes against the first cut, 1 blocker and 9 against the second, 2 and 3 against the third, 2 and 4 against the fourth, 0 and 1 against the fifth - all addressed in this build; what remains by design is stated in the config text and in the sheet's section 7).
Changed
- The placement (plant) guard has its own section beside the terrain guard (
19 - Plant & Terrain Guard):ModEnforcementPlacementGuard->PlacementGuardEnabled,ModEnforcementMaxPlantBatch->PlacementGuardMaxPlantBatch, both carried across from section 12 on first launch ([Config] carried your old 'ModEnforcementMaxPlantBatch' setting (2) across to 'PlacementGuardMaxPlantBatch') and the dead lines dropped. The guard no longer sits behindModEnforcementEnabled- its own switch is the switch; its kick still uses the section-12 message and admin bypass. The BarrkBOT export keys (placement_guard,max_plant_batch) are unchanged. ModEnforcement.KickNonVanillaClientis now a call into the sharedModEnforcement.KickClient(rpc, peer, reason, message, category, headline, honourAdminBypass, kickEnabled); the audit line for every kick now carries the socket host ([SteamID: ...]) - the 0.10.4 review's "kick log has no identity" item.
0.10.11
Fixed
-
A production-supply station visit loaded every chest in range once per fuel and once per ore, found or not (
Subsystems/ItemFlow/ProductionSupplyEngine.csBeginVisit/VisitContainers/SharedNameOf,TryConsumeOne;Subsystems/ItemFlow/VacuumEngine.csKnownNotToHold+RememberContainerNamesmade public). With the sweeps bounded (0.10.9) the profiler still showedslow frame 117 ms - Wonderland 93.2 ms: ItemFlow 89.4 | players 3every few seconds, each beside a[ProductionSupply] smelter ... <- CopperOre via rpcline.TryConsumeOnedid its ownFindNearand deserialised every container inProductionSupplyRangeuntil it found the item - and a smelter asks for its fuel and then for each of its conversions in turn (copper, tin, iron, silver, black metal, ...), so for every ore the base does not have it read every chest again; a smelter beside 30 chests was ~180 inventory loads in one frame, and the sweep budget cannot help because it is checked between visits, not inside one. Now a visit finds its containers once, loads each at most once (fuel and ore from the same chest reuse the loaded inventory; the second save writes the mutated one), and does not load at all a chest whose contents the vacuum's names cache already has at that chest's currentDataRevisionand which lacks the item or holds no more than the station's reserve (KnownToHoldAtMost, by the item's shared name, resolved once per prefab; the cache now keeps counts, not just names); every load and every save records the contents for the next visit. Every wall, floor and rock in the ring is rejected by a prefab-hash set (ContainerRegistry.IsContainerPrefab) rather than two nativeGetComponentcalls each, a container's prefab, template and hull-or-not are resolved once per visit, and a cached inventory is trusted only at the revision it was read at. The cache is reset at the start of each station visit, so a chest emptied or filled between visits is read afresh. Reviewed against the decompile (Inventory.Load->ItemDrop.Awakesetsm_dropPrefabandm_sharedfrom ObjectDB, so shared name and prefab name are consistent; equalDataRevisionmeans identical bytes): no loss or duplication path. Steady state in a base that never changes: a visit is one sector query and zero loads; the chest being fed from is loaded once per visit. -
Hull borrow hardened after review (
Core/Data/HullBorrow.cs;Subsystems/Security/ItemIntegritySweep.cs,Subsystems/WorldGovernor/StructureUpkeep.cs). A decompile-cited review of the live 0.10.10 borrow found no loss or duplication path and three edges, all closed: (1) a hand-over arriving after the 2 s timeout used to leave the hull server-owned until vanilla's nextReleaseZDOSpass (up to 2 s of dead-reckoning for the owner) with the write never made - a request now stays known for 10 s more and a late grant is written and handed back the frame it lands; (2) the hand-over packet is the owner's last word only if itsDataRevisionis above the server's copy (RPC_ZDODataapplies the ownership either way, the data only when newer), so nothing on the server may bump a client-simulated hull between request and grant: structure upkeep no longer writess_healthon one (it repairs it through the owner'sRPC_Repairinstead, see the boat bullet), the integrity sweep no longer writess_itemson one - it judges the server's copy quietly and, when a removal is due and correction is on, borrows the hull and runs the check again on the copy that arrives (audit line, removal and write as the owner; detect-only mode needs no write and is unchanged) - and a grant whose revision has not moved is handed back unwritten and logged; (3) the borrow's docstring said the hull "holds still" - it dead-reckons at its last synced velocity (ZSyncTransform.ClientSync), under 10 cm for the round trip at the 1 m/s gate. One request per hull per minute now lives inHullBorrowitself, whoever asks; the rows engine's own retry table is gone. -
Boats did not self-repair unless beached; boats now have their own upkeep loop, rate and section, and it works at sea (
Subsystems/WorldGovernor/StructureUpkeep.csUpdateBoats/RepairBoat;18 - Boat Upkeep/BoatUpkeepEnableddefault true,BoatUpkeepIntervaldefault 60 s, both read at use time). Structure upkeep used to skip a ship whiles_userwas set or either ZDO velocity field was above 0.03 m/s - a bar every floating hull clears, frozen at the last bob on a hull the crew left, ands_userstays set after a crash at the tiller. A moored boat next to its crew was never repaired, a boat under attack at sea never; only a beached one was. Ships are now out of the structure loop entirely and on a loop of their own: everyBoatUpkeepIntervala pass looks around each connected player (StructureUpkeepPlayerRadius- the pilot is always inside it of their own hull) and grants a world sweep of the four hull prefabs that runs withinSweepBudgetMs; there is no rudder or speed gate, so a damaged boat is repaired wherever it is, under sail or under a serpent, the same as a wall a troll is hitting. How: a hull a client is simulating gets vanilla's ownRPC_Repairsent to that owner (itsWearNTearsets full health on its authoritative copy and broadcastsRPC_HealthChanged; no effects, no player involved) and no server-side write - which was lost on such a hull anyway and, since 0.10.10, would bump the copyHullBorrowrelies on; a hull nobody simulates is written by the server as before. Each repair logs[BoatUpkeep] 'Karve' at (x, y, z): 312 -> 500 through its owner (near player). SetBoatUpkeepIntervalshort for boats that are hard to sink, long for boats that merely do not rot. -
Ghost items: a stack you picked up stayed in the world, and E did nothing (
Core/Data/ClaimEcho.csnew;Subsystems/ItemFlow/LatePickupPatch.cs,WaterBuoyancyEngine.cs,VacuumEngine.cs). Every claim the server makes on an item a client owns - the buoyancy lift, the vacuum's settle hold, a pickup grant - isSetOwner+ a revision lead +ForceSendZDO. When the owning client picked the stack up in the same instant, it destroyed its copy and sentDestroyZDO, and the server's packet, already in flight, reached a client that no longer had the ZDO:ZDOMan.RPC_ZDODatacreates unknown ZDOs (them_deadZDOsguard against this runs only on the server),ZNetSceneinstantiated it, and the client was left with a stack that existed nowhere else, "owned" by the server, which had nothing to hand back - the pickup animation,RequestOwninto the void, no dupe, no removal, until the next log-in. The vacuum's hold has the same window andVacuumInterval= 1 doubled it. Now every ZDO the mod force-sends is remembered for 15 s, and a client destroy batch naming one is echoed straight back to that client as the sameDestroyZDORPC: its ownHandleDestroyedZDOremoves the ghost (ZNetScene.OnZDODestroyeddrops the instance), a no-op when there is none. Same reliable ordered connection as the stale packet, and a destroyed ZDO is never force-sent again (AddForceSendZdosnull-checks), so the echo always lands last - and inside the 0.5 s auto-pickup delay a re-created stack gets, which also closes the one way a stale grant could have been picked up twice. Ghosts already on a player's screen from before this build clear on their next log-in.[ClaimEcho] echoed the destroy of N recently claimed item(s) back to peer ...when it happens. -
Items were pulled off raft decks and shorelines into the water (
Subsystems/ItemFlow/WaterBuoyancyEngine.cs). The sweep lifted any "waterborne" stack whose height differed from the surface line, in either direction, and re-claimed a client-owned one even when it already sat at the surface: of 547 lifts in one evening on the live world, 181 were stacks above the surface (29.8-30.35 m: a raft deck, a beach) being moved down to 29.75, and 144 were stacks already at the surface being taken back from the client beside them - each a fresh ownership fight and a fresh ghost window; Stone alone was lifted 227 times. Now only a stack that is actually below the surface line is lifted. A stack at or above it is left with whoever owns it; a client that sinks one gets it lifted on the next tick, as before. -
The item-integrity sweep was still a one-frame pass (
Subsystems/Security/ItemIntegritySweep.csonBudgetedSweep). 0.10.9 converted the four ItemFlow/Storage sweeps and missed this one: 25 chunks every 30 s with every container found loaded in the same frame -slow frame 122 ms - Wonderland 89.5 ms: Security 89.3. Same coverage per interval, now spread over the frames that follow withinSweepBudgetMs. Nothing about what it checks changed.
Changed
- Live tuning note, not a default change: with the sweeps budget-bound,
ContainerRowsInterval/BatchSizeandProductionSupplyInterval/BatchSizeabove the budget's throughput buy nothing (the rows cycle on a 745k-ZDO world is ~5 s atSweepBudgetMs2); the one timing players feel isVacuumInterval(the near-player pass), 1 s is a good value.
0.10.10
Fixed
- 0.10.9's forced ship write could lose an item; ship cargo rows are now written by borrowing the hull (
Core/Data/HullBorrow.csnew;Core/Data/ShipAttachment.csCommitAgainstOwnerremoved;Subsystems/Storage/ContainerRowsEngine.cs,Subsystems/ItemFlow/SortEngine.cs,ZdoSetOwnerPatchinSubsystems/ItemFlow/WaterBuoyancyEngine.cs). 0.10.8 got the server to write the anchor again ([ContainerRows] 'Karve' at (556, 30, -897): parked $item_boarjerky x6 in row 3 (2 -> 4 rows), 80 m from its crew's base) but the write never reached a screen: a hull inside a connected client's active area is owned and simulated by that client, which bumps the ZDO'sDataRevisiona few times every frame (ZSyncTransform.OwnerSync), andZDOMan.RPC_ZDODataapplies a packet only when its revision is above the one held - so the server's +1 arrived stale at the owner and the owner's next packet, one above the server's, replaced the server's copy. Only a hull nobody was near ever kept its rows. 0.10.9 forced the write through with a revision lead (the vacuum'sDataRevision += 4096) - withdrawn here:Container.SetInUse(false)does not save, only an inventory change does, so a deposit the owner made in the round trip before the forced write landed was dropped at the server and then reloaded away on the client when the cargo closed - an item lost, or with a withdrawal, duplicated. A write to a ZDO another client is actively rewriting is never safe; the ZDO has to change hands, and the hand-over has to start at the client. Now a client-simulated hull that needs its anchor is borrowed through vanilla's own container-open handshake: the server sends the ownerContainer.RPC_RequestOpen(one routed RPC, exactly what a second player's client sends to open someone else's chest); the owner's client refuses while its cargo is open (its ownm_inUse, the authority), otherwise doesForceSendZDO(server)+SetOwner(server)itself and from that instant neither simulates nor writes the hull - the packet carrying the ownership change carries its final cargo. The server, now the sole writer, loads that copy, parks the anchor if the copy still needs it, and hands the hull straight back (SetOwner(owner)+ForceSendZDO), all in the frame the hand-over arrives ([ContainerRows] 'Karve' ... parked ... on a borrowed hull). The owner'sContainerreloads on the revision change and vanillaContainer.UpdateRowsgrows the grid. On the client the hull holds still for one round trip (Ship.CustomFixedUpdateandOwnerSyncare owner-only) - a tenth of a second's pause in a moored hull's bob; a hull under sail (steered by a connected player, or moving faster than 1 m/s - a sail stays set after the pilot lets go) is never borrowed, and 0.10.8's 0.03 m/s threshold, which every floating hull exceeds, is what had kept a moored ship "underway" for as long as its crew stayed nearby.ZDOMan.ReleaseZDOS(every 2 s) would hand a server-owned hull in a peer's area back on its own; the existingZDO.SetOwnerprefix holds that off while a borrow is pending, a borrow the owner never grants is dropped after 2 s, nothing is written unless the server owns the hull at the moment of writing, and a hull is asked for at most once a minute ([ContainerRows] '...' needs its row parked - asked its owner <id> for the hull).RPC_OpenResponsecoming back is a no-op on a dedicated server. Sort no longer touches a client-simulated hull at all (a merge is cosmetic); vacuum, production supply and grid overflow still refuse one.
0.10.9
Fixed
- The server stalled 100-550 ms every 2-5 s, players or not (
Core/Data/BudgetedSweep.csnew;Subsystems/ItemFlow/VacuumEngine.cs,Subsystems/Storage/ContainerRowsEngine.cs,Subsystems/ItemFlow/SortEngine.cs,Subsystems/ItemFlow/ProductionSupplyEngine.cs;1 - General/SweepBudgetMsnew, default 2, read at use time). The 0.10.8 profiler's first five minutes on the live world (745k ZDOs):14,165 frames, avg 21.2 ms, 114 over 100 ms | Wonderland max 437.9 ms (ItemFlow), with lines likeslow frame 553 ms - Wonderland 407.0 ms: ItemFlow 406.7 | players 2every 2 s andslow frame 165 ms - Wonderland 128.1 ms: Storage 127.8every 5 s - the same withplayers 0, so nothing to do with who is connected. Cause: every world-wide sweep advanced itsPrefabSetScannerby its BatchSize chunks per interval and then visited everything those chunks found in the same frame. One chunk is up to 400 non-empty sectors of one prefab (vanillaZDOMan.GetAllZDOsWithPrefabIterative), the vacuum tracks 64 container prefabs, so a pass whose chunks landed onpiece_chest_woodloaded, ground-queried (a sector query per chest for stacks withinVacuumRadius), overflow-checked and cache-drained every wood chest in the world at once; container rows did its load-and-anchor pass the same way. Now each sweep is aBudgetedSweep: the interval still grants the same BatchSize chunks (coverage rate unchanged,VacuumBatchSize/ContainerRowsBatchSize/SortBatchSize/ProductionSupplyBatchSizeand their intervals keep their meaning), but the visiting runs on every frame untilSweepBudgetMsis spent and the rest waits for the next frame. A grant the budget could not finish by the next interval is replaced, not added to, so a world too big for the budget is swept at the budget's pace instead of piling up debt. The queue holdsZDOIDs, notZDOreferences -ZDOPoolrecycles a destroyed ZDO object for the next created one, so a reference kept across frames can silently become a different object; each id is resolved throughZDOMan.GetZDOwhen its turn comes. Visitors are cached delegates (no per-frame allocation). The vacuum's near-player pass is unchanged and now runs before the background work each interval rather than after; it judges every container in reach itself, so nothing depended on the old order. Worst case per frame with all four sweeps busy: about 4 xSweepBudgetMsplus one container load each. - Ship cargo rows: the anchor write is forced past the owning client (
ShipAttachment.CommitAgainstOwner:DataRevision += 4096+ZDOMan.ForceSendZDO(owner, uid)after the rows anchor and a sort merge;UnderwaySpeedSqr0.03 -> 1 m/s). 0.10.8 wrote the anchor but a hull inside a connected client's active area is owned by that client, which bumps the ZDO's revision every frame, so the server's +1 was discarded and the owner's next packet replaced the server's copy -'Karve' at (556, 30, -897): parkedin the log, never a row on screen. Withdrawn in 0.10.10, see there: this lead can drop a deposit or withdrawal the owner made in the round trip before the forced write lands. If you are on 0.10.9, either update or putKarve, VikingShip, VikingShip_AshlandsonContainerRowsExcludedContainers(hot-read) until you do.
0.10.8
Fixed
- Boat storage was no longer expanded (
Core/Data/ShipAttachment.csnewIsUnderway/IsConnectedPeer;Subsystems/Storage/ContainerRowsEngine.cs,Subsystems/ItemFlow/SortEngine.cs,Subsystems/ItemFlow/VacuumEngine.cs). The 0.10.3 ship guard skipped any hull whose ZDO reporteds_user != 0or a velocity above 0.03 m/s.ZSyncTransform.OwnerSyncwrites those fields only while a client owns the ZDO, and the server'sZDOMan.ReleaseNearbyZDOSdrops that owner within 2 s of the client leaving, so a moored ship keeps its last bob forever and never passed -[ContainerRows] x2 rows on 18 of 64 container type(s) ... Karve 2x2->2x4 ... VikingShip 6x3->6x6 ... VikingShip_Ashlands 8x4->8x8was announced on every boot while the only ship parked in a day was one beached Karve. Now a hull is "underway" only when a connected peer owns it and it is steered or moving; with no connected owner nobody is simulating it, the velocity fields are leftovers and the server's write is the only one there is. "Connected owner" also means in range:ZDOMan.ReleaseNearbyZDOSonly releases what a peer walks away from, so a pilot who portalled or respawned keeps a far hull owned;ShipAttachment.IsSimulatedByClientchecksZNetScene.InActiveArea(hull, owner.GetRefPos()). A steered hull is one whoses_useris a player who is actually connected -s_useris only cleared byRPC_ReleaseControl, which a crash at the wheel never sends. A hull that is owned but still (docked, calm water) is written once and then left alone for 60 s per ship (_shipRetryAt) so a client that keeps advancing the revision cannot make the anchor write loop (the 78 re-parks of one moored Karve on 2026-09-19); expect the rows to appear when the crew has left the hull's area and comes back, since a floating hull's owner rewrites the revision every frame (Ship.CustomFixedUpdatewakes the body each step). Sort uses the same rule. The vacuum, production supply (ProductionSupplyEngine.TryConsumeOne) and grid-growth overflow (GridGrowth.FindNearestSiblingContainer) refuse any hull a client is simulating whatever its speed - each of those is a write-then-remove (ground stack destroyed, ore consumed, overflow moved), and a hold write the owner's revision stream discards would leave nothing behind or duplicate it. The 0.10.3 velocity-only guard had been covering the vacuum case by accident; the other two never had a guard. PositionWatchflagged everyone at sea as fly/noclip (Subsystems/Security/PositionWatch.cs,ShipAttachment.IsNearShip). The height check compared the reported Y against the height map, which is the seabed (0 m in open ocean) while a swimmer or a deck-hand reports Y ~ 30 - 280reported Y 29.x is 29.xm above expected ground height 0.0 - possible fly/nocliplines from one player's sail on 2026-09-20, each a synchronous append towonderland_security.log. The floor is nowmax(terrain, ZoneSystem.c_WaterLevel)and a Ship ZDO within 40 m exempts the sample.
Added
- Server tick profiler (
Core/TickProfiler.cs, wired inSubsystemRegistry.OnUpdate;1 - General/TickProfilerEnableddefault true,TickProfilerSlowFrameMsdefault 100, both read at use time). For the "game stutters while moving items, only with two players connected" report, which nothing server-side explains by reading: a plain inventory move never leaves the client (Player.OnInventoryChangedends in the localUpdateKnownRecipesList/UpdateAvailablePiecesList), so if the server is involved it is as a stall in its relay. Every frame each subsystem'sOnUpdateis timed; a frame longer than the threshold logs[TickProfiler] slow frame N ms - Wonderland n ms: Security n, ItemFlow n | players 2(one line per second at most), and every 5 minutes[TickProfiler] 5 min: N frames, avg n ms, max n ms, n over 100 ms | Wonderland avg n ms, max n ms (<subsystem>) | players n. The frame figure is Unity's whole frame (vanilla + every mod), the Wonderland figure is this mod's share.Time.unscaledDeltaTimeread in a frame is the length of the frame before it, so the breakdown is double-buffered and a slow frame is reported with the breakdown that actually ran inside it; frames over 10 s (the world-load stall) are left out of the window. Cost: one Stopwatch per subsystem per frame, no per-frame allocation.
0.10.7
Fixed
- A crossplay server that nobody can join after a restart (
Subsystems/WorldGovernor/CrossplayLobbyGuard.cs, new;WorldGovernorSubsystem.cs;Wonderland.csprojnow references the server'sPlayFab.dll). VanillaZPlayFabMatchmakingregisters the server as a PlayFab lobby withstring_key2 = False, then checks its join code is unique withFindLobbies(string_key4 == JoinCode)and, inOnCheckJoinCodeSuccess, activates the lobby (string_key2 = True) only when exactly one lobby comes back andLobbies[0].Owner.Idis this server. Every client lookup (join code, host name, IP, server list - client decompile 91234-91345) filtersstring_key2 eq 'True', and a-crossplayserver has no Steam listen socket, so a lobby that never activates is a server nobody can join. The join code is the same every boot (UnityEngine.Randomis re-seeded by world generation beforeGenerateJoinCode- 637457 on every Vanilla Bean boot since 1.0.15) and the shutdown-time deactivate/leave HTTP calls almost never get out (Deactivated PlayFab lobbyon 1 of 47 shutdowns), so the next boot's check often gets the previous run's orphan lobby back. Once PlayFab has dropped that orphan's owner,Lobbies[0].Owneris null: vanilla throwsNullReferenceExceptionat IL 0x70 (at ZPlayFabMatchmaking.OnCheckJoinCodeSuccess ... PlayFabUnityHttp.OnResponse), nothing reschedules the check,Session ... is activenever logs andUnregisterServerlater reportsState: Creating. Live: 2026-09-19 20:02 (0.10.1) and 2026-09-20 11:54, 11:56 (0.10.5), 12:05 (0.10.6) - 4 of the last 8 boots, 0 of the ~40 before; the 11:54 one came 48 minutes after the previous shutdown. Not a Wonderland hook: none of the mod's 25 Harmony targets touchZPlayFabMatchmaking,PlayFab*orRandom.InitState. Now a prefix onOnCheckJoinCodeSuccesssends any reply containing an ownerless lobby down vanilla's ownRegenerateJoinCodebranch (new code on our lobby -> re-check -> activate; logs[CrossplayLobbyGuard] join code N is still held by n ownerless lobby(ies) ... regenerating the join code instead), and a finalizer turns any other exception in that callback into a logged, rescheduled check (m_retryIn = 1s, counted against vanilla's 100-retry budget). New8 - Player Cap/CrossplayLobbyGuardEnabled(default true, read at use time; does nothing on a Steam-only server). Boot line to look for:Session "..." with join code N and IP ... is active with 0 player(s)within a few seconds ofregistered with join code.
0.10.6
Fixed
- The progression tier table was never written on the live server (
Subsystems/Security/ItemTierClassifier.cs,SecuritySubsystem.cs). 0.10.5 built the table and wroteWonderland.ProgressionTiers.txt/Wonderland/progression_tiers.jsononly from the world-ready hook, and on the dedicated serverObjectDB.instanceis routinely still null there (ObjectDB.Awakeruns after theZNetScene.Awakehook - the same Awake-ordering race recorded for 0.7.x inlibs-Tools/IMPLEMENTATIONS/Wonderland.md). The 2026-09-20 15:56Z boot logged[Progression] ObjectDB or ZNetScene not available at world ready, built the index lazily on the first enforcement query (Indexed 429 recipes for 428 items and 107 conversions into 93 items; 226 items take an upgrader resource), and never wrote either file, so the BarrkBOT export carrieditems_by_tier_countall 0 andgated_items_count 0and the website listed nothing. Enforcement itself was unaffected (tiers derive on first use). NowItemTierClassifier.OnUpdate()runs every security tick: the index is built the first tickObjectDBexists, and the two files are (re)written whenever the table is stale - after that build, and within a second of aProgressionItemExemptionsorBannedItemsListedit (previously the files only reflected pins after a restart). The world-ready message is now Info, not Warning, since it is expected. Boot line to look for:[Progression] Tier table: Cheat n, DeepNorth n, ... - written to <path>. - Export/contract/sample wording updated to match (
progression_notes: "written on the first tick the game's item database exists after a start, and rewritten within a second of a ... edit").
Older entries, from 0.10.5 back to the first release, are left out of the package to fit the store's 100,000-character limit for a changelog.
