Description
When using Saturn's consumable stacking feature together with Cartomancer, the game crashes when a stacked consumable card is used.
The crash appears to be related to the interaction between Saturn's stacking system and Cartomancer's edition assignment system.
Sorry if this report became very long. I tried to include as much information as possible to help identify the issue.
Disclaimer
The player who encountered this bug does not have any programming or modding knowledge.
All investigation, debugging, and code modification were performed with the assistance of an AI tool.
This bug report was also written with the help of AI in order to clearly describe the issue.
The player only followed testing steps suggested by the AI and verified whether the crash occurred.
Environment
Game Version
Mod Loader
- Steamodded 1.0.0~BETA-1503a
- Lovely 0.9.0
Platform
Installed Mods
- Cartomancer 4.17c
- Saturn 0.2.2-E-ALPHA
- Handy 1.5.1o
- JokerDisplay 1.9.6
Error Message
Oops! The game crashed:
card.lua:1743: attempt to index local 'eligible_card' (a nil value)
Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~BETA-1503a-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.9.0
Platform: Windows
Steamodded Mods:
1: Cartomancer (Version 4.17c)
2: Saturn (Version 0.2.2-E-ALPHA)
3: Handy (Version 1.5.1o)
4: JokerDisplay (Version 1.9.6)
Stack Traceback
card.lua:1743: attempt to index local 'eligible_card' (a nil value)
Local variables:
eligible_card = nil
edition = "e_holo"
The crash occurs during an event where card editions are being assigned.
The following editions appeared in the logs:
e_negative
e_polychrome
e_holo
e_foil
Steps to Reproduce
- Install Saturn and Cartomancer.
- Obtain the consumable The Wheel of Fortune.
- Use the Perkeo Joker to duplicate The Wheel of Fortune.
- Saturn automatically merges the duplicated Wheel of Fortune cards into a stacked consumable.
- Use the stacked Wheel of Fortune card.
Result:
The game crashes with the error shown above.
Additional Observations
If the stacked consumable is manually split into individual cards before use, the crash does not occur.
Example:
- Split the stack into single consumables
- Use the card normally
Result:
Possible Cause (AI Analysis)
In stack.lua, Saturn restricts stackable cards to negative edition only:
function Card:canStack()
return inTable(CAN_STACK, self.ability.set)
and self:getEditionType() == "negative"
end
However, Cartomancer dynamically assigns other editions such as:
When these editions are applied to stacked consumables, the card object passed into the edition assignment logic appears to become invalid, resulting in:
which leads to the crash.
Temporary Fix (AI Suggested)
Removing the negative-edition restriction appears to resolve the crash.
Original Code
function Card:canStack()
return inTable(CAN_STACK, self.ability.set)
and self:getEditionType() == "negative"
end
Modified Code
function Card:canStack()
return self.ability
and inTable(CAN_STACK, self.ability.set)
end
After applying this change:
- Stacked consumables can be used normally
- No further crashes were observed during testing
Summary
The crash appears to be caused by an incompatibility between:
- Saturn's negative-edition-only stacking restriction
- Cartomancer's dynamic edition assignment
Allowing stacked cards regardless of edition type seems to prevent the crash.
Thank you for your work on this mod.
Description
When using Saturn's consumable stacking feature together with Cartomancer, the game crashes when a stacked consumable card is used.
The crash appears to be related to the interaction between Saturn's stacking system and Cartomancer's edition assignment system.
Sorry if this report became very long. I tried to include as much information as possible to help identify the issue.
Disclaimer
The player who encountered this bug does not have any programming or modding knowledge.
All investigation, debugging, and code modification were performed with the assistance of an AI tool.
This bug report was also written with the help of AI in order to clearly describe the issue.
The player only followed testing steps suggested by the AI and verified whether the crash occurred.
Environment
Game Version
Mod Loader
Platform
Installed Mods
Error Message
The crash occurs during an event where card editions are being assigned.
The following editions appeared in the logs:
Steps to Reproduce
Result:
The game crashes with the error shown above.
Additional Observations
If the stacked consumable is manually split into individual cards before use, the crash does not occur.
Example:
Result:
Possible Cause (AI Analysis)
In
stack.lua, Saturn restricts stackable cards to negative edition only:However, Cartomancer dynamically assigns other editions such as:
When these editions are applied to stacked consumables, the card object passed into the edition assignment logic appears to become invalid, resulting in:
which leads to the crash.
Temporary Fix (AI Suggested)
Removing the negative-edition restriction appears to resolve the crash.
Original Code
Modified Code
After applying this change:
Summary
The crash appears to be caused by an incompatibility between:
Allowing stacked cards regardless of edition type seems to prevent the crash.
Thank you for your work on this mod.