If you use a Deja Vu on a red seal card, it becomes Double Red Seal and retriggers twice.
You can use as many Deja Vu as you want on a single card.
https://github.com/cerloCasa/StackedRedSeals
#Stacked Red Seals
1 messages · Page 1 of 1 (latest)
Thought process (not anymore)
- Modify the
function Card:calculate_seal(context)in card.lua:2241 to become this
function Card:calculate_seal(context)
if self.debuff then return nil end
if context.repetition then
if self.seal == 'Red' then
return {
message = localize('k_again_ex'),
repetitions = self.DRreps,
card = self
}
end
end
...
- Modify the
function Card:set_seal(_seal, silent, immediate)in card.lua:462 to become this
function Card:set_seal(_seal, silent, immediate)
self.seal = nil
if _seal then
if _seal.ability.name == 'Red Seal' then
if not self.DRreps then
self.DRreps = 1
else
self.DRreps = self.DRreps + 1
end
else
self.DRreps = nil
end
self.seal = _seal
...
- Modify the
localization:red_sealto become this
...
red_seal = {
name = "Red Seal",
text = {
"Retrigger this",
"card {C:attention}#1#{} times"
}
}
...
- Change the
function generate_card_uiin common_events.lua:2731 to become this
if v == 'red_seal' then info_queue[#info_queue+1] = {key = 'red_seal', set = 'Other', vars = {self.DRreps}} end
if you got a better idea, let me know please
or if I forgot something, let me know as well
I personally don't like the modification inside localization because it would break if you use another language, but personally I don't know how to adjust it
stackable seals could be interesting, tho I'd say destroy chance should be pretty high (unless you want it to be somewhat unbalanced) because death/cryptid exist
You’ll need to modify how to apply seals as well, I’m pretty sure they won’t let you apply it to a card already with a seal
I don't really think it would work well on blue & purple seals tho because consumable slots limit
But I haven’t checked
I'd want to make a new info_queue so that you don't crash the game when playing in another language
alternatively - if card has a stacked seal it has a chance to get destroyed when activated instead
set_seal() does this operations in order
- Cancels the current seal
- Makes the current seal equal to the expected one
I mean where set seal is called
I’m not sure if you can target a card with a seal with Deja vu
i change it do do this (kinda, not exact)
pls no stealerino my balloon mechanics 😠
you can, it changes the seal to red seal
improvement
Glass card with triple red seal becomes the ultimate russian roulette
can you put #1# inside the name of the box instead of the text?
high risk high reward
does not have to be glass card if you have like idol anyways
should i use a .toml?
Hooking should be fine for what you want to do
First look
@wet root can you please?
VERSION 1.0 IS OUT!
Check it out here: https://github.com/cerloCasa/StackedRedSeals/releases/tag/v1.0
I have a feeling a random field directly on card won't persist reloading the run
putting it on card.ability should be cleaner
what's the difference?
it's saved and will get re-applied when reloading a run
ok, I'll try it
I found a bug that makes you see different numbers in your hand and your deck (the card has been retriggered 3 times when I played it) (I used 3 deja-vu)
I don't know where the +1 is coming from
this happens as soon as you put one Deja-Vu on the card
started a new run, used one single Deja-Vu on this card
the card's SRSreps value is different between hand and deck
The first tprint is when the card is in hand, the second is when I view it in the deck
I’m pretty sure the way the collection is drawn calls set seal on every card that has a seal, so you’re actually incrementing the number of seals whenever you view your deck
You could check that the card is in G.hand to get around this I think
i tried closing and reopening the deck viewer, but it is always at +1, never more
i'll try this method
is there a part of card that tells where is it?
Just do if card.area == G.play iirc
Yeah upon inspection of the code it copies the card then sets the seal, so it’s always plus 1 in deck view
VERSION 1.1 IS OUT
Bug fixing:
If you find any bug, please let me know by filing an issue on Github or writing here!
This works with latest version of smods?
i play with 0708a now I'll check if there is something new
I think the new config stuff will break this
Because smods now has config built into it and your config file isn’t set up correctly for it
You can circumvent it for now by changing the name of your file
Alternatively you can look at JokerDisplay for an example of how to do it properly
so... I have to add a localization/default.lua and a config.lua?
and also a SMODS.current_mod.config_tab = function()?
too many problems, I'll set the name of the file to SRS_config.lua
localization/default.lua is unrelated, it's a replacement for loc_txt
current_mod.config_tab also isn't required but it will allow changing settings in-game
this is my configs rn
SMODS config needs to return a table
I tried with
return {
["SRS_RedSealsForCard"] = 1,
["SRS_MaxRedSeals"] = -1,
}
but obviously it was wrong
wdym it was obviously wrong
it doesn't put these values as globals, but in your mod object's config table
You have to build your own page
But using the return in your config lets you use it in your code
You can do local config = SMODS.current_mod.config
this just means editing the config file directly might not work for users, they'd have to edit the corresponding <id>.jkr file in <save dir>/config/ instead
for now I'm doing
local config = SMODS.current_mod.config
local RedSealsForCard = config.RedSealsForCard
local MaxRedSeals = config.MaxRedSeals
yeah ik but that is easier in the moment I want to change anything in the config file
anyways, if I wanted to make the config page in the Mods list, where would I have to put the code for that?
can I put it inside the config file before the return?
no
no
in your mod file
kk
yet, I don't know how to make said page, so the config file will remain as it is now
this isn't finished yet but you can use it as a starting point
Yeah I'm gonna change the title
or maybe separate it into two pages
one for config, one for UI
thanks a lot ❤️
![Example Structure][UI_Example_1.png]
can you please send UI_Example_1.png too?
this is missing any of the useful functions for actually modifying the config though 😔
at the moment, no
it's on the list to add a more robust check to enable it, it currently just looks at if you create any SMODS object
so an Atlas will trigger it afaik
I did create one, but the Additions page is still empty
but I don't care about that rn
I am making the config tab
yeah, but in the backend we'll make a more robust check that will only make it appear if things are actually added to the collection
wdym? a text input field?
yes
there's a function that creates one, search create_text_input in the source code
and I put it inside a G.UIT.B node?
I'm trying to do this
ok
I'm trying to insert the text but something is wrong
you can't actually have two text inputs at the same time
Yeah I’m taking a look at that later
VERSION 1.3 IS OUT
Now the mod includes a "Config" page in the game to let you tweak its settings!
If you find any bug, please let me know by writing here or filing an issue on the Github page.
huge thanks to @thorn mirage and @latent berry for their help
WARN - [♥] Unknown key `patches.0.?.overwrite` found in patch file at "C:\\Users\\14242\\AppData\\Roaming\\Balatro\\Mods\\StackedRedSeals\\lovely.toml", ignoring it
WARN - [♥] Unknown key `patches.1.?.overwrite` found in patch file at "C:\\Users\\14242\\AppData\\Roaming\\Balatro\\Mods\\StackedRedSeals\\lovely.toml", ignoring it
WARN - [♥] Unknown key `patches.2.?.overwrite` found in patch file at "C:\\Users\\14242\\AppData\\Roaming\\Balatro\\Mods\\StackedRedSeals\\lovely.toml", ignoring it
Are these normal?
yes
overwrite is from old lovely version, its not needed anymore as it never did anything
it simply warns the mod dev that the key is useless
wait, so seal stacking?
i like it
why stop at red seals 🤔
I need help, I have put 5 red seals on the card but the text only appears "retrigger this card 1 time". what's wrong with the config?