Repository navigation
Conversation
…omits it On current Steamodded (main, 26.1026.0~dev-b), start fails on every run, including the first after a cold launch: INTERNAL_ERROR - src/lua/endpoints/start.lua:116: attempt to index field 'viewed_back' (a nil value) Steamodded's reworked run select (smods#1560/#1571, September 2026) no longer creates G.GAME.viewed_back on the setup_run() path, and the endpoint dereferences it unconditionally while applying the requested deck. It is not a "second run in the session" condition; restarting the game does not help. Recreate the object when it is missing (Back(deck_data)) and keep change_to behind a nil check, so start() works on both vanilla and current Steamodded. viewed_back only backs the deck-preview graphic, so recreating it is closer to vanilla behaviour than skipping the update. Upstream report: coder#244
scarcer-1
force-pushed
the
fix/start-viewed-back-nil
branch
from
November 13, 2026 18:19
082daaa to
1600464
Compare
This branch has not been deployed
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.
Problem
On current Steamodded,
startfails on every run, including the first one after a cold launch:Same failure as #244.
Cause
Steamodded's reworked run select (smods#1560/#1571, September 2026) no longer creates
G.GAME.viewed_backon thesetup_run()path.startcreates the run withG.FUNCS.setup_run({ config = {} })and then dereferencesG.GAME.viewed_backunconditionally while applying the requested deck, so the endpoint aborts before a run exists.It is not a "second run in the same session" condition — restarting Balatro does not help, which is what made this hard to pin down.
Fix
Recreate the object when missing, then keep
change_tobehind a nil check:viewed_backonly backs the deck-preview graphic, so recreating it is closer to vanilla behaviour than skipping the update. This follows the workaround in #244.Verification
Not run here. No Lua toolchain in this environment, and
pytest -n 6 tests/luaneeds a live Balatro instance, somake testwas not executed. CI should be the check.What I verified: the failure reproduces on a cold launch with Steamodded
mainunder balatrobot v1.5.2 (macOS, Steam Balatro), and per #244 theBack(deck_data)recreation is what gets past it.Open question from #244
Whether the deck choice still reaches the run on new Steamodded is untested upstream, since the run-select path changed. Worth confirming after merge that
gamestatereports the requested deck rather than the default.