#đŸ’»ăƒ»modding-dev

1 messages · Page 456 of 1

tardy raven
timid parrot
#

anyone got any idea why the first_hand_drawn context doesn't seem to be doing anything?

#

is this a bug with smods or did I screw something up?

pale holly
# tardy raven

do you mind sharing the code part directly ? the calculate part that is

tardy raven
#
calculate = function(self, card, context)
    if context.individual and context.cardarea == G.play then
        if function()
            local rankCount = 0
            for i, c in ipairs(context.scoring_hand) do
                if c:get_id() == 6 then
                    rankCount = rankCount + 1
                end
            end
            return rankCount == 3
        if rankCount == 3
        return {
                    chips = card.ability.extra.chips,
        }
            end
        end
    end
end
}

pale holly
#

so three 6s for 70 chips right ?

tardy raven
#

mhm!

#

man if im struggling this much with a relatively simple card im worried about some of the complex stuff I have planned StressedDarius

pale holly
#

oh don't worry, i've been there before

#

and still am kinda

tardy raven
#

it just sucks being so new to lua in general and just as new to smods and feeling like I have to be handheld through everything

timid parrot
#

you strike me as someone new to programming in general

tardy raven
#

you'd be correct

#

ive coded before in a different engine but

#

it wasn't a big project

#

i'm still tryna find my footing and be able to lead on my own but a lot of the information hasn't really stuck in my head and i'm still a good ways through the smods doc

#

so i'm as noob as you could probably get

#

i have friends who know their way around lua but

timid parrot
#

from what I can tell, you lack the fundamentals

#

not even of smods but just of lua and even programming logic in general

tardy raven
#

i've done a watch of a tutorial series but the info really didn't stick i guess

timid parrot
#

yeah I mean a lot of programming is practice and problem solving

#

there are plenty of websites out there that have beginner programming problems to help you build up those skills if it's something you're interested in

pale holly
#

try this

tardy raven
#

I just wanna be able to make progress on this w/o needing to constantly be handheld ig

timid parrot
#

idk if there's ones for strictly lua, but really any procedural language will help

lament agate
#

bumpy bump

pale holly
#

what's the code for the description

pale holly
#

do you mind sharing the full code this time ?

tardy raven
#

it's contained in a large doc but i'll send the relevant block to this joker

#
lua 
SMODS.Atlas{
    key = 'badguy',
    path = 'TheBadGuy.png',
    px = 71,
    py = 95,
}

SMODS.Joker{
  key = 'badguy',
  loc_txt = {
    name = 'The Bad Guy',
    text = {
      "If hand contains three 6's",
      '{C:blue}+70{} chips' },},
    rarity = 1,
    cost = 5, 
    atlas = 'badguy',
    pos = {x=0, y= 0},
    config = {
        extra = {
            chips = 70
        }
    },

 calculate = function(self, card, context)
    if context.joker_main and context.cardarea == G.play then
        if ((function()
            local rankCount = 0
            for i, c in ipairs(context.scoring_hand) do
                if c:get_id() == 6 then
                    rankCount = rankCount + 1
                end
            end
            return rankCount == 3
                    end)())  then
        return {
                    chips = card.ability.extra.chips
        }
            end
        end
    end
end
}```
timid parrot
# tardy raven most likely yeah it would be, i'd like a link to those

I'd recommend doing your own research and maybe starting with a language other than lua. Not that lua is a bad language but that I think there's less practice material for it. Something like python, which has a lot of similarities https://www.w3schools.com/python/python_exercises.asp

pale holly
pale holly
# lament agate

ah you don't use the loc_txt, not sure if i can help that way sorry

timid parrot
tardy raven
#

yeah

#

i know a tiny bit about c but like barely anything

#

i'm as raw meat to this as you can get

timid parrot
#

don't start with C

tardy raven
lament agate
#

what about the localization

pale holly
pale holly
lone dove
#

hiii im new at modding and rlly wanna playtest my jokers, how could i get them easily to see if they work

pale holly
lone dove
pale holly
pale holly
tardy raven
#

checking rn

#

like this?

pale holly
#

wait

copper thorn
#

hey, for context, i made a card that retrigers stone cards and tranforms non scoring cards into stone card, but i wnt to make the code retrigger every queen twice , and transforms non-scoring cards into polychrome queen

what should i change ?

 config = { extra = { repetitions = 1 } },

    loc_vars = function(self,info_queue,center)
        info_queue[#info_queue+1] = G.P_CENTERS.m_stone
    end,

    calculate = function(self, card, context)
        if context.cardarea == G.play and context.repetition and not context.repetition_only then
            if context.other_card.config.center.key == 'm_stone' then
                return {
                    message = 'Again!',
                    repetitions = card.ability.extra.repetitions,
                    card = context.other_card
                }
            end
        end
        if context.before and not card.debuff then
            card.ability.extra.AddChips = 0
            for i=1, #context.full_hand do
                local card_is_scoring = false
                for j=1, #context.scoring_hand do
                    if context.full_hand[i] == context.scoring_hand[j] then
                        card_is_scoring = true
                    end
                end
                if card_is_scoring == false and not context.full_hand[i].debuff and not context.full_hand[i].clown_destroying then
                            context.full_hand[i]:flip();
                            context.full_hand[i]:set_ability(G.P_CENTERS.m_stone);
                            context.full_hand[i]:flip();
                end
            end
        end
    end
} ```
tardy raven
lone dove
pale holly
fluid burrow
#

I have this code for a sticker, but I'd like it to move when the Joker is activated with the sticker. Does anyone know how?

copper thorn
#

should spawn it

lone dove
#

thank you so much

tardy raven
pale holly
pale holly
#

after config

#

something like this

tardy raven
#

no change

pale holly
#

reshare the screenshot of the current code again ?

copper thorn
tardy raven
pale holly
copper thorn
#

ohhhh

copper thorn
pale holly
tardy raven
molten musk
#

morning folks

fluid burrow
molten musk
fluid burrow
#

shake

molten musk
#
G.RESET_JIGGLES```
#

is for shaking

#

dna shake for example

#

other than that i dont know 😅

fluid burrow
#

mmm that little move a Joker makes when it activates not sure if I’m making myself clear

molten musk
#

when exactly do u wanna shake the joker? all the time or when active or another condition?

pale holly
tardy raven
#

fr?

pale holly
#

it needs to be only context.joker_main

#

you can remove context are card

#

i just tested of my own and it worked

tardy raven
#

alright I’ll give that a shot

fluid burrow
molten musk
#

oh i see

#

one sec let me think

pale holly
#

and i tested it without and with 3 6s

#

it does applies the effect only when there's 3 6s

stiff quiver
#

hey quick question, does the art for an edition have to be a shader or would a png work?

fluid burrow
#

to adapt to the lights

molten musk
tardy raven
pale holly
#

YES !!

#

glad i could help

tardy raven
#

i'm prolly gonna put this on the side since clearly I need to re-examine lua

pale holly
#

contexes is sometimes really not looked at too much lmao

pale holly
#

it basically has jokers, enhancement, vouchers, etc

molten musk
#

@fluid burrow can u add a retrurn before the last end and see what happens

pale holly
#

it's the vanilla jokers codded in lua with smods in mind

#

so it's a good resource if you ever need to do something but don't know how

tardy raven
#

definitely been lookin’ at that a good amount yeah but

#

I’m more talking just an understanding of coding logic like the guy said earlier

#

so yeah ima try and re-examine

molten musk
# fluid burrow This code

add this before the last end

    chips = card.ability.extra.chips
}```
and add this a the start 

config = { extra = {chips =0} }```

molten musk
#

im 90% sure something is gonna go wrong but its a start ig

#

dont wanna go up and down to keep looking at it lol

#

@fluid burrow why is your code like this if u dont mind me asking?

#

i'm looking at other scaling jokers in game and they they scale is diff

fluid burrow
molten musk
#

here 3 examples from game jokers

#

they all store how much they scaled and how much they scale each time in config

#

and then they add condition to when to scale

#

your code, i dont see where and how
it may just be me not understanding it correctly lol

formal parrot
#

Hello dev chat

molten musk
#

hi Heaven

#

hru?

formal parrot
#

Hello izz

fluid burrow
#

It could be because it's for a sticker and it's different from how jokers work

formal parrot
#

I just had the worst exam this semester 😭🙏

formal parrot
#

I’m good tho

#

Wbu :>

#

How’s modding

molten musk
#

good

molten musk
formal parrot
#

Whats the effect

stiff quiver
#

im getting this crash and i dont know why ```lua
SMODS.Shader{
key = "filter_shader",
path = "filtered.fs"
}
SMODS.Edition{
key = "filtered",
loc_txt = {
name = "Filtered",
text = {
"nil"
},
label = "Filtered"
},
shader = "filter_shader",

molten musk
formal parrot
fluid burrow
formal parrot
molten musk
#

@fluid burrow explain the joker function fully please

molten musk
formal parrot
#

You’re using the wrong key

#

Silly

#

Wait

#

I might be stupid let me think

formal parrot
stiff quiver
#

yeah thats what the crash msg said but it is the right key i think

formal parrot
#

Check for typo

#

Shouldn’t you add mod prefix ?

fluid burrow
molten musk
#

oh

stiff quiver
molten musk
fluid burrow
lone dove
#

Oops! The game crashed:
game.lua:2765: bad argument #1 to 'push' (boolean, number, string, love type, or table expected)

Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~BETA-0614a-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.8.0
Platform: Windows
Steamodded Mods:
1: Happiest Day by mArcello [ID: Happiest Day, Version: 1.0.0]
2: DebugPlus by WilsontheWolf [ID: DebugPlus, Version: 1.5.0~dev, Uses Lovely]
3: More Speed by Steamo [ID: MoreSpeed]
4: Achievements Enabler by Steamo [ID: AchievementsEnabler]
5: Escape Exit Button by Steamo [ID: EscapeExitButton]
Lovely Mods:

Stack Traceback

(3) LÖVE function at file 'boot.lua:352' (best guess)
Local variables:
errhand = Lua function '(LÖVE Function)' (defined at line 598 of chunk [lovely debugplus.console "debugplus/console.lua"])
handler = Lua function '(LÖVE Function)' (defined at line 598 of chunk [lovely debugplus.console "debugplus/console.lua"])
(4) method C function 'push'
(5) Lua upvalue 'gameUpdateRef' at file 'game.lua:2765'
Local variables:
self = table: 0x274b7820 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x278614a8, F_ENGLISH_ONLY:false, viewed_stake:1, HUD:table: 0x27a595f8 (more...)}
dt = number: 0.016734
(6) Lua method 'update' at Steamodded file 'src/ui.lua:84'
Local variables:
self = table: 0x274b7820 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x278614a8, F_ENGLISH_ONLY:false, viewed_stake:1, HUD:table: 0x27a595f8 (more...)}
dt = number: 0.016734
(7) Lua field 'update' at file 'main.lua:999'
Local variables:
dt = number: 0.016734
(8) Lua function '?' at file 'main.lua:938' (best guess)
(9) global C function 'xpcall'
(10) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '?' (defined at line 909 of chunk main.lua)
inerror = boolean: true
deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])

so confused why my game keeps crashing

marble yoke
#

1

fluid burrow
molten musk
#

return {'message'} should work

fluid burrow
#

Now the problem is that they activate at the same time

molten musk
floral narwhal
#

how can i fix soul's scale too?

molten musk
lone dove
molten musk
#

just screen shot line 2765 and around it a bit
like 10 lines up and down

molten musk
floral narwhal
molten musk
#

oh

stiff quiver
molten musk
#

sorry not in my limited skills list lol

unborn bay
# floral narwhal how can i fix soul's scale too?

either call set_sprites again like so

newcard:set_sprites(G.P_CENTERS.j_pal_parsi)

or just set the multiplication (right) on the width and height directly on card creation

G.CARD_W * 1.7675,
G.CARD_H * 1.7675,
unborn bay
#

the soul not scaling is caused by the scaling applied during card creation which doesn't apply when you actually manually edit the transform values

formal parrot
#

Hard math

#

Shenanigans

molten musk
stiff quiver
#

i hate it too, mainly cause i have no idea how to even do it lol, hence why i stole foil code

formal parrot
#

LMFAO SAME

lone dove
stiff quiver
#

well for now i'll just make the code for the edition and i'll just set the shader part of it to false

molten musk
formal parrot
#

I think

#

Keyword think

lone dove
formal parrot
#

Balatro shaders are codded with f# and glsl

#

There’s no such resources for this

#

Only some examples

#

And the love 2d vlog on shaders

#

If you want i can send links

stiff quiver
#

i'll probably ask someone else to make the shader

#

i think i know someone who can

formal parrot
#

Great :>

#

I suggest looking to other people’s shaders

thorn basin
#

Question: how can I check for every joker if it has been destroyed by the custom joker itself?

#

Cuz I wanna check for every joker destroyed by this custom joker it gains +Mult

formal parrot
#

You can destroy and add value

thorn basin
#

oh shoot yes, I forgor

#

thx!

formal parrot
#

If its last index it will destroy 1
If its index =last index and first index (there’s only 1 joker ) so no destroy
If its first aswell it will add 1
If its neither last or first then it will destroy 2

#

Adding double value

lone dove
#

i think debugplus is crashing my game

formal parrot
#

How ?😂

#

Whats the crashlog

lone dove
#

Oops! The game crashed:
game.lua:2765: bad argument #1 to 'push' (boolean, number, string, love type, or table expected)

Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~BETA-0614a-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.8.0
Platform: Windows
Steamodded Mods:
1: Happiest Day by mArcello [ID: Happiest Day, Version: 1.0.0]
2: DebugPlus by WilsontheWolf [ID: DebugPlus, Version: 1.5.0~dev, Uses Lovely]
3: More Speed by Steamo [ID: MoreSpeed]
4: Achievements Enabler by Steamo [ID: AchievementsEnabler]
5: Escape Exit Button by Steamo [ID: EscapeExitButton]
Lovely Mods:

Stack Traceback

(3) LÖVE function at file 'boot.lua:352' (best guess)
Local variables:
errhand = Lua function '(LÖVE Function)' (defined at line 598 of chunk [lovely debugplus.console "debugplus/console.lua"])
handler = Lua function '(LÖVE Function)' (defined at line 598 of chunk [lovely debugplus.console "debugplus/console.lua"])
(4) method C function 'push'
(5) Lua upvalue 'gameUpdateRef' at file 'game.lua:2765'
Local variables:
self = table: 0x0a87a7b0 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x0af39268, F_ENGLISH_ONLY:false, viewed_stake:1, HUD:table: 0x0b03a3a8 (more...)}
dt = number: 0.0166998
(6) Lua method 'update' at Steamodded file 'src/ui.lua:84'
Local variables:
self = table: 0x0a87a7b0 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x0af39268, F_ENGLISH_ONLY:false, viewed_stake:1, HUD:table: 0x0b03a3a8 (more...)}
dt = number: 0.0166998
(7) Lua field 'update' at file 'main.lua:999'
Local variables:
dt = number: 0.0166998
(8) Lua function '?' at file 'main.lua:938' (best guess)
(9) global C function 'xpcall'
(10) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '?' (defined at line 909 of chunk main.lua)
inerror = boolean: true
deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])

#

im so confused ive tried everything, the game only begn crashing when i installed it, maybe i installed it wrong? idk

stiff quiver
#

how do i enable joker retriggering?

formal parrot
#

The game takes care of it

#

You can disable blueprint compat

stiff quiver
#

oh its enabled by default? idk why i thought it wasnt

molten musk
#

ok so i have 2 issues with the code

  • card in hand scaling triggers for all seals and in every played hand, i want it only when triggered
    like blue seal on last hand, or red seal on a steal card mid play
  • discard doesnt scale
formal parrot
#

Or selling_card

#

Any other context will retrigger

lone dove
molten musk
#

dont give up, u will find the issue if u keep trying

stiff quiver
formal parrot
#

No its

lone dove
formal parrot
#

If you add repetitions

stiff quiver
#

wdym adding repetitions, like ading them to the return?

formal parrot
#

Seal retriggers don’t work for discards

molten musk
molten musk
formal parrot
formal parrot
#

Depends on if you want to retrigger same joker or other one

molten musk
stiff quiver
#

the same one, its for the edition

molten musk
#

oh i see

stiff quiver
#

so for now i have this```lua
if context.joker_main or (context.repetition and context.cardarea == G.play) then
if true then --pseudorandom("filtered",1,2) == 1 then
return{ repetitions = 1}
end
end

formal parrot
#
Return {repetitions=1}```
formal parrot
stiff quiver
#

would this work for it? ```lua
if (context.joker_main and context.repetition) or (context.repetition and context.cardarea == G.play) then

formal parrot
#

This is fixed 1 in 2

stiff quiver
formal parrot
#

Wait i’ll show you an example

stiff quiver
#

i want it to be a 50/50, cause it either retriggers it or debuffs it

molten musk
stiff quiver
#

so this would work right? ```lua
if context.joker_main and context.repetition and context.cardarea == G.play then

formal parrot
#

pseudorandom('seed') < G.GAME.probabilities.normal / card.ability.extra.odds then

#

Add odds in your config

#

Set it to 2

formal parrot
#

If it triggers it would show in your console

#

In debugplus

molten musk
#

i see

stiff quiver
formal parrot
#

G.jokers

#

My bad :3

#

G.jokers.card==card

#

I think

formal parrot
#

silly me forgor

molten musk
#
for _, c in ipairs(G.discard.cards or {}) do
    if c.seal and G.P_SEALS[c.seal] and G.P_SEALS[c.seal].calculate then
        -- Build a context for the seal effect
        local seal_context = {
            cardarea = G.discard,
            main_scoring = true, -- or false if you don't want to score
            individual = true,
            other_card = c,
            discard = true,
        }
        G.P_SEALS[c.seal]:calculate(c, seal_context)
    end
end```
#

what do u think of this code

#

AI helped but not sure

formal parrot
#

I dunno

#

I didnt do advanced calculating for context before

stiff quiver
#

so this should work? lua if context.repetition and (context.cardarea == G.play or (context.cardarea == G.jokers and G.jokers.card == card)) then

formal parrot
#

Remove G.play

stiff quiver
#

would it retrigger regular cards without it still?

formal parrot
#

Whats your objective

#

So i can tell you exactly what to do

stiff quiver
#

an edition that has a 50/50 chance of retriggering the card or debuffing it

#

so it has to work on both jokers and playing cards

formal parrot
#

Oh okay i see

#

Try some stuff while i look for the needed context

stiff quiver
formal parrot
#

I just found thus and its so funny 😭

stiff quiver
#

lmao

#

how would you know the notes are there if you cant read

formal parrot
#

AHHHHHHHHHH

#

1 second i think i figured it out

#

SMODS.Edition({ key = "overexposed", loc_txt = { name = "Overexposed", label = "Overexposed", text = { "{C:green}Retrigger{} this card" } }, discovered = true, unlocked = true, shader = 'overexposed', config = { repetitions = 1 }, in_shop = true, weight = 8, extra_cost = 4, apply_to_float = true, loc_vars = function(self) return {} end })

#

This is full code for triggering card with this edition

#

😭please read resources i send

modern kindle
#

Reading is overrated

molten musk
#

context.other_card.ability.seal checks if card has a seal, correct?

stiff quiver
modern kindle
stiff quiver
#

context.other_card.seal checks the key of the seal

formal parrot
#

We asked eremel he was like

#

Yeah i have no idea 😭

modern kindle
#

If its any seal at all it might just be card.seal unless im just outdated as hell

#

Mentally speaking

molten musk
#

nah it worked

#

not outdated yet

modern kindle
#

Glad to be of service :)

#

That'll be 400 dollars and a mcdouble

molten musk
#

is there a context to check if i added planets or tarots

#

or a condition

formal parrot
#

I think cards added to deck but change cardarea

#

Maybe

#

Maybe i’m stupid

modern kindle
#

Might be context.using_consumable

formal parrot
subtle merlin
modern kindle
formal parrot
#

There should be

#

A context for consumable added

molten musk
#

cant find it in smods docs

modern kindle
#

Maybe context.card_added?

#

I think that's for all cards added to deck

formal parrot
#

Nope

#

Its playing_card_added

cobalt iron
#

is there a way to change the displayed score requirement? Because the moment I change the score requirement for a blind it doesn't show any changes

formal parrot
#

I think your best alternative is consumable bought

molten musk
#

context.card_added is for any card added

molten musk
formal parrot
#

Yes

#

Maybe you can add cardarea==G.consumeables

pale holly
#

bump

modern kindle
#

if context.card_added and context.card.ability.set == "Tarot"

Or similar? Maybe?

onyx sonnet
#

is the documentation for SMODS.Center completely gone?

modern kindle
#

Still there that I see

#

Oh

#

Center not back

onyx sonnet
#

yeah im a bit fried lol

tawdry oriole
#

can't really figure out why this doesn't work - i've been doing the same thing for loc_vars the entire time but it just won't work here

modern kindle
#

Hi vic

zealous glen
#

Hello dilly

#

How are you

modern kindle
#

Was i wrong :(

#

Im okay, tired but alive

#

I hope you are well

molten musk
#

my balatro is not opening

#

its not even lunching

modern kindle
#

Maybe it needs dinner

molten musk
#

hahaha a

onyx sonnet
molten musk
#

no

#

its just not opening

onyx sonnet
#

not sure we can do anything to help if we cant diagnose the problem

#

try reverting your changes and see when it opens

zealous glen
zealous glen
zealous glen
modern kindle
modern kindle
molten musk
#

restarted laptop

#

it works now

thorn basin
#

how can I make a joker set the current played hand's chips and mult to 0?
Basically like The Flint blind but instead of halving literally sets both to 0.

final goblet
#

guys...

#

can anyone help me with this crash log?

#

im SERIOUS!!!

#

THiS IS ALL IT SAYS!!!

#

one sec lemme emulate it

fluid burrow
copper thorn
#
SMODS.Rarity{
    key = "Void",
    prefix_config = {key = false},
    badge_colour = G.C.DARK_EDITION,
    pools = {["Joker"] = true},
    get_weight = function(self, weight, object_type)
        return weight
    end,
}

i need help, it's my first rarity and im lost

what do need to add to make my joker appear only in souls and make it say not "common" but "Voidborn"

native zinc
#

what's the code

#

you're feeding an incorrect argument to a function

thorn basin
final goblet
#

that triggered when the money window popped up

molten musk
#

how to i check if i used a specific consumable using context

final goblet
#

the one that says cash out at the end of it

final goblet
stuck vault
#

I'm trying to make an enhancement which acts like the Glass Card so it has a chance to destroy itself. However, I cant seem to find a way to do this. I have looked into the source code and didn't really find where it supposedly destroys itself with that chance. I've looked at other projects but didn’t find anything I could understand there either. I'm pretty new to modding Balatro, so help would be appreciated :D
my current code:

native zinc
fluid burrow
native zinc
#

update_hand_text({}, {mult = mult, chips = hand_chips})

thorn basin
native zinc
#

just set hand_chips and mult directly and update the text

stiff quiver
dire marlin
#

how to make ability like pareidolia but considered as numbered card?

red flower
red flower
#

to make it appear in the soul i think you need to take_ownership of it

copper thorn
#

wdym

red flower
#

which part of what i said

copper thorn
#

all of it (ima begginer in making mods i might get lost easily)

#

like how do i check how i defin,ed it ? if i even defined it

red flower
#

what's the code for the joker, i mean

#

take_ownership is a way to change what a card does

#

the soul specifically spawns legendaries so if you want it to spawn another rarity you need to change it

fluid burrow
copper thorn
#
SMODS.Joker{
    key = "Soulless",
    loc_txt = {
        name = "{C:dark_edition}The Soulless One",
        text = {
            "Gains {X:mult,C:white}X1.5{} Mult",
            "then multiplies it by {X:mult,C:white}X1.5{} Mult",
            "every time that {C:attention}scoring hand",
            "contains {C:attention}three{} scoring cards",
            "{C:inactive}(Currently {X:mult,C:white}X#1#{C:inactive} Mult)";
            "{C:dark_edition}A celestial choir whispers, unseen, unheard by mortal ears."
        }
    },
    atlas = "soulless",
    soul_pos = {x = 0, y = 1},
    rarity = Void,
    pos = { x = 0, y = 0},
    cost = 50,
    unlocked = true,
    discovered = true,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,
    config = { extra = {
        xmult = 2,
        xmult_gain = 1.5
    }
    },
    loc_vars = function(self, info_queue, card)
        return {vars = {card.ability.extra.xmult}}
    end,
    calculate = function(self,card,context)

        if context.before and #context.scoring_hand == 3 then
            card.ability.extra.xmult = (card.ability.extra.xmult + card.ability.extra.xmult_gain) * card.ability.extra.xmult_gain
            return {
                message = 'Ascension...'
            }
        end
        if context.joker_main then
            return {

                card = card,
                Xmult_mod = card.ability.extra.xmult,
                message = "X" .. card.ability.extra.xmult,
                colour = G.C.MULT,
            }
        end

    end,
}```
red flower
copper thorn
#

nevermind it, im not motivated enough

red flower
#

modprefix being your mod's prefix

copper thorn
#

and where should i put it ?

red flower
#

where it says rarity = Void

#

the Void part is wrong

fluid burrow
#

Must be rarity = 4

red flower
#

no that's for legendary

copper thorn
#

like this ?

red flower
#

yes but replace modprefix for your mod's prefix

copper thorn
#

ah

#

ok it's done

dire marlin
copper thorn
red flower
floral narwhal
#

im still finding how to fix this but now with this problem. i made this for now but it makes no sense

red flower
# dire marlin like this?
if next(SMODS.find_card("j_modprefix_key")) then
    return false
end
return card_is_face_ref(self, from_boss) 
red flower
floral narwhal
#

{n=G.UIT.C, config={align = "cm", padding = 0.05, colour = G.C.BLACK, r = 0.1}, nodes={
{n=G.UIT.C, config={align = "cr", padding = 0.01, r = 0.1, colour = G.C.CHIPS, minw = 1.1}, nodes={
{n=G.UIT.T, config={text = ((G.GAME.hands[handname].chips >= 0) and "+" or "") .. G.GAME.hands[handname].chips, scale = 0.45, colour = G.C.UI.TEXT_LIGHT}},
{n=G.UIT.B, config={w = 0.08, h = 0.01}}
}},

copper thorn
#

enitre code ? with SMODS.rairity and the smods.joker and all ?

red flower
#

just the joker

copper thorn
#
SMODS.Joker{
    key = "Soulless",
    loc_txt = {
        name = "{C:dark_edition}The Soulless One",
        text = {
            "Gains {X:mult,C:white}X1.5{} Mult",
            "then multiplies it by {X:mult,C:white}X1.5{} Mult",
            "every time that {C:attention}scoring hand",
            "contains {C:attention}three{} scoring cards",
            "{C:inactive}(Currently {X:mult,C:white}X#1#{C:inactive} Mult)";
            "{C:dark_edition}A celestial choir whispers, unseen, unheard by mortal ears."
        }
    },
    atlas = "soulless",
    soul_pos = {x = 0, y = 1},
    rarity = "Awake_Void",
    pos = { x = 0, y = 0},
    cost = 50,
    unlocked = true,
    discovered = false,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,
    config = { extra = {
        xmult = 2,
        xmult_gain = 1.5
    }
    },
    loc_vars = function(self, info_queue, card)
        return {vars = {card.ability.extra.xmult}}
    end,
    calculate = function(self,card,context)

        if context.before and #context.scoring_hand == 3 then
            card.ability.extra.xmult = (card.ability.extra.xmult + card.ability.extra.xmult_gain) * card.ability.extra.xmult_gain
            return {
                message = 'Ascension...'
            }
        end
        if context.joker_main then
            return {

                card = card,
                Xmult_mod = card.ability.extra.xmult,
                message = "X" .. card.ability.extra.xmult,
                colour = G.C.MULT,
            }
        end

    end,
}```
red flower
copper thorn
#

better but no name

hidden sable
#

hey that's also what i did lol

red flower
#

or a localization file entry

red flower
#

can i see the code

formal parrot
#

Hello N

copper thorn
#

watching on steammoddeds first mod github i found this thingy misc.labels['k_'..key:lower()] what do i do with it ?

red flower
stiff quiver
#

how can i change the game over/ win text that jimbo says?

red flower
#
loc_txt = { name = "rarity name" }
#

is what you need

copper thorn
#

thnaks alot, it works now ! :)

#

and quick question now that i think of it, how do i cange the mod names color in the desc of the jokers ?

red flower
#

in your mod's metadata

copper thorn
#

makes sense

red flower
formal parrot
copper thorn
#

what's the default_weight of rare cards ?

snow vale
#

can blinds have config?

dire marlin
#

is this right?

red flower
#

it should be function Card:is_face
and the return should have self

also your joker's key should have the mod prefix

stiff quiver
#

how can i change the text that j_joker says when you lose/win a run?

next timber
#

how come playing a straight with two specific jokers from my mod crashes the game? (sometimes?? there was one specific instance where it didnt that i cant recreate) im baffled i have no clue what im doing

#

images are the error, the line in smods thats throwing it, and the calculate functions of the 2 jokers

hidden sable
#

is there any way to make it so whenever a specific consumable is ever shown on screen/spawned it becomes negative?

red flower
red flower
snow vale
#

is there any way to make blinds change what suit they're debuffing each hand?

hidden sable
#

by specific consumable i mean a consumable that changes

#

could also be consumableS

red flower
#

oh so not one of yours?

#

then that's more complicated

hidden sable
#

no it is one of mine

#

its just controlled by a different object

#

im making a partner

#

and i want their linked consumable

#

to always be negative

red flower
#

oh then you set it to negative in set_ability if the condition is true

next timber
red flower
#

idk just throwing ideas

#

it seems like you're setting the value to something wrong tho

copper thorn
#

whats the default wheight of rare cards ?

next timber
#

sorry meant to turn off ping

#

really werid that this bug only seems to show up if i play a straight with BOTH jokers though

#

or does it

#

yeah no the second joker had literally nothing to do with it

#

its just if the resulting average card was a face card or not

summer furnace
#

Hey! How could I add a seal to a played card with a boss blind?

I am trying to look into the Horse Boss Blind in the yahimod, but I cannot find the code to that :/ (It uses a function I cannot find for the life of me)
This is the Code I have for that:

    name = "bosscasual",
    key = "bosscasual",
    mult = 0.5,
    dollars = 0,
    loc_txt = {
        name = 'Casual',
        text = {
            'Nur fĂŒr Casuals!'
        }
    },
    boss = { min = 1 },
    boss_colour = HEX('3cc0c8'),

    debuff_hand = function(self)
        for i = 1, #G.play.cards do
            if G.play.cards[i].seal == nil then
                SMODS.juice_up_blind()
                G.play.cards[i].seal = "FinusHD_casualseal"
            end
        end
    end,
}```
The current Problem with that is, that the seal does not save :/
hidden sable
#

what is card_eval_status_text

red flower
#

it makes the text thing appear on cards like returning a message

#

you should use SMODS.calculate_effect instead tho

red flower
summer furnace
copper thorn
#

seems good enough

formal parrot
#

We aren’t seeing this in shop 🙏

manic rune
#

doe:

formal parrot
#

Get a lot of this guy âŹ†ïž

lament agate
#

@manic rune

#

heko

#

help

#

HELP

manic rune
#

sup

#

what is it

lament agate
#

pimp my code

manic rune
#

ship it

lament agate
#

it gives out ERROR in descbox

manic rune
#

that means whatever you are putting in localize is wrong

lament agate
#

what do

manic rune
#

can you give me an example of what this usually prints

lament agate
manic rune
#

the planet card's key?

lament agate
red flower
#

is localize(key, 'planets') a thing?

manic rune
#

mm

#

pretty sure not

lament agate
#

ah god damnit

#

what do then

#

i thought it does

manic rune
#

and even if it is, it should return a table with both the name and the description of that card

red flower
#

localize{ type = "name_text", set = "Planet", key = key }

manic rune
#

yeah what N' said
-# im still trying to boot up vsc to check localize's code 😭

#

oh yeah

#

please dont use :lower() lol

lament agate
#

whats the matter

manic rune
#

some mods might have keys with uppercase characters in them

lament agate
#

ohhhh

#

i see

lament agate
red flower
#

the key

#

like "c_pluto" or whatever

lament agate
#

sure

#

now its nil

#

@manic rune @red flower

manic rune
#

huh

red flower
#

i mean i don't know what you want me to tell you without code

manic rune
#

same

lament agate
#

hold on

#

test

#

what the fuck

#

hold on

#

i got automodded

red flower
#

just send a screenshot

manic rune
lament agate
manic rune
#

uhh your message with ``` being added with more characters when sent (color code or something) which causes it to go past the word limit

#

so it refuses to be sent

#

smt like that

lament agate
#

ah that fucking blows

manic rune
#

N' said name_text, not Planet Cards 😭

#

but also

#

the key is wrong

red flower
#

yeah it should be a string

manic rune
#

why is it c_mercury instead of planet_name
-# its not even a string too

lament agate
#

im so confused

#

HOLD ON

lament agate
lament agate
manic rune
#

yeah, type = "name_text" tells localize to grab the name only

lament agate
#

OH

#

fuck

#

im

#

stupid

#

hold on

normal crest
lament agate
#

so which one is right

manic rune
manic rune
red flower
lament agate
#

so what do i put

manic rune
manic rune
lament agate
#

no

red flower
lament agate
#

thekey

#

syre

manic rune
#

oh

lament agate
#

with ""

#

?

manic rune
#

yes

red flower
manic rune
#

without the "" you are getting c_mercury the variable

lament agate
#

still nil

manic rune
#

which is always nil unless some mods have c_mercury as a global variable for some reason

#

đŸ€” whats the code now

#

just the loc_vars code

manic rune
lament agate
#
loc_vars = function(self, info_queue, card)
            local planet_name = string.gsub(card.ability.extra.desired_planet, "c_", "")
            return { vars = { localize{ type = "text_name", set = "Planet", key = "c_mercury" } } }
        end,
manic rune
#

you are everywhere now 😭

normal crest
#

name_text

red flower
#

text_name???

normal crest
#

Not text_name

lament agate
#

fuck

#

fuck

#

FUCK

#

hold on

manic rune
#

😭

#

nxkoo calm down

lament agate
#

GHGEWHRGRDWICGUIYEGI

red flower
#

just copy the code i sent is not that hard

lament agate
#

😭

manic rune
#

how did you get name_text to text_name

#

đŸ„€

lament agate
#

im

#

stupid

#

21

manic rune
#

blackjack??

red flower
#

what happened to stupid 1 to 20

lament agate
#

JESUS CHRIST THERE YOU GO 😭😭😭😭😭😭😭😭

normal crest
manic rune
#

i have stupid type 5

#

the others idk

lament agate
#

i have cancer type 3

#

3

manic rune
#

amazing

red flower
manic rune
#

remove the string.gsub part btw

lament agate
#

i am genuine;y SO sorry btw

manic rune
#

dont change the key at all

lament agate
#

for being this dumb

manic rune
#

no its fine 😭

normal crest
#

I forgive you

dire marlin
#

how to make joker that give every joker from my mod give +mult?

manic rune
#

wha

#

wdym...

red flower
#

like baseball card?

#

but for your jokers?

dire marlin
manic rune
#

am i dumb for not understanding that

lament agate
#

imagine the modded joker gives xchips from morefluff

#

he's asking that

manic rune
#

oh so im actually dumb

#

gghh

dire marlin
normal crest
#

every joker has a reference to its mod

red flower
#

yes

manic rune
#

anyways, use context.other_joker

normal crest
manic rune
#

lemme go to balatro and check

lament agate
#

THREE HEROES APPEARS AT WORLD'S EDGE

#

N'
BepisFever
Somethingcom515

dire marlin
manic rune
manic rune
red flower
manic rune
#

MY BALATRO WONT OPENNNN

lament agate
red flower
#

sounds like a hero to me

manic rune
#

yeah so

#

check for context.other_joker.config.center.mod.id

#

it should print out the mod id the joker came from

#

do note that vanilla jokers wont have this, so add nil checks too

dire marlin
manic rune
#
if context.other_joker.config.center.mod and context.other_joker.config.center.mod.id == "your mod id" then
   --stuff
end
manic rune
normal crest
#

the id is the id you put in your metadata json

normal crest
dire marlin
lament agate
normal crest
#

syn tax err or

manic rune
#

what is this line

lament agate
hidden sable
#

"This Duck will self destruct" goes hard

manic rune
#

nxkoo

lament agate
red flower
lament agate
manic rune
#

it should only be card.ability.extra.desired_planet

lament agate
#

only that?

#

OHHHHHHHHHHHHHHH

manic rune
#

yes

lament agate
#

okay

#

hold

hidden sable
#

though self destruct should be highlighted in {C:red,E:2}

lament agate
#

dont worry

#

im not leaving any text uncolored

manic rune
#

my laptop froze

#

so im chatting on my phone rn

#

:3

red flower
#

my hands froze

manic rune
#

how do i code on this thing

manic rune
#

đŸ„

lament agate
#

gehaha

red flower
#

will self destructs?

lament agate
#

oh god damnit

normal crest
#

grammar error

lament agate
#

IM NOT AMERICAN

#

hold on

#

self destruct right

manic rune
#

slight grammatical error spotted

#

bad mod

lament agate
#

D:

red flower
#

self destroy

lament agate
#

penguin club kil

#

let me see if this works

#

actually no, that means i have to

#

find mercury in shop

red flower
hidden sable
hidden sable
red flower
#

either self destructs or will self destruct

lament agate
#

OH

#

okay

hidden sable
#

bro also forgot to include maliconics

hidden sable
lament agate
#

wait whats mercury for again

normal crest
lament agate
#

okay so

#

it didnt work

lament agate
normal crest
#

okay maybe that's too much

red flower
#

why does it include all of them

lament agate
#

a mod named cryptid

#

a mod named talisman

#

a mod named

#

yeah it didnt work

manic rune
#

:3

lament agate
manic rune
#

mean you have to use a planet card

lament agate
#

...

manic rune
#

its context.using_consumeable

red flower
lament agate
#

i should quit being a modder

#

i did mean them to use it

#

how the fuck did i forget about that

manic rune
lament agate
#

OH WAIT, BESIDES MY STUPIDITY

red flower
#

i dont have an expand tooltips keybind

manic rune
#

wait really

lament agate
#

it didnt change when i get to Ante 2

manic rune
#

đŸ€”

red flower
#

you can hide tooltips in the config

manic rune
#

we should have a context like context.end_of_ante...

red flower
#

i have a switch pages keybind and a related cards keybind

manic rune
#

oh

lament agate
#

on unrelated note, i think i lost my coffee

red flower
#

it's literally end_of_round and G.GAME.blind.boss

manic rune
#

??

#

how

lament agate
#

I FORGOT WHERE I PUT IT

native zinc
#

e

manic rune
#

nxkoo are you stressed

lament agate
#

do i looklike it

red flower
lament agate
lament agate
native zinc
#

of course i am i'm mostly liquid

manic rune
#

...should i be scared that the documentation looks like this

lament agate
#

LMAO

manic rune
normal crest
native zinc
#

how does that work

normal crest
#

they're also food

manic rune
#

im scared

normal crest
#

Yummy

native zinc
#

do i just like

#

absorb you .

manic rune
#

i once had a pdf as documentation before and it was 300 pages

lament agate
#

14 pages of PDF

#

exposing bepisfever

native zinc
#

i have grabbed nxkoo's message

lament agate
#

put it down

native zinc
#

no

red flower
#

what are u gonna do with it

native zinc
#

hold it

lament agate
#

theyre going to throw it

#

at me

native zinc
#

sure

lament agate
#

animator vs animation style

manic rune
#

my laptop froze again

#

:3

hidden sable
manic rune
normal crest
lament agate
#

thaw it

normal crest
lament agate
#

140 pages

summer furnace
#

How could I make it, that if you have a certain joker, one single song plays the entire time, unless you sell it or remove it in some way?

    {
        key= 'totk_music', 
        path = 'totkmusic.ogg', 
        volume = 2, 
        select_music_track = function()
            if (totkjoker == true) then
                return true
            else return false
            end
        end,
        sync = {
            totk_ost_music = true
        }
    })```This is the code for the music, that I made with the docs and

```calculate = function(self, card, context)
        if context.joker_main then        
            totkJoker = true,    
            return {
                chip_mod = card.ability.extra.chips,
                mult_mod = card.ability.extra.mult, 
                message = 'Willkommen zu den Tears of the Kingdom Highlights, mit mir FinusHD!',
                sound = 'FinusHD_totksfx'
            }
        end
    end,```this is the calculate code for the joker, I made. It seems to crash after the if statment for some reason :/
red flower
#

the reason it crashes is because you have an extra comma in that line

#

for your question i would check how jimball does it in cryptid

summer furnace
#

Oh okay, never played cryptid so I'll download it real quick lmao

primal robin
#

I do believe cryptid checks every frame is jimball present ehehe

normal crest
#

higher number = higher priority

summer furnace
#

ooooh, okay that makes sense

normal crest
summer furnace
normal crest
#

Inside select_music_track you can check if next(SMODS.find_card('j_prefix_key')) then return 10000 end

#

10000 is just an arbitrary number I picked

summer furnace
#

ooooh, okay thx!

#

Will I then need to play that music, or will it play automaticly?

lament agate
#

how do you word this better

normal crest
summer furnace
#

oooh, okay I get it now! Thank you!

dire marlin
#

my game crashed when i add vanilla joker, any help?

normal crest
#

Cus vanilla jokers don't have mod defined in them

dire marlin
#

how to fix it?

normal crest
#

(context.other_joker.config.center.mod or {}).id

summer furnace
red flower
#

"j_FinusHD_totk" in quotes

summer furnace
#

Ooooh yeah right 💀

#

now it is in quotes, but still does not work? Do I need to wait until the balatro music stops, and if yes how could I stop it from playing?

normal crest
#

you shouldn't need to wait, it's likely smt else is wrong

normal crest
dire marlin
pastel remnant
#

anyone know a good way to get the number of unique cards in the deck?

summer furnace
normal crest
summer furnace
#

now it works thanks!!!!

pastel remnant
#

like either different suit or rank

dire marlin
normal crest
#

What's the issue

dire marlin
#

the joker didnt giving the mult

red flower
normal crest
pastel remnant
#

uh how would i get the cards in the deck?

normal crest
#

Not at my pc rn

red flower
dire marlin
# normal crest Check what context baseball card uses
SMODS.Joker {
    key = "baseball",
    blueprint_compat = true,
    rarity = 3,
    cost = 8,
    pos = { x = 6, y = 14 },
    config = { extra = { xmult = 1.5 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.xmult } }
    end,
    calculate = function(self, card, context)
        if context.other_joker and (context.other_joker.config.center.rarity == 2 or context.other_joker.config.center.rarity == "Uncommon") then
            return {
                xmult = card.ability.extra.xmult
            }
        end
    end,
}```
red flower
normal crest
#

Or bepis lied and it's not config.center.mod

#

But I trust bepis with my life

pastel remnant
dire marlin
#

it is my mod id

dire marlin
normal crest
#

can you send your metadata json file

red flower
#

the one that worked used - in the mod id

normal crest
#

Oh yeah you put different mod ids

dire marlin
#

oh yeah another typo

#

mb

#

oh yeah it worked

#

love yall

hidden sable
#

if forced_key was like brandon or something how would the localization key look like?

manic rune
#

i dont even trust myself what the hell

hidden sable
twin kayak
#

I need help with this code

#

it should make a joker gain 1.1x mult when a hand is played

manic rune
#

sorri

stiff quiver
#

why are the played cards getting losing the debuff texture?

calculate = function(self, card, context)
    if context.before then
      if pseudorandom("filter",1,2) == 1 then
        card:set_debuff(true)
        return {message = "Filtered!"}
      end
    end
    if context.repetition and context.cardarea == G.play and context.other_card == card then
      return {repetitions = 1}
    end
    if context.retrigger_joker_check and not context.retrigger_joker and context.other_card == card then
        return {repetitions = 1, message = "Again!"}
    end
  end
normal crest
stiff quiver
#

i'll try that

normal crest
twin kayak
#

why isn't the joker scoring the x_mult

SMODS.Joker {
key = 'happi',
loc_txt = {
name = '{E:1}happi boi',
text = {
"Gains {C:white,X:chips}X#2#{} Chips",
"per played hand",
"{C:inactive}(Currently {C:white,X:chips}X#1#{C:inactive} Chips)"
}
},
config = { extra = { x_chips = 1, x_chips_gain = .1 } },
rarity = 2,
atlas = 'jester',
pos = { x = 1, y = 0 },
cost = 5,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.x_chips, card.ability.extra.x_chips_gain } }
end,
calculate = function(self, card, context)
if context.joker_main then
return {
x_chips_mod = card.ability.extra.x_chips,
message = localize { type = 'variable', key = 'x_chips', vars = { card.ability.extra.x_chips } }
}
end
if context.before and not context.blueprint then
card.ability.extra.x_chips = card.ability.extra.x_chips + card.ability.extra.x_chips_gain
return {
message = 'Upgraded!',
colour = G.C.CHIPS,
card = card
}
end
end
}

normal crest
manic rune
#
SMODS.Joker {
    key = 'happi',
    loc_txt = {
        name = '{E:1}happi boi',
        text = {
            "Gains {C:white,X:chips}X#2#{} Chips",
            "per played hand",
            "{C:inactive}(Currently {C:white,X:chips}X#1#{C:inactive} Chips)"
        }
    },
    config = { extra = { x_chips = 1, x_chips_gain = .1 } },
    rarity = 2,
    atlas = 'jester',
    pos = { x = 1, y = 0 },
    cost = 5,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.x_chips, card.ability.extra.x_chips_gain } }
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            return {
                xchips = card.ability.extra.x_chips
            }
        end
        if context.before and not context.blueprint then
            card.ability.extra.x_chips = card.ability.extra.x_chips + card.ability.extra.x_chips_gain
            return {
                message = 'Upgraded!',
                colour = G.C.CHIPS,
                card = card
            }
        end
    end
} 
twin kayak
#

ok

manic rune
#

try this instead, maybe the problem is that x_chips_mod doesnt exist

twin kayak
#

oh

#

one sec

normal crest
#

also card = card is not needed

twin kayak
#

still not working

manic rune
#

whats your smods version

#

it should work, weird

stiff quiver
manic rune
#

...does that even run when the card is debuffed

normal crest
#

yeah it won't run if it's debuffed

manic rune
#

id suggest hooking to end_round() instead

hidden sable
normal crest
#

Look where it is in the vanilla localization files

hidden sable
#

true

stiff quiver
manic rune
#
local er_ref = end_round
function end_round()
   er_ref()
   for _,v in ipairs(G.playing_cards) do
   SMODS.debuff_card(v,false,"fliter")
   end
   --do the same for G.jokers.cards
end
snow vale
#

how can i make a blind that changes the suit it debuffs every hand?

stiff quiver
stiff quiver
split sleet
#

I am currently making a mod which adds new face cards to the game. I have one here, the Fool, which goes above a ten, and behind another new face card. Outside of this, what else should I do to enforce the new order of cards?

    hc_atlas = 'RF_Cards_hc',
    lc_atlas = 'RF_Cards',
    
    
    hidden = true,

    key = 'Fool',
    card_key = 'F',
    face_nominal = 0.1
    face = true
    pos = { x = 0 },
    nominal = 1,
    strength_effect = {
            fixed = 1,
            random = false,
            ignore = false
        },
    next = {'P', 'Tr', 'M' },
    
    RF_prev= { '10' },
    
    shorthand = 'F',
    
    in_pool = RF_rankCheck,
} ```
```function init_prev_rank_data()
    print("Initialize Remaining Previous Rank Data")
    for _, rank in pairs(SMODS.Ranks) do
        
        --Initialize
        --In case the rank table does not have prev existed
        --Base rank and ROYAL FAM one has them defined manually by default
        if not rank.RF_prev then
            rank.RF_prev= {}
        end
        
        next_rank_list = rank.next
        
        for i=1, #next_rank_list do
            local next_rank = SMODS.Ranks[next_rank_list[i]]
            local RF_prev = next_rank.RF_prev or {}
            
            if not table_has_value(RF_prev, rank.key) then
                table.insert(RF_prev, rank.key)
                next_rank.RF_prev = RF_prev
            end
        end
    end
end

function getPoolRankFlagEnable(rank)
    return (G.GAME and G.GAME.pool_flags[rank] or false)
end




local function RF_rankCheck(self, args)
    if args and args.initial_deck then
        return false
    end
    
    return getPoolRankFlagEnable(self.key)
end



SMODS.Ranks['T'].strength_effect = {
            fixed = T,
            random = false,
            ignore = false
        }
SMODS.Ranks['T'].next = {'F', 'P', 'Tr'}```
#

This is what I have so far, but do I need some type of override as well?

red flower
#

this doesnt seem correct

gilded blaze
red flower
#

it doesnt lag too much so that seems good

#

at least not more than normal i mean

gilded blaze
#

there's a temporary backward compat I think

#

already commited

#

does that not work on the display

red flower
#

im trying to use the new function, i just put the wrong value there i think

gilded blaze
#

oof

red flower
#

ok its fine now and it doesnt lag too much

#

so im just pushing this

#

someone else with a worse pc can optimize jokerdisplay

gilded blaze
#

my Mac was never meant to handle JokerDisplay in the first place

#

3 fps braindead

#

probably going down to 1

#

should there be an option

#

to only update the display when necessary instead of the standard 10 fps

snow vale
daring fern
snow vale
red flower
snow vale
stiff quiver
# snow vale and how do i update it?

i dont know how the variable for the blind thing is called, but it would be what somethingcom said in a context, probably context.after i think

hidden sable
#

how can i check how many discards the player had at the end of the round

snow vale
#

this is what i have

gilded blaze
stiff quiver
red flower
gilded blaze
#

it's ok, no rush

wind steppe
#

how do i make the game ignore if you have enough money to buy something?

wind steppe
red flower
#

you'd assume wrong

#

it changes the button itself

wind steppe
#

wait what do i do then

#

cant find the function in the code

gilded blaze
#

it's in functions/button_callbacks.lua

#

e.config.button is the callback function pressing the button would do

#

setting it to nil is the same as making the button do nothing

hidden sable
#

how would a make a thing where theres a 1 in 8 chance to make an item in the shop free

#

any item can be a voucher, joker, booster

#

actually scratch vouchers

#

seems too op

stiff quiver
# snow vale

try blind.ability.debuffed.suit? if not no idea what the name of the variable is

snow vale
#

ok ill try

hidden sable
#

isnt there a coupon thing

#

for boosters and jokers

daring fern
hidden sable
#

how can i activate it for a random card in shop

#

like boosters plus top region

daring fern
snow vale
#

ok

stiff quiver
#

oh yeah, i forget self is a thing

snow vale
#

it wont crash now, but the debuffed suit doesnt changes

stiff quiver
#

try making it print the suit to see if it changes?

snow vale
#

ok

daring fern
# hidden sable like boosters plus top region
if context.starting_shop then
    for k, area in pairs({G.shop_jokers, G.shop_booster}) do
        for k, v in pairs(area.cards) do
            if pseudorandom("seed") < G.GAME.probabilities.normal / 8 then
                v.ability.couponed = true
            end
        end
    end
end
```?
snow vale
tawdry oriole
#

the overlay menu is used for full-screen ui but is there anything i could use for a smaller portion of the screen?

snow vale
#

i used this

#

imma try smthing

stiff quiver
#

print self.debuff.suit instead cause i dont think thats what you want to see

red flower
tawdry oriole
#

alright

snow vale
hidden sable
stiff quiver
snow vale
#

wait

#

if i restart run

#

the debuffed does change

daring fern
hidden sable
pure salmon
#

how do i modify a custom consumables spawn rate in the shop (this is for a voucher)

stiff quiver
gilded blaze
hidden sable
snow vale
stiff quiver
#

yeah, after changing the suit

snow vale
hidden sable
gilded blaze
stiff quiver
snow vale
#

not working 😔

stiff quiver
#

can someone smarter than me help?

snow vale
#

wait, maybe using the api method for recalc_debuff?