#đŸ’»ăƒ»modding-dev

1 messages · Page 437 of 1

thorn basin
#

omg it was simpler than I thought, thank you so much, it works properly now

manic rune
#

wheres all the uhhh stuff to return that gives xmult stored?

like, xmult, x_mult, Xmult, allat

faint yacht
#

SMODS.calculation_keys?

manic rune
#

oh dang that exists?

#

thanks

molten musk
primal terrace
#

How would I check when other Jokers give Chips or Mult?

crisp coral
#

any mod made before 1.0.0 smods

faint yacht
#

...and you'll need to enable the optional feature of post_trigger, too.

manic rune
#

actually realized i can just do this

#

:3

primal terrace
manic rune
#

looks much better now

feral tree
#

trying to create my first deck but i ended up in a overflowing sea of ben, It keeps repeatedly drawing the joker over and over everytime i run it

manic rune
#

you need to return true in func too

#

else it wont stop running

feral tree
#

thx

hidden sable
#

what do you call the area with the jokers in it

faint yacht
#

G.jokers

hidden sable
#

no like, outside of programming, what is that area called

#

becaise hand is your playing cards

#

played hand is your played cards

#

and "joker area" sounds boring

faint yacht
#

...why not reference them as Jokers held?

hidden sable
#

ture

#

but for example

#

if i wanted to reference them as

#

say a certain type of joker

#

needs to have is quanity specificied in the joker area

#

in decription

#

what would i say

#

like

#

right now i have

#

+mult for each other <joker> equipped

#

which i think works fine but it seems odd to use the word equipped

faint yacht
#

<type> Joker held

hidden sable
#

true

faint yacht
hidden sable
molten musk
#

can someone please tell me why does this trigger twice at end of round

faint yacht
hidden sable
faint yacht
molten musk
#

here whole code

hidden sable
#

its happening at the end of a round right?

#

just use calc_dollar_bonus

light canyon
#

OK, I just can wait 5 years

hidden sable
#

wiat nvm im stupid

#

thats a seal

#

mb gang 💔

molten musk
#

stoped giving money

wintry solar
faint yacht
#

đŸŽâ€â˜ ïž

faint yacht
# molten musk didnt work

if context.end_of_round and not (context.individual or context.repetition) and context.cardarea == G.hand?

hidden sable
west prism
#

is there some easy way to prevent a modded tag from being duplicated by double tag?

faint yacht
#

Remove the cardarea then?

molten musk
hidden sable
wintry solar
#

Like I said before, it’s because the check you are doing is the same as the first one, it’ll never reach the second block

molten musk
hidden sable
#

just run the first check at the top

#

the one at the bottom

#

then put your bottom code as an elswe

#

and put the rest in an if statmenet

#

for the other stuff

#

just without the first check

#

anyways yall know how to change a jokers sprite

wintry solar
# molten musk so i need to change it

Move the number of consumables check inside the first statement, then have the dollars there too, I can type it up if you’re still struggling in about thirty minutes

hidden sable
wintry solar
#

No because putting an else will mess it all up

hidden sable
#

why?

#

actually wait i see now

#

yall do not take my advice ever

#

😭

molten musk
molten musk
#

so thx

hidden sable
#

anyways

#

like inside a calc

molten musk
native zinc
#

let me pull it up

faint yacht
#

card.children.center:set_sprite_pos({x = 0, y = 0})

native zinc
#

@hidden sable

hidden sable
#

yall both have the same solution but for different problems

hidden sable
manic rune
# native zinc

that doesnt seem like what you would want to use in calculate đŸ€”

native zinc
#

this is not different problem

native zinc
#

otherwise set_sprite_pos is fine

native zinc
molten musk
native zinc
#

drop the context.cardarea

molten musk
#

here is the original code before modifing it lua SMODS.Seal { key = 'GoldBlue', pos = { x = 0, y = 0 }, atlas = "Seals15_atlas", badge_colour = G.C.BLUE, config = { extra = { h_money = 2 } }, calculate = function(self, card, context) if context.end_of_round and context.cardarea == G.hand and context.other_card == card and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1 G.E_MANAGER:add_event(Event({ trigger = 'before', delay = 0.0, func = function() if G.GAME.last_hand_played then local _planet = nil for k, v in pairs(G.P_CENTER_POOLS.Planet) do if v.config.hand_type == G.GAME.last_hand_played then _planet = v.key end end if _planet then SMODS.add_card({ key = _planet }) end G.GAME.consumeable_buffer = 0 end return true end, })) return { message = localize('k_plus_planet'), colour = G.C.SECONDARY_SET.Planet } end if context.end_of_round and not (context.individual or context.repetition) then return{ dollars = card.ability.seal.extra.h_money } end end }

#

it works correctly for most part except money triggers twice at the end

molten musk
molten musk
fierce frost
#

the joker keeps crashing the game when loading, it specifies line 92, so i assume it goes for lines 97, 102, and 107

native zinc
#

oh this is a seal

hidden sable
#

why the joker look weird

#

like the right half is cut off and theres a weird line on the left

native zinc
#

i don't think seals count in card area

molten musk
worthy stirrup
molten musk
#

my code is basically copy paste blue seal code

wintry solar
# molten musk like this??

So this will give the planet, I’d change that return to SMODS.calculate_effect({table}, card) and then add the dollars return after it

molten musk
#

it even stoped giving planets

native zinc
#

return completely ends your code

#

so you shouldn't be returning so early

wintry solar
#

Move the buffer update to after the card limit check

molten musk
#

ok one sec

wintry solar
#

Oh

#

Delete that random return dollars in the middle too

molten musk
#

like this?

floral narwhal
#

how can i enter the shop? somthing like G.GAME.shop:enterShop() ?

wintry solar
#

That looks better, the bit you’ve cropped off though is important too 😂

molten musk
#

oh

#

thats what i cropped

native zinc
#

still multiple returns

molten musk
#

i will delete it after u tell me where to put the money

molten musk
#

the return true

native zinc
#

the return true is fine

hidden sable
#

WHYS THIS JOKER BEING WEIRD

native zinc
#

your asset texture is wrong

hidden sable
#

IT MEASURES AT THE CORRECT SIZE???

native zinc
#

yes but it's clearly not aligned

floral narwhal
#

check atlas

native zinc
#

move it so it aligns with the atlas specified

wintry solar
hidden sable
native zinc
#

i know it's the correct size

#

it's positioned wrong

molten musk
hidden sable
wintry solar
#

Yes

#

Where table is whats currently in the return

floral narwhal
# hidden sable wdym

your atlas like:SMODS.Atlas{
key = 'minty',
path = 'tarot.png',
px = 71,
py = 95,
}

native zinc
hidden sable
molten musk
floral narwhal
native zinc
#

actually you probably have to move it up too

wintry solar
wintry solar
molten musk
#

oh

fierce frost
#

actually wait it scores and doesnt crash now but the stuff isnt scaling

molten musk
#

is this it?

hidden sable
#

the padding is PART of the 71x95

wintry solar
native zinc
#

yeah

fierce frost
fierce frost
#

this is at the end of round btw (i feel context may have been important)

molten musk
fierce frost
native zinc
#

also please use elseif

fierce frost
native zinc
native zinc
#

if then elseif then elseif then end

molten musk
#

so the planet part is working, money part is not working again

wintry solar
native zinc
#

just remove all of that

hidden sable
#

the normal texture looks fine

#

AND NOW THE NEW TEXTURE IS FINE??

#

WHAT???

#

IT JSUT FIXED ISTELF??

native zinc
#

did you just forget to close and reopen the game after making changes

hidden sable
native zinc
#

cool

hidden sable
#

i guess that was the issue

molten musk
#

my brain pokemon_dead

fierce frost
native zinc
#

your joker main one must be removed

molten musk
#

have been coding for hours now and my brain cant handle thinking at this point

light canyon
native zinc
#

SMODS.calculate_effect*

molten musk
#

didnt eat lunch wanna finish this one cause if i go eat im not getting back NPCGuideSigh

fierce frost
molten musk
normal crest
light canyon
normal crest
#

Balatro IRL

wintry solar
molten musk
#

added planets

#

didnt give money ...

wintry solar
#

Can you show the full code again?

molten musk
#

oh and all cards with the seal show +1 planet message even if they dont have space to add planets

hidden sable
#

how can i make a calculate return send 2 messages

wintry solar
#

They should 100% give money if the message pops up

hidden sable
#

like 1 message saying "Fixed!" then another saying "+10 Mult"

wintry solar
#

Try creating a new card with the seal

hidden sable
#

is there a function that emulates a message i can call in a func

molten musk
#

nothing

wintry solar
hidden sable
molten musk
hidden sable
#

i want 2 to happen, one after the other

wintry solar
molten musk
wintry solar
wintry solar
# molten musk yep

Can you run this for me when hovering over a card eval dp.hovered.ability.seal

fierce frost
#

i have fixed one of the bugs, i have no clue here (i think it'd happen with any it tried to increase)

molten musk
#

or u mean in debug plas

wintry solar
#

Yeah in the console

molten musk
#

ok

wintry solar
#

Then screenshot what it prints out

molten musk
wintry solar
#

And that doesn’t work?

molten musk
#

for some reason its not giving money

wintry solar
#

I have no idea then

molten musk
wintry solar
#

The code should work

#

No that’s not for you

molten musk
#

oh ok

native zinc
#

actually aren't ya supposed to use ease_dollars() or something

molten musk
#

explain

wintry solar
#

No

#

You’re not

#

Let me get on my pc and see if I can figure it why it won’t work for you, can you paste the entire code?

molten musk
#

ok

molten musk
#
-- Gold Blue Seal
SMODS.Atlas {
    key = "Seals15_atlas",
    path = "B_Gold.png",
    px = 71,
    py = 95,
}
SMODS.Seal {
    key = 'GoldBlue',
    pos = { x = 0, y = 0 },
    atlas = "Seals15_atlas",
    badge_colour = G.C.BLUE,
    config = { extra = { h_money = 2 } },
    calculate = function(self, card, context)
        if context.end_of_round and context.cardarea == G.hand and context.other_card == card  then
            G.E_MANAGER:add_event(Event({
                trigger = 'before',
                delay = 0.0,
                func = function()
                    if G.GAME.last_hand_played and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
                        G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
                        local _planet = nil
                        for k, v in pairs(G.P_CENTER_POOLS.Planet) do
                            if v.config.hand_type == G.GAME.last_hand_played then
                                _planet = v.key
                            end
                        end
                        if _planet then
                            SMODS.add_card({ key = _planet })
                        end
                        G.GAME.consumeable_buffer = 0
                    end
                    return true
                end,
            }))
            SMODS.calculate_effect({message = localize('k_plus_planet'), colour = G.C.SECONDARY_SET.Planet}, card)
            return{ dollars = card.ability.seal.extra.h_money }
        end
    end
}```
native zinc
#

@fierce frost you're straight up changing c.a.e.chips all the time

native zinc
fierce frost
#

oops

#

fixed but i think the issue will still happen

native zinc
#

change the _mod in the calculate

fierce frost
native zinc
#

probably before c.a.e.chips = c.a.e.chips + c.a.e.chip_mod

fierce frost
#

so set chips_mod to zero in the config then actually change it in the calculate part

native zinc
#

yeah

fierce frost
#

now quick question, is it possible to make it choose from these six? (0.05, 0.1, 0.15, 0.2, 0.25, 0.3)

#

this is for the xmult and xchips parts

light canyon
native zinc
#

pseudorandom('anyseedhere', 1, 6) * 0.05

fierce frost
#

also does pseudorandom need a seed?

native zinc
#

yes

fierce frost
#

ah

native zinc
#

you should use the joker name

fierce frost
#

i may be not very smart

native zinc
#

i'm not exactly sure how you think pseudorandom would function without a seed

#

but you go mate

fierce frost
stiff quiver
#

@fierce frost you can also do pseudorandom_element({0.05, 0.1, 0.15, 0.2, 0.25, 0.3},pseudoseed("seed"))

native zinc
hidden sable
#

is there any way to emulate message inside a function

native zinc
fierce frost
native zinc
#

pseudorandom_element basically just uses pseudorandom anyway

#

i mean whoa who knew right

#

especially since your list of numbers is the easiest thing to make you should not be doing pseudorandom_element shenaniganary

fierce frost
#

anyways i'm trying to fix the description of this to reflect the current amount

fierce frost
#

oh like down at the bottom

maiden phoenix
fierce frost
#

one sec

native zinc
#

aw yeah it's time to invoke the rite of passage

hidden sable
#

whats the wait function in this?
sleep()?
wait()?
await()?

fierce frost
#

like in here

native zinc
#

READ DOCS

#

i failed

#

there we go

modern kindle
#

a tragic play

native zinc
maiden phoenix
native zinc
#

vars = {1, 2, 3, 4}

maiden phoenix
#

#2# would be nil cuz you return only one variable

native zinc
#

bascially events

hidden sable
fierce frost
#

my dumbass deadass almost tried this

native zinc
daring fern
fierce frost
#

wait wait the c.a.e.chips is a placeholder

native zinc
#

return { card.ability.extra.chips, card.ability.extra.xchips, card.ability.extra.mult, card.ability.extra.xmult }

fierce frost
#

cuz im just copy/pasting it dw (i say as i have done that before and forgotten to replace it)

hidden sable
native zinc
#

i think it's frames?

#

actually it probably isn't

daring fern
native zinc
#

just duck around and find a good timing

#

that's what i do

fierce frost
#

how can i make the xmult and xchips have the funny boxes (like in the images shown)

native zinc
fierce frost
tall wharf
obtuse silo
#

is balanced calculated by adding the chips and mult together then dividing by 2, then ^2 the result?

#

and to add
does if balance == true then actually check if balance is enabled?

obtuse silo
#

oh right
you return "balance = true"
and that's not necessarily a variable

#

that can be used in functions at least

wintry solar
#

it just tells the score to be balanced

obtuse silo
#

ah right
but how would I check if the score is balanced?

daring fern
native zinc
#

personally i'd just do if hand_chips == mult

obtuse silo
#

ok so
context.final_scoring_step does the balance part

wintry solar
#

what effect are you trying to create?

obtuse silo
wintry solar
#

and why does that need to see if the score is balanced?

fierce frost
#

so it is increasing the stats multiple times (also not displaying a message when it upgrades but thats a later issue)

wintry solar
#

add and context.main_eval to the end of round check

obtuse silo
fierce frost
wintry solar
#

you need to use context.after if you want to check after all the scoring is done

native zinc
wintry solar
native zinc
#

and also all the jokers

fierce frost
#

ah

obtuse silo
fluid dove
#

bump

wintry solar
#

yes it shbould do

native zinc
# fluid dove bump

as long as you do it in add_to_deck and remove_from_deck i don't see an issue

fierce frost
#

anyways how can i make the scaling message

fluid dove
daring fern
fluid dove
formal parrot
#

Message_card=card,

formal parrot
wintry solar
daring fern
#

‎

manic rune
#

sometimes i wonder if you are just asking yourself or you are genuinely asking if others know the answer 😭

fierce frost
daring fern
native zinc
fierce frost
#

so i should not make the two local

native zinc
#

locals, are local. they only act within whatever "tier of code" you have them in

#

you need to declare the actual local above the if statement you define them in

#
local upgrade, plusincrease, xincrease = pseudorandom('snap!', 1, 4), pseudorandom('snap!', 15, 30), pseudorandom('snap!', 1, 6) * 0.05
if upgrade == 1 then
   card.ability.extra.chips = card.ability.extra.chips + plusincrease
elseif ...
fierce frost
#

so uh where can i see the documentation for how to format this text?

native zinc
#

return {message = 'a', colour = G.C.MULT}

fierce frost
#

so i.e. here

daring fern
fierce frost
#

damn

native zinc
fierce frost
#

so how can i make it say the variable

native zinc
#

return { message = '+'..xincrease..' Xmult' }

hidden sable
#

what causes this

native zinc
#

that's

obtuse silo
#

well
the scouter does destroy itself when you score over 9000
the issue is that context.after does it too quickly for my liking
perhaps i need to put something in the event queue

native zinc
#

how did this happen

#

what did you do

hidden sable
#

disabling my modded tag worked and the game started so ill take that

#

it was a test tag anyway

manic rune
#

đŸ„€

#

i think my humor is broken

obtuse silo
wintry solar
#

use SMODS.destroy_cards(card) instead

hybrid shadow
#

bump

fluid dove
# hybrid shadow bump

Are you asking, how do I use github, or are you meaning, whats good practise for laying out a repo/release of a mod on github?

pastel kernel
#

joker tooltip won't show

fluid dove
# hybrid shadow both?

Github have a helpful guide for you to get used to how repos work, im assuming from the way you answered you havent used git before.

https://docs.github.com/en/get-started/start-your-journey/hello-world

the above is actually probably a little overkill for now but its good to learn proper version control.

as for setting up the page itself I dont know if theres a standard, but I saw the Prism mod's page the other day and it looks like a great example to follow on from

hybrid shadow
fluid dove
hybrid shadow
fluid dove
#

so if you needed a file while you're working but it won't be used in the proper release, or it's something temporary you don't want to track changes to, you include that file in the .gitignore and your git won't track changes

modern kindle
#

not super particularly beyond what youve done for your mod in general, you can sepaate things for readability
its recommended if you dont to ahve a localization file

otherwise alot of people tend to do a format akin to this
where modules will have jokers.lua, consumables.lua, etc

or in the folder you can have a joker or etc folder with indiv files like kino does

i use github desktop and push everything that way, otherwise some stuff works as drakath is saying

fluid dove
#

can make it a bit easier starting out rather than learning the CLI or general command structure

thorn furnace
#

is SMODS.Mods[mod].so_and_so immutable

hybrid shadow
fallow condor
#

how do I add/change something in a vanilla joker?

fluid dove
#

I would guess

hybrid shadow
fallow condor
#

sure

fluid dove
#

take what im saying with a pinch of salt since I dont have direct experience, but its basically cut and paste into the code the game is running

#

its how steamodded was built, bc you know, we have all these lovely apis to make programming easier, but somewhere along the lines it has to actually, get into the game

#

go look at the lovely github page for the documentation, it seems pretty straightforward if you know regex

#

and if not that's a great programming skill to learn!

wintry solar
#

you don't need to know regex at all

fluid dove
#

I'm still slowly working my way through the codebase to try and understand how you wizards did it, apologies if i'm spreading misinformation by accident!

fierce frost
#

how do you open the debugplus menu?

fluid dove
#

hold tab is the default iirc

thick needle
thorn furnace
#

I can't use the 5.2+ features 😔

fierce frost
#

how can i destroy a joker?

quick scarab
modern kindle
final goblet
#

hi! just to make sure

#

how exactly does one calculate the soul_pos coordinates?

#

if considering single non-atlas sprite

quick scarab
formal parrot
#

@thick needle

#

Here

thick needle
#

ok gimme a sec

formal parrot
#

Can you tell me what do you want it to do aswell

thick needle
#

The joker is suppost to give 1$ for each current joker

#

like abstract + golden

#

(at the end of the round)

formal parrot
#

Okay i’m sadly not on my pc can you send me a screenshot of the code

thick needle
#

ok i didnt know you werent on pc

quick scarab
#

Is that the real Mr.Tenna

thick needle
# quick scarab Is that the real Mr.Tenna

Coming straight from your house, Coming straight from YOUR house. He's the one, THE KING OF ONLY! He's GROOVY and NEVER glooby! You cant get this from an EGG! The sensation of your screen, the show that makes you scream. Say it with him, folks! Mr. (Ant)Tenna's TV TIME!!!

wind steppe
#

use the metadata files not steamodded headers

formal parrot
wind steppe
#

(Translation: I’m taking psychic damage as we speak)

formal parrot
#

I think everyone should take a look at the wiki and understand stuff but the wiki doesn’t tell you everything lol

#

Like how to add cards / jokers

thick needle
wind steppe
#

Does Tax Collector.png actually exist?

formal parrot
#

Can i see the code now

proud depot
formal parrot
#

( I can’t see the code ) is he using an old header ?

proud depot
#

yeah

formal parrot
#

That summarizes it

proud depot
#

you make a new .json file for it

thick needle
#

and thats the code

wind steppe
#

Also change your prefix

#

xmpl is a bad idea

thick needle
#

why is xmpl bad?

wind steppe
wind steppe
thick needle
#

No in visual studio

wind steppe
#

Get a lua extension

formal parrot
#

Why’s it light lol

thick needle
formal parrot
#

I think the path of your image is incorrect tho

thick needle
#

Its easier to show in notepad because i can zoom out

proud depot
formal parrot
#

Also you’s missing a variable in loc_vars

#

And you didn’t include the variables in loc_text by #1# and #2#

#

@thick needle

#

This is a good resource for reference

#

Look for abstract joker and edit the variables , add atlas , loc_txt and you’ll be fine

#

And change context

#

From context.joker_main to end of round i think

#

Golden joker has the context you need

simple helm
#

anyone knows why the jokers dont have the eternal sticker?

wild escarp
#

How would I create tags based on their position in the collection?

hybrid shadow
#

hell yeah finally posted

fierce frost
wintry solar
#

this is easily fixed by uninstalling talisman

fierce frost
#

but i need talisman for a different joker

wintry solar
#

đŸ€·â€â™‚ïž

lament agate
#

so like this>

manic rune
#

:3 idk if its colour or colours

#

but that looks right, i think

pure salmon
#

how do you debuff cards before scoring? (not perma)

manic rune
pastel kernel
#

where do i post my mod?

pastel kernel
plain apex
#

oh most people use github

sturdy monolith
#

@thorn furnace still having the same problem even with the new update script
though i think this time it's exclusive to my mod
you might wanna add a check for if the mod directory isn't empty
the script doesn't work if a native library is loaded

#

for now I'll just unrequire the lib in a hook to the restart game method

#

even that doesn't work 😭

sturdy compass
#

Your shit be royally fucked Sob_praying

sturdy monolith
#

anyways, time to make a Future Funk joker

sturdy compass
#

PEAK

sturdy monolith
#

time to play a 4m 12s hard demon just to get a cool screenshot đŸ”„

sturdy compass
#

😭

sturdy monolith
#

luckily I'm good at gd so it'll only take me like 3 attempts lol

thorn furnace
sturdy monolith
thorn furnace
#

O

#

Wait your mod directory is empty?

sturdy monolith
#

ye but yk how Windows sometimes doesn't let you delete certain things because they're still in use by a process or whatever?

thorn furnace
#

Yea

sturdy monolith
#

that's why it's not working for my mod, since my mod uses a native library instead of Lua for some stuff

thorn furnace
#

Yea that'll do it

#

Lua/json/toml just ends up in the cache so it can be deleted while you're in-game

sturdy monolith
#

exactly, so I'll just have to stick with a non-automatic update script lol

faint yacht
#

For extra tabs beyond the config one, it's this, ye?

return {
  { label = '1', tab_definition_function = dummy1() },
  { label = '2', tab_definition_function = dummy2() },
}
spice wadi
#

Should be

thorn furnace
sturdy monolith
thorn furnace
#

Yea

sturdy monolith
#

tenna plays balatro???

sturdy compass
#

Apparently

#

Even the email hater cannot resist

sturdy monolith
#

done

snow vale
#

what do i return here so i can only use the consumeable if im playing the blind?

faint yacht
#

G.GAME.blind.in_blind iirc?

snow vale
#

okk

faint yacht
manic rune
#

do mods with lower priority load earlier or later than mods with higher priority

#

just to be sure

faint yacht
#

Lower earlier, high later.

manic rune
#

i see

sonic cedar
#

So, I'm trying to work around my joker's set_ability function using the base atlas when it comes to using the abilities of, well, basegame jokers. Patching into card.lua doesn't seem to work, so now the method is hooking into DrawStep. Does anyone know enough about DrawStep to tell me why this doesn't replace the atlas my Joker uses with the actual atlas it should be using? (Note this is a sort of fodder joker designed to act as a costume for a justraq different joker. If you've been around my questions long enough, you know what this is about.)

sonic cedar
obtuse silo
#

having an issue where my tags don't work with a localization file

sonic cedar
#

did you format ur file right

wintry solar
sonic cedar
#

yes, but i have another atlas that makes the fact that it's fake a little more obvious. otherwise itd be impossible to tell, which is... not fun for anybody

obtuse silo
wintry solar
sonic cedar
#

modpref- yeah

obtuse silo
#

ohhhhh

wintry solar
sonic cedar
#

isnt front for playing cards though?

#

or do you mean the general usage of the word "front" and im overthinking

sturdy compass
#

Just not every card uses it

pulsar furnace
#

why when I use Card() and I put {playing_card = any number} it crashes?

manic rune
#

is it possible to add this to all the Yggdrasil.Material centers?

sonic cedar
obtuse silo
#

infoqueue doesn't work

pulsar furnace
#

if i remove playing_card it doesn't crash

wintry solar
#

You can use it for anything

sonic cedar
#

so it doesnt matter that front isnt in here, id still use it?

sonic cedar
pulsar furnace
sonic cedar
#

ahhhh

#

i know literally nothing about collection ui isaac_grin

wintry solar
#

Just create the front sprite in your set ability

sonic cedar
#

ok uh

sonic cedar
sturdy compass
wintry swallow
#

does this crash cause application cant handle

wintry solar
obtuse silo
sturdy compass
#

The key should also be the full key

sonic cedar
# wintry solar I have no idea what you’re showing me here 😂

IGNORE THE EXCEPTIONS BIT (those are separate jokers that have their own effects other than "activate it like normal")
the two ijiraq variables are like sendouts to check whether or not the card is a costume/ a faker
and then it just uses set ability to pick a joker based off a key "jkey"

but yeah how would i "front" in this case if possible

sturdy compass
#

I just realized you’re trying to infoqueue onto a tag oml

#

I’m so sorry

obtuse silo
#

why?

sturdy compass
#

Cuz the tag set was a red herring lol

obtuse silo
#

yeah
it's a booster being infoqueued onto a tag

#

just like charm tag

sturdy compass
#

In reality you can switch the table for G.P_CENTERS[“p_prefix_megamintconditionpack”]

wintry solar
sonic cedar
wintry solar
#

and it's supposed to change every round?

sonic cedar
#

no, same costume just for the whole run rn, eventually need to set it to every ante

#

once i remember/figure out how to do that

wintry solar
#

isn't reset_game_globals called at the end of each round?

sonic cedar
#

oh god is it

wintry solar
#

anyway, you want it to always be the same when it appears in the shop, right?

#

or different per ante eventually

sonic cedar
obtuse silo
wintry solar
#

okay well lets start with it being the same for the entire run for now

sonic cedar
#

does the run_start not
do that

sonic cedar
# sonic cedar oh god is it

i asked this, forgetting the variable's name literally includes the words current_round solely so i dont forget this

obtuse silo
wintry solar
#

in your reset_game_globals function you'd probably want something like

if run_start or G.GAME.round_resets.blind_states.Boss == 'Defeated' then
    -- set your key for the sprite here
end```
#

that should only udpate at the end of each ante

sturdy compass
#

For future reference, the . and the [“”] work essentially the same

sonic cedar
sonic cedar
wintry solar
#

okay so now in set_ability you want something like this card.children.front = Sprite(self.T.x, self.T.y, self.T.w, self.T.h, G.ASSET_ATLAS[G.P_CENTERS[KEYREFERENCEHEREPLS].atlas], G.P_CENTERS[KEYREFERENCEHEREPLS].pos)

#

and then this too

card.children.front.states.hover = card.states.hover
card.children.front.states.click = card.states.click
card.children.front.states.drag = card.states.drag
card.children.front.states.collide.can = false
card.children.front:set_role({major = card, role_type = 'Glued', draw_major = card})```
#

I think that'll work

sonic cedar
wintry solar
#

it won't switch at the end of each ante yet but we can do that later

sonic cedar
#

real

wintry solar
#

just see if this works first

sonic cedar
#

should these be before or after anything

daring fern
#

‎

simple helm
#

how can i apply a gold seal to the first card scored? im trying everything, but nothing works...

chrome widget
#

What does context.check do for the debuff_hand context?

scarlet imp
#

pretty sure Lua indexes starting at 1

simple helm
#

thanks :D

scarlet imp
#

np

mossy helm
#

Good afternoon Good People of modding dev! I was curious if it'd be possible to make this idea I had
I came up with this joker called "Drawn Joker", it's effect is that it would scale +2 chips when a card is drawn from the deck. That would include not only during a Blind, but also when you open Arcana or Spectral packs

wintry solar
sonic cedar
#

oh ok let me do it rq then

mossy helm
#

how come?

violet void
#

Hello this might be an advanced question and I'm having some issues with the unlocked sprites for my custom cards

It used to work a few months ago with the current code but after updating smods, these cards show the normal sprites even if they are locked

Is someone able to point me to the right direction? Ty

mossy helm
# mossy helm how come?

How would you achieve that? Would I need to check every time the action to draw a card is made? How can I check that?

sonic cedar
wintry solar
#

the part in the centers is wrong

#

you need it to reference that value in G.GAME you created

sonic cedar
#

ohhhh ok

wintry solar
#

oh maybe all those selfs in it should be card too

sonic cedar
#

got it

sonic cedar
wintry solar
#

yeah

sonic cedar
#

fixing

scarlet imp
#

A cheaty way you could do it during blinds in have it scale like this:
card.ability.chips = card.ability.chips + math.max(0, #G.hand.cards - num)
you've use the variable num to count how many cards were played in the previous hand
as for Arcane/Spectral packs, the only way I could think of is checking whenever G.hand exists and scaling the joker depending on how many cards were in it

#

the code is probably wrong but that's the vibe of it lol

vague crest
#

whats the part of a joker's code that causes the money increase to pop up where the joker is? similar to to-do list

sonic cedar
#

fixed?

wintry solar
#

yeah give it a go

sonic cedar
#

alright here we go 🙏

scarlet imp
#

what context should I use to find when another Joker is removed? I know context.card_added is used for adding, is it just context.card_removed for removing?

sonic cedar
sonic cedar
wintry solar
#

run an eval G.GAME.current_round.fodder_card.jkey

wintry solar
#

I am planning on adding a joker destruction context

scarlet imp
#

Well I would need to account for Jokers sold as well for my purposes

#

My idea is the Joker gives +1 Hand for every uncommon Joker, similarly to Baseball card. I can use context.card_added when you get an Uncommon Joker, but I need to be able to tell when you lose them as well to remove excess hands

sonic cedar
chrome widget
wintry solar
#

but what does it actually say

sonic cedar
scarlet imp
wintry solar
#

oh ofcourse

#

vanilla doesn't have an atlas woops

sonic cedar
#

lmfao

wintry solar
#

after the .atlas put or 'Joker'

chrome widget
scarlet imp
#

I guess, yeah, I just don't like waiting lol. Been waiting months for Blue Stake to get changed already

chrome widget
#
function Card:start_dissolve(dissolve_colours, silent, dissolve_time_fac, no_juice)
    local ret = ref_card_dissolve(self, dissolve_colours, silent, dissolve_time_fac, no_juice)

    if self.area and self.ability.set == 'Joker' then
        SMODS.calculate_context({joker_removed = self})
    end

    return ret
end```
sonic cedar
wintry solar
#

đŸ€”

scarlet imp
#

is there a context for Joker scaling? Or is that something I'll need to implement myself

chrome widget
#

As someone who has done multiple things with joker scaling: absolutely not

willow plinth
chrome widget
#

What do you need to do with joker scaling?

scarlet imp
#

I want to make a Joker that gets +2 chips when another Joker scales, or something along those lines

#

Would I just have to search for this Joker in the calculate of Jokers that scale to activate it manually?

sonic cedar
pure salmon
#

how do i check with a seal/enhancement whether a playing card is about to be destroyed

wintry solar
#

it works for me đŸ€”

#

wait

#

I think I have misunderstood

#

you have a different atlas right?

sonic cedar
#

yes

wintry solar
#

I see

#

is it the same size as the vanilla atlas?

sonic cedar
#

iiiit

#

hm

#

let me look

#

it should be

#

considering i just

#

went over the vanilla atlas

chrome widget
wintry solar
#

yewah that'll be fine then

chrome widget
#

I.E. your joker creates proxies of various tables on all your other jokers, and sets/unsets them as needed to maintain decent functionality

wintry solar
#

so that place we added or 'Joker' just change the entirety of that bit to whatever your atlas key is

sonic cedar
#

(making sure i didnt crop it or something)

wintry solar
#

yes

sonic cedar
#

ok cool we're finw

wintry solar
#

nah the whole thing

sonic cedar
#

oh ok

zealous glen
sonic cedar
wintry solar
#

yeah but with the modprefix

wintry solar
sonic cedar
#

oh TRUE

#

ok check

wintry solar
#

what's the set_ability line for?

#

that will just actually change the joker

sonic cedar
#

so it can change into the exceptions

wintry solar
#

I see

#

yeah that looks okay

sonic cedar
#

cause otherwise itll change into the non-exception version of the joker yeah

#

ok testing

#

oh my god

#

naming my kid eremel

gilded magnet
#

Hi, I want to make/contribute to a balatro mod. I can code and have looked at steammodedd and that stuff. However, I was unable to find resources explaining how to add fancy/custom joker behavior like every consumable being replayed or a card being destroyed/modified. Can yall help?

mossy helm
gilded magnet
pulsar furnace
#

How do you make the card below not look shadowed? Do I create another card above it or what?

gilded magnet
pure salmon
#

why does this seal never activate and copy itself?

sonic cedar
gilded magnet
#

copy_card:add_to_deck()?

wintry solar
lucid owl
#

is rank not meant to be a string?

wintry solar
#

like, it's not your custom joker with a pretend skin on, it's actually the other joker

pure salmon
sonic cedar
wintry solar
#

I have made this ridiculously complex for no reason đŸ€Ł

sonic cedar
#

MAN 😭

#

ok but it's
sort of working?

#

it's just that if the card uh

#

doesnt conform to regular shape im guessing?

wintry solar
#

try using this instead

card.children.center.sprite_pos = G.P_CENTERS[G.GAME.current_round.fodder_card.jkey].pos
card.children.center.atlas.name = 'hpfx_IjiraqJokers'
card.children.center:reset()
sonic cedar
#

just paste over everything?

#

that i had put before

wintry solar
#

yeah

sonic cedar
#

got it

broken cliff
wintry solar
#

I think this should respect the size too

broken cliff
#

and return the card u need to destroy

pure salmon
#

does context.main_eval just not work on seals

sonic cedar
broken cliff
daring fern
violet void
pure salmon
pure salmon
#

no log

#

hard crash, not responding

pulsar furnace
#

Can someone help me add a page in Galdur?

pure salmon
#

ok i might just be stupid but how do i get a seal to do somthing when the card it's on scores

sonic cedar
#

now ive just gotta shop test

normal dune
#

how can i do a joker actives like bloodstone(the probability part)?

cobalt vector
#

how can I detect if a blind is beaten in one hand?

simple helm
#

srry, copypaste :P

cobalt vector
#

if I want it to happen to all blinds, I'd just need to remove G.GAME.blind.boss, right?

wintry solar
simple helm
#

i though it was only in boss blind, more balanced

sonic cedar
wintry solar
#

it should be as simple as looping over the jokers, finding the disguised ones, and calling the set_ability again

cobalt vector
sonic cedar
#

ok but where would i do that

normal dune
#

how can i do a joker actives like bloodstone(the probability part)?

wintry solar
#

oh, in the reset game globals bit

#

after you update the key

simple helm
sonic cedar
#

oh ok

cobalt vector
thick needle
#

can someone help with faulty code?

simple helm
cobalt vector
#

I did that with a previous joker and it worked, but when I tried to do it this time it wasn't working.

#

I'll try again tho

simple helm
#

then make it true again with an if context.setting_blind then

violet void
simple helm
cobalt vector
#

would I put the extra variable in the config?

simple helm
#

like this

#
      extra = {
           applied = false
    }
  },````
#

bruh, discord text styling is so bad lol

scarlet imp
#

is there a way I can text if other Jokers give chips? rn I have this:

if context.other_joker and context.other_joker.calculate ~= nil then
    local ret = context.other_joker:calculate(self, context.other_joker, context)
    if ret[chips] ~= nil or ret[x_chips] ~= nil then
        card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_mod
        return {
            message = localize("k_upgrade_ex"),
            colour = G.C.BLUE
        }
    end
end

but it no work

snow vale
#

how can check if the current blind is the boss blind inside use?

violet void
snow vale
violet void
snow vale
vague crest
#

if i wanted to add mult and chips in the same joker how would i do that? this just crashes

simple helm
#

3 is without the remark

sonic cedar
violet void
snow vale
#

yeah it's 3

#

4 wont work

simple helm
snow vale
#

oh

simple helm
#

Mobile dc I suppose lol

daring fern
snow vale
sonic cedar
#

does G.GAME.bl-- what he said

daring fern
#

‎

wintry solar
cobalt vector
sonic cedar
wintry solar
#

oh the check is wrong too

#

because the cards have been changed

#

so the center.key would be j_smiley for example

simple helm
sonic cedar
#

oh rightttt

simple helm
#

Try it and tell me

cobalt vector
#

the adding xmult

sonic cedar
simple helm
wintry solar
#

no, you set a flag on them before right? in the initial set_ability

sonic cedar
#

oh yeah duh i can jsut use that

cobalt vector
simple helm
#

If so, play a hand and win the blind

cobalt vector
#

I've been testing it by playing a hand and winning the blind

#

I haven't been using debugplus to win without playing a hand

simple helm
#

Idk what is causing the error

#

You can erase code to see if that is cuasing the error

#

Lol, I repeated myself

sonic cedar
wintry solar
#

uhhh what was the set ability code again?

#

it was like card.isljiraq iirc

sonic cedar
#

or no, actually, since visibly gets set to true when it's added to the deck i should check that

sonic cedar
wintry solar
#

so check if card.isIjiraq

sonic cedar
#

and then there's this ofc

sonic cedar
cobalt vector
sonic cedar
#

thought i broke something but no i actually got banner three times in a row

simple helm
daring fern
#

‎

sonic cedar
#

forgot to change "jokerkey" to the actual key im an idot

cobalt vector
simple helm
sonic cedar
#

like i can still use an event here

red flower
cobalt vector
vague crest
#

if i wanted to pick a random card and do something to it in full deck whats the process for that

#

i know how to affect things held in hand but the thing im trying to do requires being in the shop so that doesnt really work

red flower
wind steppe
#

is there a way to check what mod a joker is from?

sonic cedar
#

it works, but not if it's one of the exceptions
how can i make it so it's like
"if the variable (card.isIjiraq) is true OR if the joker's key is in the table of exceptions?"

cobalt vector
sonic cedar
cobalt vector
sonic cedar
#

although isnt it other_joker or is this for the joker checking itself

red flower
#

joker as in the variable that holds the joker they want to check

sonic cedar
#

ahhh

sonic cedar
#

does the table have to be global for that to work actually

wind steppe
#

how do i check a joker's key?

sonic cedar
sonic cedar
wind steppe
azure wraith
daring fern
sonic cedar
#

card.conf-im gonna get you

azure wraith
sonic cedar
#

i'm a masochist

azure wraith
#

i use vscode for latex because it is the least bad option balatrojoker

sonic cedar
red flower
#

yes

sonic cedar
#

oh massive win

sonic cedar
# red flower yes

so this is fine? (this is in the override file, which is why i was asking about locals)

vague crest
#

trying to figure out how to destroy a random card on rerolling the shop, any experienced people know if im on the right track?

red flower
vague crest
#

ohhh my god is that what it is 😭

red flower
#

also make that a local variable

red flower
#

are they both in the same function

sonic cedar
#

this is the function being called if the conditional is fulfilled yes

hybrid shadow
#

i cant wait to make "add dollar to card"

red flower
sonic cedar
#

so take it out of the joker and put it in the main file instead (as a global)

vague crest
#

tysm omg it works beautifully

#

just gotta indicate which card actually got destroyed

sonic cedar
#

otherwise it just
happens which is

#

jarring

wind steppe
#

how do i check cards held in hand?

cobalt vector
#

how do I detect when a second passes in-game?

vague crest
#

i think this is something i feel like im getting close

red flower
vague crest
#

WAIT i removed context and it worked

#

what it did prior was crash đŸ”„ but it says the rank that it removed

wind steppe
vague crest
#

from my understanding its just lik,e a general randomness thing?

#

like it picks a random card and sets my variable to that card, and then destroys it

#

i think the pseudoseed in particular

#

waitttt i gotta test something

red flower
vague crest
#

YIPPEE it works with two of them

wind steppe
#

ive just been seeding my pseudorandom with strings (no pseudoseed)

#

is that bad

red flower
#

no

#

it does it automatically

#

pseudorandom_element didn't

sonic cedar
#

WHAT IS HAPPENING

wind steppe
sonic cedar
wind steppe
sonic cedar
#

gone

wind steppe
#

how do i check a card's base suit?

sonic cedar
#

oh it fixed when i restarted

daring fern
#

‎

sonic cedar
sonic cedar
chrome widget
#

I love finding extremely niche bugs in SMODS and fixing them myself because my mod depends on them

sonic cedar
#

real

chrome widget
#

Well... this one is technically a vanilla bug that only becomes relevant when extended by SMODS

daring fern
sonic cedar
#

d-does it work

daring fern
sonic cedar
#

i mean yeah theyre seals

red flower
daring fern
sonic cedar
#

well card.lua has stuff about gold seals

#

actually yeah i think all the seal stuff is here

#

seems like only gold uses self.playing_card though

#

but that's probably cause it's for an unlock

wind steppe
#

why does this do nothing

sonic cedar
daring fern
wind steppe
wind steppe
daring fern
wind steppe
tight notch
#

how do i unhook something so that when i stop playing on a deck the effect goes away?

tight notch
#

what condition would i use to check what deck you're on

red flower
daring fern
plush depot
#

anyone have reference booster pack code

wind steppe
tight notch
#

oh wait nvm

plush depot
#

boosters arent on there

#

ur good

red flower
wind steppe
# plush depot anyone have reference booster pack code
SMODS.Booster{
    key = 'creditpack',
    config = {extra = 1, choose = 1},
    atlas = 'Boosters',
    pos = { x = 2, y = 0 },
    create_card = function(self, card)
        return SMODS.create_card({area = G.pack_cards, no_edition = true, key = 'j_credit_card'})
    end,
    weight = 1,
    cost = 1,
    group_key = 'groupcreditpack'
}
sonic cedar
tight notch
wind steppe
tight notch
red flower
# wind steppe

yeah that's not what I meant
G.hand.cards is a list of cards held in hand

plush depot
wind steppe
plush depot
#

o

wind steppe
#

in my case its one

tight notch
#

on the topic of packs how do i get my group name to not return error?

red flower
#

weird that should work

#

are you defining a group_key elsewhere

tight notch
#

yes

sonic cedar
red flower
tight notch
#

ah ok

cobalt vector
#

would it be possible for a joker to do a probability check every second while you have it?

tight notch
#

how do I check in a hook if you're playing on a certain deck?

sonic cedar
# red flower afaik yes

ok but the thing with that is
if the card is something like half joker, switching to a full size card just makes it

cobalt vector
cobalt vector
#

yes

red flower
sonic cedar
#

how can i uh

fix that

#

if possible cookedprayer

tight notch
red flower
sonic cedar
cobalt vector