#đŸ’»ăƒ»modding-dev

1 messages · Page 540 of 1

fluid nebula
#

WIP art for lottery ticket

final jewel
#

what is the Global variable for the cash you have

jolly shadow
#

G.GAME.dollars

final jewel
#

k thx

rancid kindle
#

Is that 000000 black I see?

final jewel
#

is there a round function in steamodded ?

candid prism
rancid kindle
#

Oh no
.

final jewel
#

<@&1133519078540185692>

frosty rampart
#

oh yea, we're bumping it

#

(pls help)

willow scroll
#
SMODS.Atlas({
    key = "Lingo2Glyphs",
    path = "Lingo2Glyphs.png",
    px = 96,
    py = 96,
    atlas_table = "ASSET_ATLAS"
}):register()

MaxBoiSM.Gears = Sprite(0, 0, 1, 1,
    G.ASSET_ATLAS['maxboism_Lingo2Glyphs'], { x = 0, y = 0 })

i feel like i am losing it why is this crashing with an attempt to index field atlas (a nil value)

#
SMODS.Atlas({
    key = "CustomEnhancements",
    path = "CustomEnhancements.png",
    px = 71,
    py = 95,
    atlas_table = "ASSET_ATLAS"
}):register()

Sprite(self.T.x, self.T.y, self.T.w, self.T.h,
                G.ASSET_ATLAS['maxboism_CustomEnhancements'], { x = 0, y = 0 })

when this works

#

wait

#

ah

#

thats slightly annoying

#

nvm problem solved ignore me

solemn shuttle
#

is there a way to increase the chance of negatives showing up in the shop

#

i might know where to look for this but thought id ask

#

or wait better question

#

nvm i realized it prolly doesnt

#

but yeah is there a way to adjust the negative chance then

#

or would i have to do functions with card.ability.extra.odds to rig X chance

final jewel
#

I crash because of that line it saying cant compare a table to a number

manic rune
#

talisman turns some global variables into tables (aka bignums)

final jewel
#

yeah

manic rune
#

you want to use if to_big(G.GAME.dollars) > to_big(0) then

final jewel
#

ok

#

thx

manic rune
#

and have to_big = to_big or function(x) return x end at the top of ur file, just in case theres no talisman installed

final jewel
#

like in the util file ?

manic rune
#

anywhere in your mod

final jewel
#

ok ok

final jewel
manic rune
#

mhm

compact valve
candid elbow
compact valve
candid elbow
#

Bless me

ivory citrus
#

Hello, I would like to know if anyone can help me figure out how to make the joker only create jokers that are from the “Green” pool.

cursive gazelle
#

code should be outside the return statement

rocky plaza
cursive gazelle
#

also don’t use polls , use a table and pseudorandom_element

#

and assign it as a key

rocky plaza
#

<@&1133519078540185692>

karmic creek
#

yeet

sage crater
cursive gazelle
#

local green ={“jokerkey1”,”jokerkey2”}

#

etc

#

you might yse it as a global and not a local table

rocky plaza
cursive gazelle
#

Tables do the same thing lol

ocean sinew
#

would say tables are also simpler ngl

thick drift
#

how would I go about saving a custom value between runs of a game? should I add it to the Game object or is there a function that supports this and I'm just not understanding the documentation? (it's a counter for how many times a specific consumable has been used to trigger an effect upon the nth use)

ocean sinew
cursive gazelle
#

global variable

#

what type of information do you want to save exactly

ocean sinew
cursive gazelle
#

this run ?

ocean sinew
#

yeah I think

#

"custom value between runs of a game"

ivory citrus
#

God, I don't understand anything.

cursive gazelle
#

There’s a joker that gains mult based on tarot cards used

thick drift
#

yea, per run. I currently do have it as a global variable, but I noticed it kept resetting to 0 in between tests for a different feature

cursive gazelle
#

Hook game save when value changes

#

?

thick drift
#

Welp, this bit of research is not exciting :/ but at least I just need to do this once

manic rune
#

oh, if you want it to save for all runs

#

then save it to G.PROFILES[G.SETTINGS.profile]

thick drift
#

not all runs, just the one that is saved

candid elbow
#

Nice clutch psps

manic rune
chrome widget
#

Been on the art grind for some time so here's a spectral

candid elbow
#

Owwww

modern kindle
chrome widget
#

👍

modern kindle
#

damn ive been thumbs upped

clear ocean
#

hi dilly

modern kindle
#

hello

chrome widget
#

Here's the other arts I've been working on recently

modern kindle
#

i like the pack ripped open ig..if it even matters....imo...personally..

chrome widget
#

that one is still wip until I can figure out how to effectively draw the shrink wrap peeling back 😔

modern kindle
#

well its still cool..

frosty rampart
jolly shadow
#

<@&1133519078540185692>

livid scroll
#

đŸ”«

jolly shadow
#

phisher ban speedrun goddamn

livid scroll
exotic hedge
livid scroll
thick drift
#

rip, I completely broke a run I was using for testing but it had natural canio and perkeo on the booster packs but I forgot to save the seed

gusty iron
#

how would i check if the score caught fire at the end of a round?

frosty rampart
#

"score caught fire" = "single hand's score >= blind requirement", so it's just a check for
if hand_chips * mult > G.GAME.blind.chips in context.final_scoring_step
(hand_chips and mult are the chips and mult values from that played hand at the time of calculation; in final_scoring_step it should be the final score for that hand. G.GAME.blind.chips is the blind requirement)

gilded blaze
#

if you're on latest smods commit, don't use hand_chips*mult

gusty iron
#

what do i use then 😔

gilded blaze
#

if you're on latest release (0711a), it's fine

gusty iron
#

actually ill just see if it works

frosty rampart
gilded blaze
#

alr then
it would be SMODS.Scoring_Parameters["chips"].current * SMODS.Scoring_Parameters["mult"].current

frosty rampart
#

awesome, thanks

frigid cargo
#

How do i change a games function? Im tryna change the price of retcon but idk how to do that.

west solar
#

Hey, anyone has any idea how to update the current config_tab of my mod? I want to do a pagination but having trouble with it

gilded blaze
#

it's true if hand one-shots blind

split cairn
#

would this work for checking if a playing card has the custom seal and then giving the mult?

    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then
            if SMODS.has_seal(context.other_card, 'inf_bitten') then
                return {
                    e_mult = card.ability.extra.bitten
                }
            end
        end
    end,
azure laurel
#

hey, i want to know if smods handle by default the difference of dark and light suits?

#

mods includeed

gilded blaze
split cairn
gilded blaze
#

just do if context.other_card.seal == "modprefix_key" then iirc

#

note that it's modprefix_key, not modprefix_key_seal

frigid cargo
#

Im tryna make a random number between 0.5 and 6 but it just keeps giving 5.5+
pseudorandom("Glitch") * 0.5 + 5.5

gilded blaze
frigid cargo
gilded blaze
#

randomfloat(start, end) = start + pseudorandom("seed") * (end - start)

red flower
gilded blaze
#

I believe mult * hand_chips is no longer used

red flower
#

that's not my question

gilded blaze
#

then what is

red flower
#

Is it different?

#

In the current version

gilded blaze
#

wdym different 💀

#

and which version 😭

red flower
gilded blaze
#

Plasma effect is not in a usable state because of this

red flower
#

That's not my question!

modern kindle
#

Do both equations give the same result

gilded blaze
#

💀

#

what problem would make them not give the same result then

red flower
#

it doesn't matter i can gather that no

red flower
#

also i dont like having to do smods.scoring_para................ whatever to get the score

#

also good morning dilly

modern kindle
#

Hello N

#

I agree that hand_chips * mult is just shorter for me to deal with

red flower
#

i havent messed around with this yet i would have to see

modern kindle
#

I haven't downloaded it yet even

#

Figured id just wait for release which I think is this weekend

wintry solar
red flower
#

amazing

wintry solar
#

There’s also SMODS.last_hand_oneshot which is a Boolean flag, and you can use SMODS.calculate_round_score() to get the score respecting different calculations (though I’m not sure when this resets off the top of my head)

red flower
#

saving this to update my wiki

unborn bay
#

hi n

#

hi eremel

red flower
#

hi haya

modern kindle
#

Damn im nothing

#

Thats some hater shit

red flower
wintry solar
#

It just ignores plasma right now, and I think probably swap effects too

knotty orchid
#

While using my mod the longer the run the worst the performance. I think it could be a memory loss. Is this a Balatro thing or should I review my code?

wintry solar
#

If they use mod_chips/mod_mult it will when it’s fixed

manic rune
knotty orchid
#

It has yeah

manic rune
#

mhm

knotty orchid
#

So I have to review the ui then

long sun
#

Jokers with multiple ability texts don't seem to display them properly when they have info_queues?

cursive gazelle
#

I think this got fixed a while ago

#

Check your smods update maybe

long sun
#

ah, okie

cursive gazelle
#

I don’t know if it’s in main yet but i remember bepis committed the change

#

It’s been a while it’s probably added

gilded blaze
#

it's added

#

but I don't recommended updating to latest commit

cursive gazelle
#

Are there problems ?

gilded blaze
#

Chip-Mult Operator API is not in a usable state

cursive gazelle
#

My english is lacking i just woke up lol

gilded blaze
cursive gazelle
gilded blaze
#

many

long sun
cursive gazelle
#

I can’t be bothered

cursive gazelle
long sun
#

schweet

#

thanks!

#

will test soon, i don't doubt that this will work

cursive gazelle
#

(X) to doubt
(O) to skip dialogue

long sun
#

([ ]) to truth

red flower
#

the thing about the multiple info queues should be fixed too but i think that's after the chip mult operator thing

long sun
#

awesome ^u^

#

you guys work fast fkjgnhkjfghn

cursive gazelle
#

N does most of the work

red flower
#

this was all eremel

gilded blaze
#

I already sent the link to the exact commit before chip mult operator

cursive gazelle
wintry solar
#

It’s mixed within it

red flower
red flower
wintry solar
#

But please please stop directing inexperienced devs to the dev branch for the love of god

#

Just say “it’ll be in the next smods release, don’t worry about it”

gilded blaze
#

😭

cursive gazelle
wintry solar
#

That is the entire point of having releases

knotty orchid
#

Is there a way to activate a joker when debuffed?

cursive gazelle
#

Remove the debuff

knotty orchid
#

I still want it to be debuffed but I want to have other effect

cursive gazelle
#

If context.debuff

#

I think

knotty orchid
#

I've tried that

#

but doesn't work 🙁

#
    
calculate = function(self, card, context)
        apply_element("Forest", "ina_onforest", G.C.PALE_GREEN)
        if context.debuff then
            restore_types_for_area()
        end
    end,```
#

this is all my function

red flower
#

what do you want to do

knotty orchid
#

I have a type system and this joker set all the jokers to Forest type

#

I want to reset the type when debuffed

red flower
#

use remove_from_deck

knotty orchid
#

remove_from_deck applies when debuffed??

red flower
#

yes

knotty orchid
#

oh

cursive gazelle
red flower
cursive gazelle
#

What’s reading

knotty orchid
cursive gazelle
#

Cpu overload

red flower
#

balatro modding book when

knotty orchid
#

AHAHHA

#

vanilla remade

#

that's the book

cursive gazelle
#

I’m helping seu pai make better scaling detection with a lua praser

knotty orchid
long sun
cursive gazelle
#

Lol

long sun
#

well ya, that'd make it work, but the problem is that i'm on the version it requires

#

shown in the screenshot

cursive gazelle
#

Rigged

red flower
long sun
#

ah okie

wintry solar
#

😡 please stop using dev builds as dependencies why am I suddenly having to say this all the time again

molten relic
#

i have this ObjectType for a booster, though when i open the booster pack i get 3 jimbo's

    key = "Passive Items",
    default = "j_bali_breakfast",
    cards = {
        ["j_bali_sadonion"] = true,
        ["j_bali_innereye"] = true,
        ["j_bali_spoonbender"] = true,
        ["j_bali_cricketshead"] = true,
        ["j_bali_myreflection"] = true,
        ["j_bali_numberone"] = true,
        ["j_bali_bloodmartyr"] = true,
        ["j_bali_brotherbob"] = true,
        ["j_bali_skatole"] = true,
        ["j_bali_haloflies"] = true,
        ["j_bali_magicmush"] = true,
        ["j_bali_thevirus"] = true,
        ["j_bali_roidrage"] = true,
        ["j_bali_heart"] = true,
        ["j_bali_rawliver"] = true,
        ["j_bali_skelekey"] = true,
        ["j_bali_dollar"] = true,
        ["j_bali_boom"] = true,
        ["j_bali_trans"] = true,
        ["j_bali_compass"] = true,
        ["j_bali_lunch"] = true,
        ["j_bali_dinner"] = true,
        ["j_bali_dessert"] = true,
        ["j_bali_breakfast"] = true,
        ["j_bali_rottenmeat"] = true,
        ["j_bali_spoon"] = true,
    }
})```
#

whats wrong

jolly shadow
knotty orchid
#

how do I know if a card is eternal?

wintry solar
jolly shadow
wintry solar
#

you are missing the point entirely

red flower
jolly shadow
gray kiln
#

how do i make tag appear only after ante 2

red flower
unborn smelt
#

Is there an easy way to check if the played hand is a royal flush? It defaults to Straight Flush with context.scoring_name

frosty dock
#

royal flush is just a display modification

#

it's not a hand type in its own right

red flower
#

context.evaluate_poker_hand and context.display_name == "Royal Flush" then save that

gray kiln
unborn smelt
red flower
wintry solar
#

checking the display name woudl language lock it though I think

red flower
#

i checked, the value is before it gets localized

languid canopy
#

hello! how do i make so theres more than the two "rarity" and "modname" thingy on the jokers ?
(ping me pls)

rotund sable
#
    set_badges = function(self, card, badges)
             badges[#badges+1] = create_badge('text', G.C.RED, G.C.BLACK, 0.8 )
     end,
languid canopy
#

in the joker code itself so

#

thxs

rotund sable
#

It's put there just like the calculate function

#

And can also go into consumables etc

languid canopy
#

yeah aight thanks

azure laurel
#

hey i really need help to make a joker, i want to make that gives mult for every dark suit played but destroy every light suit, but my code cant recognize more that one suit at the time and i dont know how to destroy cards so pls someone help me

slim ferry
#

what do you mean by cant recognize more than 1 suit at a time

real steeple
#

mod

manic rune
#

and use context.destroy_card/context.destroying_card/SMODS.destroy_cards depending on what you are doing

long sun
#

this code is able to create an Orbital Tag, however, when it spawns, its poker hand is listed as [poker hand], and yeping it crashes the game

#

how can i fix this?

languid canopy
#

is there a loc format colour for foil cards ?
like
{C:foil}text{}

#

yk

long sun
#

C:dark_edition

faint yacht
#

-# I just went the lazy route and change the tag manually if it is Orbital.

long sun
#

ah kay ^^;

real steeple
#

is it possible to save found seeds from "Immolate seed finder" to a txt file

#

can i use freopen? for c++

cursive gazelle
wintry solar
cursive gazelle
#

You can export variables to a txt file with lua

long sun
wooden nexus
#

wrong modding channel whoops

cursive gazelle
# real steeple how
local seed = “the seed"
local file = io.open("seeds.txt", "w")

file:write(seed)

file:close()```
long sun
cursive gazelle
#

Shinku jumpscare

cursive gazelle
#

“n \” without space

#

Why didn’t it show lol

#

I hate this app 💗

#

N\ but the N is lowercase

red flower
cursive gazelle
#

Hi

#

I’m having a hard time putting a \ beside you

gilded goblet
#

\n

long sun
#

ya it's that

gilded goblet
#

Gotta do double \

long sun
#

\n

real steeple
long sun
#

the n is short for newline

real steeple
#

this thing

gilded goblet
#

I have yet to figure out/understand what \r does

cursive gazelle
gilded goblet
long sun
gilded goblet
#

Yeah but like

#

What Is That

long sun
#

so

cursive gazelle
#

Tldr

real steeple
#

in cl

cursive gazelle
long sun
#

\n is for new lines, \r returns to the start of the line

real steeple
#

ok then?

long sun
#

having both would make a new line, with the cursor at the start

rotund sable
long sun
#

you don't really need both though

cursive gazelle
#

This will save the seed to a file

long sun
#

\n suffices

steady tusk
#

Hi all. Brand new here but hoping someone might be able/willing to help me troubleshoot something.

I've been using Mod Manager for the last few months, I've always launched the game through BMM without Steam being open.

Well, I've been grinding away at C++ the last couple weeks and was down to my final joker as of last night.

Unfortunately, I launched Balatro today while steam was open, and my save file seems to have reverted back to the last time I had launched through Steam, losing about 50 gold stickers in the process.

I tried quitting steam and BMM and relaunching without steam being open, as well as restarted my MacBook, and no luck.

Am I just screwed here? Or is there any way I could recover that previous save file?

#

Forgive me if this is the wrong channel for this type of thing. Took my best guess.

rotund sable
#

Ahem

#

Smh ven

polar parrot
#

Sorry guys. Wrong channel.

cursive gazelle
#

FurinaSleep your save file got overridden

steady tusk
#

Damn. What I feared.

cursive gazelle
real steeple
#

yeah

wintry solar
cursive gazelle
#

Yeah that should work

#

Make sure it’s a string

#

Or else convert it

cursive gazelle
steady tusk
# cursive gazelle Sadly

I feel like I had launched through Steam before w/o this happening, so I had some small hope. Thanks for letting me know.

frosty rampart
#

how can I set up a custom context to behave like context.fix_probability? I'm trying to refactor the context I set up to modify dice rolls, and I'd like to be able to return a new dice_value calculation key instead of passing the whole die object into the context and having the context users modify it directly

ocean sinew
#

How to change the chance of a joker appearing without changing its rarity?

red flower
#

you cant without redesigning the pool system

wintry solar
#

-# yet

ocean sinew
#

to change things in it

red flower
#

you can thats what i do

#

check joyousspring if you want

ocean sinew
#

I will thanks

#

If I use any of the code I'll give u credit btw

frosty rampart
languid canopy
#

hello, currently making sprites for playing cards for a custom deck, in this custom deck, there is 4times the same card lets say, should i also put 4 times the sprite ? (please ping me)

fluid nebula
red flower
#

i havent watched it but you can justa add more jokers by adding more SMODS.Joker to the same file so it should be good

fluid nebula
#

okay, nice

coarse marsh
#

And it comes back with this error

#

It has the moddedprefix rotted

fluid nebula
#

no proper calculations yet

frosty rampart
# coarse marsh I made a joker

the rarity should be fullhous_rotted. "modprefix" is a stand in for the prefix that you assigned to your mod, which appears to be "fullhous" according to the error

fluid nebula
coarse marsh
still violet
#

does anyone know if its possible to "play" a card that is held in hand (preferably using lovely)

frosty rampart
frosty rampart
#

yes it's nichola, it scores face cards that are held in hand as if they were played (they still count as being held in hand, and won't be discarded after the hand is over)

frosty rampart
#

no, the SMODS.Atlas
you do have one, right?

still violet
#

but i need to recreate some this since i am using lovely

frosty rampart
#

is there any particular reason you're not using steamodded? it's the central API for pretty much all balatro modding

fluid nebula
#

sorry if this is a simple mistake but how may i fix this
i want the '$5' and '$50' to appear yellow

frosty rampart
fluid nebula
#

thanks

#

had no idea

#

C Money sounds like a rapper who had one hit in the early-to-mid 2000s

hallow slate
#

Should I use functions or LOVELY editing to modify the UI?

red flower
#

depends

frosty dock
#

if you can hook cleanly, you probably should

#

if you can patch safely, you probably should

fluid nebula
#

does anybody know the game's values for money and probability

modern kindle
#

woah its aure hi aure

frosty dock
hallow slate
#

G.GAME.dollars?

frosty dock
modern kindle
#

i havent seen you in ages i hope youve been well

frosty dock
#

i've been well, just haven't had much time for modding stuff

fluid nebula
fluid nebula
frosty dock
#

got exams coming up so there's that

modern kindle
#

totally fair, no obligation to either
I hope your exams go well!

fluid nebula
frosty dock
#

good luck to me hehe

modern kindle
#

the fact im seeing 1 42 and then the next highest being 30 is wild

#

good luck man

frosty dock
#

ty

fluid nebula
solid zinc
#

any idea how to fix this? i just updated lovely and smod but now i can't launch the game

fluid nebula
#

sorry for constantly asking questions but how do i program probability into a joker

#

like a 1 in whatever for something to happen

#

just trying to get the basics from the professionals

bold sleet
copper thorn
#

from 1 to 10 how hard to code a joker that would it be to give +chips on a certain day ?

bold sleet
#

but why?

#

also uh... idk if that helps

fluid nebula
copper thorn
# bold sleet *but why?*

no judging and by the seeing or your question i won"t tell you why (althought you might know one day or another ?)

fluid nebula
#

of course you will need steam modded to run the joker but still

#

i'm just curious

frosty rampart
copper thorn
#

f#k

frosty rampart
#

os.date("%A") == "Tuesday" will be true if the current day is tuesday i think. fill in whatever day of the week you wanted

copper thorn
#

i don't need a day but a date like persay 14 february

#

so that don't fit

frosty rampart
#

os.date("%B") == "February" and os.date("%d") == "14"
note that it should be a string with the number in it

copper thorn
#

wait ima build smth up and get back to y'all

fluid nebula
#

i'm so sorry for being annoying but does anybody know how to properly integrate chance into a joker

#

i've read through the smods 0711a notes

frosty rampart
fluid nebula
#

thanks

copper thorn
#

so this should give 404 chips only on the 14th of february ?

#

f#ck i put mult

frosty rampart
#

return chips instead of mult, but yes everything else looks good

copper thorn
#

yh i saw that rn i copied from vanilla remade the base joker x) i'm not wriing allat

frosty dock
copper thorn
#

and this works for all language, like if my pc is in french it will work ?

frosty rampart
#

aw fuck right

copper thorn
#

f#ck

frosty dock
copper thorn
#

cuz im french and i have my mod in french and english

#

so i put the french for august

#

and that should work

frosty dock
#

maybe don't rely on system locale

copper thorn
#

yh

frosty dock
#

os.date("*t") should get you a date table if I'm not mistaken

copper thorn
#

but how am i supposed to make it universal ?

frosty rampart
#

oh actually just do os.date("%m"), that'll give you a number for the month

rotund sable
#

it return number

frosty rampart
#

so e.g. for february os.date("%m") == "2"

frosty rampart
#

yea that'll be true on august 14th

copper thorn
#

nice

#

made let's see if it works

#

why isn't there i have my atlas correct (it should be my actual discord pfp as a joker)

cursive gazelle
#

Change joker key maybe

copper thorn
#

so it works but i don't see why cuz i always put the same key as the atlas key in the joker key -_-

cursive gazelle
#

Keys should be unique please

copper thorn
#

x) why please ? it works and helps me with ctrl+f

#

but yeah from now on ill differentiate keys

#

so i tested my date based joker on todays date and this happenned when i summoned it

rocky plaza
# copper thorn

so encase that entire if statement inside
if context.joker_main then
-- do stuff here
end

#

or add an and

cursive gazelle
#

You basically calling a nil value because there’s no chips

copper thorn
#

like this ?

#

forgot to format sry

rocky plaza
cursive gazelle
#

The if should be inside

#

Lua is case sensitive

rocky plaza
#

wait

copper thorn
slim ferry
#

oh

cursive gazelle
#

Second if is outside the first if statement

slim ferry
#

lmao

copper thorn
#

and the %m needs the 0 before any month that has only one number like august

#

to make it clearer x)

cursive gazelle
#

Should make a time related mechanic

copper thorn
#

so now i have another joker but no idea of what effect to give it

cursive gazelle
#

Baguette đŸ„–

copper thorn
#

no it's a sad heart

#

i might wanna test whanging texture every boos blind or smth like that, i have this image to go along

cursive gazelle
#

I smell Tangents

copper thorn
copper thorn
cursive gazelle
copper thorn
#

or x1450 to not bother changing it every year

cursive gazelle
#

Just do ^^mult

#

At this point

copper thorn
#

no :(

#

but srsly i need ideas im bored rn

copper thorn
#

to not bother anymore

fluid nebula
#

WHERE?????????

red flower
#

in that line

rotund sable
#

"main.lua.txt" hmmm

rotund sable
red flower
#

loc_vars = local ... ,
doesn't make sense

fluid nebula
#

my bad that was a coding oversight

#

thanks y'all

red flower
#

did you look at vanillaremade

#

there are jokers with the new probability stuff

fluid nebula
#

the fuckin message is still there

fluid nebula
#

smods probability, 0711a

red flower
#

i recommend looking at vanillaremade

#

it has examples for that

#

look at like cavendish or something

fluid nebula
#

any help, anybody?

#

no idea what this symbol could be

#

nevermind

frosty rampart
#

grahhhh
dice now have a total of 3 accessible contexts: context.dice_mod, context.dice_add_rerolls, and context.dice_post_roll.

context.dice_mod is triggered every time a die rolls, and passes the die object itself in context.dice_other_die, as well as context.dice_roll_value for the current value from the roll. returning dice_value in this context changes the die's rolled value, which updates context.dice_roll_value (like numerator updates in probability-editing contexts) so that duplicates of dice_mod jokers can stack.

context.dice_add_rerolls is triggered once during the die use process, and can be used to make a die roll multiple times. it passes context.dice_other_die and context.dice_roll_value again. returning a number as dice_rerolls in this context rerolls the die that many times. by default it will pick the highest number rolled, but you can also pass a function as dice_reroll_determiner to make an alternate condition (e.g. you could write a function that takes an average of all the rolls). the function should get a single argument, which is the table of all the rolled values (including the original one that it had before this particular card did its rerolls)

context.dice_post_roll is triggered after the whole rolling and rerolling process is done. it just passes context.dice_roll_value, being the absolute final roll value for the die

#

this has allowed me to un-hardcode my vouchers and make it so that other cards are "reaching into" a die's ability table as little as possible

clear ocean
#

any documention on how to change the position of the stake sticker

frosty rampart
#

dunno exactly but just a heads up, you'll probably want to move the eternal/perishable sticker location too (it's the same height in the left corner)
and maybe even the rental sticker

clear ocean
#

yeah i figured too

frosty rampart
#

my first guess is something with either the set_sprites or draw functions in the joker

rocky plaza
#

really quick
does G.GAME only exist during a run?

slim ferry
#

yes

frosty rampart
#

? no
(source: debugplus eval G.GAME on the main menu)

languid canopy
#

is there a resource i can use for making custom decks ? (with custom playing cards)

slim ferry
#

also stuff in G.GAME is saved to the run so like

#

why would it exist outside

frosty rampart
#

maybe the contents are different, and i think it rebuilds G.GAME in initialize_game_object and/or start_run

slim ferry
red flower
#

it 100% exists outside the game because i never nil check G.GAME

languid canopy
slim ferry
#

no, thats only for making alternate textures for the existing cards like the face card skins that exist in vanilla

#

if you wanted to make an entirely different set of playing cards you would need to look into SMODS.Rank and SMODS.Suit

languid canopy
#

aight

slim ferry
#

and SMODS.PokerHand for hands

odd fjord
#

um my game keeps crashing when trying to cash out after the first bind

final jewel
#

Im trying to make my deck card score randomly, like the one in TogaStuff. idk why it doesn't work

still sierra
#

Does anyone have any experience editing number_format?

red flower
high sinew
#

for removing/banning a tag from game how can i do it?

still sierra
red flower
#

that's part of the problem i was mentioning because messing with number_format and messing with UI are entirely different lol

still sierra
#

alright lol, my bad

#

at the minute my code only touches number_format, so I thought it was relevant

red flower
#

you would need to patch this

final jewel
#

guys where do I need to define that

rapid stag
#

is there some way if could do some kind of blueprint-showman-esque type joker effect where, with doubles appearing enabled, increase chances of joiker to the right spawning?

red flower
#

there's no way to control individual joker weight yet

oblique lotus
#

How can I get cards held in hand to score like those selected?

plain apex
#

is there a context before context.open_booster for when you buy the booster? context.open_booster doesn't trigger until its already opened so trying to add more choices then just adds it to the next booster pack

candid sleet
#

General question cuz I'm just brainstorming ideas right now, would it be fairly simple to have a custom back for a specific edition, say you had a custom steel back on your steel card so you could see it was a steel card when it was drawn face down

daring fern
oblique lotus
jolly shadow
#

i think they want cards held in hand to score

oblique lotus
#

Yes

jolly shadow
#

that sounds interesting actually idk if thats doable

daring fern
# oblique lotus Yes
local oldsmodsscorecard = SMODS.score_card
function SMODS.score_card(card, context)
    if not G.scorehand and conditions and context.cardarea == G.hand then
        G.scorehand = true
        context.cardarea = G.play
        SMODS.score_card(card, context)
        context.cardarea = G.hand
        G.scorehand = nil
    end
    return oldsmodsscorecard(card, context)
end
modern kindle
#

hi smt

daring fern
modern kindle
#

how have you been my friend
i hope well

clear ocean
#

some folks have returned... (i'll work on the art later on) i will still credit you dilly for the additional concept

#

going to readd memory card

#

and it has come to bargain

oblique lotus
clear ocean
#

saved hands or discards / limit

oblique lotus
#

I see. I am more used to a (Max x hands stored) type format.

clear ocean
#

i see

gilded goblet
#

Is there a way to get what consumable a player has used?

I'd like to get if that consumable is a planet, and upgraded the poker hand's level by 2 instead of 1 (as a joker effect)

frosty rampart
#

aka if context.using_consumeable is true in your calculate function, then context.consumeable is the consumable in question

#

and no, consumeable isn't a typo

chrome widget
gilded goblet
#

Im tires

chrome oak
#

I dont know if this is the right place to ask this, but i have a quick question. Im trying to put my own music into the game by manually replacing the .ogg files. When i first did this, the music was slowed and pitched down. ive been trying to get it to the correct pitch and speed but i cant find it. Does anybody know the pitch and speed i need to set the music to so it sounds normal?

clear ocean
umbral zodiac
#

i might be stupid but does anyone know why my patch isnt being applied
this pattern exists and its the only instance of it

[[patches]]
[patches.pattern]
target = 'functions/state_events.lua'
pattern = '''
other_drawn = not G.GAME.facing_blind and SMODS.drawn_cards
'''
position = "after"
payload = '''
, forced_draw = forced and SMODS.drawn_cards
'''
match_indent = true
#

i have another patch right above it which does work and it targets the exact same file

frosty rampart
#

the pattern has to match the whole line exactly, so you need the }) at the end (which also means it's probably not going to behave exactly as you expect)

umbral zodiac
#

ill probably make it patch the first line instead i guess

frosty rampart
#

you might be able to insert it between that last parameter and the }) with a regex but I'd rather just figure it out with a different pattern tbh

umbral zodiac
#

ya i could probably just do it on after with the first line of the calculate_context and be fine

gleaming crescent
#

I hate this

#

I really don't understand how to make my stake appear before specific stake AND make that specific stake apply my stake

jolly shadow
clear ocean
#

No way

#

Did you recreate it for yourself or you made the art for my mod or something

#

Because either way that is awesome

jolly shadow
#

i made the art for u to use if youd want to

#

i didnt actually recreate the function i just faked the description for the ingame visual

clear ocean
#

I would love to 💯 about to go to sleep

#

So I’ll do it the morning

jolly shadow
#

ill dm u the sprite then

clear ocean
#

Message me how you want to be credited and an optional social media profile for linking on the read me

gleaming crescent
#

I hate Cryptid's code

frank ridge
#

Is there a way to count cards drawn?

#

From first draw and the next play/discard draws?

ocean sinew
#

how to get every joker rarity?

jolly shadow
#

SMODS.Rarities maybe

#

should have all, including ones from other enabled mods i think

pastel kernel
#
if context.before and next(context.poker_hands["Flush"]) and not context.blueprint then
            G.E_MANAGER:add_event(Event({
                trigger = 'after',
                delay = 0.4,
                func = function()
                    play_sound('busterb_makudonarudo')
                    card:juice_up(0.3, 0.5)
                    update_hand_text({ sound = 'button', volume = 0.7, pitch = 0.9, delay = 0 },
                        { level = 'x' .. to_big(card.ability.extra.multiplier) })
                    for poker_hand_key, hand in pairs(G.GAME.hands) do
                        local current_level = hand.level or 1
                        local levels_to_add = math.max(0, math.floor(current_level * (to_big(card.ability.extra.multiplier) - 1)))
                        if levels_to_add > to_big(0) then
                            level_up_hand(card, poker_hand_key, true, levels_to_add)
                        end
                    end
                    update_hand_text({ sound = 'button', volume = 0.7, pitch = 1.1, delay = 0 },
                        { mult = 0, chips = 0, handname = '', level = '' })
                    return true
                end
            }))
            return {
                message = localize('k_level_up_ex'),
                colour = G.C.MULT,
                card = card
            }
        end```
#

it works

#

but the animation is kinda buns

subtle merlin
#

How would I forcefully add a card to the scoring hand (no matter the scoring hand's current size) without changing the type of the scoring hand? (in context.before, preferably)

gleaming crescent
sage crater
jolly shadow
#

it's not my card

#

Just my art

sage crater
#

Ah, got it

frank ridge
#

How can you count how many cards have been drawn?

vernal path
lament agate
#

IM SORRY

solid mesa
#

wait i want to see all the "SMODS.Joker{...}"

harsh warren
#

ok

solid mesa
#

@harsh warren can you send it :^?

harsh warren
#

the code?

#

SMODS.Joker{ --Freddy
key = "freddy",
config = {extra = { mult = 5,}},
pos = { x = 0, y = 0},
rarity = 1,
cost = 3,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
unlocked = true,
discovered = true,
effect=nil,
soul_pos=nil,
atlas = 'freddy',

calculate = function(self, card, context)
    if context.joker_main then
        mult = card.ability.extra.mult
        {
        cardarea = G.jokers,
        full_hand = G.play.cards,
        scoring_hand = scoring_hand,
        scoring_name = text,
        poker_hands = poker_hands,
        joker_main = true,
        }
    end       
end

}

solid mesa
#

yup

#

ok there are few things to fix

harsh warren
#

yeah i know lol

#

wich things

solid mesa
#

so you dont have to scroll 1827 lines

#

soul_pos is the Atlas for legendary, you dont need it
-# any joker can have that, but you get it

harsh warren
#

yep that i know

solid mesa
#

any stats that is changed in a function, have to be in the return

mystic meteor
#

I'm currently trying to create a config tab with a toggle button, but I'm running into issues. It honestly could be a simple lua error, since I'm new to the language.
Here is the error message I'm getting:

engine/ui.lua242: attempt to index local 'node' [a nil value]
-- main.lua
HW = {}
HW.CONFIG = {}

HW.CONFIG.ui = function ()
  local ui_nodes = {
    custom_text_container("ml_tags_options_message", {
      colour = G.C.UI.TEXT_LIGHT,
      scale = 0.80,
      shadow = true,
    }),
    {
      n = G.UIT.R,
      config = {
        align = "cm",
        padding = 0.1,
      },
      nodes = {
        create_toggle({
          label = "Enable Hello World",
          ref_table = HW.config,
      }),
     }
    }
   }

  return {
    n = G.UIT.ROOT,
    config = {
      align = "cm",
      padding = 0.05,
      colour = G.C.CLEAR,
  },
    nodes = ui_nodes,
  }
end

HW.config = SMODS.current_mod.config
SMODS.current_mod.config_tab = function ()
  HW.CONFIG.ui
end
solid mesa
#
if "condition/s" then 
"things that does not touch the game"
return{
        mult = card.ability.extra.mult
}
end
harsh warren
#

return {
chips = card.ability.extra.chips
}

solid mesa
#

yea like that

harsh warren
#

ok

#

where does it go

#

or here?

solid mesa
#

tbf idk why you have all of that

#

the {........}

#

youre just making a joker that doesnt need them

harsh warren
#

ok

solid mesa
#

maybe and for more advanced jokers if necessary

#

the return goes after the if

#
if skdisjs then
    return {

    }
end
harsh warren
#

okay got it

#

thx

harsh warren
#

im crashing out bro

candid elbow
#

Couldn’t find your main file

#

:>

harsh warren
#

fixed it

#

but the god damn joker does not appear

candid elbow
#

Can i see the code

harsh warren
#

how do i disable vanilla jokers?

#

like to not making them appear

candid elbow
#

Change joker key

#

To anything but atlas key

harsh warren
#

change Joker to Atlas you mean?

candid elbow
#

And your path should have the file extension at the end (.png)

candid elbow
harsh warren
candid elbow
#

Change key = “freddy” to anything else

harsh warren
#

i forgot that lol

#

okay

candid elbow
#

Keys should be unique across your mod

harsh warren
candid elbow
#

That does that

#

If you’re trying to test your joker

harsh warren
#

okay thx so much

candid elbow
#

There’s a mod called debugplus that lets you spawn jokers and a lot more

candid elbow
candid elbow
solid mesa
#

@harsh warren Banner lets you to disable all things to appeard

#

but yea, if you just want to try the joker use debugplus

#

hover the joker in collection and press Ctrl+3

candid elbow
#

Thanks for the translation

#

Sob

#

😭

solid mesa
#

too sleepy to read and think

solid mesa
manic rune
# harsh warren

you need to add the extension path too, like .png, .jpg, etc etc at path.

#

uhhh

#

-# wait i realized kate already helped you lmao

wintry solar
candid elbow
#

😭i said across your mod

#

That’s literally what i meant

wintry solar
#

Yes what you said is wrong

candid elbow
#

Guys am i speaking another language 😭

wintry solar
#

You can absolutely have an atlas and a joker with the same value in the key field

candid elbow
#

It doesn’t load tho

#

I tried

wintry solar
#

It does

candid elbow
#

Who am i to argue with john smods

languid canopy
#

hello, im seeking help for creating a custom modded deck(custom cards/hands/and so on), pls ping me or hit me up in dms

cursive gazelle
#

what eremel said is true you can have the same key in diffrent objects but two SMODS.joker can’t have the same key (as an example )

candid elbow
#

AHHHHHHHHH

#

Gotcha

cursive gazelle
unborn smelt
#

maybe Im blind and cant find the documentation for it, but where do you define your mods icon?

languid canopy
#

in main.lua
SMODS.Atlas {key = 'modicon',path = "icon.png",px = 32,py = 32}

#

in your assets X1 AND X2 place the icon.png (your mod icon)

unborn smelt
#

ok, thanks. Did not know that you have to define it in an atlas

wispy falcon
#

Where do I find how to make buttons and such for cards? I would guess in the wiki but I don't find said thing there

candid elbow
#

It’s under ui

#

But

#

Good luck

wispy falcon
#

Why?

#

Should I be scared?

slim ferry
#

ui is scary

candid elbow
wispy falcon
#

Why...?

candid elbow
#

Shit is so hard not even ai can help

wispy falcon
#

Well, ai is sometimes not that good at all at coding

slim ferry
#

yeah most ai sucks at coding

cursive gazelle
#

Ui isn’t hard

#

Just look at how people do it and you’ll understand it

#

good reference is always

#

joyous spring

wispy falcon
#

Do you have a link for that?

wispy falcon
#

Thank you :)

bold sleet
#

<@&1133519078540185692>

#

Nuke them

#

To the shadow realm!

#

ty <3

candid sleet
#

anyone know why this scales but doesn't actually apply any xMult during scoring?

#

do i need to do a permanent upgrade like hiker?

wintry solar
#

Your top block won’t happen

candid sleet
#

oh ok

wintry solar
#

Just put the xmult = in the bottom one

candid sleet
#

ah yeah that works thanks

#

i was originally planning something like this which obviously isnt working but i'm a bit confused on how to do it

#

i don't know how to go about applying something like that to every card in the deck that uses that enhancement at once

long sun
#

hiya! i'd like to write a shader that cuts a pixelated hole from a card

#

shaders are beyond me right now though, so i need help -3-

#

i have this:

#if defined(VERTEX) || __VERSION__ > 100 || defined(GL_FRAGMENT_PRECISION_HIGH)
    #define MY_HIGHP_OR_MEDIUMP highp
#else
    #define MY_HIGHP_OR_MEDIUMP mediump
#endif

extern MY_HIGHP_OR_MEDIUMP vec2 drilled;
extern MY_HIGHP_OR_MEDIUMP number dissolve;
extern MY_HIGHP_OR_MEDIUMP number time;
extern MY_HIGHP_OR_MEDIUMP vec4 texture_details;
extern MY_HIGHP_OR_MEDIUMP vec2 image_details;
extern bool shadow;
extern MY_HIGHP_OR_MEDIUMP vec4 burn_colour_1;
extern MY_HIGHP_OR_MEDIUMP vec4 burn_colour_2;

vec4 dissolve_mask(vec4 tex, vec2 texture_coords, vec2 uv)
{
    if (dissolve < 0.001) {
        return vec4(shadow ? vec3(0.,0.,0.) : tex.xyz, shadow ? tex.a*0.3: tex.a);
    }

    float adjusted_dissolve = (dissolve*dissolve*(3.-2.*dissolve))*1.02 - 0.01; //Adjusting 0.0-1.0 to fall to -0.1 - 1.1 scale so the mask does not pause at extreme values

    float t = time * 10.0 + 2003.;
    vec2 floored_uv = (floor((uv*texture_details.ba)))/max(texture_details.b, texture_details.a);
    vec2 uv_scaled_centered = (floored_uv - 0.5) * 2.3 * max(texture_details.b, texture_details.a);
    
    vec2 field_part1 = uv_scaled_centered + 50.*vec2(sin(-t / 143.6340), cos(-t / 99.4324));
    vec2 field_part2 = uv_scaled_centered + 50.*vec2(cos( t / 53.1532),  cos( t / 61.4532));
    vec2 field_part3 = uv_scaled_centered + 50.*vec2(sin(-t / 87.53218), sin(-t / 49.0000));

    float field = (1.+ (
        cos(length(field_part1) / 19.483) + sin(length(field_part2) / 33.155) * cos(field_part2.y / 15.73) +
        cos(length(field_part3) / 27.193) * sin(field_part3.x / 21.92) ))/2.;
    vec2 borders = vec2(0.2, 0.8);

    float res = (.5 + .5* cos( (adjusted_dissolve) / 82.612 + ( field + -.5 ) *3.14))
    - (floored_uv.x > borders.y ? (floored_uv.x - borders.y)*(5. + 5.*dissolve) : 0.)*(dissolve)
    - (floored_uv.y > borders.y ? (floored_uv.y - borders.y)*(5. + 5.*dissolve) : 0.)*(dissolve)
    - (floored_uv.x < borders.x ? (borders.x - floored_uv.x)*(5. + 5.*dissolve) : 0.)*(dissolve)
    - (floored_uv.y < borders.x ? (borders.x - floored_uv.y)*(5. + 5.*dissolve) : 0.)*(dissolve);

    if (tex.a > 0.01 && burn_colour_1.a > 0.01 && !shadow && res < adjusted_dissolve + 0.8*(0.5-abs(adjusted_dissolve-0.5)) && res > adjusted_dissolve) {
        if (!shadow && res < adjusted_dissolve + 0.5*(0.5-abs(adjusted_dissolve-0.5)) && res > adjusted_dissolve) {
            tex.rgba = burn_colour_1.rgba;
        } else if (burn_colour_2.a > 0.01) {
            tex.rgba = burn_colour_2.rgba;
        }
    }

    return vec4(shadow ? vec3(0.,0.,0.) : tex.xyz, res > adjusted_dissolve ? (shadow ? tex.a*0.3: tex.a) : .0);
}

vec4 effect( vec4 colour, Image texture, vec2 texture_coords, vec2 screen_coords )
{
    vec4 tex = Texel( texture, texture_coords);
    vec2 uv = (((texture_coords)*(image_details)) - texture_details.xy*texture_details.ba)/texture_details.ba;

    tex.a *= 0.35;

    return dissolve_mask(tex * colour, texture_coords, uv);
}

extern MY_HIGHP_OR_MEDIUMP vec2 mouse_screen_pos;
extern MY_HIGHP_OR_MEDIUMP float hovering;
extern MY_HIGHP_OR_MEDIUMP float screen_scale;

#ifdef VERTEX
vec4 position( mat4 transform_projection, vec4 vertex_position )
{
    if (hovering <= 0.){
        return transform_projection * vertex_position;
    }
    float mid_dist = length(vertex_position.xy - 0.5*love_ScreenSize.xy)/length(love_ScreenSize.xy);
    vec2 mouse_offset = (vertex_position.xy - mouse_screen_pos.xy)/screen_scale;
    float scale = 0.2*(-0.03 - 0.3*max(0., 0.3-mid_dist))
                *hovering*(length(mouse_offset)*length(mouse_offset))/(2. -mid_dist);

    return transform_projection * vertex_position + vec4(0,0,0,scale);
}
#endif```
#

where do i start 😭

candid sleet
# wintry solar Your top block won’t happen

can i ask why that is? i wanted to try this idea of it only scaling during boss blinds but i don't see how i would do it without 2 seperate blocks and the 2nd block isn't happening in this code right now

wintry solar
#

Put them the other way round

candid sleet
#

yeah that fixes the scaling during the boss blind but then the actual scoring doesnt happen at all anymore

#

nevermind

#

hold on a sec

#

ah ok

#

they score but not during boss blinds

#

i think i can just add the scoring to the boss blind block as well

wintry solar
#

Oh you need the Xmult still in both

candid sleet
#

yeah gotcha

wintry solar
#

Your boss blind return is super funky too

#

card = card doesn’t do anything, and why are you using an extra table?

candid sleet
#

i'll be honest i dont know

#

i think i saw something else similar use it and thought it was required

#

i dont really know what it does, i have that in quite a few jokers though

#

oh wait yeah nevermind idk why i have that there lmao

#

i know what it's for now

#

another question about this actually

#

is there a way i can limit how high this can go

#

for balancing purposes i think it probably makes sense to cap it at 1.5x mult

long sun
#

<@&1133519078540185692>

#

they're giving it another try :)

faint yacht
languid canopy
#

hello, im having a real hard time making a modded deck, can someone help me out ?

drowsy acorn
#

im trying to make a joker that draws an additional card whenever you play or discard. i tried using the SMODS.draw_cards(handspace) function but im not really getting anywhere

#

here's the current joker code btw

    key = 'amoeba',
    loc_txt = {
        name = 'Amoeba',
        text = {
            "After play or discard,",
            "draw {C:attention}#1#{} additional card"
        },
    },
    
    config = {extra = {additional_cards = 1}},
    rarity = 1,
    atlas = 'CosmicTomfoolery',
    pos = {x=0,y=0},
    cost = 3,
    blueprint_compat = true,

        loc_vars = function(self, info_queue, card)
        return {
            vars = {card.ability.extra.additional_cards}
        }
    end,
    calculate = function(self, card, context)        
    if context.drawing_cards and (G.GAME.current_round.hands_played ~= 0 or G.GAME.current_round.discards_used ~= 0) then
                return {
                    SMODS.draw_cards(hand_space)
                }
            end
        end
}```
wintry solar
faint yacht
unborn smelt
#

Is there a context that triggers when buying items from the shop?

wintry solar
faint yacht
#

...this is not SMODS at fault, just my function being a bit after the sprites are set. 😅

wintry solar
#

Ah I see

#

I also don’t think my issue is on the smods end

faint yacht
#
if next(card) and not manual_sprites then
  self:set_sprites(nil, card)
end

Actually curious if card is still needed there if self.config.card = card was done earlier...

cursive gazelle
#
GitHub

Steamodded example mods. Contribute to Steamodded/examples development by creating an account on GitHub.

GitHub

Contribute to Steamodded/Wiki development by creating an account on GitHub.

long sun
#

in a shader, how can i get a random number between 0 and 1?

#

(i don't need noise, this is for positioning)

languid canopy
# cursive gazelle sure

so basicly its a deck with custom cards and custom hands
(would use basic set of mahjong tiles so 4 x 9 Man, Pin, Sou then 4 winds, 3 dragons)
i don't know how to put exacly those cards in there, like listing them inside the deck yk

cursive gazelle
long sun
#

will give it a go :D

#

doesn't seem like it

#
if (hole_pos.x < 0) {
        hole_pos.x = random(uv);
    }
    if (hole_pos.y < 0) {
        hole_pos.y = random(uv / 2);
    }```
cursive gazelle
#

define a func

#
    float r = random(uv);
    return r ;
}```
long sun
#

okie

faint yacht
cursive gazelle
cursive gazelle
languid canopy
long sun
cursive gazelle
cursive gazelle
long sun
#

i guess i could use time instead?

#

lemme try something

cursive gazelle
#

prob

languid canopy
long sun
#

alright, this didn't crash, but it's also doing nothing to the card ;u;

#

it's rendering fine if i change the opacity to 1??

#

just, opaque

#

no idea how to change the texture's opacity

languid canopy
cursive gazelle
#

im a little busy , try asking is modding chat pleasee

languid canopy
#

gotcha

wintry solar
long sun
#

the circle is absent

wintry solar
#

do you stop the base shader being drawn?

long sun
#

ah, no -3- i haven't looked at that

wintry solar
#

then that'll be why it looks like nothing is happening đŸ€Ł

#

you're adding a transparent circle on top of an image

long sun
#

right ;u;

candid prism
#

kirbyfalling.jpg

#

stacked gave us this diva

manic rune
#

the new versions got a much better look lol

long sun
#

no idea what to do about the shadow though

#

it's still rendering the base shader, but disable_shadow removes it entirely

candid prism
manic rune
#

o

#

makes sense

#

-# wait why tf is the effect UP there

candid prism
wintry solar
manic rune
#

it should be between Extra Effects [Stacked] and Press [LShift + X] to view effects

#

no clue why its up there

#

i dont think ive ever encountered that bug before

#

maybe try updating stacked ;P

knotty orchid
#

can a retrigger joker retrigger another retrigger joker?

candid prism
knotty orchid
wintry solar
#

no it's not

knotty orchid
#

I mean Blueprint and Brainstorm kinda do that so

wintry solar
#

copy effects are different to retriggers

#

they can't loop infinitely

long sun
#

got it to work!! is there a way to make it spawn only on Jokers? :D

#

(and, conversely, i'd like Waxed to stop appearing on Jokers)

copper thorn
#

i have a question, for a custom suit i need to register an atlas for each png/texture including hc and lc ?

long sun
#

lc sheet, hc sheet, suit icon

bold sleet
#

Hi chat, does anyone happen to know how to allow numbers and other symbols into this thing?

copper thorn
#

and those 3 needs registered atlas i suppose ?

rotund sable
#

<@&1133519078540185692>

copper thorn
#

ans what do i put in the colour part ?

long sun
#

hex("[hex code of your colour here]")

copper thorn
#

oh ok

ocean sinew
#

how do I get the edition of a joker?

#

is it just card.edition

hollow mango
#

i'm trying to make it so boosters that are debuffed cant be opened and vouchers that are debuffed cant be redeemed

#

ive tried patching into button_callbacks but i dont understand the e object that's getting passed

#

i tried tracing it backward but the UI system is really complicated with several layers of stuff getting passed around

bold sleet
#

-# e is the node that is executing the function. From there you can get e.config.ref_table, etc...

hollow mango
#

oh is it under ref_table

#

oh. that makes perfect sense

#

lets see

bold sleet
#

e is the node.

{n = G.UIT.R, config = { minw = 1}}

print(e.config.minw)
> 1
azure laurel
#

there is a context to tell if X joker was sold?

rocky plaza
bold sleet
#

Yeah, that.

azure laurel
bold sleet
#

if context.selling_card and context.card.config.center.key == "joker_key" then end

copper thorn
#

wth is wrong ? i hecked and the name it wrote on both are correct

copper thorn
#

and my icon is is the asset folder

azure laurel
#

where is the file?

bold sleet
#

For atlases it must be in /assets/1x and /assets/2x

copper thorn
bold sleet
#

1 and 2 times the size respectively.

copper thorn
#

i know i already registered atlases correctly

bold sleet
#

Then idk

copper thorn
#

so it works for some reason now but do i need e loc_txt ? it's not suppoed to be "ERROR" (althought it fits the gimmick) (yh my suit is not original)

#

and why does it take the place of diamonds ?

bold sleet
#

It is encouraged to have a localization file.

#

The error generated by the game is just a way for it to not crash. You should replace these messages with your own, even if they should read 'error'.

copper thorn
#

i meant not supposed sorry

#

i forgot the "not"

wintry solar
#

diamonds are on the next page, no?

copper thorn
#

x)*

#

i didn't see

#

but ignoring the need of localization, how do i give my suit a correct name ?

ocean sinew
bold sleet
copper thorn
#

like the name not beng the "ERROR" the game gives

vast bough
#

how would i reference the number of levels for most played, least played, and most recently played hand

pliant sigil
#

Hi there fellow devs and modders
I'd like to get into modding and since i've been playing balatro a lot lately, i thought this would be great to start ! (Embedded dev that never touched game dev)

I have a pretty good idea of what i'd like to do but i don't know if it's possible.
So here it comes : Is it possible to add or edit UI and menus ? (i'm don't know what lua scripting allows or not)

If so, do you guys have basic ressources to share ? I'm guessing a lot can be found around the Love2D docs ?

jolly shadow
#

there's some basic document on ui definitions on the smods wiki

rotund sable
vast bough
jolly shadow
#

just store last played hand when it s played

rotund sable
pliant sigil
rotund sable
#

In general the VanillaRemade is a good point of reference for modding (it recreates almost all vanilla things with smods) and it has a really helpful wiki explaining a lot

pliant sigil
#

Ho okay 😼 Thanks for the doc !

#

i'm guessing it would be easier to add a button that opens another menu rather than editing an existing menu then ?

rotund sable
#

I'm not sure about adding buttons but I feel like it would still need patching, just because the ui is defined in the source code,

bold sleet
#

or any variation in whatever menu idk

pliant sigil
#

Yeah exactly !

bold sleet
#

How much knowledge you have on lua.

#

Not necesarely balatro modding context.

pliant sigil
#

Almost none i'm affraid

bold sleet
#

oh

#

Then I'd suggest you first learn the basics of lua.

#

What are variables, conditionals, loops.

#

Tables, functions, etc.

#

The lua manual is a good starting point, maybe.

pliant sigil
#

Well i'm already a dev so i'm guessing it won't be that hard ?

#

unless LUA has really specific usages ?

bold sleet
pliant sigil
bold sleet
#

<@&1133519078540185692> kill

pliant sigil
#

i thought this was a LUA discord

#

my brain froze for a sec ahahah

bold sleet
#

Which involves lua.

#

Since balatro is made on lua.

bold sleet
pliant sigil
#

no i meant, the discord link that just appeared, i thought it was a LUA discord ahah

bold sleet
#

bru

#

No, that was whatever the fuck.

pliant sigil
#

timing was perfect

bold sleet
#

It's the third one this day.

#

Anyways, go read the manual

pliant sigil
#

they are getting aggressive

pliant sigil
bold sleet
#

If you have any questions, maybe ask them in DMs to not clutter this chat.

#

or not, I don't know if that's allowed here.

#

I don't know the rules by heart.

modern kindle
#

pretty much if its mod creation assistance this would be the place to be

bold sleet
#

General lua questions. I don't know if that fits here.

ivory widget
#

How do i check which Suit a Flush is using? All the ways i can think of would get messed up by Four Fingers or Wild cards

wintry solar
#

You just have to count the suits and find the most populous

ocean sinew
fluid nebula
#

gotta make the description of my joker change depending on if oops all 6s is there

#

i'll do that now

crimson marlin
#

Im trying to make a new hand in my mod, but for some reason it is disabling full house and flush house. This is my evaluate code, is something wrong???

        if true then return {} end
        if #get_flush(hand) >= 1 then return {} end
        if #get_straight(hand) >= 1 then return {} end
        local valid = {}
        local count1 = 0
        local count2 = 0
        local count3 = 0

        for i = 1, #hand do
            local card = hand[i]
            
            local num = card:get_id()
            if card.label ~= "Base Card" then
                if num == 2 then
                    count1 = count1 + 1
                    table.insert(valid, card)
                elseif num == 4 then
                    count2 = count2 + 1
                    table.insert(valid, card)
                elseif num == 7 then
                    count3 = count3 + 1
                    table.insert(valid, card)
                end
            end
        end
        --if hand[1].base.id == 10 then
        --    print("WOOOOOOOOW")
        --end
                

        if #valid > 0 and count1 == 1 and count2 == 1 and count3 == 1 then
            return {valid}
        else
            return {}
        end
    end```
fluid nebula
#

can someone explain to me why this isn't allowed

manic rune
fluid nebula
#

that confuses me. numerator clearly exists

#

unless the game hasn't loaded it when it boots up

slim ferry
#

thats not

#

how you do loc_vars

#

you would have to use loc_vars to have your description update for oops

frosty rampart
#

you need to get the numerator (and denominator) in your joker's loc_vars function, and return them as variables. check the 0711a release notes again for a code snippet about how to do exactly that

fluid nebula
#

wait a second

#

they are

#

they were already like that

rotund sable
#

?

slim ferry
#

what>

#

?

fluid nebula
#

unless i'm missing something

slim ferry
#

oh yeah

rotund sable
#

You have to use #1#

#

And #2#

slim ferry
#

you just need to then put #1# and #2# in the text in place of the original values to get them in the description

fluid nebula
#

ah, i see

#

so #1# instead of numerator?

slim ferry
#

you would instead just have

#

well

#

you dont need to concatenate

#

you can just put #1# and #2# directly in the text

fluid nebula
#

thank you very much for your guidance

#

i know i am very bad at lua programming, so sorry for constantly asking modding-dev for help

hushed field
#

@manic rune It's easy to set up, it's mostly that it involves patching, and a continuous learning about additional things to patch, haha. But it shouldn't be too hard to set up. Copying the Seals implementation just means I'm dealing with a lot of vanilla jank due to it not being intended to be expandable, haha

Gonna try and figure out if I can rewrite some stuff on the Smods' end to help with making a new card layer easier as a whole, honestly, because a lot of the stuff is just pretty unintuitive.

fluid nebula
#

i am trying to improve though

#

i've been using vanillaremade for guidance

#

as advised by N'

#

(thank you n')

slim ferry
#

vanillaremade localization files can also be used as reference btw

#

it has all the text for the vanilla jokers

hushed field
# fluid nebula i've been using vanillaremade for guidance

VanillaRemade is a great tool. Something I tend to do when I don't know how to do something that is present in vanilla code is by just adding a comment every few lines trying to explain what's happening. A lot becomes a lot cleaner once you start to realize what stuff references what other stuff, and why it does so

midnight coyote
fluid nebula
midnight coyote
#

is this right for triggering a card when it is destroyed?

fluid nebula