#💻・modding-dev

1 messages · Page 72 of 1

nocturne garnet
#

just hooked to end_round, changed a variable and checked if the variable is the same as the string

tepid crow
#

seems like G.GAME.blind is only defined during the round

#

that's annoying

zealous glen
#

I mean, you’re not in a Blind out of a round

#

So if you want the Blind-to-be you need to look at the list of Blinds for the Ante

tepid crow
#

I guess

#

undefining it seems like a lot though

#

or rather, keeping G.GAME.blind defined but not the attributes that define a blind

zealous glen
#

Doesn’t seem like a lot

#

Just vacate the memory

#

I wonder if the burning animation also destroys the Blind

#

Like it does to Cards

tepid crow
#

seems like it's the Blind:defeat that does the self:set_blind(nil, nil, true)

tepid crow
#

idk I'm just annoyed G.GAME.blind still exists, but not for any useful reasons as far as I can tell

zealous glen
#

Isn’t it vacated?

tepid crow
#

no, only the parts of it that define what a blind is

#

the Small/Big/Boss and name, mostly

zealous glen
#

What else is there

tepid crow
#

a lot of UI stuff I think

#
G.GAME.blind = {
  click_offset = table: 0x0713a480,
  static_rotation = false,
  ambient_tilt = 0.3,
  parent = table: 0x06d1b8b0,
  mult = 0,
  T = table: 0x0713a390,
  offset = table: 0x0713b100,
  tilt_var = table: 0x0713b270,
  last_aligned = -1,
  Mid = table: 0x0713a1f0,
  colour = table: 0x0713b300,
  loc_debuff_text = "",
  VT = table: 0x0713a980,
  shadow_parrallax = table: 0x0713b160,
  ARGS = table: 0x0713a278,
  ID = 617,
  container = table: 0x06ce8318,
  config = table: 0x0713b248,
  velocity = table: 0x0713aa70,
  disabled = false,
  CALCING = true,
  dollars = 0,
  alignment = table: 0x0713acb0,
  prepped = true,
  loc_name = "",
  blind_set = false,
  CT = table: 0x0713a390,
  STATIONARY = true,
  loc_debuff_lines = table: 0x0713cc40,
  chips = 0,
  debuff = table: 0x071d8ab0,
  zoom = true,
  dark_colour = table: 0x0713b358,
  sound_pings = 2,
  chip_text = "0",
  role = table: 0x06fbc960,
  layered_parallax = table: 0x0713b1c0,
  FRAME = table: 0x0713a690,
  NEW_ALIGNMENT = true,
  shadow_height = 0.08999916553245,
  created_on_pause = false,
  RETS = table: 0x0713a2d8,
  states = table: 0x0713a6f0,
  hover_offset = table: 0x0713a4a8,
  last_moved = -1,
  pinch = table: 0x0713b0a0,
  name = "",
  children = table: 0x0713b220,
}
#

so stuff like name still has a value, but it's empty

zealous glen
#

Ah, I think that’s just the UI that slides in then

#

It’s just usually hidden

#

And the text and sprite is updated when needed

#

That’s what I would guess

tepid crow
#

yeah it's probably there to just paste the blind info on top of

#

so Thunk doesn't have to recreate* the UI element for it

zealous glen
#

Not only redefine but recreate it

tepid crow
#

yeah that's what I mean

nocturne garnet
#

this took SOOO long to make unlockable

brisk rose
#

I noticed you removed your config. Are you planning to re-add it and make it a toggle to unlock all?

nocturne garnet
#

removed my wut...

paper hare
brisk rose
#

wait I'm getting mixed up I guess

nocturne garnet
#

i never had a config?

brisk rose
#

my bad

#

I remember now how I made that screwup

nocturne garnet
#

i'll research it

brisk rose
#

yeah that'd be cool

tepid crow
#

most colours are G.C.[colour] btw, you can find those at globals.lua:333

paper hare
tepid crow
paper hare
#

Oh, okay, so you can just use HEX (not the Spectral card)

tepid crow
#

yeah just HEX('0047AA') for example

nocturne garnet
#

i will NEVER run out of ideas

wintry solar
#

I think the secondary colour gets added to the loc colours table and is used in the collection menu, I have no idea what the primary colour is used for

nocturne garnet
#

does anyone know how to add text to challenge descriptions?

#

something like Small Blinds dont have shops

wintry solar
regal wolf
nocturne garnet
#

for a challenge

regal wolf
#

like a custom challenge?

nocturne garnet
#

i mean what else would it be

dim nimbus
#

is there a way i could have a joker only spawn in the shop if you already have a certain joker?

#

sort of like how golden ticket or steel joker works but it needs a joker and not an enhancement

opal spade
#

yes_pool

#

if joker has a yes_pool it'll spawn only if the pool flag for it is set to true

wintry solar
#

you can use in_pool too

opal spade
#

that too

#

idk why i forgot about in_pool

dim nimbus
#

would it work the same as enhancement_gate?

#

or at least similar to it

opal spade
#

in_pool is a function in your joker
if it returns true, joker can spawn, if it returns false, the joker cant spawn

#

so here it would be in_pool = function(self) return next(find_card(<key>)) end

dim nimbus
#

okay so in_pool is another function alright

opal spade
#

in_pool is a function you define within your joker

#

like calculate

dim nimbus
#

alright

opal spade
#

more on it here (although its a bit outdated)

dim nimbus
#

yeah the steammodded github is in general outdated

#

i wish there was a better balatro modding tutorial out there

opal spade
#

i think its still a useful resource for the stuff that it does cover

nocturne garnet
#

why is this crashing?????

#

no crash screen, just closes

nocturne garnet
#

but i dont know what

#

wait shit typo oops

crisp coral
#

have you considered that it runs for every context

nocturne garnet
nocturne garnet
crisp coral
#

yeah idk then

#

also don't reply ping

nocturne garnet
#

oops sorry

dim nimbus
#

would i need a return function if its false as well or no?

opal spade
#

bad key

#

you need to give the full key

dim nimbus
#

oh so, mod name and all got it

opal spade
#

ye

wintry solar
wintry solar
#

I mean you've said you know its the create card line that your screenshot snips off

#

so....

nocturne garnet
#

its supposed to store the sold joker's card's key and ability, and create it if it doesnt exist

nocturne garnet
#

which is just G.GAME.cardboard.key

#

on the 7th part of create_card

crisp coral
#

i don't see it ever removing G.GAME.cardboard.card

#

which means it is running for every context

dim nimbus
wintry solar
#

yeah that bottom block is going to run on every calculate

crisp coral
#

do you have a mod prefix set?

wintry solar
crisp coral
#

^

nocturne garnet
#

so if there is no G.GAME.cardboard.card, it spawns the card

#

instead of spawning the card if there is G.GAME.cardboard.card

crisp coral
#

and when are you removing G.GAME.cardboard.card exactly

nocturne garnet
#

its being removed when it saves and reloads 🥹

#

if it werent i would have just put it in the config

nocturne garnet
#

but what would it be running on said context??

#

what am i not getting

#

its supposed to not ever create the card unless there is no card

#

so it shouldnt ever spawn the card unless there is no card

#

am i being dumb

#

am i being blind

dim nimbus
wintry solar
#

oh

crisp coral
#

if there is a card, there are no restrictions on when it will spawn the card

wintry solar
#

use SMODS.find_card()

nocturne garnet
#

its sold

opal spade
opal spade
dim nimbus
#

okay, seems like it works!!!

nocturne garnet
wintry solar
nocturne garnet
#

it should still exist if theres no cardarea

wintry solar
#

then why is it copying it endlessly

nocturne garnet
#

i dont know why its creating them endlessly!!!

wintry solar
#

because that block runs on every calculate call, and there's a lot of them

#

it's probably not the reason it crashes but you should stop that from happening regardless

nocturne garnet
#

now it just wont exist on reload

zealous glen
#

It probably needs a and not context.blueprint somewhere

#

Also calling the effect of a different card while selling a card and copying its effect might be tricky

#

And I think the calculate call of the created Joker might not exist for some reason

opal spade
#

feeling really stupid rn but how do i do dependencies again

#

upd: nvm i just missed one space

#

infinite fusions api now works

#

there's still at least 10 more that dont but let me have this one win

loud citrus
opal spade
#

mechanically it just wraps different jokers into a single card
by default it doesnt have custom art or name and instead is just "infinifusion", with the jokers its made up of being shown on the side

#

in the screenshot are the first two custom artworks to test the api for that

opal spade
nocturne garnet
#

rate the challenge

zealous glen
nocturne garnet
#

yeah, thats where i had the idea from

tepid eagle
#

small blinds dont have shops
big blinds dont have shops
boss blinds dont have shops
there are no shops
shops don't exist

zealous glen
#

The gaslighter

nocturne garnet
#

i wonder how many people downloaded my mod

#

is there anything to check that on github?

tepid crow
rough furnace
tepid crow
nocturne garnet
#

Homeless Man Challenge

#

includes the garbage he just took

#

with his bare hands

opal spade
#

how does homeless man become homeful man

nocturne garnet
#

capitalism

#

the has-home man challenge is the shopping spree challenge

#

for the middle class

#

now i will make the first class challenge

#

Start with 10 Million dollars, earn 300% interest, cards cannot be debuffed, do not pay taxes, women love you

nocturne garnet
#

GUYS....

loud citrus
#

i'm scared of the unlock condition

maiden phoenix
#

Beat up the Homeless Rose

#

Do it

#

Find one on the street

maiden phoenix
#

That's the spirit

nocturne garnet
# nocturne garnet GUYS....

should i draw some sprites (i've been using the same placeholder for 20 years) or focus on adding more jokers

#

im hella bored rn

nocturne garnet
nocturne garnet
maiden phoenix
#

The context.individual are killing your jokers

rough furnace
#

I can't wait to cryptid glitched that down and have oops all 6s

frosty dock
#

eh just rig it

rough furnace
#

Oh yeah

spare elk
#

instead of destroying all jokers it should just instantly set the blind size to infinity

nocturne garnet
#

does anyone know how to make a jokers loc_txt change??

#

i swear i used to be able to do it but now it doesnt work

spare elk
#

i have no idea what that means

nocturne garnet
#

i swear it used to work

#

but now it wont??

#

i dont know why??

edgy reef
#

loc_vars function should let you change the localization key

#

iirc

frosty dock
#

this

#

changing loc_txt never worked bc it's not directly tied to the localization table, it's just a copy

still jacinth
#

this might be really stupid, but how do i get a card to reference another card like it does with Marble Joker?

rough furnace
#

The adding to the info queue part

still jacinth
#

i think i did something wrong (also why is there text above it, its an enhancement)

        info_queue[#info_queue + 1] = {
          key = 'dqck_derpyjoker', 
          set = 'Joker',
          config = { extra = { mult = 0, mult_mod = 1 } }
        }
        return { vars = { center.ability.extra } }
    end,```
#

idk if you need the prefix in the key but it didnt work without the prefix etiher

brisk rose
#

unless there's 2 seperate questions

still jacinth
wintry solar
#

the name in the tooltip is a bug that hasn't been fixed yet

#

the key needs j_ infront of it too

still jacinth
#

oh

brisk rose
brisk rose
still jacinth
#

yeah

brisk rose
#

I also noticed that that familiar enhancements don't have 'card'

#

but the vanillia ones do

#

I guess i should mention that in the familiar thread

still jacinth
#

for some reason it says nil on both the mentions

brisk rose
maiden phoenix
#

Oh wait it's a scaler nvm

wintry solar
#

pretty sure its specific_vars = {vars = {blablabla}}

#

could just be specific_vars = {balbla}

brisk rose
#

This i think

#

but maybe they didn't do it right, idk

wintry solar
#

no it's not that

brisk rose
#

my b

still jacinth
#

it also works on the actual joker

#

just not on the reference

wintry solar
#

try just vars = {mult = 0, mult_mod = 1} in the infoqueue bit

#

wait no

#

vars = {0, 1}

maiden phoenix
#

Yea info_queue can't refer to a card value in loc_vars

#

Learned that the hard way

still jacinth
maiden phoenix
#

Not sure why it doesn't work for you, can you show your bit of code?

still jacinth
#
        info_queue[#info_queue + 1] = {
          key = 'j_dqck_derpyjoker', 
          set = 'Joker',
          vars = { 0, 1 }
        }
        return { vars = { center.ability.extra } }
    end,```
brisk rose
wintry solar
#

you are missing something

maiden phoenix
#

using config instead of vars no?

wintry solar
#

this isn't for the main tooltip

brisk rose
#

oh nvm I see

#

I indeed missed the fact that it was a seperate tooltip

rough furnace
#

Shoidlnt it be specific_vars and not vars?

still jacinth
#

you mean specific_vars = { extra = { 0, 1 } }?

rough furnace
#

Not sure but if that doesn't work try removing the extra part

still jacinth
#

aha!

#

specific_vars = { 0, 1 } works

narrow pollen
#

...hm.

#

gotta love when you're trying to sift through the source to find something that just isn't turning up

rough furnace
#

What are you looking for?

narrow pollen
#

i was looking for the money payout of lucky cards, but it was just a PEBCAK issue.

#

of course i'm not going to find lucky_money if i'm searching for lucky_mult

tepid crow
#

is there a better way of telling a run is or isn't a challenge run than checking if G.GAME.challenge (defined as args.challenge.id within Game:start_run) exists?

still jacinth
#

now i cant find a way to change the enhancement of a card 😭

tepid crow
still jacinth
#

it just keeps giving me Oops! The game crashed: card.lua:297: attempt to index field 'config' (a nil value)

tepid crow
#

you need an "enhancement center"

still jacinth
#

i have no idea what that means

tepid crow
#

no worries, I didn't either at first (still don't)

#

this is Midas Mask's code for example

if self.ability.name == 'Midas Mask' and not context.blueprint then
    local faces = {}
    for k, v in ipairs(context.scoring_hand) do
        if v:is_face() then 
            faces[#faces+1] = v
            v:set_ability(G.P_CENTERS.m_gold, nil, true)
            G.E_MANAGER:add_event(Event({
                func = function()
                    v:juice_up()
                    return true
                end
            })) 
        end
    end
    if #faces > 0 then 
        return {
            message = localize('k_gold'),
            colour = G.C.MONEY,
            card = self
        }
    end
end
#

you can see where Thunk does the v:set_ability(G.P_CENTERS.m_gold, nil, true)

#

(you can find all the enhancements in game.lua:648-655)

#

does that help?

narrow pollen
#

so i'm having a bit of lovely trouble. do i have to use patches.regex if i'm attempting to find a line with curly brackets {} in it?

wintry solar
#

no

still jacinth
narrow pollen
#

ah, i figured out the problem

#

i have to take the line that i want from the balatro executable itself and not the lovely dump's version.

#

because apparently my mod's lovely file is loaded before steamodded's...?

#

idk, point is, i fixed it

still jacinth
#

like i dont think any of my code is triggering in the enhancement calculations

umbral zodiac
#

very new to this, how would i check if the played hand is a flush in a joker's calculate function?

narrow pollen
#

if it is a flush, or if it contains a flush?

umbral zodiac
#

if it is a flush

narrow pollen
#

context.scoring_name == "Flush"

umbral zodiac
#

ahh

#

ty

narrow pollen
#

however

#

this will only trigger on flushes

#

not straight flushes, flush houses, or flush fives

umbral zodiac
#

yea i dont want it to trigger on other types of flushes

narrow pollen
#

fair

#

just making sure you understood

umbral zodiac
#

its a joker that gives mult buffs but randomizes the suit of played flushes

#

might change it to containing flushes later but i think its fine as only flushes

narrow pollen
#

and you want those "higher" hands to be exempt?

umbral zodiac
#

doesnt change too much either way

narrow pollen
#

yeah, that's fair

#

just make sure you word the description properly!

umbral zodiac
#

dont owryr i love semantics

#

i actually got no clue how i edit the cards played 😭

narrow pollen
#

that all said, uh... anyone know how to take ownership of a tarot? trying to get used to this newfangled SMODS logic after being out of the loop for... weeks...

wintry solar
tacit escarp
#

and lots of sincere thank yous

umbral zodiac
#

can someone help with this error? not sure what it's actually expecting since the description seems fine

#

nvm found it i forgot a comma lmao

still jacinth
# wintry solar whats your calculate function look like?
        if context.individual and context.cardarea == G.play then
            return {
                x_mult = card.ability.extra.xmult,
                colour = G.C.RED,
                card = card
            }
        end
        if context.after then
            if pseudorandom('copper') < G.GAME.probabilities.normal/card.ability.extra.odds then 
                card:set_ability(G.P_CENTERS.m_dqck_oxidized, nil, true)
                G.E_MANAGER:add_event(Event({
                    func = function()
                        card:juice_up()
                        return true
                    end
                })) 
                return {
                    message = 'Oxidized!',
                    colour = G.C.GREEN,
                    card = card
                }
            end
        end
    end```

but whenever i put anything in there even without an if, it doesnt do anything
wintry solar
#

you can't return from enhancements

#

you have to add to the effect table

#

or use SMODS.eval_this

still jacinth
#

idk how to do any of that, but shouldnt the card:set_ability(G.P_CENTERS.m_dqck_oxidized, nil, true) still work since its not returning?

wintry solar
#

uhhh I guess so, yeah

still jacinth
#

like i just changed it to
card:set_ability(G.P_CENTERS.m_lucky, nil, true)
and put it at the top of the calculate and it does nothing

wintry solar
#

can you send your entire enhancement code?

still jacinth
#
    key = 'copper',
    loc_txt = {
        name = 'Copper Card',
        text = {
            'placeholder'
        }
    },
    pos = { x = 0, y = 0, },
    atlas = 'DucktacularEnhancers',
    config = {extra = { xmult = 3, odds = 4 },},
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = {
          key = 'j_dqck_derpyjoker', 
          set = 'Joker',
          specific_vars = { 0, 1 }
        }
        return { vars = { card.ability.extra.xmult, ''..(G.GAME and G.GAME.probabilities.normal or 1), card.ability.extra.odds } }
    end,
    calculate = function(self, card, context, effect)
        card:set_ability(G.P_CENTERS.m_lucky, nil, true)
        if context.individual and context.cardarea == G.play then
            return {
                x_mult = card.ability.extra.xmult,
                colour = G.C.RED,
                card = card
            }
        end
        if context.after then
            if pseudorandom('copper') < G.GAME.probabilities.normal/card.ability.extra.odds then 
                card:set_ability(G.P_CENTERS.m_dqck_oxidized, nil, true)
                G.E_MANAGER:add_event(Event({
                    func = function()
                        card:juice_up()
                        return true
                    end
                })) 
                return {
                    message = 'Oxidized!',
                    colour = G.C.GREEN,
                    card = card
                }
            end
        end
    end
}```
wintry solar
#

if you drop a sendDebugMessage in there, does it trigger?

still jacinth
#

just sendDebugMessage('test message')?

wintry solar
#

yeah that'll do

still jacinth
wintry solar
#

are you loading an old save to test or is it a fresh enhancement?

still jacinth
#

old save, ill load a new one

#

weirdly, it didnt do the debug message but it did turn it lucky like it is supposed to in the code

#

still not doing the changing to my enhancement (i removed the chance element)

tepid crow
#

make sure your steamodded minimum log level is set to trace?

wintry solar
#

is the key correct?

still jacinth
#

would it be m_dqck_oxidized?

#

also, i put some test messages in places after turning trace on, and its only sending a debug message before the if statements

wintry solar
#

oh

#

maybe enhancements don't call context.after

still jacinth
#

how do glass cards work then

wintry solar
#

glass cards aren't a modded item

still jacinth
#

ik but

#

dont they still use contexts

wintry solar
#

no

still jacinth
#

damn

wintry solar
#

you can lovely patch it though

#

that's what I do for an enhancement that has an after play effect

still jacinth
#

lovely patch?

rough furnace
still jacinth
#

is there an alternative to context.after besides patching

#

i also still dont even know how to add mult and stuff with enhancements

#

now its saying that card is a nil value 😭

#

it doesnt like me accessing self.ability.extra.xmult or card.ability.extra.xmult, how am i supposed to get the ability xmult??

paper hare
#

Can someone tell me why I'm getting the dreaded attempt to index field 'atlas' (a nil value) error when trying to open the collection page for Upgrades?

still jacinth
#

why did you send a zip

#

cant u just send ur code

brisk rose
paper hare
# still jacinth cant u just send ur code
upgrades:register()

SMODS.ConsumableType {
  key = 'Upgrade',
  collection_rows = { 5, 4, 4 },
  primary_colour = HEX('D97FCF'),
  secondary_colour = HEX('D97FCF'),
  loc_txt = {"Upgrades"},
  atlas = upgrades
}

SMODS.Consumable {
  key = 'mult_upgrade',
  set = "Upgrade",
  unlocked = true,
  discovered = true,
  pos = {x = 0, y = 0},
  loc_txt = {
    name = "Mult Upgrade",
    text = {"Upgrades {C:mult}Mult{} Jokers", "by one level"}
  },
  atlas = upgrades
}```
etc.

But there's definitely a problem in this code, because of `attempt to index field 'atlas' (a nil value)`
brisk rose
#

Though sending the whole mod makes sense too so people can test if they want

still jacinth
#

atlas = upgrades
shouldnt that be
atlas = "Upgrade"?

#

or wait

#

i might just be dumb lol

#

idk

still jacinth
#

yay

paper hare
#

but now I'm getting a different problem — the dreaded [ERROR] type and empty description.

wintry solar
#

you need to give it a loc_txt

paper hare
# wintry solar you need to give it a loc_txt

it already has one

  key = 'mult_upgrade',
  set = "Upgrade",
  unlocked = true,
  discovered = true,
  pos = {x = 0, y = 0},
  loc_txt = {
    name = "Mult Upgrade",
    text = {"Upgrades {C:mult}Mult{} Jokers", "by one level"}
  },
  atlas = "Upgrade"
}```
wintry solar
#

oh, and a loc_vars

paper hare
#

or does it have to be localize('text')?

paper hare
wintry solar
#
end```
#

iirc, just adding that will make it work

#

I could be mistaken though

wintry solar
# still jacinth .

self.config.extra.xmult should work, or you can throw an if card then before the card one

still jacinth
#

i dont know why its still angry about card

#

i changed it to SMODS.eval_this(center, { x_mult = self.config.extra.xmult, message = {type = 'variable', key = 'x_mult', vars = {self.config.extra.xmult}} })

wintry solar
#

can you show the whole function again?

still jacinth
#

the enhancement or just the calc part?

wintry solar
#

the calc part and the config values

paper hare
still jacinth
# wintry solar the calc part and the config values
    config = {extra = { xmult = 3, odds = 4 },},
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = {
          key = 'j_dqck_derpyjoker', 
          set = 'Joker',
          specific_vars = { 0, 1 }
        }
        return { vars = { card.ability.extra.xmult, ''..(G.GAME and G.GAME.probabilities.normal or 1), card.ability.extra.odds } }
    end,
    calculate = function(self, card, context, effect)
        sendDebugMessage('test 1')
        if context.cardarea == G.play then
            sendDebugMessage('test 2')
            SMODS.eval_this(center, {
                x_mult = self.config.extra.xmult,
                message = {type = 'variable', key = 'x_mult', vars = {self.config.extra.xmult}}
            })
        end
        if context.after then
            sendDebugMessage('test 3')
            card:set_ability(G.P_CENTERS.m_dqck_oxidized, nil, true)
            G.E_MANAGER:add_event(Event({
                func = function()
                    card:juice_up()
                    return true
                end
            })) 
            return {
                message = 'Oxidized!',
                colour = G.C.GREEN,
                card = card
            }
        end
    end```
wintry solar
#

you should be able to replace the SMODS.eval_this with effect.x_mult = card.ability.extra.xmult

still jacinth
wintry solar
#

oh, add a and not context.repetition to the if statement

still jacinth
#

ok so now everything is working except for the changing into an oxidized card

#

oh wait

#

its not even being triggered 💀

wintry solar
#

whats not being triggered?

still jacinth
#

the stupid context.after

wintry solar
#

like I said earlier, context.after isn't sent to enhancements

still jacinth
#

yeah

#

so i have to figure out a different way to deal with that

wintry solar
#
[[patches]]
[patches.pattern]
target = 'functions/state_events.lua'
pattern = '''if destroyed then'''
position = 'before'
match_indent = true
payload = '''
if scoring_hand[i].config.center == G.P_CENTERS['m_'..Ortalab.prefix..'_sand'] and not scoring_hand[i].debuff then
    
end'''
#

this is the basis of the lovely patch you need for the glass card step

still jacinth
#

what do i do with that

wintry solar
#

oh fuck it's 3am, I should've been asleep ages ago

still jacinth
#

you should probably sleep

wintry solar
#

good luck with your lovely patching!

paper hare
# wintry solar ```loc_vars = function(self, info_queue, card) end```

Partially works now. The Upgrade showed up, but not the description text

upgrades:register()

SMODS.ConsumableType {
  key = 'Upgrade',
  collection_rows = { 5, 4, 4 },
  primary_colour = HEX('D97FCF'),
  secondary_colour = HEX('D97FCF'),
  loc_txt = {name = "Upgrade"},
  loc_vars = (function(self, info_queue, card) end),
  atlas = upgrades
}

SMODS.Consumable {
  key = 'mult_upgrade',
  set = "Upgrade",
  unlocked = true,
  discovered = true,
  pos = {x = 0, y = 0},
  loc_txt = {
    name = "Mult Upgrade",
    text = {"Upgrades {C:mult}Mult{} Jokers", "by one level"}
  },
  loc_vars = (function(self, info_queue, card) end),
  atlas = "Upgrade"
}```
still jacinth
#

should it be loc_vars = function(self, info_queue, card) end, instead of loc_vars = (function(self, info_queue, card) end), or does that not matter?

still jacinth
#

hm

#

not sure if this affects it but you didnt change the atlas in SMODS.ConsumableType to "Upgrade"

still jacinth
#

i cant think of anything that would be wrong with the loc_txt and loc_vars

wintry solar
#

This might sound stupid, but does the one you’re hovering over have a loc txt?

paper hare
#

for some reason name comes through, but not text

still jacinth
#
functions/common_events.lua:2924: attempt to index local 'cfg' (a nil value)```

im getting this for making my enhancement have a little reference tab thing
wintry solar
#

Maybe try single quotes rather than double?

paper hare
wintry solar
#

I don’t know why it doesn’t work

#

Everything looks fine

still jacinth
#

have you made any other consumables of that type? if so, are their loc_txt's working?

still jacinth
paper hare
still jacinth
#

the only thing i can think of currently that would make it not work is the loc_var and loc_txt on the consumable type, but i have no idea why that would affect the specific consumable so probably not

still jacinth
loud citrus
#

I've been bashing my head against a wall trying to figure out how to make a config tab, if someone could make an example mod me and probably future people would be able to have a better understanding.

brisk rose
#

Just looking at how other mods do it isn't helping enough?

paper hare
loud citrus
surreal marsh
#

how to win the blind in a joker's calculate function🤔 just copy win_blind causes this

umbral zodiac
#

anyone know what im doing wrong? still very new to this and i got no clue how to set it up properly

#

i just kinda copied how another mod seemed to work

umbral zodiac
#

im very intelligent

#

do i really not need anything after the calculate function similar to how other entries need commas

umbral zodiac
#

ah alr

#

when u sent that screenshot i thought you meant a comma after the atlas line 💀

surreal marsh
#

🤪

umbral zodiac
#

holy hell the game opens this is new and unheard of

opal spade
#

how do i fix children (floating_sprite/stickers/seals etc) of resized jokers?

umbral zodiac
#

anyone know why this is happening now? nothing should be different to other code that works

#

the scaling part works perfectly fine, but whenever i try to score a hand, it crashes

opal spade
#

do you have any other jokers

umbral zodiac
#

no i only had the one

opal spade
#

wait

#

i realized

#

your joker shouldnt return anything on certain contexts

umbral zodiac
#

oh lmao

opal spade
#

replace return with card_eval_status_text instead

umbral zodiac
#

yea maybe having it upgrade any time anything happened was a reckless idea

opal spade
umbral zodiac
#

how do i use that? is it just doing card_eval_status_text = "zeepy zoop"

opal spade
#

it's in balatro's functions/common_events.lua

umbral zodiac
opal spade
#

i think for your purpose it should be card_eval_status_text(card, 'extra', nil, percent, nil, <your current return table>)

#

although having your code do something for every context w/o any specification is not good in general

umbral zodiac
#

why have good ideas when u can have bad ideas

nocturne garnet
#

wtf man

brisk rose
#

corrupted png?

opal spade
#

no

nocturne garnet
#

i didnt change nothin

opal spade
#

that happens when steam is trying to cloud

brisk rose
nocturne garnet
#

fuck you steam

#

okay wtf

frosty dock
#

iirc that's "not enough memory"

zealous glen
opal spade
zealous glen
#

@opal spade I did it here, let me see if I can find how

#

It was for 0.9.8 and I haven’t ported it yet

opal spade
#

let me know if you find it

zealous glen
#

At least how I did it was by changing the sprite size inside set_ability

#

So I could have a wide Joker and a wide floating sprite

#

How are you doing it

nocturne garnet
#

rate my setup

languid mirage
nocturne garnet
nocturne garnet
#

for more shit

nocturne garnet
#

for more ideas

languid mirage
#

didnt see your msg

nocturne garnet
#

whats the weirdest thing a card could change

zealous glen
#

Your mortgage

languid mirage
opal spade
# zealous glen How are *you* doing it

this function runs at the end of set_sprites (args is a table of arguments collected within set_sprites as the game is trying to see whether it should use an existing joker sprite or go procedural)

    local H = G.CARD_H
    local W = G.CARD_W
    local scale = args.wee and 0.7 or 1
    if args.same_check then
        local same_center = G.P_CENTERS[same_check]
        if same_center.set_sprites and type(same_center.set_sprites) == 'function' then
            card.config.center = same_center
            card.ability = card.infinifusion[1].ability
            same_center.set_sprites(same_center, card, front)
            card.config.center = G.P_CENTERS['j_infus_fused']
            card.ability = card.ability_placeholder
            return nil
        end
        
        if same_check == 'j_half' then
            H = H/1.7
        end
        
        if same_check == 'j_photograph' then
            H = H/1.2
        end
    end
    
    if args.square then
        H = W
    end
    
    card.T.h = H*scale
    card.T.w = W*scale
    
    card.VT.h = card.T.h
    card.VT.w = card.T.w
    
    
    if args.same_check then
        if args.square then
            card.children.center.scale.y = card.children.center.scale.x
        end
        
        if same_check == 'j_half' then
            card.children.center.scale.y = card.children.center.scale.y/1.7
        end
        
        if same_check == 'j_photograph' then
            card.children.center.scale.y = card.children.center.scale.y/1.2
        end
    end
end```
nocturne garnet
opal spade
zealous glen
#

Lemme paste my code

opal spade
zealous glen
#

0.9.8 formatting but still

languid mirage
#

ok I'm lbind

zealous glen
#

The important part is just defining set_ability

zealous glen
#

Because the Joker only needs to be resized once anyways

opal spade
#

i updated the file so its at the current state i have it rn

zealous glen
#

and it's fine to resize it when setting the ability

opal spade
zealous glen
#

This is how I discovered that the game creates new Jokers on load IIRC

#

Because it didn't make sense to me this would work

nocturne garnet
#

this joker is the funniest shit ever

zealous glen
#

I think an alternative procedural approach would be to allow width and height parameters in the object constructor and automatically append a resize to set_ability when constructing the Joker object

opal spade
#

wait

#

i think i realize what i have to do

zealous glen
#

Try getting it to work in set_ability first

opal spade
#

im not sure why that would effect anything

zealous glen
#

I’m just saying my code worked so maybe try that one 😅

#

And it will be easier to make progress after getting something to work

nocturne garnet
#

rate my setup chat

#

why is this happening.........

#

why must i be this bad 😭

#

its crashing instead of randomizing a random joker

opal spade
#

could it be the game undoing this

#

floating sprites don't resize for undiscovered booster packs, do they?

#

I'll need to check that when I get back

surreal marsh
languid mirage
#

oh I thought you were using real sprite but with undiscovered texture

#

why would you even use vanilla undiscovered sprite?

opal spade
#

it's soul_pos floating sprite

#

like legendaries

languid mirage
#

ah

wintry solar
#

you can disable it

opal spade
nocturne garnet
wintry solar
#

on new undiscovered sprites at least

opal spade
#

it's not actually undiscovered, it's just taking the textures vanilla uses for undiscovered

#

it's a joker and it defaults to undiscovered texture if it can't find appropriate one

wintry solar
#

does it use the soul position to draw the floating sprite?

opal spade
#

yes

wintry solar
#

you should be able to patch card:draw to send a scale to the floating sprite rendering in that case

opal spade
#

thank you for the help, now that i noticed what was going on no wonder it didnt work

zealous glen
#

I think the solution I showed to resize floating sprites worked

opal spade
zealous glen
#

Hmmm

zealous glen
#

All resized sprites, I mean

opal spade
zealous glen
#

Mine was made with the same size of the Joker sprite

#

I remember while trying to make it work, there was some setting to scale the sprite such that it had the correct size, but with stretching of course

#

Since I made my sprite the correct size, I didn’t want it

#

So maybe that’s what missing from my solution?

opal spade
zealous glen
#

But it’s the same sprite all the time

#

That does put some limitations on what you can do

opal spade
#

tbh i dont understand what you mean
if you mean "joker soul_pos uses the same atlas as joker's pos", then while yes, thats the normal behaviour, my set_sprites changes the floating_sprite's atlas to be different so i can use vanilla's atlases (and vanilla separates undiscovered joker body with undiscovere joker float)

zealous glen
#

No I’m not talking about a single Joker’s sprite

#

I’m talking about different Jokers

#

Since you’re automating it, I imagine you only have a single floating sprite

zealous glen
opal spade
#

what i think i'll do is remove my joker's soul_pos and instead create the floating sprite myself, then patch it's drawing as a separate chunk of code

zealous glen
#

That feels unnecessarily complicated

opal spade
wintry swallow
#

I really do wish mod support came to mobile, hopefully in the future, who watches skootie lite on YT, Cryptid mod is sooooooo overpowered

opal spade
#

moderators said no 😔

#

modding mobile is illegal

brisk rose
opal spade
#

didnt mean it literally im just silly odd_todd

brisk rose
#

lol you good

#

I just know some people actually believe that it is or might be, so just checkin

hardy viper
#

it's not like you can't do it you just can't talk about it here

brisk rose
#

tbh this is one of the reasons why we should have a seperate purly community modding server.

outer jungle
#

is there a easy way for a deck to give you a joker at the start of a run?

brisk rose
#

yes, sdm-0 has decks that do that

nocturne garnet
nocturne garnet
opal spade
nocturne garnet
#

yeah

#

rate my setup

nocturne garnet
rough furnace
#

if its in a joker calcualtge you probab;y have tp wait

crisp coral
#

instead of sleeping I've been thinking of a way to have multiple blinds active at once but the more i think about it the more impossible it seems thanks to the removal of the blind parameter from Steamodded blind objects

#

fml

#

never liked that change and now it's come to bite my ass

#

it was removed because the only thing that would be passed through the blind param is G.GAME.blind but now i need it to only affect like blinds[1] and nope that's not an option anymore

#

ok enough ranting back to sleep

mellow sable
#

Although it’s technically not multiple blinds, just a blind with multiple abilities

nocturne garnet
#

(i have no idea what a pepperspray looks like)

outer jungle
#

I might need some help with this one, happends when i try to give myself the card

--Boilerplate from Steamodded
SMODS.Joker {
  key = 'j_mystic',
  loc_txt = {
    name = 'Golden Joker 2',
    text = {
      "Earn {C:money}$#1#{} at",
      "end of round"
    }
  },
  config = { extra = { money = 4 } },
  rarity = 1,
  SMODS.Sprite:new("MysticJoker.png",
  cost = 6,
  loc_vars = function(self, info_queue, card)
    return { vars = { card.ability.extra.money } }
  end,
  -- SMODS specific function, gives the returned value in dollars at the end of round, double checks that it's greater than 0 before returning.
  calc_dollar_bonus = function(self, card)
    local bonus = card.ability.extra.money
    if bonus > 0 then return bonus end
  end
  -- Since there's nothing else to calculate, a calculate function is completely unnecessary.
}
-- Adding the Joker
add_joker("j_mystic", nil, true, false)

The Error displays the add_joker function at line 375

function add_joker(joker, edition, silent, eternal)
    local _area = G.P_CENTERS[joker].consumeable and G.consumeables or G.jokers
    local _T = _area and _area.T or {x = G.ROOM.T.w/2 - G.CARD_W/2, y = G.ROOM.T.h/2 - G.CARD_H/2}
    local card = Card(_T.x, _T.y, G.CARD_W, G.CARD_H, G.P_CARDS.empty, G.P_CENTERS[joker],{discover = true, bypass_discovery_center = true, bypass_discovery_ui = true, bypass_back = G.GAME.selected_back.pos })
    card:start_materialize(nil, silent)
    if _area then card:add_to_deck() end
    if edition then card:set_edition{[edition] = true} end
    if eternal then card:set_eternal(true) end
    if _area and card.ability.set == 'Joker' then _area:emplace(card)
    elseif G.consumeables then G.consumeables:emplace(card) end
    card.created_on_pause = nil
    return card
end
rough furnace
#

which line is 375 in partcitular

outer jungle
# rough furnace which line is 375 in partcitular

local card = Card(_T.x, _T.y, G.CARD_W, G.CARD_H, G.P_CARDS.empty, G.P_CENTERS[joker],{discover = true, bypass_discovery_center = true, bypass_discovery_ui = true, bypass_back = G.GAME.selected_back.pos })

maiden phoenix
#

If you want to test a joker in game use DebugPlus

outer jungle
#

okay

outer jungle
maiden phoenix
#

You might want to remove this line SMODS.Sprite:new("MysticJoker.png",

#

Not sure what its doing there

outer jungle
#

okay, but how do i give the joker a sprite?

hearty mesa
#

use SMODS.Atlas

maiden phoenix
#

You have to create an Atlas object and refer your joker to said atlas

hearty mesa
#

for example SMODS.Atlas { key = "jokeratlas", -- atlas name path = "jokeratlas.png", -- atlas file px = 71, -- width of each joker sprite, in pixels py = 95 -- height of each joker sprite, in pixels }

outer jungle
#

okay thanks let me try that :)

maiden phoenix
#

And then in your Joker you must add atlas: [atlas_key]

#

(without the [ ])

outer jungle
#

still crashes with the same error

#

do i add the joker wrong?
add_joker("j_mystic", nil, true, false)

tepid crow
#

is there any particular reason you want to use add_joker instead of any of the debug tools btw?

outer jungle
tepid crow
#

ah, I see

outer jungle
#

The current code

SMODS.Atlas {
  key = "mysticjoker", -- atlas name
  path = "MysticJoker.png", -- atlas file
  px = 71, -- width of each joker sprite, in pixels
  py = 95 -- height of each joker sprite, in pixels
}

SMODS.Joker {
  key = 'j_mystic',
  loc_txt = {
    name = 'Golden Joker 2',
    text = {
      "Earn {C:money}$#1#{} at",
      "end of round"
    }
  },
  config = { extra = { money = 4 } },
  rarity = 1,
  atlas = "mysticjoker",
  cost = 6,
  loc_vars = function(self, info_queue, card)
    return { vars = { card.ability.extra.money } }
  end,
  calc_dollar_bonus = function(self, card)
    local bonus = card.ability.extra.money
    if bonus > 0 then return bonus end
  end

}
tepid crow
#

no need to add j_ to your key

#

steamodded will do that for you

#

then that key will be transformed to j_[mod prefix]_mystic iirc

outer jungle
#

okay good to know

#

okay i try that

#

i changed the prefix to xaver with --- PREFIX: xaver in the steamodded header

tepid crow
#

sounds good

outer jungle
#

and use add_joker("j_xaver_mystic", nil, true, false) to add the joker

#

but there is still the error

#

functions/common_events.lua:375: attempt to index a nil value

#

Finally. I managed to fix the crash, thanks to everyone who took the time to help me out

#

Now everything works as aspected

loud citrus
#

so i'm editing a sticker from another mod and i was trying to exclude it from having rental and itself at the same time, am i incorrectly referring to rental because all of my other changes worked.

frosty dock
#

might just be an order of operations thing. stickers currently don't natively support being incompatible with each other in steamodded

#

basically rental doesn't care about applying after your sticker

loud citrus
#

huh, is there a way i can wait until after rental then?

umbral zodiac
#

how can i make a joker destroy itself?

maiden phoenix
#

Look at how food jokers does it

umbral zodiac
#

ah i see

neon ridge
#

hello wonderful people can someone teach a brotha how to make mods to this game, made a mod for tboi once, other than that im blind

loud citrus
#

it has recourses

#

but it's hard if you don't know the rules of lua

narrow pollen
#

maybe "Gain chips equal to 100% of all chip values and 500% of all other values"

loud citrus
#

you guys know the special website for displaying mod content? how do i make one of my own?

crisp coral
zealous glen
#

How would that work?

crisp coral
#

so no oo ain't cutting it

zealous glen
#

Because I'm not sure I see how one Blind with multiple abilities is different from multiple Blinds

crisp coral
#

separate score

zealous glen
#

How do you score separately?

crisp coral
#

why do you ask so many questions when it can't even work in theory

zealous glen
#

I mean, I'm trying to understand what you want to understand why it won't work

#

I don't know if it works in theory or not if I don't know what it even is

crisp coral
#

sorry if i'm coming out as rude, but i'm still very frustrated

zealous glen
#

I already read that message

#

It didn't clarify anything

crisp coral
#

that's all you need to know why it won't work

zealous glen
#

No, that's what I need to know for why a specific implementation of [something] won't work

#

But I still don't know what [something] is

crisp coral
#

because steamodded blinds always affect G.GAME.blind, instead of its own blind instance

#

so it will never work

zealous glen
#

I feel like this conversation isn't progressing

umbral zodiac
#

anyone know what this error actually means? the curly braces are seemingly fine (yes there is an ending curly brace at the bottom, screenshot couldnt fit it)

zealous glen
#

There's probably a wrong number of brackets

#

or there's something else putting a bracket out of scope

tepid crow
umbral zodiac
#

going mentally insane

#

ty

#

i really need something to alert me of my stupid commas 😭😭😭

tepid crow
#

if that ever happens again just start cutting into your own code

#

isolate it to a couple of lines and it'll be way easier to spot (though to be fair, the error gave you the 3 lines it happened on)

crisp coral
zealous glen
#

As I said, it was a scope issue

zealous glen
crisp coral
#

if you do have a solution then you can chime in

zealous glen
#

Again I can't make a suggestion unless I know what you want to do

#

So far you've only talked about how you want to do something

#

The only what I know is that there would be multiple scores

#

which isn't a lot because there's no word on what a player does to score multiple scores and the relationship between them and progressing the game state

#

Is it like Pokémon where you select a move (hand to play) for each Pokémon (Blind), and only after selecting a move (hand to play) for each it processes what happens?

#

And so you have a copy of your deck for each Blind?

#

I guess we will never know balatrojoker

umbral zodiac
#

is there a way to check if a joker is being viewed in the collection

#

rn it crashes the game since there isnt exactly a deck to view in the main menu

mellow sable
#

I think you can check what type of card area it is in

#

But for this sort of thing you should probably check if there is a deck to view

umbral zodiac
#

so more like if G.deck

#

or would that not work

mellow sable
#

That should work

umbral zodiac
#

yay it works

#

ty

mellow sable
#

yw

crisp elbow
#

Dearth?

umbral zodiac
still jacinth
#

is there a way to get the amount of seconds spent in the current ante, similar to Cryptid's The Clock and Lavender Loop? i tried looking at the code for it in Cryptid but i dont really understand any of it

mellow sable
#

You basically have to set a timer right when the ante starts

#

Hook Game:update(dt) - that dt is what you add to your timer

#

Cryptid’s is much more complex because it’s using that dt to calculate the blind size instead of putting it in a timer

still jacinth
#

so how do i set a timer when the ante starts

mellow sable
#

Hook ease_ante probably

still jacinth
#

i dont know how to hook lol

limpid wing
#

What is the name of the save editor?

still jacinth
#

i think it might be Brainstorm

#

nah i think im wrong

umbral zodiac
#

anyone know why using card_eval_status_text like this is causing the text to appear in the top left corner of the screen?

#

like its up here for some reason

mellow sable
umbral zodiac
#

oh alr

limpid wing
umbral zodiac
#

developer art is best art 🔥

limpid wing
umbral zodiac
#

we need jorkem ipsum 🔥

#

maybe not actually

mellow sable
umbral zodiac
#

dear lord

limpid wing
#

M

tepid crow
limpid wing
tepid crow
#

Oh. That's not corrupted, that's just gone

mellow sable
# umbral zodiac dear lord

Lorem Ipsum (Exotic)

Create a random hidden consumable when a blind is selected. (The Soul, Black Hole, White Hole, Gateway, POINTER://)
-# just uses placeholder art

limpid wing
mellow sable
#

For Cryptid that should be like a code card related joker

umbral zodiac
#

i have a problem

mellow sable
#

I imagine something like creating code cards then self destructing

limpid wing
#

If else card

mellow sable
tepid crow
#

didn't someone make a joker with a whole codeblock in it

#

like a complete if-else statement

umbral zodiac
#

creates a consumable that doesnt show what it is at all

#

but it is a random consumable

mellow sable
#

-# by the way if we want to be strict about the Latin requirement, it would be called Dolorem Ipsum

limpid wing
#

New M joker name idea

#

Iocosa scurra its jolly joker in latin

umbral zodiac
#

waiter waiter !! more m jokers

mellow sable
#

(Balatro is another translation of joker in Latin)

limpid wing
#

Nice name lore

orchid thunder
#

I had. A sheet me and my friend made and I was going to try to make an exotic based of a very similar name but i never go around to creating an idea and though it would be too much since we already had 1 M exotic

limpid wing
tepid crow
#

I've actually started doing that myself too lol

#

Actually helped me out recently when I accidentally overwrote my normal save file by starting the game with mods like talisman

lament zealot
umbral zodiac
#

how can you create a custom joker rarity?

hardy viper
umbral zodiac
#

ah

hardy viper
#

there's a custom rarity fork of steamodded but it doesn't really work and seems to be more of a complete rework of rarities which isn't really necessary

#

there's a chance it gets refined and perfected and merged into steamodded but i don't see it happening very soon

umbral zodiac
#

then i might hold off for now and just make my op ideas weaker and legendaries

edgy reef
#

You sound like the first person to test the PR besides me.

#

So I am intrigued.

#

🤔

brisk rose
#

Cryptid seems to make their own globals for their rarities

#

And uses a lovely patch to get them to display

#

The only snods function I see involved is insert_pool

edgy reef
#

Cryptid also did some hooks which are converted to injections.

#

technically rarities were heavily messed with but vanilla rarity logic was super hardcoded.

#

And even then it doesn't turn into that much

#

I'll go mess with it rq

brisk rose
#

So yeah it seems like any changes made to how rarities work were just to make a custom rarity api possible at all

opal spade
#

apparently infinifusion crashes at engine/particles.lua when being materialized through ankh and im completely stumped with what i could do to avoid it because of how low level its going
nvm it was because there was no rarity

edgy reef
#

Or did I not...

#

Ok I was hallucinating

#

But from some quick testing it does work as intended and the rate normalization math checks out, so I'm not sure what's broken about it.

brisk rose
#

I presume, so as to not needlessly break every single existing modded joker, that the indices will still work for vanilia rarities

edgy reef
#

Yea

#

There's some backwards compat between int/string rarities for vanilla rarities so on paper both should function the same.

brisk rose
#

makes sense

loud citrus
#

so i can't refer to jokers like consumables, so i'm wondering how would i in this case?

brisk rose
#

check their code

edgy reef
#

Ok I do need to double check if all rarity-specific stuff works as I broke The Soul

loud citrus
brisk rose
#

oh I see

#

there are jokers that can do that too

#

there's one in ortalab

#

that gains chips for both consumables and jokers

loud citrus
#

thank you! ill check that out right now :)

brisk rose
#

np :3

brisk rose
#

the newer dev version probably has it in 1.0 format but it's not public

#

nvm

#

i guess the old demo was ported

#

I just kinda presumed it wasn't

loud citrus
brisk rose
#

no worries :3

loud citrus
#

we where just taking about your mod i think

brisk rose
#

it's one of my favorite non-content (as in no new cards) mods and relies a lot on specific rarities

edgy reef
#

hmm, sure

brisk rose
edgy reef
#

All the non-mod specific rarities work (Epic Pack would need to have the rarity set to "cry_epic" instead of 1).

#

Exotic already uses a string so it's fine

brisk rose
#

glad it works for what i'd use

loud citrus
#

i remember talking about this with someone but i don't know how to get this code to overwrite the code of abstract joker

brisk rose
#

shouldn't your mod take prescedence if it has a negative priority? or does it need to be positive to take ownership of the object in the first place? (totally spitballing as a non-modder)

#

(it's probably not how priorities work)

loud citrus
#

so basically i turn a vanilla object into my modded one, it still has all of the same code but i can mess with it

brisk rose
#

yes that's take_ownership right?

loud citrus
#

here overwriting delayed grat was easy because i know how to do this kind of return because it's not much code

#

but with bigger blocks i have no idea how to return it

brisk rose
#

does returning it the same way as if it was a from-scratch joker not overwrite the original code?

loud citrus
#

so returning simply sends back the information, and because i'm using the same function as the original code the info sent back goes over the original, that's why text that needs to update constantly or any value, uses return

brisk rose
#

I mean wouldn't it still work the same way on abstract then? return the mult and it goes over the original?

#

afaik the variable you're returning is what makes the difference, not how you calculate it

#

the original code still running and being ignored seems like it's probably a non-issue

#

though as I said I quite literally have no idea what I'm talking about, lol

#

tbh I'd think your calculate function would run instead of the original anyway

loud citrus
#

so this is what i'm returning, what's confusing me is that this should do the trick but abstract isn't acting as my modded version but vanilla, i don't know if my code works because the value isn't behaving like my code.

brisk rose
#

at least your ide doesn't seem to think so. I suck at counting "ends"

loud citrus
#

no it is

brisk rose
#

oh I was missing the very outer line that must be there

#

my b

loud citrus
#

also i'm trying out returning other things

#

see if it works

brisk rose
# loud citrus no it is

actually no, your ide is parsing it as 2 seperate functions. Calculate ends before return starts

loud citrus
#

this is how i think it works out

#

wait my ends are in bad spots

brisk rose
#

they are faint with your color theme, but there

loud citrus
#

well notpad++ doesn't track ends properly sometimes and i would be lying if i said i had the whole picture but in drawing i was able to see and fix a big issue

brisk rose
#

fair enough

#

I didn't even know np++ had that sort of ide-like feature at all

#

I wonder what there is on linux that's between a plain text editor and a full-fat ide

lime sierra
#

neovim

#

There's a lot actually in the style of NP++

#

Kate honestly is a pretty good balance

brisk rose
#

I mean most default linux text editors mostly get there tbh

#

xed is what comes with mint and it has things like highlighting for specific languages, line numbers, and some other things. Though it doesn't seem about to show the bounds of a function with lines in the margin like that

#

which would be useful

hearty mesa
#

hi hello I am trying to make a joker that destroys itself and it crashes at end of round and i have no idea why

        if context.end_of_round and not context.game_over and not context.repetition then
            G.GAME.joker_buffer = G.GAME.joker_buffer - 1
            Q(Event({ -- jenlib my beloved
                fc = function()
                    for i=1,2 do
                        -- insert function to create a card here
                        -- there is a function here in my code i
                        -- just omitted it because it's long
                    end
                    G.jokers:remove_card(card)
                    card:remove()
                    card = nil
                end
            }))
            card_eval_status_text(card, 'extra', nil, nil, nil, { message = "Split!" })
        end
    end```
hearty mesa
#

oh nvm i figured it out, you just need to remove the G.GAME.joker_buffer = G.GAME.joker_buffer - 1 line

frosty dock
#

at a glance, shouldn't fc be func?

umbral zodiac
#

anyone know why this joker does literally nothing? tried to copy dna's code but just make it work on the whole hand and it doesnt seem to do anything

#

no crashes, joker exists perfectly fine, its just nothing happens

frosty dock
#

pretty sure hands_played gets incremented somewhere in that sequence

#

try including 1

#

classic oboe

umbral zodiac
#

ok well i tried something else that dupes cards and now theres just certain cards that are literally invisible

brisk rose
#

Keep in mind DeFused is still a 0.98 mod

brisk rose
#

they're unselectable too right?

umbral zodiac
#

i dont know if theyre selected in the first place tbh but

#

i would assume so, since my joker was supposed to duplicate every played card

#

and it was duping cards i didnt think i had played

brisk rose
#

hmm... not sure what to reccomend that you reference. Mika's Mod has a joker that duplicates all played cards in the winning hand but the code is probably not too useful for modern steamodded stuff because it's a pretty old mod

umbral zodiac
#

do u keep everydetail of every balatro mod in your mind

brisk rose
#

and have over 900 jokers in my game

umbral zodiac
#

either way i just decided to scrap that part of the joker and replace it with: discards now destroy all discarded cards, gain a death card for each discarded card

#

though i may actually make it give cryptid cards so u can make 1 bajillion cards u like

crisp coral
umbral zodiac
#

funny

#

what file is create_card in i want to know how it works

crisp coral
#

misc_functions.lua

umbral zodiac
#

i found it in common_events

maiden phoenix
#

Check if context.full_hand exists first

maiden phoenix
brisk rose
#

how do I do that? (this isn't originally my code, I have no experience modding balatro for real yet. Just frankensteining together existing jokers)

crisp coral
umbral zodiac
#

i figured out how to make it work even though i actually probably did it very stupiodly

umbral zodiac
#

idk what the right way is all im doing is this

maiden phoenix
#

Should be put around the CheckForFaces block

brisk rose
maiden phoenix
#

Im blind I can't see what you changed in your code

umbral zodiac
#

that indentation hurts me

#

im so sorry

brisk rose
#

sorry

maiden phoenix
#

Keep the CheckForFaces = true above the if line

brisk rose
#

ah yeah that might be why it's not crashing but also not doing anything atm

maiden phoenix
#

I'm not sure if context.full_hand exists with context.other_joker

brisk rose
#

and I managed to do that troubleshooting in the middle of a run, while winning the blind in question, lol

maiden phoenix
#

uhm maybe you should try on a new run

brisk rose
#

because now it's functioning and not crashing

maiden phoenix
#

If you modify a modded joker and continue your run it will keep the the old modded joker data

brisk rose
#

it behaved differently whenever i changed the code

#

I restarted the game ofc

maiden phoenix
#

Huh

#

Well if it works 🤷

brisk rose
#

I don't think that it stores the code anywhere but the lovely dumps, which it regenerates every time you boot the game

#

so afaik it couldn't reuse the old code if it wanted to

#

maybe i'm way off

umbral zodiac
#

what if you wanted to make a good looking balatro mod but god said "you must have an upscaled version of your cards"

brisk rose
brisk rose
#

i'm not even sure the official jokers do

brisk rose
#

as long as it's integer scaling the pixels stay square

brisk rose
#

that doesn't interpolate really

#

it's good for integer scaling pixel art

umbral zodiac
#

no im just saying i dont like the process of adding new great art and then having to make another version of the file

brisk rose
#

oh you're lazy

umbral zodiac
#

i dont really mind how its upscaled too much

brisk rose
#

i get it

#

i am too

#

lol

umbral zodiac
#

i make my jokers for INSTANT gratification

#

i turned off pixel art smoothing and Bro what

brisk rose
#

TBH you could make a python script that does it in one click

umbral zodiac
#

truee

brisk rose
umbral zodiac
#

done turned my jokers into a puzzle 🙏

brisk rose
#

it's normal for it to do that

#

it's a vanillia bug I think

#

or smodded

umbral zodiac
#

"lets see you take a crack at it smart guy!"

umbral zodiac
brisk rose
#

also, what? I know fuck is blocked in some contexts but I don't get this one

umbral zodiac
#

i feel like joe biden rn

opal spade
#

you can press M to reload atlases

maiden phoenix
#

Tbh it looks like the jokers have the wrong sprite size

umbral zodiac
#

theyre just a big puzzle

maiden phoenix
#

The spritesheet in your x1 folder needs to be half the size of the one in x2

brisk rose
#

yeah it's not the normal no-restart texture bug then

umbral zodiac
#

you see i d

#

ont like spritesheets

#

so i think abouyt them as little as possible

maiden phoenix
#

Still your images needs to have the proper dimensions

umbral zodiac
#

ill deal with it when i decide my mod should be mid tier quality at best

brisk rose
#

ah I see

#

trying to block verb use, lol

languid mirage
crisp coral
#

what's the parameters for "hide button if condition is not met"

#

i forgor

#

wait im an idiot

wintry swallow
#

I really wish mods was on mobile, games like btd6 luck be a landlord and balatro are more fun with mods, arent they?

frosty dock
#

just play on steam and relay that to your phone somehow? pretty sure that's possible

opal spade
#

on my way to make gaycoonie's defused fork of fusion jokers fusable again

maiden phoenix
#

Omw making evolutions of fused defused fusions of jokers

brisk rose
limpid flint
#

What

opal spade
# opal spade

idk if i'll actually go through the effort of coding in fusion/defused jokers into the main mod, but the api for that will be there

stiff locust
opal spade
#

werent you also making a fusion mod

#

i can add built-in support for it later if you want

maiden phoenix
# opal spade

I know it's usually hard to have 2 of the same joker, but what if fusing 2 of the same joker that can evolve fuses into their evolution? 🤔

opal spade
#

absolutely possible

#

when i finish this update all you'll need to do is just add an optional dependecy file to register them as SMODS.InfiniFusion objects

opal spade
nocturne garnet
#

what if

maiden phoenix
#

Spectral?

nocturne garnet
nocturne garnet
#

HELL YES

#

rate my setup

opal spade
#

why decimals

nocturne garnet
#

+, *, - or / -2.25 to 3.25 to all values

crisp coral
#

is that just misprint deck on a joker

nocturne garnet
#

fucked up evil misprint deck

opal spade
#

why no floor

#

or ceil

#

does Balatro even have ceil

crisp coral
#

math.ceil prolly exists

nocturne garnet
#

guess what its hiding

umbral zodiac
#

waiter more polychrome hearts 😭‼️

cobalt surge
#

i google translated balatro

primal robin
#

At least 100 times?

cobalt surge
#

each

#

till it was good enough

#

im working on blinds tags cards seals etc

#

but the main jokers etc is done

#

want v1

lament zealot
tepid egret
#

balatro mod that makes it look like theres beer in the background

#

like the iphone app that makes it look like you're drinking a beer

ebon blade
#

hi, so im working on this idea https://discord.com/channels/1116389027176787968/1280991980574216192
and i need help from someone who knows what they are doing with lua to make a data base or an api or at least a base source of basic joker functions so i can add those to code blocks in a scratch like tool (i chose to make the menu not ingame)

#

im making the tool itself, i just dont know lua or balatro modding by itself

#

if anyones intrested in helping

cobalt surge
#

im trying to make a googel translate mod but i want to have a toggle for the descriptions translations how do i do that?

wooden nexus
maiden phoenix
#

Cursed

wooden nexus
#

I see nothing wrong here

shell timber
#

joker without jolly