#đŸ’»ăƒ»modding-dev

1 messages · Page 121 of 1

wintry solar
#

I actually can't believe that thunk updates values like steel count in update

forest hinge
#

ok, let me try to restructure this without using update

frosty dock
#

Balatro has severe solo dev syndrome

split copper
fallen tendon
tidal steppe
#

i recently made deck that starts you on ante 2. im wondering if instead is there a way to skip you to the ante 1 boss shop? so just before ante 2. giving you a single shop before really starting?

stiff locust
#

when I was making my steel joker fusion I just made it update during context.before and every context that involved adding or removing cards

fallen tendon
#

at all

frosty dock
#

he did not, in fact, remove it

tidal steppe
#

XD

forest hinge
#

any gamedev codebase is guaranteed to have some junk in it. if it's good enough to support the complexity of an award-winning game then its a good enough codebase imo

wintry solar
#

it looks like he has a load of stuff that calculates every frame

fallen tendon
#

the entirety of create_card has these three comments

#

so descriptive

frosty dock
#

it's a great game no questions asked, but solo dev syndrome is very real

split copper
#

better a game that exists than doesn't

fallen tendon
#

^^^^

#

i will never forgive him for glass joker tho

stiff locust
#

what happened to glass joker

frosty dock
#

we all would write code like this if we knew no one was gonna review it to get it merged

fallen tendon
hardy viper
stiff locust
#

good to be thorough

fallen tendon
wintry solar
#

I write code like this even knowing people might look at it 🙃

hardy viper
#

i feel like the real crime in that situation would be packing create_card instead of Card:init

fallen tendon
#

that function has left me stumped for hours

wintry solar
#

you screenshotted get_current_pool though?

fallen tendon
#

shoot lol

split copper
fallen tendon
#

i am an idiot

#

everything i was saying about create_card

#

its actually that one

#

im sorry

frosty dock
fallen tendon
#

but yeah get_current_pool is an evil function birthed from hell itself

edgy reef
#

idk why you think that it looks fine. Like it's not good but not that kind of atrocity.

fallen tendon
#

ok

#

this one is just stupid tho

edgy reef
#

That is an atrocity

wintry solar
#

at least thunk uses sensible variable names

frosty dock
#

nothing compares to Card:calculate_joker in terms of atrocity

fallen tendon
#

why the hell do all the edition consumables SHARE THE SAME CODE

fallen tendon
cerulean rose
frosty dock
#

well

rare bobcat
#

How would I make a joker gain mult based on every copy of that joker (gains 0.5x per activation per copy of that joker)

frosty dock
#

it's ordered

#

by contexts

fallen tendon
#

ye

wintry solar
#

the edition consumables is easy to understand what it does I just have no idea why it's written that way

fallen tendon
#

you can just use ctrl f to navigate

cerulean rose
#

not the same but triggers on other joker

#

might be useful

fallen tendon
#

ehhhhh not really

frosty dock
#

yeha of course

#

but like

fallen tendon
#

seems more like something like stone joker

frosty dock
#

why is one joker's effects in like 4 different places in the code

fallen tendon
#

in which case it would be in update

cerulean rose
stiff locust
fallen tendon
wintry solar
#

no don't normalise counting effects in update

fallen tendon
#

and oh god i hate glass joker

hardy viper
#

theres also 1 comment not 3

fallen tendon
frosty dock
cerulean rose
frosty dock
#

and there's other individual effects sprinkled across all the other functions too

fallen tendon
#

whatever

#

this is the dumbest argument ever

rare bobcat
frosty dock
rare bobcat
#

Ctrl + f isn’t helping me

cerulean rose
fallen tendon
#

lets just accept that balatro is held together by duct tape and prayers but if it ain broke, dont fix it

stiff locust
#

can we just accept that Every played card counts in scoring

frosty dock
#

I do

#

except if it ain't broke I might still fix it

fallen tendon
stiff locust
#

what do you mean nope

wintry solar
#

talking to people who have been fixing unbroken things for the past X months

cerulean rose
#

have you literally ever played balatro

tepid crow
wintry swallow
#

if it ain't broke it'll probably break the instant anyone tries to do anything outlandish with it

#

at least that's how the blind system went

fallen tendon
#

still waiting for the day that local thunk ships the game with the debug menu enabled

cerulean rose
fallen tendon
#

someone get me into the icu

#

im being seperated from my copium

stiff locust
#

how would getting into the icu help you they just make movies

wintry solar
#

lets talk about how good better calc is omg you can return chips from any context and it will be happy with it

sick sparrow
#

how to not perform unnecessary commands when exiting a run? (like giving 22 tarots when exiting a run)

viscid bough
#

Yall im attempting to make a mod, and im really confused on some of this stuff. Some of the example mods i found have a large block of comments at the top that say the mod name and description and stuff. And then others have a json file that says the same things. Is there a reason for this?

fallen tendon
wintry swallow
stiff locust
cerulean rose
fallen tendon
stiff locust
#

anyone got a template file I can grab

wintry solar
#

on the wiki linked above

wintry swallow
#

there is one in the mod metadata link no?

rare bobcat
fallen tendon
#

i know the header is worse

#

but i kinda prefer it

cerulean rose
fallen tendon
#

it just feels wrong to use json and i dont know why

stiff locust
#

i don't know how to just

manifest a json file

cerulean rose
#

do you know how to copy-paste

stiff locust
#

yeah

wintry swallow
#

you just like

#

make a text file

#

and change the extension to .json

stiff locust
#

what

cerulean rose
#

wdym what

wintry swallow
#

yeah json files are just text

#

they're not special. they're just text

#

it's the content of the file that matters

stiff locust
#

oh my god it fucking worked

#

what

#

how long has that been a thing???

wintry swallow
#

since the filesystem was invented

#

so uh about the late 1970s?

sick sparrow
#

give luchador when there are no luchadors in G.jokers?

wintry solar
#

yeah how else are you making files

wintry swallow
cerulean rose
rare bobcat
#

I rewatched te same tutorial 20 times just to get something kind of working so can somebody tell me what if context.other_joker and context.other_joker.ability.set == "Joker" then in the cryptid mod luigi joker does (I know what the if and then are but I'm confused on everything else)

wintry solar
rare bobcat
#

I only know about 10% of what I’m doing and there’s maybe 2 YouTube tutorials for this

rare bobcat
wintry swallow
#

that sure seems to be what that line does yes

rare bobcat
#

How would I make it be a specific type of joker?

#

Replace “Joker” with the name of the joker?

wintry swallow
#

preferably checking its center_key

cerulean rose
wintry swallow
#

that's its ID and will not break if the user loads a different language

#

(...unless joker names don't change internally and are just loc'd later, i wouldn't put that past thunk...)

wintry solar
#

you're using the newest smods which completely rewrites calculation

#

thats why you're crashing

cerulean rose
#

i have this code so far

local hook3 = Card.calculate_joker
function Card:calculate_joker(context)
    if not (G.GAME.blind.name == "bl_pencil_arrow" and (context.repetition or context.retrigger_joker_check)) then
        return hook3(self, context)
    end
end

local hook4 = Card.calculate_seal
function Card:calculate_seal(context)
    if not (G.GAME.blind.name == "bl_pencil_arrow" and context.repetition) then
        return hook4(self, context)
    end
end

local hook5 = G.FUNCS.evaluate_play
G.FUNCS.evaluate_play = function(e)
    local ret = hook5(e)
    for k, v in ipairs(G.GAME.blind.debuffs or {}) do
        SMODS.debuff_card(v, false, "bl_pencil_arrow")
        SMODS.recalc_debuff(v)
    end
    G.GAME.blind.debuffs = nil
    return ret
end
rare bobcat
#

How would I then change the amount of xmult that a joker gives

cerulean rose
#

use config

rare bobcat
cerulean rose
#

constellation

forest hinge
#

this is basically just a simple lua syntax question (since I have no idea how scope works in lua...). I'm looking to define a helper function recalculate_steel_tally within my take_ownership on steel joker, just so I can avoid copy+pasting the same code in two places. What's the right place to put that? I've tried a few so far and just getting various levels of syntax error/nil values

rare bobcat
cerulean rose
#

card.lua

dusk shoal
#

chat this is just an idea but

forest hinge
#

when I do that, pairs(G.playing_cards) starts to complain which made me think that was missing some context

dusk shoal
#

what would be cooler? 1 in 4 chance to not consume a discard, or the same but for a hand?

#

so like when you discard/play a hand, the counter has a chance to just not go down basically

forest hinge
#

1st one imo

dusk shoal
#

yeah feels a little more interesting

rare bobcat
#

Maybe have both

#

Just as separate cards

#

Hands would be broken with 2 copies of OA6

dusk shoal
#

mhm

#

infinite hands and discards

rare bobcat
#

Is there a way to make it cap at a certain probability?

dusk shoal
#

as long as you have enough cards in your deck

dusk shoal
#

if g.game.probability > 2,
2 in 4 chance

#

so you just automatically set it to 1 in 2 so its not

#

kinda just a free win

rare bobcat
#

calculate = function(self,card,context)
if context.other_joker and context.other_joker.ability.set == "BORBJOKER" then
return{
self.ability.x_mult = self.ability.x_mult + self.ability.extra
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,

forest hinge
#

oh wait a lot is wrong with this

#

haha

#

nvm let me clean this up

rare bobcat
cerulean rose
#

mismatched {}

sick sparrow
cerulean rose
#

also why are you returning self.ability.x_mult = self.ability.x_mult + self.ability.extra

cerulean rose
rare bobcat
cerulean rose
#

thats not a return value

rare bobcat
#

I know something is missing but I don’t know what

#

That’s why I asked

cerulean rose
#

don't return that, just put it in the function

#
calculate = function(self,card,context)
        if context.other_joker and context.other_joker.ability.set == "BORBJOKER" then
            card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.scaling
        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,

start with this

#

oh also self doesn't have an ability field

#

use card like in the return

cerulean rose
#

can i have the whole joker code

rare bobcat
#

I followed a tutorial but it didn’t give me the information needed to do what I’m trying to do

wintry solar
#

thats not how context.other_joker works

rare bobcat
#

I figured

cerulean rose
wintry solar
#

you want a joker that counts other jokers?

#

and gives xmult per other joker?

rare bobcat
#

Per copies of itself but yes

#

Or copies of another joker I plan to add

#

But I want to finish the copies of itself first

cerulean rose
#

also a bunch of cryptid's cryptidm jokers do something like that

wintry solar
#
if context.joker_main then
  local other_count = #SMODS.find_card('key_of_joker') --note if this is the same as this joker you probably want to subtract 1
  return {
    xmult = card.ability.extra.Xmult + (other_count * card.ability.extra.gain)
  }
end
#

do something like this

cerulean rose
rare bobcat
#

Game did not crash

#

Game crashed

cerulean rose
#

whole joker code please

rare bobcat
#

How do I do the code formatting

cerulean rose
#

triple backticks (```)

wintry solar
#

use ```lua at the start and ``` at the end

rare bobcat
#
--- MOD_NAME: Leaf Blower Revolution (but in Balatro)
--- MOD_ID: LBR
--- MOD_AUTHOR: Tax Fraud
--- MOD_DESCRIPTION: I copied a tutorial to get this far and now I'm confused
--- PREFIX: LBR
----------------------------------------------
------------MOD CODE -------------------------


SMODS.Atlas{
    key = 'Jokers',
    path = 'Jokers.png',
    px = 71,
    py = 95
}
SMODS.Joker{
    key = 'BORBJOKER',
    loc_txt = {
        name = 'Borb Joker',
        text = {
          'Gain {X:mult,C:white}X#1#{} Mult per activation',
          'for every other Borb Joker',
          'or Borbiana Jonesker', -- Not implemented
          '(Currently {X:mult,C:white}X#1#{})'
        },
        
    },
    atlas = 'Jokers', 
    rarity = 2, 
    cost = 5,
    unlocked = true, 
    discovered = true,
    blueprint_compat = true,
    eternal_compat = false,
    perishable_compat = false,
    pos = {x = 0, y = 0}, 
    config = { 
      extra = {
        Xmult = 1.5 
      }
    },
    loc_vars = function(self,info_queue,center)
        info_queue[#info_queue+1] = G.P_CENTERS.j_joker
        return {vars = {center.ability.extra.Xmult}} 
    end,
    check_for_unlock = function(self, args)
        if args.type == 'derek_loves_you' then 
            unlock_card(self)
        end
        unlock_card(self) 
    end,
    calculate = function(self,card,context)
        if context.joker_main then
  local other_count = #SMODS.find_card('BORBJOKER') --note if this is the same as this joker you probably want to subtract 1
  return {
    xmult = card.ability.extra.Xmult + (other_count * card.ability.extra.gain)
  }
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,
    in_pool = function(self,wawa,wawa2)
        return true
    end,
    calc_dollar_bonus = function(self,card)
        return 123
    end,
}


  
----------------------------------------------
------------MOD CODE END----------------------
    ```
cerulean rose
#

yeah if u put lua after the backticks it highlights it

rare bobcat
#

Random lua at the start is not intentional

wintry solar
#

1 - you need a gain value in your config,
2 - you need to delete the other joker_main stuff
3 - that's not the correct key

crisp coral
#

wuh oh bettercalc 2 merged

wintry solar
#

4 - delete the in_pool and calc_dollar_bonus parts

crisp coral
#

how will this affect the trout population

cerulean rose
#

this broke fucking everything

wintry solar
cerulean rose
crisp coral
#

it's fucking exams season you can't do this to me

rare bobcat
tidal steppe
#

does anyone know how to fetch the number of skipped blinds in a run?

rare bobcat
#

Maybe check the throwback joker

#

'''
--- STEAMODDED HEADER
--- MOD_NAME: Leaf Blower Revolution (but in Balatro)
--- MOD_ID: LBR
--- MOD_AUTHOR: Tax Fraud
--- MOD_DESCRIPTION: I copied a tutorial to get this far and now I'm confused
--- PREFIX: LBR

------------MOD CODE -------------------------

SMODS.Atlas{
key = 'Jokers',
path = 'Jokers.png',
px = 71,
py = 95
}
SMODS.Joker{
key = 'BORBJOKER',
loc_txt = {
name = 'Borb Joker',
text = {
'Gain {X:mult,C:white}X#1#{} Mult per activation',
'for every other Borb Joker',
'or Borbiana Jonesker', -- Not implemented
'(Currently {X:mult,C:white}X#1#{})'
},

},
atlas = 'Jokers', 
rarity = 2, 
cost = 5,
unlocked = true, 
discovered = true,
blueprint_compat = true,
eternal_compat = false,
perishable_compat = false,
pos = {x = 0, y = 0}, 
config = { 
  extra = {
    xmult = 1
    card.ability.extra.gain = 0.5
  }
},
loc_vars = function(self,info_queue,center)
    info_queue[[#1116390750314307698](/guild/1116389027176787968/channel/1116390750314307698/)_queue+1] = G.P_CENTERS.j_joker
    return {vars = {center.ability.extra.Xmult}} 
end,
check_for_unlock = function(self, args)
    if args.type == 'derek_loves_you' then 
        unlock_card(self)
    end
    unlock_card(self) 
end,
calculate = function(self,card,context)
    if context.joker_main then

local other_count = #SMODS.find_card('LBRBORBJOKER') --note if this is the same as this joker you probably want to subtract 1
return {
xmult = card.ability.extra.Xmult + (other_count * card.ability.extra.gain)
}
end
end,
in_pool = function(self,wawa,wawa2)
return true
end,
end,
}


------------MOD CODE END----------------------
'''

#

Weird

#
--- MOD_NAME: Leaf Blower Revolution (but in Balatro)
--- MOD_ID: LBR
--- MOD_AUTHOR: Tax Fraud
--- MOD_DESCRIPTION: I copied a tutorial to get this far and now I'm confused
--- PREFIX: LBR
----------------------------------------------
------------MOD CODE -------------------------


SMODS.Atlas{
    key = 'Jokers',
    path = 'Jokers.png',
    px = 71,
    py = 95
}
SMODS.Joker{
    key = 'BORBJOKER',
    loc_txt = {
        name = 'Borb Joker',
        text = {
          'Gain {X:mult,C:white}X#1#{} Mult per activation',
          'for every other Borb Joker',
          'or Borbiana Jonesker', -- Not implemented
          '(Currently {X:mult,C:white}X#1#{})'
        },
        
    },
    atlas = 'Jokers', 
    rarity = 2, 
    cost = 5,
    unlocked = true, 
    discovered = true,
    blueprint_compat = true,
    eternal_compat = false,
    perishable_compat = false,
    pos = {x = 0, y = 0}, 
    config = { 
      extra = {
        xmult = 1
        card.ability.extra.gain = 0.5
      }
    },
    loc_vars = function(self,info_queue,center)
        info_queue[#info_queue+1] = G.P_CENTERS.j_joker
        return {vars = {center.ability.extra.Xmult}} 
    end,
    check_for_unlock = function(self, args)
        if args.type == 'derek_loves_you' then 
            unlock_card(self)
        end
        unlock_card(self) 
    end,
    calculate = function(self,card,context)
        if context.joker_main then
  local other_count = #SMODS.find_card('LBRBORBJOKER') --note if this is the same as this joker you probably want to subtract 1
  return {
    xmult = card.ability.extra.Xmult + (other_count * card.ability.extra.gain)
  }
end
    end,
    in_pool = function(self,wawa,wawa2)
        return true
    end,
    end,
}


  
----------------------------------------------
------------MOD CODE END----------------------
    ```
wintry solar
#

just gain = 0.5

rare bobcat
#

Ah

wintry solar
#

and Xmult = 1

rare bobcat
#

But other than that it should work?

wintry solar
#

assuming your smods is up to date, yes

#

no

#

the key is still wrong

#

j_LBR_BORDJOKER

rare bobcat
#

Ah

#

The joker is not in the collection

tidal steppe
#
        elseif context.skip_blind then
            if self.ability.name == 'Throwback' and not context.blueprint then
                G.E_MANAGER:add_event(Event({
                    func = function() 
                        card_eval_status_text(self, 'extra', nil, nil, nil, {
                            message = localize{type = 'variable', key = 'a_xmult', vars = {self.ability.x_mult}},
                                colour = G.C.RED,
                            card = self
                        }) 
                        return true
                    end}))
            end
            return

doesnt appear to be a stored value, but just updating the joker. but i need this for an unlock requirement. if my unlock triggers on context.skip_blind. is there some way for it to store that value? cuz i only want to unlock if x blinds have been skipped by run win

cerulean rose
#

also MOD_AUTHOR needs to be in brackets

crimson fern
rare bobcat
#

Still not there

cerulean rose
#

do you have latest steammodded?

rare bobcat
cerulean rose
rare bobcat
#

I forgot to save

crimson fern
rare bobcat
cerulean rose
crimson fern
#

oh so do i need a earlier version

tidal steppe
#

ill make sure not to git pull XD

rare bobcat
#

It looks like I’m missing a bracket

cerulean rose
#

anything before this is hopefully ok

rare bobcat
#
--- MOD_NAME: Leaf Blower Revolution (but in Balatro)
--- MOD_ID: LBR
--- MOD_AUTHOR: [Tax Fraud]
--- MOD_DESCRIPTION: Mod inspired by Leaf Blower Revolution
--- PREFIX: LBR
----------------------------------------------
------------MOD CODE -------------------------


SMODS.Atlas{
    key = 'Jokers',
    path = 'Jokers.png',
    px = 71,
    py = 95
}
SMODS.Joker{
    key = 'BORBJOKER',
    loc_txt = {
        name = 'Borb Joker',
        text = {
          'Gain {X:mult,C:white}X#1#{} Mult per activation',
          'for every other Borb Joker',
          'or Borbiana Jonesker', -- Not implemented
          '(Currently {X:mult,C:white}X#1#{})'
        },
        
    },
    atlas = 'Jokers', 
    rarity = 2, 
    cost = 5,
    unlocked = true, 
    discovered = true,
    blueprint_compat = true,
    eternal_compat = false,
    perishable_compat = false,
    pos = {x = 0, y = 0}, 
    config = { 
      extra = {
        Xmult = 1
        gain = 0.5
      }
    },
    loc_vars = function(self,info_queue,center)
        info_queue[#"Info"_queue+1] = G.P_CENTERS.j_joker
        return {vars = {center.ability.extra.Xmult}} 
    end,
    check_for_unlock = function(self, args)
        if args.type == 'derek_loves_you' then 
            unlock_card(self)
        end
        unlock_card(self) 
    end,
    calculate = function(self,card,context)
        if context.joker_main then
  local other_count = #SMODS.find_card('j_LBR_BORBJOKER') --note if this is the same as this joker you probably want to subtract 1
  return {
    xmult = card.ability.extra.Xmult + (other_count * card.ability.extra.gain)
  }
end
    end,
    in_pool = function(self,wawa,wawa2)
        return true
    end,
    end,
}


  
----------------------------------------------
------------MOD CODE END---------------------- ```
crimson fern
#

@cerulean rose could you please link me to a working version

rare bobcat
#

Oh wait wrong thing

cerulean rose
#

i am having great difficulty finding one

crimson fern
#

me too

sick sparrow
#

ante 39 is broken as always

rare bobcat
crisp coral
#

i read the desc and thought you were reimplementing the entire game

cerulean rose
#

missing comma in config table

rare bobcat
#

Ah

crimson fern
#

does anyone have a working smod file for the latest cryptid version

wintry solar
rare bobcat
#

I remember a substitute teacher I had going on about how she made a website to show her friends but it crashed because she forgot a single bracket or something like that

#

Also another crash

crimson fern
#

i was told someone fucked up the latest smod release. thats why i asked

#

@wintry solar

rare bobcat
#

An extra comma

#

I think

#

I had

wintry solar
#

why did you ping me

crimson fern
#

check the message

wintry solar
#

yes and I have already answered your prior question about a link

cerulean rose
rare bobcat
#
--- MOD_NAME: Leaf Blower Revolution (but in Balatro)
--- MOD_ID: LBR
--- MOD_AUTHOR: [Tax Fraud]
--- MOD_DESCRIPTION: Mod inspired by Leaf Blower Revolution
--- PREFIX: LBR
----------------------------------------------
------------MOD CODE -------------------------


SMODS.Atlas{
    key = 'Jokers',
    path = 'Jokers.png',
    px = 71,
    py = 95
}
SMODS.Joker{
    key = 'BORBJOKER',
    loc_txt = {
        name = 'Borb Joker',
        text = {
          'Gain {X:mult,C:white}X#1#{} Mult per activation',
          'for every other Borb Joker',
          'or Borbiana Jonesker', -- Not implemented
          '(Currently {X:mult,C:white}X#1#{})'
        },
        
    },
    atlas = 'Jokers', 
    rarity = 2, 
    cost = 5,
    unlocked = true, 
    discovered = true,
    blueprint_compat = true,
    eternal_compat = false,
    perishable_compat = false,
    pos = {x = 0, y = 0}, 
    config = { 
      extra = {
        Xmult = 1,
        gain = 0.5
      }
    },
    loc_vars = function(self,info_queue,center)
        info_queue[#info_queue+1] = G.P_CENTERS.j_joker
        return {vars = {center.ability.extra.Xmult}} 
    end,
    check_for_unlock = function(self, args)
        if args.type == 'derek_loves_you' then 
            unlock_card(self)
        end
        unlock_card(self) 
    end,
    calculate = function(self,card,context)
        if context.joker_main then
  local other_count = #SMODS.find_card('j_LBR_BORBJOKER') --note if this is the same as this joker you probably want to subtract 1
  return {
    xmult = card.ability.extra.Xmult + (other_count * card.ability.extra.gain)
  }
end
    end,
    in_pool = function(self,wawa,wawa2)
        return true
    end,
    end,
}


  
----------------------------------------------
------------MOD CODE END---------------------- ``` (same crash reason, unexpected symbol on line 65 near end)
wintry solar
#

you have an extra end at the end

rare bobcat
#

That makes sense

#

It works

cerulean rose
# cerulean rose i'm getting a bluescreen when launching

Oops! The game crashed:
Syntax error: game.lua:2507: duplicate label 'continue'

Additional Context:
Balatro Version: 1.0.1n-FULL (best guess)
Modded Version: 1.0.0~ALPHA-1306b-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.6.0

Stack Traceback

(3) C function 'function: 0x2003cf38'
(4) global C function 'require'
(5) main chunk of file 'main.lua' at line 1876
(6) global C function 'require'
(7) LÖVE function at file 'boot.lua:323' (best guess)
Local variables:
c = table: 0x2003a5a8 {identity:false, version:11.5, accelerometerjoystick:true, modules:table: 0x2003a5f8 (more...)}
openedconsole = boolean: false
confok = boolean: true
conferr = nil
(8) global C function 'xpcall'
(9) LÖVE function at file 'boot.lua:362' (best guess)
Local variables:
result = boolean: true
(10) global C function 'xpcall'
(11) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.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"])

crimson fern
rare bobcat
#

I have no doubt I’ll be back but thanks for the help so far

cerulean rose
crimson fern
#

then where is the latest version??

cerulean rose
#

you have to download the repo manually

crimson fern
#

what is a repo dawg

cerulean rose
#

repository

#

the steammodded code page

crimson fern
#

ok where do i find that

cerulean rose
crimson fern
cerulean rose
#

yes

zealous glen
#

Nice and thank you :D

crimson fern
#

ok thanks sorry for the hassle

cerulean rose
wintry swallow
#

otherwise use it as you please

cerulean rose
#

finally my torture has concluded

zealous glen
# wintry swallow np, if you use it please like write my name somewhere

I'm not sure I will but it is something to consider. I have two Jokers that provide a benefit and a challenge and I wanted a third to complete a set.

I also have a different Joker that provides a benefit but needs a drawback. I wanted to make the drawback bigger, so I was thinking about introducing a second Boss to each Boss, as it's consistent with other mechanics, but I wasn't sure about it (especially because it might still be too easy)

#

So making every Blind a Boss sounds like a good alternative to either of those

nova finch
#

how do i make an enhancement that has a chance to destroy itself like a glass card does?

crimson fern
zealous glen
crimson fern
#

i just wanna play cryptid dude

zealous glen
cerulean rose
#

make sure to use the link from above

nova finch
cerulean rose
#

bettercals broken af

wintry swallow
cerulean rose
#

everything crashes

zealous glen
#

and it's a relevant update

zealous glen
wintry swallow
#

more specifically, "random joker of X rarity"

cerulean rose
#

right make sure to use the link above

nova finch
cerulean rose
#

dont update btw

wintry swallow
#

when entering into the challenge, they will not actually spawn as jokers in game but instead they will be replaced

crimson fern
cerulean rose
#

what url did u download from

zealous glen
zealous glen
crimson fern
cerulean rose
#

yeah thats too new

wintry swallow
crimson fern
#

cripes

zealous glen
# nova finch k

The new update might be a bit prone to breaking since a lot changed, but the main feature is facilitating modded Enhancements and Editions, so, like, I don't think using an old version helps you

cerulean rose
cerulean rose
zealous glen
forest hinge
#

out of curiosity, is there a nice established way to prevent multiple copies of the same joker from stacking

#

or is it just kinda figure it out case by case

zealous glen
# wintry swallow why specifically me, i'm curious

also have you added a hover UI on any of your challenge's texts? IIRC that would make the "scaling" easier to discern. Maybe you could make the Blind description pop up when hovering over the Blind name

wintry swallow
#

i would have to do SO much more bullshit to the text preprocessor to get tooltips working

forest hinge
#

I've got a joker that does some stuff on add_to_deck and remove_from_deck, but it should really only happen with the first copy of the joker you get

wintry swallow
#

there is already a very large dose of bullshit done to the text preprocessor so i'm saving myself the headache for now

zealous glen
#

Can't you copy what decks do?

wintry swallow
#

well it's not a custom object. it's the vanilla challenge select menu

#

ah

#

let me check

#

ha! yeah no

#

cannot be done

forest hinge
#

it's making gold cards count as steel and vice versa (blindingly original, I know) which I do by adding an h_x_mult mod to gold cards, which creates the problem of then stacking with multiple copies of the joker

zealous glen
crimson fern
wintry swallow
zealous glen
wintry swallow
#

which

#

god

#

i don't wanna do that right now

zealous glen
#

I think it's worth considering for later

hardy viper
#

i should add pregnancy to balatro

forest hinge
#

but maybe I'm storing the global variable in the wrong place

zealous glen
hardy viper
crimson fern
#

i think the other guy helping me got tired of the bullshit could someone else help me please

zealous glen
#

Create a subtable in the init_game_object return dictionary for your mod and store it there

rare bobcat
#
--- MOD_NAME: Leaf Blower Revolution (but in Balatro)
--- MOD_ID: LBR
--- MOD_AUTHOR: [Tax Fraud]
--- MOD_DESCRIPTION: Mod inspired by Leaf Blower Revolution
--- PREFIX: LBR
----------------------------------------------
------------MOD CODE -------------------------


SMODS.Atlas{
    key = 'Jokers',
    path = 'Jokers.png',
    px = 71,
    py = 95
}




SMODS.Joker{
    key = 'BORBJOKER',
    loc_txt = {
        name = 'Borb Joker',
        text = {
          'Gain {X:mult,C:white}X#1#{} Mult per activation',
          'for every other Borb Joker',
          'or Borbiana Jonesker', -- Not implemented
          '(Currently {X:mult,C:white}X#1#{})'
        },
        
    },
    atlas = 'Jokers', 
    rarity = 2, 
    cost = 5,
    unlocked = true, 
    discovered = true,
    blueprint_compat = true,
    eternal_compat = false,
    perishable_compat = false,
    pos = {x = 0, y = 0}, 
    config = { 
      extra = {
        Xmult = 1,
        gain = 0.5
      }
    },
    loc_vars = function(self,info_queue,center)
        info_queue[#info_queue+1] = G.P_CENTERS.j_joker
        return {vars = {center.ability.extra.Xmult}} 
    end,
    check_for_unlock = function(self, args)
        if args.type == 'derek_loves_you' then 
            unlock_card(self)
        end
        unlock_card(self) 
    end,
    calculate = function(self,card,context)
        if context.joker_main then
  local other_count = #SMODS.find_card('j_LBR_BORBJOKER') --note if this is the same as this joker you probably want to subtract 1
  return {
    xmult = card.ability.extra.Xmult + (other_count * card.ability.extra.gain)
  }
end
    end,
    in_pool = function(self,wawa,wawa2)
        return true
    end,
}


  
----------------------------------------------
------------MOD CODE END---------------------- ``` It's not crashing but also not working properly. Also, when it says Gain {X:mult,C:white}X#1#{} Mult per activation it's displaying the mult variable and changing mult to gain just makes it white.
#

As for the not working properly, the score doesn’t add

wintry solar
#

screenshot your main screen

zealous glen
rare bobcat
#

The first x1 should be x0.5

sick sparrow
#

booster packs are unusable other than buying from shop

zealous glen
rare bobcat
zealous glen
rare bobcat
#

I tried that but realized I didn’t save

#

I can’t put what I want to say into words

zealous glen
#

try a bird call then

rare bobcat
#

But I tried and forgot to save but didn’t realize it until now

zealous glen
#

maybe an ostrich or swallow call

rare bobcat
#

Now it just says xnil

crimson fern
rare bobcat
#

I changed the 1 to a 2 but it says nil instead of 0.5

zealous glen
sick sparrow
#

how to add jokers and consumables to playing deck?

zealous glen
forest hinge
# zealous glen

still doesn't quite work for me. maybe something else in the way I have it set up.
something I notice happening is that when I return to main menu, I see remove_from_deck getting called multiple times and the global var ticks down to 0, but when I continue the run, I don't see add_to_deck getting called that many times, so the effect gets turned off even though I still have multiple copies.

zealous glen
forest hinge
#

noted, i'll look into that

wintry swallow
#

is this a normal amount to have written in 3 days

#

especially as my first mod...

zealous glen
#

everyone else is skill issue

#

(it's me I'm skill issue)

rare bobcat
# zealous glen because you didn't change `vars`

I copy some part of the vars function and change the 1 to a 2 and change the xmult to gain but what part do I copy without either a crash or a nil output (or am I going about this completely wrong)

zealous glen
viscid bough
#

Does anyone know how i can modify the Chip and Mult values with a joker card? I have an idea for something that would flip the value of chips and mult

zealous glen
#

I think thunk didn't use it

#

so just see if you can find it

#

swap or something IIRC

rare bobcat
zealous glen
wintry swallow
#

there's a lot of things thunk didn't use lol

zealous glen
#

I mean there's some leftover debug and demo stuff

wintry swallow
#

debug mode is still fully present in the game

zealous glen
#

There was also like an online championship demo or something which they partially removed

#

Yes but not accessible to players

#

just like swapping Chips and Mult

wintry swallow
#

i wrote a lovely patch which reenables it

#

but i think everyone has

zealous glen
#

no need for a patch

#

just need to change a variable

#

or use DebugPlus

#

which has extra functionality added on top

#

A patch sounds like a disproportionately hard way to do it

wintry swallow
#

did you know this is a part of vanilla debug mode

zealous glen
#

yes

rare bobcat
#
        return {vars = {center.ability.extra.mult}} 
    return {vars = {center.ability.extra.gain}} 
    end, ``` is this right?
zealous glen
#

no

wintry swallow
#

you cannot return two values

#

executing a return stops the rest of your function from executing

rare bobcat
#

So what do I do?

zealous glen
#

;P

wintry swallow
#

hey it was the easiest way i thought about doing it

#

...

#

i

#

it's fucking lua

#

nothing is constant

#

i could just have set _RELEASE_MODE to false

zealous glen
#

exactly

wintry swallow
#

fucking hell this is what you meant. oh man

zealous glen
zealous glen
wintry swallow
#

i have debugplus yes

#

i use its win ante button a lot

#

i made my thing before i installed it

zealous glen
#

I see

rare bobcat
#

I still don’t know how to make this work

#

And the functionality is also busted

wintry solar
zealous glen
wintry solar
#

they're also having functionality issues

zealous glen
#

anyways you want something like vars = {YOURFIRSTVARIABLE, YOURSECONDVARIABLE}

#

I thought that was someone else

#

trying to run Cryptid

rare bobcat
#

When the joker activates, it doesn’t add to xmult

forest hinge
wintry swallow
#

hey is 7bc9acd3164472a39f8f28d058ca97f4104dd4b3 the last steamodded commit before the calculation change that breaks everything?

zealous glen
#

right; could be new calc

forest hinge
#

removeFromDeck called 4x, addtodeck not called. still have 4 copies of the joker

zealous glen
wintry swallow
#

new calc's roll out was very poorly thought out in my opinion, it's starting to hit users of my mod because it breaks vanilla content

forest hinge
#

i'm on latest as of like 2 days ago

zealous glen
#

I mean

#

You're not supposed to expect non-breaking changes

#

during the alpha

crisp coral
#

bettercalc 2 fucks with vanilla?

rare bobcat
#

The moment I hovered over my joker it crashed

wintry solar
#

I'm pretty sure bettercalc doesn't change any vanilla stuff

wintry swallow
#

well i'm getting reports of foil and gold cards not working on my mod which does not touch them at all

#

so clearly something's up

crisp coral
#

i'll pulling bettercalc rn, will get back to you

wintry swallow
#

i believe enhancements don't work period in bettercalc

rare bobcat
#
--- MOD_NAME: Leaf Blower Revolution (but in Balatro)
--- MOD_ID: LBR
--- MOD_AUTHOR: [Tax Fraud]
--- MOD_DESCRIPTION: Mod inspired by Leaf Blower Revolution
--- PREFIX: LBR
----------------------------------------------
------------MOD CODE -------------------------


SMODS.Atlas{
    key = 'Jokers',
    path = 'Jokers.png',
    px = 71,
    py = 95
}




SMODS.Joker{
    key = 'BORBJOKER',
    loc_txt = {
        name = 'Borb Joker',
        text = {
          'Gain {X:mult,C:white}X#2#{} Mult per activation',
          'for every other Borb Joker',
          'or Borbiana Jonesker', -- Not implemented
          '(Currently {X:mult,C:white}X#1#{})'
        },
        
    },
    atlas = 'Jokers', 
    rarity = 2, 
    cost = 5,
    unlocked = true, 
    discovered = true,
    blueprint_compat = true,
    eternal_compat = false,
    perishable_compat = false,
    pos = {x = 0, y = 0}, 
    config = { 
      extra = {
        Xmult = 1,
        gain = 0.5
      }
    },
    loc_vars = function(self,info_queue,center)
        info_queue[#info_queue+1] = G.P_CENTERS.j_joker
        return {vars = {center.ability.extra.mult,center.ablity.extra.gain}} 
    end,
    check_for_unlock = function(self, args)
        if args.type == 'derek_loves_you' then 
            unlock_card(self)
        end
        unlock_card(self) 
    end,
    calculate = function(self,card,context)
        if context.joker_main then
  local other_count = #SMODS.find_card('j_LBR_BORBJOKER') --note if this is the same as this joker you probably want to subtract 1
  return {
    xmult = card.ability.extra.Xmult + (other_count * card.ability.extra.gain)
  }
end
    end,
    in_pool = function(self,wawa,wawa2)
        return true
    end,
}


  
----------------------------------------------
------------MOD CODE END----------------------
    ```
#

Crashes when I hover over the joker

wintry solar
#

ablity

wintry swallow
crisp coral
#

Crash on 1. creating a "Joker" (with DebugPlus), 2. adding Foil (with DebugPlus), 3. playing a hand

rare bobcat
#

It does this now

crisp coral
#

i shjould be turning off mods for this

rare bobcat
#

I swapped the problem

edgy reef
#

(much like how not returning two values in calculate_joker will break joker retriggers)

#

Cause enhancements 100% work if I don't have mods that mess with this

rare bobcat
#

The functionality is also still not working

zealous glen
crisp coral
#

oh fuck right

rare bobcat
#

It doesn’t add to xmult and I don’t know if it applies xmult

crisp coral
#

i forgot i hooked to eval_card

wintry solar
#

waht did you hook eval_card for?

edgy reef
crisp coral
#

the mess i showed you a few days ago

edgy reef
#

Although "enhancements not working at all" is likely something else

rare bobcat
#

I’m going to get the functionality working before I make the text work

wintry solar
#

oh yeah

crisp coral
#

yup both Foil (on Jokers) and Gold Cards don't work

rare bobcat
#

It doesn’t even apply xmult to the calculation

#

I think i might’ve accidentally deleted that part maybe

edgy reef
#

I think

#

maybe not xdd

wintry solar
#

foil 100% was working for me

crisp coral
#

i don't think Mult being given before Chips on Mult Cards is correct

wintry swallow
#

love having to tell end users this

rare bobcat
#

I accidentally put mult instead of xmult

edgy reef
#

Ok yaknow what

#

Imma document this

rare bobcat
#

It should display

#

I do need to get up somewhat early tomorrow

crisp coral
#

showcases:

  • Foil/Holo on Jokers not working
  • Gold Cards not working
  • Mult being given before Chips on Mult Cards
edgy reef
forest hinge
crisp coral
rare bobcat
#
  local other_count = #SMODS.find_card('j_LBR_BORBJOKER')
  return {
    xmult = card.ability.extra.Xmult + (other_count * card.ability.extra.gain)
  }
end ``` is not working for some reason
#

they're triggering with no change

edgy reef
#

No mods installed, just Steamodded goofed lmfao

wintry solar
#

oh god did the priority change fuck all the patches

crisp coral
#

lmao

edgy reef
#

Not sure how -10 priority means that patches hitting vanilla break but yeah

rare bobcat
#

Screen recording isn’t working with my computer so I’m just going to record with my phone and crop it a bit (and mute the audio)

wintry solar
#

well if someone has time to fix them right now that would be very appreciated but it is 2:30 and I need to be at work in 5 hours T_T

crisp coral
#

bettercalc2 moment

wintry solar
#

does it work fine with the patch priority set back to 0?

rare bobcat
#

It just does that

wintry solar
#

I mean I guess that's the only change since I last worked on it

#

so it should be okay at 0 for now

edgy reef
#

Other bugs reported still happen but no instant crash

#

Well I think othering things might also be whiffing?

rare bobcat
# rare bobcat
--- MOD_NAME: Leaf Blower Revolution (but in Balatro)
--- MOD_ID: LBR
--- MOD_AUTHOR: [Tax Fraud]
--- MOD_DESCRIPTION: Mod inspired by Leaf Blower Revolution
--- PREFIX: LBR
----------------------------------------------
------------MOD CODE -------------------------


SMODS.Atlas{
    key = 'Jokers',
    path = 'Jokers.png',
    px = 71,
    py = 95
}




SMODS.Joker{
    key = 'BORBJOKER',
    loc_txt = {
        name = 'Borb Joker',
        text = {
          'Gain {X:mult,C:white}X#2#{} Mult per activation',
          'for every other Borb Joker',
          'or Borbiana Jonesker', -- Not implemented
          '(Currently {X:mult,C:white}X#1#{})'
        },
        
    },
    atlas = 'Jokers', 
    rarity = 2, 
    cost = 5,
    unlocked = true, 
    discovered = true,
    blueprint_compat = true,
    eternal_compat = false,
    perishable_compat = false,
    pos = {x = 0, y = 0}, 
    config = { 
      extra = {
        Xmult = 1,
        gain = 0.5
      }
    },
    loc_vars = function(self,info_queue,center)
        info_queue[#info_queue+1] = G.P_CENTERS.j_joker
        return {vars = {center.ability.extra.Xmult,center.ability.extra.gain}} 
    end,
    check_for_unlock = function(self, args)
        if args.type == 'derek_loves_you' then 
            unlock_card(self)
        end
        unlock_card(self) 
    end,
    calculate = function(self,card,context)
        if context.joker_main then
  local other_count = #SMODS.find_card('j_LBR_BORBJOKER')
  return {
    xmult = card.ability.extra.Xmult + (other_count * card.ability.extra.gain)
  }
end

    end,
    in_pool = function(self,wawa,wawa2)
        return true
    end,
}


  
----------------------------------------------
------------MOD CODE END----------------------
    ``` This is the code, how do I fix this?
arctic lion
#

Xmult_mod

forest hinge
#

I have to head out for now but I'm curious if anyone else can repro.

  1. Create a joker, put some printouts in add_to_deck and remove_from_deck
  2. Start a game, spawn in some copies of your joker, observe the add_to_deck calls
  3. Play a hand, then return to main menu. Observe the remove_from_deck calls
  4. Continue run, observe lack of add_to_deck calls
rare bobcat
arctic lion
#

instead of xmult in your return

viscid bough
arctic lion
#

supported effects are mult_mod chip_mod Xmult_mod message etc.

rare bobcat
#

Does the capital matter for this?

arctic lion
#

capitals always matter for variable names

rare bobcat
#

Ok

wintry solar
rare bobcat
#

Now it’s just multiplying mult by 2

#

Which is weird because it should be 1

fading pier
#

is there any mods with an example joker similar to drivers license?

#

I was trying to make a joker similar to that

tall wharf
#

how do you make jokers look like it would fit in the game well

edgy reef
#

Some of these patches have 4 spaces inside the loop but vanilla has 2

rare bobcat
#

Oh wait

wintry solar
#

But they all worked before 😭

arctic lion
rare bobcat
#

It’s supposed to permanently upgrade xmult

fading pier
cold grotto
rare bobcat
#

Crash and code ``` --- STEAMODDED HEADER
--- MOD_NAME: Leaf Blower Revolution (but in Balatro)
--- MOD_ID: LBR
--- MOD_AUTHOR: [Tax Fraud]
--- MOD_DESCRIPTION: Mod inspired by Leaf Blower Revolution
--- PREFIX: LBR

------------MOD CODE -------------------------

SMODS.Atlas{
key = 'Jokers',
path = 'Jokers.png',
px = 71,
py = 95
}

SMODS.Joker{
key = 'BORBJOKER',
loc_txt = {
name = 'Borb Joker',
text = {
'Gain {X:mult,C:white}X#2#{} Mult per activation',
'for every other Borb Joker',
'or Borbiana Jonesker', -- Not implemented
'(Currently {X:mult,C:white}X#1#{})'
},

},
atlas = 'Jokers', 
rarity = 2, 
cost = 5,
unlocked = true, 
discovered = true,
blueprint_compat = true,
eternal_compat = false,
perishable_compat = false,
pos = {x = 0, y = 0}, 
config = { 
  extra = {
    Xmult = 1,
    gain = 0.5
  }
},
loc_vars = function(self,info_queue,center)
    info_queue[#info_queue+1] = G.P_CENTERS.j_joker
    return {vars = {center.ability.extra.Xmult,center.ability.extra.gain}} 
end,
check_for_unlock = function(self, args)
    if args.type == 'derek_loves_you' then 
        unlock_card(self)
    end
    unlock_card(self) 
end,
calculate = function(self,card,context)
    if context.joker_main then

local other_count = #SMODS.find_card('j_LBR_BORBJOKER')
return {
xmult = card.ability.extra.Xmult + (other_count * card.ability.extra.gain)
}
if context.joker_main then
return {
Xmult_mod = xmult
}
end

end,
in_pool = function(self,wawa,wawa2)
    return true
end,

}


------------MOD CODE END----------------------
```

zealous glen
#

wait I didn't see the rest

fading pier
cold grotto
#

yeah

zealous glen
rare bobcat
#

Am I just missing a comma or is it more than that?

fading pier
#

oops you just answered that

#

thanks, is there a wiki explaining this stuff or is it just stuff you figured out from reading it?

zealous glen
fading pier
#

yeah I got that part, makes sense

zealous glen
viscid bough
# zealous glen try Steamodded wiki

i really cant seem to find an example of this sort of thing. someone please help me here theres gotta be some way to modify the scoring values right?

fading pier
#

thats cool, I get the general idea with most stuff but its nice to have the specifics explained. Thanks!

zealous glen
viscid bough
#

guess is suck at finding things huh

rare bobcat
#

Same problem as before with it not working, the code now is ```--- STEAMODDED HEADER
--- MOD_NAME: Leaf Blower Revolution (but in Balatro)
--- MOD_ID: LBR
--- MOD_AUTHOR: [Tax Fraud]
--- MOD_DESCRIPTION: Mod inspired by Leaf Blower Revolution
--- PREFIX: LBR

------------MOD CODE -------------------------

SMODS.Atlas{
key = 'Jokers',
path = 'Jokers.png',
px = 71,
py = 95
}

SMODS.Joker{
key = 'BORBJOKER',
loc_txt = {
name = 'Borb Joker',
text = {
'Gain {X:mult,C:white}X#2#{} Mult per activation',
'for every other Borb Joker',
'or Borbiana Jonesker', -- Not implemented
'(Currently {X:mult,C:white}X#1#{})'
},

},
atlas = 'Jokers', 
rarity = 2, 
cost = 5,
unlocked = true, 
discovered = true,
blueprint_compat = true,
eternal_compat = false,
perishable_compat = false,
pos = {x = 0, y = 0}, 
config = { 
  extra = {
    Xmult = 1,
    gain = 0.5
  }
},
loc_vars = function(self,info_queue,center)
    info_queue[#info_queue+1] = G.P_CENTERS.j_joker
    return {vars = {center.ability.extra.Xmult,center.ability.extra.gain}} 
end,
check_for_unlock = function(self, args)
    if args.type == 'derek_loves_you' then 
        unlock_card(self)
    end
    unlock_card(self) 
end,
calculate = function(self,card,context)
    if context.joker_main then

local other_count = #SMODS.find_card('j_LBR_BORBJOKER')
return {
xmult = card.ability.extra.Xmult + (other_count * card.ability.extra.gain)
}
end
if context.joker_main then
return {
Xmult_mod = xmult
}
end

end,
in_pool = function(self,wawa,wawa2)
    return true
end,

}


------------MOD CODE END----------------------
```

rare bobcat
arctic lion
#

why are you doing context.joker_main again

#

and repeating the code

#

just replace xmult for Xmult_mod

wintry solar
#

I actually think the new calculation guide does a terrible job at demonstrating modded calculations

rare bobcat
arctic lion
#

the additional code is redundant you're returning nothing to nothing

rare bobcat
#

I want it to be a permanent upgrade that is stronger based on how many copies of that joker there are, what do I do?

arctic lion
#

count the jokers and multiply

rare bobcat
#

I have it save to the xmult variable and I want Xmult_mod to be the same as xmult after I’m done with that

#

I tried putting it in the same return but the game crashed

wintry swallow
#

@zealous glen @wintry solar turns out i forgot to make beating any ante 8 boss not count as winning the run until the last blind so here's the patch with that fix applied

arctic lion
#

have you read the documentation, it covers how to return values

rare bobcat
#

Where’s the documentation

#

Pins?

arctic lion
rare bobcat
#

There’s a tutorial in there?

#

Wow

viscid bough
#

unless you mean it does work but its not in the game

carmine burrow
#

i was thinking of making a joker w/ ability like "Jokers and consumables seen in the shop do not appear again [while this Joker is held]; destroyed when pool is exhausted" , would this be too situational? i feel like it could be really useful either when looking for a specific joker or just when trying to set up a build but maybe it doesn't affect probabilities enough to make a big difference

#

could also just encourage really boring strategy ... reroll for baron, mime, blueprint, brainstorm every single run

#

there are around 180 total possible items to appear in the shop (random guess, could be lower or higher) which means at maximum 90 rerolls+rounds to get everything you want

tidal steppe
carmine burrow
rare bobcat
viscid bough
tidal steppe
#

how do i get this unlock text?
the below shows up on preview, but not on the unlock event popup

        unlock = {
            "Skip {C:attention}6 Blinds{} by {C:attention}Ante 4"
        }
carmine burrow
sick sparrow
#

i put 4 pinned jokers and it can't be relocated to other pinned joker location, but the pinned joker insertion method is reverse of code said

                card = create_card('Joker', G.jokers,nil,nil,nil,nil, "j_mista")
                card.pinned = true
                card:add_to_deck()
                G.jokers:emplace(card)
                card:start_materialize()
                card = create_card('Joker', G.jokers,nil,nil,nil,nil, "j_geriolish")
                card.pinned = true
                card:add_to_deck()
                G.jokers:emplace(card)
                card:start_materialize()
                card = create_card('Joker', G.jokers,nil,nil,nil,nil, "j_joker")
                card.pinned = true
                card:add_to_deck()
                G.jokers:emplace(card)
                card:start_materialize()
                card = create_card('Joker', G.jokers,nil,nil,nil,nil, "j_mime")
                card.pinned = true
                card:add_to_deck()
                G.jokers:emplace(card)
                card:start_materialize()
                card = create_card('Joker', G.jokers,nil,nil,nil,nil, "j_mista")
                card:add_to_deck()
                G.jokers:emplace(card)
                card:start_materialize()
                card = create_card('Joker', G.jokers,nil,nil,nil,nil, "j_geriolish")
                card:add_to_deck()
                G.jokers:emplace(card)
                card:start_materialize()
                card = create_card('Joker', G.jokers,nil,nil,nil,nil, "j_joker")
                card:add_to_deck()
                G.jokers:emplace(card)
                card:start_materialize()
                card = create_card('Joker', G.jokers,nil,nil,nil,nil, "j_mime")
                card:add_to_deck()
                G.jokers:emplace(card)
                card:start_materialize()
#

the pinned mista is located somewhere on middle, not leftmost

carmine burrow
#

in the real thing it says scoring_hand not fake_scoring_hand i think

#
  • some other things
#

but the general idea is the same -- you'd have to inject custom code into that function to handle your enhancement

#

fortunately this is only like 3 lines probably

sick sparrow
sonic cedar
#

how would i make the same joker do a +chips notif, then a +mult notif after

#

the one during scoring

#

i experimented with reusing the message function but it overwrote regardless of order

elder vapor
#

i think you have to use card_eval_status_text and return a message

sonic cedar
#

how would i
use that exactly
the smods tutorial literally said ask someone who knows eval status text for how to use it lmao

plain apex
#

full code of this goes over text limit but is there any way i can halve what it gets from the 2 jokers ie joker 1 gives +20 mult so +10 mult joker 2 gives x3 so x1.5 etc?

-- Process the left joker, if it exists
        if left_joker and left_joker ~= self then
            context.blueprint = (context.blueprint and (context.blueprint + 1)) or 1
            context.blueprint_card = context.blueprint_card or card

            if context.blueprint > #G.jokers.cards + 1 then
                return
            end

            local left_result, left_trig = left_joker:calculate_joker(context)
            if left_result or left_trig then
                if not left_result then
                    left_result = {}
                end

                left_result.card = context.blueprint_card or card
                left_result.colour = G.C.GREEN
                left_result.no_callback = true
                table.insert(results, left_result)
            end
        end

        -- Process the right joker, if it exists
        if right_joker and right_joker ~= self then
            context.blueprint = (context.blueprint and (context.blueprint + 1)) or 1
            context.blueprint_card = context.blueprint_card or card

            if context.blueprint > #G.jokers.cards + 1 then
                return
            end

            local right_result, right_trig = right_joker:calculate_joker(context)
            if right_result or right_trig then
                if not right_result then
                    right_result = {}
                end

                right_result.card = context.blueprint_card or card
                right_result.colour = G.C.GREEN
                right_result.no_callback = true
                table.insert(results, right_result)
            end
        end

        -- Return the combined result
        if #results > 0 then
            return results[1] -- Return the first result (or adjust as needed)
        end
    end
}
#

basically trying to create a half-print

tidal steppe
#

how do i check if a played hand contains a five of a kind?

plain apex
tidal steppe
#

i cant use context in check for unlock, how do i reach that from args?

plain apex
#

no idea haven't messed around with unlocks yet

tidal steppe
#

also i specifically want 'contains' so five of a kind and flush five both trigger

#

aight

sturdy compass
#

Ok so I'm trying to do something quite odd here. I'm confident in the equation but it keeps giving "X(-0)" Mult. Anyone have any ideas on how to get this working?

normal crest
#

Wtf why does lua have -0

sturdy compass
#

GREAT question LMAO

#

Hold on lemme get a screenshot of the trigger cuz it's really funny

normal crest
#

apparently 0 * -1 is -0, and -0 + 0 is 0

#

so I guess if you want to get rid of the - just add 0

carmine burrow
#

the general idea is that since floating-point numbers are approximate they represent ranges of possible values rather than single precise numbers, and it can be really useful to distinguish between really small number (positive) and really small number (negative)

normal crest
#

In this case the equation is literally multiplying by 0 tho

#

0 * -1 should not be -0

carmine burrow
#

for all ieee 754 knows you could be multiplying by 1e-10000

hardy viper
#

we are not in ieee land here we are in omeganum land

normal crest
#

I will say this is my first time seeing this in any programming language i've ever used

carmine burrow
hardy viper
carmine burrow
#

(... does talisman use omeganum for literally everything, or just scores? i assumed things like ability.extra still used floats)

hardy viper
#

i was under the impression cryptid converted them to bignum format because of scaling and whatnot

sturdy compass
#

Oh god I accidentally sparked math chat Ded

hardy viper
#

0*-1 is still -0 in float math terms anyways isn't it

tidal steppe
#

each day since ive joined this server and began modding balatro, Lua seems less like python and more like js

rare bobcat
hardy viper
rare bobcat
#

I’m just glad we don’t have to use a Turing machine

topaz sun
#

Is there a context for when a playing card is drawn to hand? That would make it possible to create "on draw" effects for enhancements

sonic cedar
#

ok so guys what happened

#

this is after the blind, when receiving funds

rare bobcat
#

I want to update the xmult variable and then update the Xmult_mod using the xmult variable

#
        if context.joker_main then
  local other_count = #SMODS.find_card('j_LBR_BORBJOKER')
  return {
    xmult = card.ability.extra.Xmult + (other_count * card.ability.extra.gain)
    Xmult_mod = xmult
  }
  end```
it just crashes saying that there's a missing }
#
--- MOD_NAME: Leaf Blower Revolution (but in Balatro)
--- MOD_ID: LBR
--- MOD_AUTHOR: [Tax Fraud]
--- MOD_DESCRIPTION: Mod inspired by Leaf Blower Revolution
--- PREFIX: LBR
----------------------------------------------
------------MOD CODE -------------------------


SMODS.Atlas{
    key = 'Jokers',
    path = 'Jokers.png',
    px = 71,
    py = 95
}




SMODS.Joker{
    key = 'BORBJOKER',
    loc_txt = {
        name = 'Borb Joker',
        text = {
          'Gain {X:mult,C:white}X#2#{} Mult per activation',
          'for every other Borb Joker',
          'or Borbiana Jonesker', -- Not implemented
          '(Currently {X:mult,C:white}X#1#{})'
        },
        
    },
    atlas = 'Jokers', 
    rarity = 2, 
    cost = 5,
    unlocked = true, 
    discovered = true,
    blueprint_compat = true,
    eternal_compat = false,
    perishable_compat = false,
    pos = {x = 0, y = 0}, 
    config = { 
      extra = {
        Xmult = 1,
        gain = 0.5
      }
    },
    loc_vars = function(self,info_queue,center)
        info_queue[#info_queue+1] = G.P_CENTERS.j_joker
        return {vars = {center.ability.extra.Xmult,center.ability.extra.gain}} 
    end,
    check_for_unlock = function(self, args)
        if args.type == 'derek_loves_you' then 
            unlock_card(self)
        end
        unlock_card(self) 
    end,
    calculate = function(self,card,context)
        if context.joker_main then
  local other_count = #SMODS.find_card('j_LBR_BORBJOKER')
  return {
    xmult = card.ability.extra.Xmult + (other_count * card.ability.extra.gain)
    Xmult_mod = xmult
  }
  end
  
    end,
    in_pool = function(self,wawa,wawa2)
        return true
    end,
}


  
----------------------------------------------
------------MOD CODE END----------------------
    ``` the whole thing
wet sand
#

you need a comma at the end of the xmult = line

sonic cedar
#

you're missing a comma

rare bobcat
#

It’s always the comma

sonic cedar
#

xmult = card.ability.extra.Xmult + (other_count * card.ability.extra.gain), fixed ver

rare bobcat
#

It’s not crashing but it’s not doing anything either

tidal steppe
#

Got it working!

    -- play a hand of 5 7's
    check_for_unlock = function(self, args)
        if args.type == 'hand' and #args.scoring_hand == 5 then -- or args.handname == 'Five of a Kind' or args.handname == 'Flush Five' then
            for _, card in pairs(args.scoring_hand) do
                print(card:get_id())
                if card:get_id() ~= 7 then
                    print('non 7 found')
                    return false
                end
            end
            unlock_card(self)
        end
    end
#

should probs remove the prints now 😅

rare bobcat
#

This should be working, shouldn’t it?

#

It checks how many copies of itself there are and adds that many x 0.5 to the xmult

#

It then sets Xmult_mod to that number

#

Which should multiply mult by a value that goes up every round and goes up faster based on how many copies of itself there are

#

But it’s not doing that

#

Does anybody know what the problem is

normal crest
#

Xmult_mod = card.ability.blah blah blah

rare bobcat
#

That’s not what I want it to do, that simply multiplies by the amount there are, x0.5, +1

#

I want it to scale the xmult_mod

#

So it goes up the more times it’s activated

#

So that if you only have 1 copy it goes x1, x1.5, etc but 2 copies is x1, x2, etc and so on with more copies

normal crest
#

So whenever it's triggered its xmult goes up by the current amount?

rare bobcat
#

Xmult permanently goes up depending on how many copies there are and xmult_mod is just set to Xmult

normal crest
#

Okay then, before the return, modify card.ability.extra.Xmult and then put Xmult_mod = card.ability.extra.Xmult in the return

sonic cedar
#
functions/state_events.lua:1089: attempt to concatenate global 'i' (a nil value)

Additional Context:
Balatro Version: 1.0.1n-FULL
Modded Version: 1.0.0~ALPHA-1306b-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.6.0
Steamodded Mods:
    1: Hyperfixation by tomatose [ID: HYPERFIXATION]
Lovely Mods:
    1: Saturn-alpha-0.2.1-A
    2: DebugPlus

Stack Traceback
===============
(3) Lua field 'evaluate_round' at file 'functions/state_events.lua:1089'
Local variables:
 pitch = number: 1.07
 dollars = number: 6
 (for index) = number: 1
 (for limit) = number: 1
 (for step) = number: 1
 k = number: 1
 _card = table: 0x0406c5f8  {click_offset:table: 0x0406c710, zoom:true, children:table: 0x0406e118, ambient_tilt:0.2 (more...)}
 ret = number: 1
 (*temporary) = Lua function '?' (defined at line 987 of chunk functions/common_events.lua)
 (*temporary) = table: 0x03f66eb8  {bonus:true, dollars:1}
 (*temporary) = string: "joker"
 (*temporary) = nil
 (*temporary) = string: "attempt to concatenate global 'i' (a nil value)"
(4) Lua field 'func' at file 'game.lua:3363'
(5) Lua method 'handle' at file 'engine/event.lua:99'
Local variables:
 self = table: 0x03773a28  {start_timer:true, timer:TOTAL, blockable:true, trigger:immediate, func:function: 0x03a5e448 (more...)}
 _results = table: 0x040fcb60  {blocking:true, pause_skip:false, time_done:false, completed:false}
(6) Lua method 'update' at file 'engine/event.lua:182'
Local variables:
 self = table: 0x03793c68  {queue_last_processed:16.15, queues:table: 0x03793c90, queue_dt:0.016666666666667 (more...)}
 dt = number: 0.00551203
 forced = nil
 (for generator) = C function: next
 (for state) = table: 0x03793c90  {unlock:table: 0x035a0138, other:table: 0x035a01d8, tutorial:table: 0x035a0188 (more...)}
 (for control) = number: nan
 k = string: "base"
 v = table: 0x035a0160  {1:table: 0x0406c580, 2:table: 0x03773a28, 3:table: 0x0408b718, 4:table: 0x03761f38 (more...)}
 blocked = boolean: false
 i = number: 2
 results = table: 0x040fcb60  {blocking:true, pause_skip:false, time_done:false, completed:false}
(7) Lua upvalue 'gameUpdateRef' at file 'game.lua:2519'
Local variables:
 self = table: 0x0357ecd0  {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x03da27d0 (more...)}
 dt = number: 0.00551203
 http_resp = nil
(8) Lua upvalue 'gameUpdateRef' at Steamodded file 'src/ui.lua:81' 
Local variables:
 self = table: 0x0357ecd0  {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x03da27d0 (more...)}
 dt = number: 0.00551203
(9) Lua method 'update' at line 22 of chunk '"11585"]'
Local variables:
 self = table: 0x0357ecd0  {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x03da27d0 (more...)}
 dt = number: 0.00551203
(10) Lua field 'update' at file 'main.lua:996'
Local variables:
 dt = number: 0.00551203
(11) Lua function '?' at file 'main.lua:935' (best guess)
(12) global C function 'xpcall'
(13) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
 func = Lua function '?' (defined at line 906 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"])

can someone tell me what it means by this global 'i'? why is it nil? is this something id have to send the code for?

normal crest
#

maybe latest steamodded version broke some of your mods

rare bobcat
#

That works

#

Thank you

sonic cedar
#

yep! that was it thank you

tidal steppe
#

can we get an @ everyone once steamodded is fixed 🙏

sonic cedar
#

did people figure out a quick reload command yet or is it still just close and reopen the game?

merry raven
#

So for my blind, it increases your hand size when you start it, but how do you make it so that it returns back to normal after the blind is defeated?
G.hand:change_size(5)
This line of code is all there is

merry raven
sonic cedar
#

oh nice thanks

normal crest
#

or whatever it's called

#

yeah it's called defeat

merry raven
#

Yeah there's function Blind:defeat(silent)

#

So do I call it like if defeat(true) then?

normal crest
#

in your blind add a defeat = function(self)

#

and there you can disable the effects

merry raven
#

Yeah I'm gonna store the current hand size in a local variable, and then increase the hand size after that
Once the blind is defeated, I can use the local variable to reset it back

merry raven
#

Also what's the function/value to fetch the current hand size?

tidal steppe
#

do you have to put all code in 1 file for it to show as a single mod? cuz i kinda dislike that i have multiple mods 'zeros decks' 'zeros jokers' etc
but i dont rlly want one massive file of everything.

merry raven
#

Yeah I haven't split my code yet

tidal steppe
#

i split mine from the start, into the diff categories as said above

#

i would not be able to stand such a large single file XD

merry raven
#

haha yeah

tidal steppe
#

0_0

#

my longest, the jokers is only 300 rn

normal crest
tidal steppe
#

though my readme list of yet to implement ideas is also 300 XD

crisp coral
normal crest
#

it is a bad habit in general

crisp coral
#

loc file

normal crest
#

loc file is fine tho

wet sand
#

mercy gif NFS.load

tidal steppe
merry raven
#

I need to split my Enhancements and Blinds and Jokers
Are there any example code that does this

normal crest
#

here's in the wiki

tidal steppe
#

hmm

#

i might have to come back to that

sonic cedar
#
        if context.joker_main then
            return{
                chip_mod = card.ability.extra.chips,
                mult_mod = card.ability.extra.mult,
                message = 'Placeholder!'
            }
        end

how do i set a color for the message? like that square when it activates

tidal steppe
#

i think the square colour is automatic to the mod type being returned?

normal crest
sonic cedar
#

see i did that before

#

and it crashed my game

tidal steppe
#

oof

normal crest
#

what was the crash reason

sonic cedar
#

let me recreate

merry raven
#

What's the value to fetch the current hand size? G.GAME.hands or something

tidal steppe
#

held or played hand?

merry raven
#

Held

#

This thing

tidal steppe
#
SMODS.Joker {
    key = 'redJoker',
    loc_txt = {
        name = 'Red Joker',
        text = {
            "{C:mult}+2{} Mult for each",
            "remaining card in {C:attention}hand"
        },
        unlock = {
            "Have {C:attention}10{} or more cards",
            "remaining in {C:attention}hand"
        }
    },
    rarity = 1,
    atlas = 'ModdedVanilla',
    pos = { x = 5, y = 1 },
    cost = 2,
    calculate = function(self, card, context)
        if context.joker_main then
            return {
                mult_mod = 2*#G.hand.cards,
                message = localize { type = 'variable', key = 'a_mult', vars = { 2*#G.hand.cards } }
            }
        end
    end,
    unlocked = false,
    discovered = false,
    -- on play have 10 cards remaining in hand
    check_for_unlock = function(self, args)
        if args.type == 'hand' and #G.hand.cards > 9 then
            unlock_card(self)
        end
    end
}
merry raven
#

Ooh #G.hand.cards then?

tidal steppe
#

yup

sonic cedar
#

still chip blue

normal crest
#

what colour did you put

tidal steppe
sonic cedar
tidal steppe
#

i havent had luck when doing chip and mult at same time

normal crest
#

You can also make it show two messages in quick succession

#

using this

sonic cedar
#

wait wrong

#

commenting out didnt do it

sonic cedar
normal crest
#

which could be lower than the limit

#

Try G.hand.config.card_limit

sonic cedar
#

mercy gif

#

where was this godsend two days ago at 3 in the morning

merry raven
# normal crest Try `G.hand.config.card_limit`
set_blind = function(self, reset, silent)
        ease_hands_played(15)
        ease_discard(15)
        local original_hand_size = G.hand.config.card_limit
        G.hand:change_size(5)
....... up till the end of function

defeat = function(self)
        G.hand.config.card_limit = original_hand_size
    end

Witness my programming prowess (it crashed)
bad argument #2 to 'max' (number expected, got nil) this error is pointing to cardarea.lua at line 276, which is
self.config.temp_limit = math.max(#self.cards, self.config.card_limit)

Guh what can I do here, I feel like the fix is simple yet I can't pinpoint it

normal crest
#

Okay so

#

You defined a local variable inside the set_blind function

tidal steppe
#

card_limit was set to nil?

normal crest
#

That variable is not accessible to other functions

#

So when you set card_limit to that, the variable doesn't exist, so it's nil

tidal steppe
#

and so G.hand.config.card_limit = original_hand_size set it to nil bc original_hand_size didnt exist

merry raven
#

Fuck hold on

tidal steppe
#

can you store the var in config.extra?

normal crest
#

A simpler way to do that is to just do G.hand:change_size(-5)

#

And no need to save the previous value

merry raven
#

i completely forgot change_size takes in negatives

normal crest
#

Presumably it does, I haven't used it

tidal steppe
#

bro... i thought you were saving cuz you were doing an unknown number of change sizes XD

wet sand
#

most change functions do and i dont see why it would be different tbh

tidal steppe
#

even if it doesnt do negative, you can just set it to current - 5 since you know you added 5

merry raven
#

Alright sick I got it working

#

Now a completely different question - how do I destroy specific cards in deck
My Blinds have blind-specific enhancements and consumables so I need to make sure they get taken out and not clog up the deck or consumable slots past the Blind

#

Never mind I figured it out

defeat = function(self)
        G.hand:change_size(-5)     
        for i = #G.deck.cards, 1, -1 do
            if G.deck.cards[i].config.center == G.P_CENTERS.m_fm_diving_bird or
               ..... or
                G.deck.cards[i]:start_dissolve()
            end
        end
    end
tidal steppe
#

is there any way to access 'args' from joker.calculate() ?
the different vars i get between calculate() and check_for_unlock() are frustrating.
i have to use different approaches for the same things depending on which im in

#

i know how to check if end boss blind with args but not from context :/

viscid bough
#

Is there a way to get VSCode to auto complete code for making mods?

normal crest
#

i think so anyway...

normal crest
viscid bough
#

Ahh thanks

normal crest
#

most of the modded stuff is in the wiki

wet sand
#

i use sublime text but if i have the balatro source in my project then it lets me view function definitions throughout the codebase which is nice

#

not quite auto complete but still insanely nice

normal crest
#

it is definitely nice to have the game source open

tidal steppe
#
    calculate = function(self, card, context)
        if context.blind and context.blind.boss then
            G.E_MANAGER:add_event(Event({
                func = function()
                    local card = copy_card(pseudorandom_element(G.jokers.cards, pseudoseed('perkeno')), nil)
                    card:set_edition('e_negative', true)
                    card:add_to_deck()
                    G.jokers:emplace(card)
                    return true
                end
            }))
            card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil,
            { message = localize('k_duplicated_ex') })
        end
    end

PerkeNo

normal crest
#

doesn't that trigger at the start of a boss

tidal steppe
#

yes

#

¯_(ツ)_/¯

normal crest
#

oh, I thought you wanted after it was defeated

tidal steppe
#

context is quite limited

wet sand
#

the worst part about making a mod for me rn is lowkey trying to come up with ideas

tidal steppe
#

context does not contain .blind at .round_end

#

only at start

normal crest
#

but blind is a global thing

#

G.GAME.blind

tidal steppe
#

i have 300 lines of pending ideas

wet sand
#

i have a bunch of sort of neat ideas for variations on spectral cards but they range from slightly overpowered to completely busted

tidal steppe
#

can i offload some? XD

normal crest
#

slightly overpowered sounds reasonable

#

you just gotta make them rare

wet sand
#

heres some fun ones

normal crest
#

they don't really sound inverted, more like enhanced

wet sand
#

yea inverted was just a placeholder name

#

they have like 3 different names across all my projects lol

#

in game theyre listed as "antispectral", in the ideas doc theyre "inverted spectral", and the texture name is "distspectral" (distorted spectral)

normal crest
#

personally not a fan of making new cards that are very similar or have just changed values of the vanilla one

wet sand
#

neither am i really but its a really easy way to get familiar with a bunch of different modding basics at once

#

like making this one showed me how to add a joker w/ an edition and how to mess with the ante value

tidal steppe
#

maybe 'The Spirit'?

wet sand
#

its also one of the more unique of all the ideas, i dont think anything other than the hiero/petroglyph vouchers touches the ante number in any way?

normal crest
#

i feel like the +1 ante should work regardless of the current ante

wet sand
#

if youre on ante 8 it just cant be used

tidal steppe
#

no, cuz then on 8 you can use this to just win the run

normal crest
#

oh I see

tidal steppe
#

or, then you win at ante 9? so you make scores higher but dont just win. if you can do that

normal crest
#

so it doesn't work only on ante 8

wet sand
#

i thought about making it not work on all big boss blinds but if youre using a consumable card to skip like ante 24's boss i honestly dont care

#

but i dont want it to like. break win conditions or something

tidal steppe
#

I think that does me for today. commit name = Numerous

tall wharf
#

oh my god

wet sand
tidal steppe
#

hmm

#

i wish you luck

wet sand
#

idk if ill do this at all its just an interesting idea

tidal steppe
#

fair

wet sand
#

i wonder if anyone else has done something similar with the win_ante before though

tidal steppe
#

Completed!

Decks

Antimatter
Start with 1 Joker slot, Gain 1 per Ante
Unlock: Finish a run with 8+ Jokers
Headstart deck
$25 jumbo buffon pack, start ante 2
Unlock: Skip 8 by Ante 8

Jokers

Red Joker
Gain 2 mult per remaining card in hand
Unlock: Have 10+ cards remain in hand
Dumpster Fire
All discards are destroyed
Unlock: Reduce you deck to 26- cards
One Mans Trash
Gain $1 per remaining discard
Unlock: Finish a run with no unused discards
Noble Joker
Gain 1 mult per 2 face cards in full deck
Unlock: Have 24 face cards in your deck
Prime Time
Prime cards give their rank as mult
Unlock: Play a hand of 5 7's
Perkeo2?
Make a negative copy of a random joker when entering boss
Unlock: None/Legendary
Leaper
+1 mult. this doubles per straight flush played
Unlock: ?

glass scaffold
#

Hey, how do I check to see if a played hand is a High Card to trigger a Joker?

#

Here's where I need to put the code

glass scaffold
#

Thanks

#

Now, if I want to double the mult each time after it triggers, what do I do?

tidal steppe
#

elaborate

glass scaffold
#

"Starts at 2x, doubles every time you play high card"

#

How do I make that happen?

tidal steppe
#

lol, trying to copy my idea XD jk

-- Leaper
SMODS.Joker {
    key = 'leaper',
    loc_txt = {
        name = 'Leaper',
        text = {
            "{C:mult}Mult gain{} doubles",
            "if played hand",
            "contains a {C:attention}Straight Flush{}",
            "{C:inactive}(Currently {C:mult}+#1#{C:inactive} Mult)"
        }
    },
    config = { extra = { mult = 1, mult_gain = 2 } },
    rarity = 3,
    atlas = 'ModdedVanilla',
    pos = { x = 1, y = 0 },
    cost = 8,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.mult, card.ability.extra.mult_gain } }
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            return {
                mult_mod = card.ability.extra.mult,
                message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } }
            }
        end
        if context.before and next(context.poker_hands['Straight Flush']) and not context.blueprint then
            card.ability.extra.mult = card.ability.extra.mult * card.ability.extra.mult_gain
            return {
                message = 'Upgraded!',
                colour = G.C.MULT,
                card = card
            }
        end
    end
    -- add an unlock
}

very similar joker of mine for reference

#

beware that and next(context.poker_hands['Straight Flush']) means 'contains' so high card in this format would trigger on everything. i believe

sturdy compass
true jasper
tidal steppe
#

i havent done much cryptid, its a bit too much XD. perkeno is my strongest. most others i make i try to make balanced

true jasper
#

Is there a link to forum for this? I'm interested in this frfr

tidal steppe
tall wharf
#

uhm please never ask me to cook

glass scaffold
#

I know I'll need a mult_gain variable, but what else needs to be added?

tidal steppe
#

you need to update the mult_gain there. you also need context.main for the application of the mult

tall wharf
tidal steppe
#

what mult is stored?

tall wharf
#

the current mult

tidal steppe
#

i like the idea, i just dont understand what sets the mult gain

#

of the joker?

tall wharf
#

when it activates

#

the mult of the current hand as the joker activated

tall wharf
#

the number in the red box on the side

tidal steppe
#

really strong

tall wharf
#

does it seem too op

tidal steppe
#

get mult too >100 with repeater on right side, then it scales by that each next turn 👀

#

i think it needs to set its mult from a smaller source, then its really cool. unless this is a cryptid card in which its perfectly fine

glass scaffold
#

This should be correct as I copied it from my Joker that gives x2 Mult with each scored Ace, just given the parameter of requiring a High Card.

tall wharf
#

extreme nerf

tall wharf
#

X1.5 mult with extra steps basically 😭

tidal steppe
#

if i understand correctly that sounds good

sturdy compass
#

Another full page. That's three! (still need to finish some functionality for some tho)

sturdy compass
tall wharf
#

what it do

sturdy compass
#

I scored hand has exactly 4 cards, it converts the suits of each card to clubs, hearts, diamonds, and spades from left to right

tall wharf
#

ah

sturdy compass
#

e.g. the 3rd card in the hand would become a diamond

tall wharf
#

unpleasant indeed

sturdy compass
#

Quite

#

However, flower pot

tall wharf
#

true

#

you might be cooking

#

square joker

sturdy compass
#

There are a lot of 4-card synergies in this mod. There's another not on that page called 4-Leaf Clover that converts a scored hand of 4 into lucky cards

tall wharf
#

i have skill issue

#

do not let me cook

thorny adder
tall wharf
#

maybe early game

#

no

#

actually

#

it will be op

thorny adder
#

Hack blueprint this

sturdy compass
#

Holy hell

thorny adder
#

With talkie walkie

elder vapor
#

SMODS.eval_this is a lifesaver 😭 wish i knew this existed before

true jasper
tall wharf
#

changed that back to 1

#

still is kinda op

thorny adder
#

@tall wharf

tall wharf
#

hi

thorny adder
#

Do you need a coder by any chance

tall wharf
#

uhhhh

sturdy compass
#

Tacking it to an event that happens as often as the score changing is very strong

tall wharf
#

i am a comsci student i probably might need some help but i will be the main coder

sturdy compass
#

My mod is my first experience with Lua but I’ve had prior coding experience, so if you have that (and it sounds like you do), you should pick it up pretty fast

tall wharf
#

i've made a small thingamajik in lua before

thorny adder
#

I dont actually have time I regret asking anyway lol

tall wharf
#

😭

wet sand
#

tbh even without lua experience its easy to pick up balatro modding imo

#

as long as you have some coding experience

sturdy compass
#

That’s what I’m sayin’ lol

#

I’ve worked with C#, C++, Java/TypeScript, Java, and Python before and that experience helped a TON with getting into this

tidal steppe
#

i wouldnt say ez

wet sand
#

curious for a more general opinion on this - should this be totally random what edition it applies or should it apply one of each across the 3 cards

true jasper
#

The only coding experience I have is python from when I was in 7th grade 😭😭

thorny adder
#

Well the cool thing with mods is that you can write 3 lines and it will work, unlike a real game where you need to code a shit ton until it works

tidal steppe
#

tru

wet sand
#

me looking at the decade of gamemaker studio experience on the table

tidal steppe
#

gotta write less, but gotta read more

thorny adder
#

Mod coding is cool cause you can code bits by bits and try stuff without breaking too much

tall wharf
#

please never let me cook again

#

op with observer obviously

thorny adder
#

Those are really good ngl

wet sand
#

broken with any Xmult card tbh

wet sand
#

imagine a flush five ace build, scholar on the left of this card, hologram on the right

#

its over

tall wharf
#

you need to actually be good at the game to make this op

#

maybe

wet sand
#

idk is that really true? i feel like this would be broken with the combo i just listed + dna + blueprint which is a combo ive gotten in runs like 4 or 5 times

tall wharf
#

😱

#

that does sound broken

wet sand
#

feels very hard to balance because you could just put something really cheap that triggers per card on the left side and something really broken on the right

tall wharf
#

true

tidal steppe
#

early game, any suit +mult card on left, play flush, with then any Xmult on the right

thorny adder
#

@tall wharf

#

Maybe make it last a couple rounds

#

That would fix it right

#

And remove from eternal pool of course

tall wharf
#

sure

tall wharf
#

maybe 8 is too many

thorny adder
tall wharf
#

instead of triggering the joker to the right

#

x1.11

#

mult

thorny adder
#

Huh

#

Hmmmm

tall wharf
#

like

thorny adder
#

That could work too

tall wharf
#

it can go either way

thorny adder
#

Idk

#

Wait for more people to react

#

I like both fixes lmao

wet sand
#

could also make it trigger every 2-3 times instead

#

oooh wait. maybe the amount of times the joker on the left has to trigger goes up by 1 every time it activates? and then you could reset it back to 1 every ante or something

tall wharf
#

true

#

ok i think i am ok at cooking

#

😭

wet sand
#

fire

frosty kiln
#

that'd be so cool

wet sand
#

workshopping these distorted spectral cards a little more

frosty kiln
#

making mods would be so cool.... but the fact i can't even get one running means i should probably keep any mod ideas in my brain 😭

tall wharf
#

ok well

#

writing these down to share and keep as record in case i want to turn this into a real thing

#

i never planned a Minecraft mod

#

these are just things in my head written down

quaint latch
#

why is disabling discards so TrollDespair

tidal steppe
tidal steppe
tall wharf
#

8 rounds seems too arbitrary

#

maybe it scales like the observer

quaint latch
#

can someone please tell me whats wrong with this code D8
I'm trying to patch the discard button to be disabled when a specific card is selected. IT doesnt seem to have any effect.

Patch:

[[patches]]
[patches.pattern]
target = 'functions/button_callbacks.lua'
pattern = '''
    if G.GAME.current_round.discards_left <= 0 or #G.hand.highlighted <= 0 then 
        e.config.colour = G.C.UI.BACKGROUND_INACTIVE
        e.config.button = nil
'''
position = 'after'
match_indent = true
payload = '''
    elseif (function()
      if #G.hand.highlighted > 0 then
          for i = 1, #G.hand.highlighted do
            if G.hand.highlighted[i] and G.hand.highlighted[i].key == 'clowned' then
              return true
            end
          end
        end
        return false
      end)() then
        e.config.colour = G.C.UI.BACKGROUND_INACTIVE
        e.config.button = nil
'''

Original code:

  G.FUNCS.can_discard = function(e)
    if G.GAME.current_round.discards_left <= 0 or #G.hand.highlighted <= 0 then 
        e.config.colour = G.C.UI.BACKGROUND_INACTIVE
        e.config.button = nil
    else
        e.config.colour = G.C.RED
        e.config.button = 'discard_cards_from_highlighted'
    end
  end
sick sparrow
#

is there are mod settings?

quaint latch
quaint latch
wet sand
quaint latch
#

I'd just like to do that thing and it doesnt seem to work with the way i patched it and i cant explain why

sick sparrow
quaint latch
sick sparrow
#

how to activate end of round event

stray warren
#

if context.end_of_round

steep rain
#

What am I doing wrong here?