Mac projector fallback#5
Merged
halestom15 merged 12 commits intoMay 20, 2026
Merged
Conversation
Replace the win32-only guard in createSymlink/destroySymlink with a defaultTTSHomeDir() dispatch on os.platform(). Resolves the TODO comment in both functions. - macOS: ~/Library/Tabletop Simulator - Linux: ~/.local/share/Tabletop Simulator - Windows: unchanged (steam.homeDir.win32) Verified on macOS: npm start creates the TTSDevLink symlink under ~/Library/Tabletop Simulator/Saves/ pointing to ./dist correctly.
TTS on macOS renders the Cohesion / Range / Maximum Move / Deployment Boundary AssetBundle Projectors as solid magenta because the legacy shaders shipped with these bundles are no longer supported by the Berserk engine after the Unity 6 upgrade. This commit adds a per-seat fallback that re-renders the overlays using Global.setVectorLines plus Global.setDecals (vector outlines with PNG fills) instead of the native Projector bundles. Mac players see the vector fallback, Windows players keep the original Projectors via a UI toggle on their seat panel. Default is "Windows Original" so the majority of users see no change. PNG assets live in mod/data/mac-fallback-assets/ and are loaded over HTTPS from raw.githubusercontent.com at runtime. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
TTS multiplayer sync uses an internal byte buffer that overflows when the synced LuaScript contains multi-byte UTF-8 characters, producing "output byte buffer is too small to contain the encoded data" Lua errors on the receiving client and breaking the synced script on Windows clients. Replace em dashes, arrows, and accented chars in comments with ASCII equivalents. No runtime behavior change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Used by the Mac fallback hologram silhouette overlay to cap the top of the wireframe cylinder. Radial gradient green-cyan, matching the Star Wars briefing hologram aesthetic. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Simple 48-segment cylinder mesh (radius=1, height=1, base at y=0) used to spawn a translucent volume for the Mac silhouette overlay. Custom_Model uses TTS's internal shader, so setColorTint alpha is respected (unlike the vanilla Custom_AssetBundle whose custom shader breaks under Unity 6). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
True 3D wireframe cylinder cage: each ring/vertical edge is modeled as a thin rectangular bar (40 bars total, ~320 verts, ~240 faces). Spawned as Custom_Model so the wireframe is a real 3D mesh on the table. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Five iterations on silhouette overlay this session hit a hard wall: TTS Custom_Model spawns an auto-generated collider that cannot be disabled in Lua, so any spawned cylinder breaks fig-on-fig collisions. The pure Lua approaches (vector lines, decals stack) miss the gameplay-mandatory volume cue (LoS / cover). Next attempt will use a Unity 6 AssetBundle (custom Prefab with explicit no-MeshCollider) under the same per-seat Mac fallback toggle. For now the branch stays focused on Projector + R POI fixes, which are validated solo. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Custom_AssetBundle replacement for the Mac SIL fallback. Unity 6 build with: - Primitive Cylinder, no collider component (Custom_AssetBundle won't auto- inject one like Custom_Model does, so it won't push minis around) - Standard shader, Rendering Mode = Transparent, cyan alpha 0.10 - Self-emission tint for the hologram-briefing look Built via Assets/Editor/BuildSilhouetteHologram.cs in UnityProject-U6 (Unity 6000.0.62f1 batchmode, target StandaloneWindows64).
The previous build (commit d1234b7) used a primitive Cylinder + Standard Transparent material, which didn't render the way the upstream silhouette does and also turned out to be unnecessary - the real bug is the Allen White BucketheadBits/Silhouette shader compiled under Unity 2019 failing to load on Mac TTS U6 (falls back to Standard, opaque). This new build reuses Assets/Sihl/Sihl.prefab as-is (same mesh, same material, same shader source), but the shader is compiled by Unity 6's toolchain. Identical visual contract to upstream Windows users; the only difference vs the vanilla Steam UGC bundle is the Unity compile target. Path A from Dicewrench's analysis.
Adds the Python patcher that injects Mac fallback into a vanilla SWL TTS save, alongside the helper scripts used during development (bundle inspection via UnityPy, overlay PNG generation, retrospective notes). Documents the full set of fixes shipped on this branch: cohesion/range/ movement/deployment overlays, silhouette nil-guard, SIL button rename (toggleSilhouettes -> macToggleSil to bypass the TTS engine intercept), Order Token Speed/Move inline bodies, firing arc lines for round and oblong bases >27mm. See mac-patcher/README.md for usage. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…eploymentMode TTS occasionally throws "byte buffer too small to contain encoded data, encoding UTF-8 fallback EncoderReplacementFallback" when UI.setXmlTable runs synchronously inside a click handler or right after a deployment toggle. Symptom seen on the stable build: clicking the per-seat mode toggle prints the error in chat and the panel doesn't refresh. The fix mirrors what we already do for onPlayerChangeColor / Connect / Disconnect: defer one frame + wrap in pcall. Same Wait.frames pattern, just applied to the three remaining synchronous call sites. macDeferRefresh promoted from local to global function so handlers defined earlier in the chunk can reach it via name lookup at call time. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pre-existing upstream crash in BLUE/RED LIST BUILDER: importFromText
fires onEndEdit whenever the import InputField loses focus, even with
empty/invalid text. JSON.decode("") returns nil, then _loadArmyFromJson
indexes data.armyFaction and crashes.
Repro: open Import JSON panel, focus the textarea, click anywhere
outside the textarea. Crash fires on every blur.
Fix: nil-guard at the top of _loadArmyFromJson. Covers both callers
(importFromText and _loadArmy at line 2062). Idempotent via negative
lookahead on the marker comment. Upstream-able if halestom wants it.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.