#💻・modding-dev

1 messages · Page 447 of 1

formal parrot
#

1 second

#

Do you anything about f#

snow vale
formal parrot
#

Shit

pastel torrent
#

thank you

formal parrot
#

Sent message link

pastel torrent
#

may both sides of your pillow be cold

#

every summer

formal parrot
pallid sleet
#

Tis a new day so Im hoping I can get this figured out today. I have this joker that I made to basically make two negative bubble jokers these jokers are my own custom ones though. Even with having prefix for the joker it crashes the game when it tries to work. Hlep

    calculate = function(self, card, context)
        if context.setting_blind then
            SMODS.add_card({key = "j_loljk_Bubble", edition = "e_negative"})
            SMODS.add_card({key = "j_loljk_Bubble", edition = "e_negative"})
        end
    end

the JSON:

{
    "id": "silly_goofy_balatro_mod",
    "name": "SillyGoofyBalatroMod",
    "display_name": "Silly Goofy Balatro Mod",
    "author": ["blocky"],
    "description": "Made this for dopamine",
    "prefix": "loljk",
    "main_file": "main.lua",
    "badge_colour": "#078674",
    "badge_text_colour": "#ffffff",
    "version": "1.0.0"
}
formal parrot
#

@snow vale

snow vale
#

ok

formal parrot
#

Check other people shaders

#

Aswell

#

1 second i have one more recourse

#

Ressource

#

FUCK

#

Here

#

I wish you all luck

snow vale
#

ok tysm

formal parrot
#

Good advice

#

Check people’s shaders

#

And ingame shaders

#

Good resource would be ruby’s

#

Shaders in entropy

#

They’re advanced and look really cool

formal parrot
#

Create_card

#

This is how i do it

#

New card =

snow vale
#

btw what language uses the shaders?

formal parrot
#

Emplace and add to deck at the end

formal parrot
snow vale
hard mica
#

does anyone know how i can give the player a random buffoon pack?

formal parrot
snow vale
#

ok

sleek cliff
#

so, im trying to localize only a specific set of jokers, but idk how to localize that

pallid sleet
formal parrot
#

Pool*

#

And pseudorandom

hard mica
formal parrot
#

🤷

#

That sound easy tho😭

#

Can’t think of anything else really

hard mica
#

damn

formal parrot
#

Idk

#

Look for references

#

I can’t really guide you here i don’t play modded , can’t think of a helpful resource

#

But my idea should work perfectly

#

@hard mica

wild escarp
#

Where is the ID of a played hand scored?

formal parrot
#

Make a local table

tight hull
#

so my texturepack mostly works but there are some black strips, does someone know how to get rid of them?

formal parrot
#

Locals packs={key1,key2,key3}

#

Variable =Math.random(#packs)

#

Add tag with the key in (packs[variable ])

formal parrot
formal parrot
#

It should look something like this

#

Every joker is separated with 2 pixels from others

hard mica
formal parrot
#

Remade of tags

wild escarp
# formal parrot What?

I want to check and store the ID of a played hand so that I can check whether or not a certain hand has been played at the end of a round.

hard mica
formal parrot
hard mica
tight hull
#

or is it too complicated

formal parrot
#

Px=
py=

#

In your atlas

#

X is width and y is hight

tight hull
#

its that bad?

formal parrot
#

You should

#

Can you show me the sprite sheet ?

tight hull
formal parrot
#

Yup

#

I knew it

tight hull
formal parrot
#

Your cards are off centered

#

There’s no pixel separation between tarots

tight hull
formal parrot
#

Move them couple of pixels left and right

tight hull
formal parrot
#

Depends on where the lines are

formal parrot
tight hull
#

you mean as horizontal separation or vertical

formal parrot
#

Every tarot takes

#

95x71

pure salmon
#

how do i check if the player is currently in a blind

formal parrot
#

Make sure they’re not taking each other spaces

#

Thats it

formal parrot
#

Forgot

#

Lmao

chrome widget
#

huh bwuh

tight hull
# tight hull

nvm im stupid, when removing the background i left a black strip

#

between cards

formal parrot
#

Skull emoji

pastel torrent
formal parrot
#

Kms

native zinc
chrome widget
native zinc
#

where the fuck did you steal from

formal parrot
#

Stealing code is legal

tight hull
#

another texture pack

formal parrot
#

^w^ i can do my favorite hobby without the policemen going after me

native zinc
#

yes but it's stolen from somewhere that uses ancient smods

formal parrot
tight hull
#

wdym

formal parrot
formal parrot
native zinc
#

no it doesn't im pretty sure this breaks

manic rune
# tight hull

oo those cards are cool, what media is this from? 🤔

native zinc
#

and also this isn't piracy

formal parrot
#

It does

manic rune
tight hull
tight hull
native zinc
#

you should upgrade and just read from malverk

manic rune
#

6 months ago

#

😭

formal parrot
#

Holy balls

#

Balatro beta

native zinc
#

come on now stealing from archaeological sites is illegal

#

why have you done this...

manic rune
#

at least steal from new mods 😭

formal parrot
manic rune
#

stealing from old mods makes it hard for both you and other people 😭

native zinc
#

malverk literally had examples :p

formal parrot
#

Yo guys if it works

manic rune
tight hull
formal parrot
#

We don’t touch it

#

She take my dinero chat

native zinc
#

well i still feel like pointing at rule 5

#

i sincerely doubt you can obtain permission from a beta mod dev

candid sleet
#

sorry for reply ping to super old message but could i use this in my mod and how do you get it to work? i'm messing around with it right now and i made it a .toml file and put it in Mods>Mod Name>lovely but i still can't get perishable to work

wintry swallow
#

oh perishable is not an edition

#

perishable is a sticker

candid sleet
#

ohhh right

tight hull
candid sleet
#

i thought this was for stickers for some reason my bad

wintry swallow
#

kinda fun how people keep coming back to my patches time and time again though lol

formal parrot
#

😭😭

native zinc
#

but if it's personal it's probably fine? i am not a lawyer

primal robin
chrome widget
#

For the record if anyone wants use my code they do not need my explicit permission because intellectual property is fake and stealing is cool

primal robin
#

gottem

normal crest
#

I wouldn't even call it stealing, more like duplicating

chrome widget
#

Correct

worthy stirrup
#

What happens if a mod shares a priority number with another mod?

formal parrot
native zinc
#

if anyone wants to use my code and/or art they are entitled to a 1 hour+ step-by-step lesson on how to recreate that code or art by themselves because i believe in the guarantee of education

lament agate
#

fuck why isnt it working

normal crest
worthy stirrup
#

Ok thanks, I wanted to make sure I didn’t need to change the number

pure salmon
#

which argument in SMODS.Booster controls this bottom text

snow vale
#

why isnt this creating a negative playing card?

native zinc
#

is it not in docs

#

it's probably a loc txt thing right

pure salmon
#

oh it is in docs

#

group_name

wintry swallow
#

i'm not terribly active around here anymore but i still respond to queries

chrome widget
formal parrot
tepid crow
stiff quiver
#

hi, i was told a few hours ago to hook SMODS.calculate_context here for this to work, but i actually still have no idea of what im supposed to do lol. could i get a bit of help?

native zinc
pure salmon
snow vale
formal parrot
#

N help the cute girl

red flower
red flower
native zinc
#

duplicate cards with seal on destroy

stiff quiver
#

with a specific seal but yeah, that

red flower
#

sounds hard

native zinc
#

which more accurately means just add a copy to hand on destroy

#

it's difficult yeah

formal parrot
#

There’s no has_seal😭😭

lament agate
#

does anybody have the booster pack template?

native zinc
#

you can just get the seal key

formal parrot
#

Code or assets

lament agate
#

assets

native zinc
#

but it would be useful to have has_seal() or has_sticker() at some point

stiff quiver
#

its not any seal its a seal whose ability is that when the card is destroyed it creates two copies of it

lament agate
native zinc
lament agate
#

whats the atlas res btw

native zinc
errant fulcrum
formal parrot
pure salmon
native zinc
#

the seal check is probably easiest

lament agate
chrome widget
wintry solar
#

this calculate function is within the seal, right?

pure salmon
#

they're from the balamod aesprite extension files, which has other useful assets

wintry solar
#

and what about it isn't working?

stiff quiver
#

this is what i havelua calculate = function(self,card,context) print("0") if context.destroy_playing_cards then print("1") for i = 1, #context.removed do print("2") if context.removed[i].seal == "" then for l = 1, 2 do print("3") local copy_card = copy_card(context.removed[i], nil, nil, G.playing_card) copy_card:add_to_deck() end end end end end}

#

but its not doing anything

wintry solar
#

context.destroy_playing_cards isn't a thing

faint yacht
#

context.remove_playing_cards is, however. 😛

lament agate
#

my deck is rock hard

#

@manic rune

manic rune
#

mhm, hold on

stiff quiver
manic rune
#
local click_ref = Card.click
function Card:click()
  local ret = click_ref(self)
  SMODS.calculate_context{clicked_card = self}
end
#

this is what you want

lament agate
manic rune
#

no, put it outside of your joker's code

native zinc
#

this code is for nxhoo

wintry solar
manic rune
#

and remove the SMODS.calculate_context inside your joker's calculate too

lament agate
stiff quiver
#

i was told by somethingcom that context.remove_playing_cards doesnt get called on seals so i needed to hook SMODS.calculate context

wintry solar
#

well you were given bad information then

manic rune
#

looks right, yes

tawdry oriole
#

is there a way to update a joker's loc_txt through the update method?

stiff quiver
native zinc
#

loc_vars

#

Misprint does some shenanigans

tawdry oriole
merry raven
#

So with SMODS.ObjectType I can create new card types different from Jokers, consumables and playing cards?

lament agate
pallid sleet
#

Should this work for making two negative jokers from the same mod as this one?

calculate = function(self, card, context)
        if context.setting_blind then
            new_card = SMODS.create_card({key = "j_loljk_Bubble", edition = 'e_negative'})
            new_card = SMODS.create_card({key = "j_loljk_Bubble", edition = 'e_negative'})
        end
    end
red flower
native zinc
#

loc_vars can take strings

tawdry oriole
#

but they can't take strings with other loc_vars in them right?

#

like it wouldnt work

native zinc
#

why wouldn't it just send more than one

tawdry oriole
#

right

#

i'll try it out

native zinc
#

you can also change colour and stuff with V

tawdry oriole
#

yeah that im aware of

tired kestrel
#

Now how does X2 mult gain work?

snow vale
#

how should SMODS.merge_effects() be used?

manic rune
#

what line is this

wintry solar
red flower
snow vale
stiff quiver
lament agate
red flower
snow vale
#

ok

plush jewel
#

Chat Im making joker that copies the first card in the first hand of the blind and adds a seal to it. Can't manage to make a copy of card

manic rune
snow vale
#

and why isnt this working?

manic rune
#

now we just need to fix the code inside

wintry solar
lament agate
manic rune
red flower
manic rune
#

not G.GAME.current_round.round_resets.ante 🤔

lament agate
stiff quiver
# wintry solar can you screenshot the full seal code?
SMODS.Seal{
  key = "shoomimi_seal",
  loc_txt = {
    name = "Shoomimi seal",
    label = "Shomimi seal",
    text = {
      "When this card is {C:attention}destroyed{},",
      "create {C:attention}two{} copies of it"}},
  badge_colour = HEX('8CE6BD'),
  discovered = true,
  unlocked = true,
  calculate = function(self,card,context)
    print("0")
    if context.remove_playing_cards then
      print("1")
      for i = 1, #context.removed do
        print("2")
        if context.removed[i].seal == "" then
          for l = 1, 2 do
            print("3")
            local copy_card = copy_card(context.removed[i], nil, nil, G.playing_card)
                copy_card:add_to_deck()
          end
        end
      end
    end
  end}```
manic rune
#

actually, is it G.GAME.current_round.ante or G.GAME.round_resets.ante...

#

its one of these

#

lemme check

plush jewel
#
calculate = function(self, card, context)
        if context.after and context.scoring_hand then
            local original = context.scoring_hand[1]
            if original and original.ability then
                G.E_MANAGER:add_event(Event({
                    func = function()
                        local original = context.scoring_hand[1]
                        local copy = copy_card(original)
                        if copy then
                            copy:set_seal("goolatro_hologram")
                            copy.ability.hologram_uses = 3
                            G.ENTITIES.HAND:give_card(copy)
                            play_sound("prototype_clone")
                            card_eval_status_text(card, 'extra', nil, nil, nil, {message = "Projected!"})
                        else
                            print("[Prototype] copy_card вернул nil")
                        end
                        return true
                    end
                }))



            else
                print("[Prototype] Оригинал недействителен или нет ability")
            end
        end
    end
lament agate
manic rune
#

yeah its G.GAME.round_resets.ante

lament agate
#

so

lament agate
#
if context.clicked_card and context.clicked_card == card then
            if G.GAME.round_resets.ante ~= card.ability.extra.last_click_round then
                card.ability.extra.knock_count = (card.ability.extra.knock_count or 0) + 1
                card.ability.extra.last_click_round = G.GAME.round_resets.ante
#

@manic rune

manic rune
#

looks right to me

lament agate
#

alright

wintry solar
red flower
# snow vale

it might be because it returns 2 values, try saving it to a local first

lament agate
manic rune
#

🤔 whats :update_loc_vars()

#

im pretty sure that doesnt exist

lament agate
#

oh my god

#

really?

#

god damnit

manic rune
#

yeah it doesnt

main minnow
#

okay can someone help me understand what exactly G.P_CENTERS is? i can't tell what it's actually for (aside from being some kind of weird catch-all object), where it's defined or how to interface with it

stiff quiver
red flower
manic rune
#

G.P_CENTERS stores all the information of "centers" (which includes jokers, consumables, backs aka decks, etc etc), and whenever they are created they will grab information from there

snow vale
main minnow
#

right okay

tight hull
#

Hi, I came back to say that I fixed it

#

and im even more blind than I thought

lament agate
#

@manic rune IT WORKS!!!

manic rune
#

nice, gj nxkoo :3

tight hull
manic rune
#

😭

wintry solar
manic rune
#

how did you not notice a black strip in your atlas lol

lament agate
stiff quiver
manic rune
lament agate
#

nevermind

manic rune
#

whats the joker's code

lament agate
#

IT WORKS

manic rune
#

oh lol

tight hull
lament agate
#

-# but ante works, i dont like coding this at all

wintry solar
manic rune
#

i mean, the "every 1 round" part can be done in either context.end_of_round or context.setting_blind, so its not that difficult 🤔

stiff quiver
#

doesnt hurt to try updating

wintry solar
#

time to merge the probability utils 🤞 for no explosions

pallid sleet
#

okay so this doesn't crash the game but it doesn't work any ideas?

calculate = function(self, card, context)
                use = function(self, card, are, copier)
                    local new_card = nil
        if context.setting_blind then
            new_card = SMODS.create_card({key = "j_loljk_Bubble", edition = 'e_negative'})
            new_card = SMODS.create_card({key = "j_loljk_Bubble", edition = 'e_negative'})
        end
    end
manic rune
lament agate
#

but ill try t

tight hull
manic rune
#

wait

#

why the hell is your use function in your calculate

#

😭

wintry solar
lament agate
#

like this right? @manic rune

stiff quiver
manic rune
#

what is the effect of this joker

lament agate
manic rune
#

i might need a general idea on what you are doing first

lament agate
#

thats it

pallid sleet
tawdry oriole
manic rune
#

so the knock can be increased by:
- at the end of every round
- you manually clicking on it?

manic rune
#

🤔 whats the every round effect then

lament agate
#

before you came in

tired kestrel
stiff quiver
#

still isnt working for me, i genunely dont know why

pallid sleet
pallid sleet
#

joker

manic rune
manic rune
# pallid sleet joker
calculate = function(self, card, context)
        if context.setting_blind then
            SMODS.add_card({key = "j_loljk_Bubble", edition = 'e_negative'})
            SMODS.add_card({key = "j_loljk_Bubble", edition = 'e_negative'})
        end
    end```
lament agate
#

tysmmm!

manic rune
#

the fact that it didnt crash with that is a miracle honestly

lament agate
pallid sleet
stiff quiver
#

um, so i added this to see if the game did it when i played a card with the seal and its not even doing that, maybe my game just doesnt even recognize the seal? lua if context.main_scoring and context.cardarea == G.play then print("0") return { message = "AAAAAAAAAAAAAAAAAA" , mult = 100 } end

wintry solar
#

does your card definitely have the seal?

#

or are you editing some other file thats not the correct one?

stiff quiver
pallid sleet
#

nope
yknow yesterday was me figuring out how to add a prefix to the overall mod and it should be set up properly...

stiff quiver
pallid sleet
#

im gonna read the crash report

#

im gonna screnshot actualyy..

manic rune
pallid sleet
#

damn

#

good guess! lol

#

its correct

#

lemme figure it out rq

manic rune
#

mhm, double check the joker's key then

tawdry oriole
# red flower return a `key` in loc_vars...

not really possible in this situation, i'm trying to modify the entire 5-6 line description every now and then, returning the entire text as a key in loc_vars just crashes the game

#

wait i have an idea

pallid sleet
manic rune
#

its fine, everyone goes through that every once in a while :p

red flower
tawdry oriole
#

how would i do that though?

#

i have no knowledge whatsoever of localization entries

errant fulcrum
#

Am I crazy or is there an SMODS.remove_card function?

junior hamlet
#

Hey I just tried to install Pokermon - I got lovely and Steammodded and that is the only mod I run but I can't get it to work.
Worked just fine on my laptop, but I can't get it to work on my desktop.
Can I post a pic of the error and someone might guide me where I went wrong?
(sorry if that is the wrong chat I am trying to find everything out as I go)

red flower
#
  1. make a localization file
  2. in descriptions = { Joker = {...} } put an entry for your joker, the key should be something like j_modprefix_key_desc2
  3. in loc_vars
    return { key = condition and "j_modprefix_key_desc2" or nil }

you can check vanillaremade or another big mod to check how localization files are set up

#

@tawdry oriole

tawdry oriole
#

ohh alright

pure salmon
#

trying to create an edition that always destroyed the card/joker it's on at the end of the round, but this messes with the deck size (shows 55/52 after adding and removing 3 temporary cards). can i fix this?

tawdry oriole
#

i'll try it out

#

thanks a lot

manic rune
lament agate
#

okay so

#

if it was text

#

its should be G.C.TEXT_RED?

#

since when i use G.C.RED, the text wont show up

errant fulcrum
red flower
manic rune
lament agate
#

the first UIT

manic rune
#

i see

red flower
lament agate
#

huh

#

it disappears when i put RED

red flower
#

maybe im wrong with the name

manic rune
#

im p sure its G.C.RED

tired kestrel
lament agate
#

let me show you

#

the text

#

with the red

#

40

manic rune
lament agate
#

oh wait

#

this one is G.C.UI

#

and the other were G.C

tired kestrel
lament agate
#

whats the difference

main minnow
red flower
main minnow
#

like, there is no calculate function on that object in the base game (at least not that i can find), so i'm not sure where i should be referencing this or what it should be returning

red flower
#

smods adds a calculate function

#

but i still wouldn't recommend doing that

lament agate
red flower
#

use take_ownership instead

shell timber
#

new n profile picture?

quiet bear
#

is there a way to sense if any joker triggers?

manic rune
#

context.post_trigger

red flower
#

it's an optional feature you have to enable

manic rune
#

🤔 it is?

main minnow
hidden sable
#

how can you not tell? this guy clearly doesn't have more hours in balatro than atoms in the universe

red flower
main minnow
#

is there an ETA on that release?

glad stirrup
#

Is there any way to store the key of the last used consumable? Been trying to figure it out myself and just can't get my head around it.

main minnow
hidden sable
red flower
hidden sable
red flower
#

a better way to manipulate them yeah

glad stirrup
hidden sable
crisp coral
timid night
#

Hey im making an edition (for jokers) that multiplies current chips by 2, how would I access the amount of chips that there are currently?

hidden sable
crisp coral
#

the xchips in question

merry raven
#

How do I move my button up

timid night
snow vale
#

never helped me

#

tbh

hidden sable
snow vale
#

but is the only thing i have so

hidden sable
#

let me find my example of a hook

snow vale
#

i can show u some examples tho

#

yeah

crisp coral
#

declare it somewhere else

snow vale
merry raven
#

I could have sworn that I made a button that's not at the bottom before

hidden sable
#

have a look at this

pallid sleet
#

what would be code for a joker like this? or at least the claculate bits this seems a little complicated

hidden sable
#

not a perfect example but

merry raven
tawdry oriole
#

the loc file is set up but the thing is that i'm not sure what i'm supposed to do with the key in loc_vars

#

is key to be replaced with something too?

faint yacht
#

-# How do I format the return for context.check_enhancement again?

hard mica
#

Does anyone know how I can give the player a random buffoon pack?

snow vale
#

also @daring fern @gilded blaze tysm, i finally fixed my amalgam joker, now it works even if i reload my run

red flower
daring fern
main minnow
#

is there a good way to check if the player currently owns a particular joker, or do i have to set flags in the add_to_deck and remove_from_deck functions?

main minnow
#

yes, i have to set flags?

daring fern
pallid sleet
#

how does random chance work? where in code do I put it.

snow vale
#

how can i make so i can only sell him if i have money?

crisp coral
timid night
#

When xchips is 1, it doesnt multiply chips at all, but when it is 2, it multiplies it twice?

merry raven
timid night
red flower
snow vale
snow vale
#

how can i refer to the money i currently have?

red flower
#

G.GAME.dollars

snow vale
#

ok ty

timid night
#
-- doesnt multiply
if context.edition and context.cardarea == G.jokers then
            return {
                xchips = 1
            }
        end

-- multiplies by two and then two again
if context.edition and context.cardarea == G.jokers then
            return {
                xchips = 2
            }
        end
red flower
timid night
#

Yup

#

Im very new to modding so I might be doing this in the worst way possible lol

red flower
#

try using context.post_joker instead of context.edition

tired kestrel
#

Does anyone have an idea of replicating the solitare win screen thing?

snow vale
plush jewel
#

How to make joker trigger it's ability only on first hand of the round?

timid night
main minnow
red flower
snow vale
#

uh

stiff quiver
#

@wintry solar i got a friend to test the seal i was making and they said it works but the cards stay floating instead of being added to hand

plush jewel
#

How to make joker trigger it's ability only on first hand of the round?

red flower
snow vale
#

so then what do i change for the argument??

main minnow
faint yacht
pure salmon
#

how do i make an edition effect also trigger on debuffed cards?

harsh wind
#

what the hell is tarot interrupt pulse 💔

glad stirrup
red flower
snow vale
#

it's my worst enemy after shaders

glad stirrup
#

Testing determines it doesn't work 🙃

pure salmon
#

i want this to trigger no matter what (currently this causes issues with debuffed cards, as they are not destroyed)

pallid sleet
#

Is it posssible to discard a hand after its been played? like a joker that has a 1 in 5 chance of discarding the hand played.

wintry solar
red flower
stiff quiver
wild escarp
#

Anyone know why this sometimes creates 2 jokers?

calculate = function(self, card, context)
    if context.selling_self and not context.blueprint then
        card_eval_status_text(
            card,
            "extra",
            nil,
            nil,
            nil,
            { 
                message = localize("k_plus_joker"), colour = G.C.RARITY["willatro_organ"] 
            }
        )
        local card = create_card("Joker", G.jokers, nil, "willatro_organ", nil, nil, nil, "willatro_cadaver")
        card:add_to_deck()
        G.jokers:emplace(card)
        card:start_materialize()
        return nil, true
    end
end
faint yacht
#

...that looks like a retriggerable Joker with return nil, true being there.

wild escarp
#

idk, I just copied stuff from cryptid.

stiff quiver
tawdry oriole
#

is there a way to exclude a certain joker rarity (or certain jokers if that isn't possible) from a booster pack?

quiet bear
#

why does it no work

real night
#

how do you change the atlas for your mod in github commits

#

ive never figured that out

rugged mantle
faint yacht
#

I've sped up the calculating and the triggering parts by 4x in post as indicated by >>. Otherwise, Nopeus.

pallid sleet
#

what do dis mean

#

index field joker eh?

tawdry oriole
pallid sleet
#

mk

#

thx

rugged mantle
#

Btw does anyone know what gamepad inputs love uses for joycons or are they universal?

wild escarp
#

Anyone have a good example of booster pack code?

pure salmon
# wild escarp Anyone have a good example of booster pack code?
SMODS.Booster {
    key = "ephemeral_small_1",
    loc_txt = {
        name = "Ephemeral Pack",
        group_name = "Ephemeral Pack",
        text = {
            "Choose {C:attention}#1#{} of up to",
            "{C:attention}#2# {V:1}Ephemeral{} cards to",
            "be used immediately"
        }
    },
    config = { extra = 3, choose = 1 },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.choose, card.ability.extra, colours = {HEX("8ea4b3")} } }
    end,
    cost = 4,
    atlas = "gb_Boosters",
    weight = 1.5,
    pos = { x = 0, y = 0 },
    draw_hand = false,
    select_card = "consumeables",
    kind = "Ephemeral",
    create_card = function(self, card, i)
        return SMODS.create_card({set = "Ephemeral", skip_materialize = true, area = G.pack_cards})
    end,
    ease_background_colour = function(self)
        ease_colour(G.C.DYN_UI.MAIN, HEX("8ea4b3"))
        ease_background_colour({ new_colour = HEX('59778c'), special_colour = HEX("8ea4b3"), contrast = 2 })
    end
}
wild escarp
#

Thanks!

pallid sleet
pure salmon
#

how do i do something before context.end_of_round in update

#

i want to undebuff cards with an edition before then so they trigger their destroy effect

#

or if there's a way to have editions work regardless of debuff status that works too

wild escarp
#

What are the default weights for packs in the base game?

faint yacht
#
Balatro Wiki

Two booster packs are always offered in each Shop, often but not always of two different types. These come in five categories:

Arcana packs, containing Tarot Cards for immediate use.
Celestial packs, containing Planet Cards for immediate use.
Standard packs, containing playing cards (often with enhancements, seals and/or editions) that are adde...

rugged mantle
pure salmon
#

how do i make an edition that stops a card from being modified?

native zinc
#

but that's scuffed asf

pure salmon
#

that is scuffed

#

there is on_remove but that would only trigger if you tried to override the edition

stiff quiver
#

could i put if context.before and context.remove_playing_cards then to make something happen before a set of cards gets destroyed?

#

or does context.before not work like that

wintry solar
#

@red flower just looking through the visible poker hands PR, how do you feel about combining is_visible with visible, so visible can either the function (or a boolean for back compat reasons)?

pallid sleet
#

hleppp with random chnace 1 in 5 plss

#

wait cna i just debuff the played hand instead?

#

hmmmmm

faint yacht
#

-# god, returning every enhancement on every card is wild af. laggy tho.

modern kindle
#

Have you tried turning off the lag machine

#

Silly goose

faint yacht
pallid sleet
#

( pulling hair out rn)

#

THOU SHALL SUFFER TERRIBLY IN WHAT IS CODING

#

lmao

sweet pelican
#

I'm not sure if I'm using these variables the right way, I'm getting an error that I'm trying to compare a number with a table? any help would be greatly appreciated!

red flower
tired kestrel
#

how do you load images for an effect?

wintry solar
#

oh right yeah, the game auto sets them to true when you play them right?

red flower
#

yeah

placid harbor
#

Why am I seeing mixed usage of "number" and "float" in GLSL? Wouldn't everything just be "number" since Love2D's version of GLSL just converts float into that?

wintry solar
#

the function would automatically use the originally defined function though at all times

red flower
#

And if you want to check if it was played you would check G.GAME.hands?

wintry solar
#

and then if a function doesnt exist it'll default to the boolean value set by the game, which I think is probably fine?

#

you'd need a different check for played hands regardless

red flower
#

yeah i think it's fine

wintry solar
#

I don't know how to fix the lsp though 😭

#

can I just leave both lines there?

pallid sleet
#

This has an error but idk what the error is, could someone point it out for me. Should be somewhere around the else because it was when I added that, that it didn't work.

 calculate = function(self,card,context)
        if context.joker_main and #context.full_hand == 5 then 
             if pseudorandom('ThunderStorm') < G.GAME.probabilities.normal / card.ability.extra.odds then
            return {
                Xmult_mod = card.ability.extra.Xmult,
                message = "X" .. card.ability.extra.Xmult,
                colour = G.C.MULT
            } else 
                if context.before then
        card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips
        return {
            message = 'Upgraded!',
            colour = G.C.RED
        } 
    end
red flower
sweet pelican
wintry solar
#

that sounds correct

#

cool, that's sorted then

sonic cedar
#

the jokers' keys get stored in the global table properly, but the joker isn't using the effects of the jokers stored?

example: i store the key of clever joker, but this guy justraq doesn't have the effect of clever joker

red flower
#

someone should make an API to copy not-owned joker effects

sturdy compass
#

That would be cool

sweet pelican
sonic cedar
#

it would be so awesome

#

it would be so cool

pallid sleet
#

hmmm

placid harbor
#

Could probably use an elseif instead of an else and an if too

sweet pelican
#

^ yeah that too

pallid sleet
#

how so?

#

(figuring it out lol 😭 )

placid harbor
#

It does the same thing

#

Just cleaner

broken rivet
#

how do mods do tetrating, pentating, etc. mult/chips

formal parrot
#

Huh?

#

Using talisman

#

[f talisman ]

pallid sleet
#

hmh it still shows an error. its one of those things where it has the bottom most "}" underlines red

broken rivet
#

oh talisman does it

rugged mantle
pallid sleet
#

i uhm hmmmm

wintry solar
red flower
#

i see that asked a lot in here so i think it would be amazing

placid harbor
pallid sleet
#

Gah! this sucks I hacve no idea whats going wrong 😭
I dont really know about where the "ends' have to go regarding "else" statements

placid harbor
#

Not sure about chaining "if then if then" needs a separate end for each... but you probably missed an "end" in the if block you have at the end in your else block

red flower
#
if condition then
    -- code
elseif condition then
   -- code
else 
   -- code
end
sweet pelican
placid harbor
wintry solar
pallid sleet
#

okay okay hollup

red flower
placid harbor
#

Ah yeah that makes sense

placid harbor
#

One if you change that else and if into an elseif

stiff quiver
pallid sleet
#

okay i think your right and I found solution

#

Theres no error message so hope it works

    calculate = function(self,card,context)
        if context.joker_main and #context.full_hand == 5 and
         pseudorandom('ThunderStorm') < G.GAME.probabilities.normal / card.ability.extra.odds then
            return {
                Xmult_mod = card.ability.extra.Xmult,
                message = "X" .. card.ability.extra.Xmult,
                colour = G.C.MULT
            } 

        elseif context.before then
        card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips
        return {
            message = 'Upgraded!',
            colour = G.C.RED
        } 
    end
end 
placid harbor
#

Now you have one too many I think

pallid sleet
#

when i had only one it didn't work

#

tho

placid harbor
#

Yeah but you removed 2 if blocks

#

You went from 3 to 1

stiff quiver
#

theres one end for the if and another for the function, its fine

placid harbor
#

Oh functions need an end too?

stiff quiver
#

yes

placid harbor
#

Ugh give me back my brackets

pallid sleet
#

it works but not as intended research must be done! ☝️

#

lol lemme test some stuff

red flower
# wintry solar N what are your thoughts on this? https://github.com/Steamodded/smods/pull/774

i think it's cool but in my opinion it's going to be a lot harder to convince people to use this one, even more so than the probability ones

probabilities checks are already kinda cumbersome to write and they require people to learn what pseudorandom is, but this one replaces a simple value = value + scalar which I think it's kinda unintuitive (and gets close to Talisman's to_big thing)

also it says addative instead of additive 😦

wintry solar
#

yeah I'm not keen on it for that reason

plush jewel
#

I want to post mod where can I do that

wintry solar
#

it doesn't handle the things that scale negatively either right now

#

but overall, I think it would be very hard to get it picked up

rugged mantle
plush jewel
placid harbor
pallid sleet
#

the goal of this calculation is to have it trigger when played hand has 5 cards, then to have a 1 in 5 to upgrade its chip count, if not landing on that 1 in 5 then it'll do X2 Mult

im a noob so sadly cannot help.
Grasp a better concept of all of this I must!

sweet pelican
#

how do I refer to the player's current score at the end of a round? I tried using G.GAME.chips but it seems like thats storing all the chips I've scored in the run?

wind steppe
#

how would i implement a double exponential chips effect (^^2 chips)? i have talisman

red flower
sweet pelican
#

oh then I've made some logic error 😭

#

I'll review my code lol

#

ty

red flower
#

what does it say when you print it

sweet pelican
#

can I print thought the debug menu?

#

I didnt know I could even do that

red flower
#

yeah

#

print(G.GAME.chips) in your code or eval G.GAME.chips in the debug plus console

stiff quiver
tired kestrel
#

okay I was trying to recreate the solitare winscreen thing.

#

but I get an error for this

red flower
sweet pelican
sweet pelican
#

oh wait

pallid sleet
sweet pelican
#

is it adding my current dollars to the amount it's adding?

red flower
#

yes

sweet pelican
#

ah

#

that would do it

tired kestrel
#

nvm figured out

sweet pelican
#

oh and I guess it would assume any number I return is in dollars becuase it's a "calc_dollar_bonus" yes?

red flower
sweet pelican
#

okay that makes so much sense thank you a ton jimbo_spin

stiff quiver
pallid sleet
#

is there a chance action instead of an if statement?

#

beause i believe its the fact that its an if than going into another if than

red flower
hidden sable
#

how would i make a consumable that turns your entire hand into 1 selected card

red flower
wind steppe
#

what does this mean? (in smods.rarity)

#

trying to make a joker rarity

pallid sleet
#

im using this line of code for the 1 in 5 chance but the problem is I only want it to trigger after this other (2nd) if then. It seems to not work for the first one to be the result of the second one.

if pseudorandom('ThunderStorm') < G.GAME.probabilities.normal / card.ability.extra.odds then 
if context.joker_main and #context.full_hand == 5 then
red flower
hidden sable
wind steppe
#

do i need to add this if i want the rarity to work

red flower
red flower
wind steppe
#

wait nvm vanillaremade has rarities

pallid sleet
#

okay hollup TwT

#

lmao

red flower
#

that's why I'm asking what the problem is, that looks correct to me

sour garden
#
calculate = function(self, card, context)
    -- When hand is drawn
    if context.hand_drawn then
        if (context.card:get_id() == 12) then
            SMODS.debuff_card(card, false, source)
        end
    end        

i'm trying to make a joker where when queens are drawn, they get undebuffed
when it runs if (context.card:get_id() == 12), it gives an error saying card is a nil value. is there a way to provide a value for card?

red flower
#

context.hand_drawn is a list of cards drawn, you would need to iterate that

but also I would use context.debuff_card

#

instead of hand_drawn

sour garden
#

oh that's a thing? i couldn't find it on the documentation

#

this was driving me crazy last night

errant fulcrum
#

Could anyone tell me why this sets the cost to 1 and not 0?

{
    cost = 0
}, true
)```
sour garden
red flower
#
if context.debuff_card and context.debuff_card:get_id() == 12 then
     return { prevent_debuff = true } 
end    
stiff quiver
#

i think you misspelled the return, it'd be ```lua
return {prevent_debuff = true}

red flower
#

yes

sour garden
#

works like a charm, thanks y'all

wind steppe
#

how do i add tetrational chips with talisman?

daring fern
chrome widget
#

Is it possible to insert modded items in the order of item load before some vanilla items?

#

I'm adding some Blinds, but I'd prefer to be able to add my non-boss blinds with the non-boss blinds in the collection (rather than after the default boss blinds)

manic rune
#

is it possible to pow a table, like {50,500} (50500) by 0.5 (or 0.2, whatever) without needing to turn the table into a whole number?

#

ive been scratching my head over this for a while now

sonic cedar
daring fern
manic rune
sonic cedar
manic rune
#

{50,500} is supposed to be a big num here, and im trying to figure out a way to exponentiate that big num by 0.2 (i think i got the word right)

#

and no, this is not talisman

red flower
#

is that 50*10^500?

daring fern
manic rune
#

nop, its just 50500 when converted into a number

stiff quiver
manic rune
#

:3 wat

stiff quiver
#

or am i not understanding what you want

manic rune
#

that doesnt help me with exponentiating the big num lol

stiff quiver
#

well nvm then lol

manic rune
# stiff quiver or am i not understanding what you want

okay, so uh, because lua ints have a value of 2^1024 or something, a way to bypass this is to have big nums which are essentially tables of numbers

{50,500} in this case is 50500

and currently, im trying to figure out a way to exponentiate this big num with a number that has decimal points

red flower
#

i hate math

stiff quiver
#

so you want to do 50500 ^num?

manic rune
#

same N', same

manic rune
#

which is very unfortunate because i have been looking at this screen for about an hour now :3

stiff quiver
#

so basically you want like an ecuation that with 50 and 500 you get 50500 ^n

manic rune
#

mhm

sonic cedar
stiff quiver
#

yeah that math is complex lmao

manic rune
#

all because of this fucking upgrade :3

manic rune
#

why did i think i was qualified for this

sonic cedar
#

cause you are

manic rune
#

no, not at all

#

the most notable thing i have been able to add to this bignum lib was representing it with "e" (i dont know what its called)

sonic cedar
#

whoa

manic rune
#

its 2:32 am rn, so im just gonna take a sleep and figure this out tomorrow

normal crest
#

Why are you representing the numbers like that in the first place

manic rune
#

good night everyone

manic rune
#

because they are bignums? 🤔

stiff quiver
#

i asked chat gpt and it made this for python, seems pretty accurate from my testing py def concat_power(a, b, n): d = 1 if b == 0 else int(math.log10(b)) + 1 c = a * (10 ** d) + b return c ** n

manic rune
manic rune
#

i see d and c in there too

stiff quiver
#

a is the first number in the list, b is the second one and n is what you are elevating by

#

oh wait it just concatenates the numbers and then calcs, i should've read lol

manic rune
#

oof

#

yeah no that unfortunately wont work lol

stiff quiver
#

sorry, well hope you sleep well!

manic rune
#

when concat'ed bignums can very frequently go above the limit of nums unfortunately

#

yeah no worries, gn :3

wind steppe
normal crest
#

just wondering why you chose it

daring fern
wind steppe
tired kestrel
#

How do I get the Joker's X position?

manic rune
#

dunno, thought that was the easiest way to go about with it

normal crest
#

No, the [50, 500] = 50500

manic rune
#

oh

#

the library does that

#

:p

#

i couldnt find any better ones, so

sour garden
#

is it possible to return 2 different enhancements with quantum enhancements?

daring fern
sour garden
daring fern
tired kestrel
tired kestrel
#

like card.X or card.y

#

I was trying to replicate the solitare winscreen

daring fern
normal crest
#

card.T.x

tired kestrel
#

and oh by the way, I've been trying to get the jpeg shader to work, while it did work but it didn't render the jpeg effect.

#

just to let you know

sonic cedar
#

it didnt send

wind steppe
daring fern
sonic cedar
tired kestrel
daring fern
tired kestrel
#

I want it to like at the area where the joker is positioned.

sonic cedar
#

cause i print the global one each time with eval

daring fern
sonic cedar
#

in this case

#

it doesnt say

#

(its empty)

hard mica
#

Anyone know how to give the player a random buffoon pack?

sterile minnow
#

hey, is there a way to give different number of repetitions to different number?

sour garden
# daring fern No, you would do `return {m_wild = true, m_modprefix_key = true}`
if context.individual and context.cardarea == G.play then
        if context.check_enhancement and context.other_card:get_id() == 12 then
            return {m_wild = true, m_lucky = true}
        end
    end
end

i added the first line after adding the code on its own led to a stack overflow error, but now it seems to not be doing anything whatsoever

tired kestrel
normal crest
sterile minnow
#

how would I do it?

sterile minnow
wild escarp
#

How would I have this booster pack create jokers of only a certain modded rarity?

create_card = function(self, card)
    return create_card("Joker", G.pack_cards, nil, nil, true, true)
end,
red flower
#

return { set = "Joker", rarity = "modprefix_key", area = G.pack_cards }

hard mica
daring fern
sour garden
tired kestrel
#

Apperently when I used card.T.x and card.T.y somehow it set itself to the top left corner not the position where the joker is.

tired kestrel
tired kestrel
#

actually Y'know what

sour garden
# daring fern Log?

don't want to share the entire log unless you need it, but the log ended with

INFO - [G] ERROR LOADING GAME: Card area 'shop_booster' not instantiated before load 
INFO - [G] ERROR LOADING GAME: Card area 'shop_jokers' not instantiated before load 
INFO - [G] ERROR LOADING GAME: Card area 'shop_vouchers' not instantiated before load 
INFO - [G] line not found
tired kestrel
#

this is the joker I've been making

daring fern
tired kestrel
#

I know there's some code that I'Ve gotten reference from the yahimod which is an idea to learn also.

sour garden
#

was there a patch in a more recent version?

daring fern
sour garden
#

a couple, let me try turning off my other ones

sour garden
tired kestrel
#

Finally figured out

#

it was supposed to be: card.tilt_var.mx and card.tilt_var.my

daring fern
sour garden
#

just tried it, nope

daring fern
sour garden
#
SMODS.Joker{ --Queen
    name = "Queen",
    key = "queen",
    config = {
        extra = {
            
        }
    },
    loc_txt = {
        ['name'] = 'Queen',
        ['text'] = {
            [1] = '{C:attention}Queens{} count as both',
            [2] = '{C:attention}Wild{} and {C:attention}Lucky Cards{}',
            [3] = 'and cannot be debuffed'
        }
    },
    pos = {
        x = 0,
        y = 0
    },
    soul_pos = { x = 0, y = 1 },
    cost = 20,
    rarity = 4,
    blueprint_compat = false,
    eternal_compat = true,
    unlocked = true,
    discovered = true,
    atlas = 'CustomJokers',
    
    loc_vars = function(self, info_queue, card)
        return {vars = {}}
    end,
    calculate = function(self, card, context)
    -- When hand is drawn
    if context.debuff_card and context.debuff_card :get_id() == 12 then
     return {prevent_debuff = true}
end    
    
        if context.check_enhancement and context.other_card:get_id() == 12 then
            return {m_wild = true}
        end
    end
}
tired kestrel
daring fern
sullen field
#

heya so uh, i'm trying to develop a mod basically from scratch, 0 coding experience at all. so i may need someone to show me the ropes of lua, and yes, i'm trying to understand shit through the main thread.

daring fern
#

You have to check if context.other_card.base.id == 12

tired kestrel
wild escarp
#

Is there a context I can check for the start of a new run?

tired kestrel
daring fern
#

So it would be useless.

plush depot
#

im trying to make 1 joker count multiple enhancements and then give +3 mult for each one scored, if i wanted to count multiple woud it be adding commas and then more enhancements or would it be something like i have here

daring fern
sour garden
daring fern
daring fern
plush depot
#

thanks didnt see that

tired kestrel
#

Now, how do I make it so that it can draw into gameplay

#

without being on the front

sour garden
daring fern
tired kestrel
#

just to seee that it's actually in game

north swallow
#

guys how do i make a new type of consumables?

solid grotto
#

Is there a way to simply check if a listed probability happens or not?
I'm trying to make a joker that scales based on failed listed probability triggers
I could always brute force it and change every joker with listed probabilities to also return scaling, but it'd be nice to have this be compatable with future jokers I add

solid grotto
#

If you lack any coding experience then modding is going to be pretty difficult

#

As a first step

tired kestrel
solid grotto
#

Honestly I recommend using code.org to learn javascript

daring fern
solid grotto
#

Lua would be weird to learn first because it's not used often

north swallow
solid grotto
# daring fern No.

I can always use the brute force method which probably won't take that long. Only issue is that it won't be compatable with other mods

sullen field
north swallow
sullen field
#

oh?

north swallow
#

aside from table stuff

#

and a bit of details

solid grotto
#

I suppose not every mod needs to be compatable with other mods

daring fern
north swallow
#

i didnt know vremade did that

sullen field
north swallow
solid grotto
#

This my first mod anyway so I can always change things later or simply have it be a standalone thing

north swallow
#

also looking at other people's code

solid grotto
#

Not all mods need to work with each other

#

¯_(ツ)_/¯

north swallow
#

i recommend looking at vanilla remade's code and the steamodded api wiki

#

pretty useful stuff there

solid grotto
#

Vanilla remade has carried me so far

#

Simply being able to look at how base game jokers function is a godsend

sturdy compass
#

Glad we could help

tired kestrel
sullen field
#

thanks mates, i appreciate it.

north swallow
tired kestrel
violet gulch
solid grotto
#

What's the function to take ownership and change base game jokers?

#

I forget

tired kestrel
#

that's what I was going for for this joker

violet gulch
#

Instantly recognizable, nice work.

solid grotto
#

Thank you

sturdy compass
#

I’m looking for feedback on a potential SMODS Pull Request I’m proposing. The idea is a value scaling util function that takes into account global scaling modifiers and new contexts, but the concern is that replacing something as simple as adding to a value could lead to inconvenience. I believe it’s not an insanely drastic issue and has a lot of potential for more functionality devs could harness, but I still wanna know the thoughts of others https://github.com/Steamodded/smods/pull/774

mild fractal
#

being told "unexpected symbol near '='" and not really sure what's wrong? sorry if its obvious lmao i am very much just learning

north swallow
vague crest
# north swallow

out of curiosity if you wanted to create something that works like four fingers or shortcut, would the process involve doing the take ownership thing on a vanilla hand?

wild escarp
#

I've got this code, but the suit only resets after a played hand, so it always starts as spades, is there a good way to have it also reset at the start of a run, similar to ancient joker or castle?

calculate = function(self, card, context)
    local message = false
    if context.after and context.main_eval then
        local valid_eye_cards = {}
        for _, playing_card in ipairs(G.playing_cards) do
            if not SMODS.has_no_suit(playing_card) then
                valid_eye_cards[#valid_eye_cards + 1] = playing_card
            end
        end
        local eye_card = pseudorandom_element(valid_eye_cards, 'willatro_eye' .. G.GAME.round_resets.ante)
        if eye_card then
            card.ability.chosen_card.suit = eye_card.base.suit
        end
    end

    if context.before and context.main_eval and not context.blueprint and card.ability.chosen_card then
        for k, v in ipairs(context.scoring_hand) do
            if v:is_suit(card.ability.chosen_card.suit) then
                card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
                message = true
            end
        end
    end
    if message == true then
        message = false
        return {
            message = localize('k_upgrade_ex'),
            colour = G.C.MULT
        }
    end

    if context.joker_main then
        return {
            mult = card.ability.extra.mult
        }
    end
end
hard mica
sturdy compass
daring fern
hard mica
north swallow
daring fern
daring fern
#

There is SMODS.four_fingers and SMODS.shortcut

hard mica
daring fern
tired kestrel
vague crest
north swallow
#

how do i make it so i can add a name to the custom consumable set?

wild escarp
#

What would I be putting in there to reset though? Since I'm not using a function.

daring fern
north swallow
daring fern
north swallow
daring fern
north swallow
#

so just this

daring fern
formal parrot
#

Localization?

tired kestrel
#

trying to figure out how I can like put the animation when the message shows.

formal parrot
#

Happens to the best of us

tired kestrel
#

can you add funciotns to calculate effect so it can trigger at he same time when it triggers?

brazen tusk
#

Could you rephrase sorry I’m not quite understanding what you are asking

tired kestrel
brazen tusk
#

I would imagine you just tell it to play in the same return you have to show the message

tired kestrel
#

yeah

hard mica
brazen tusk
#

Same as juicing a card

sullen field
tired kestrel
faint yacht
#
return { message = ...,
  func = function()
    -- start?
  end
}
```?
daring fern
brazen tusk
#

Or that

hard mica
daring fern
tired kestrel
#

wait I'm gonna try something

daring fern
tired kestrel
#

return {
message = localize('k_upgrade_ex'),
colour = G.C.MULT,
func = function()
-- start?
end
}something like this?

#

is this something that you didn't get?

hard mica
daring fern
daring fern
tired kestrel
#

I need to have an idea if it's instant

#

or how would it be instant?

#

hold on.

daring fern
tired kestrel
#

I think I figured out