#💻・modding-dev

1 messages · Page 551 of 1

slim ferry
#

from what ive seen of it it doesnt

zealous glen
#

I mean I was just invoking them as the foremost specialist on seals

slim ferry
#

i mean idk why this requires a seal specialist

zealous glen
#

I'm just curious

wispy falcon
#

How do I make my soundtrack only play in the main menu?

grim remnant
#

also, sorry but i'm. still not entirely sure how to specify said original function. in my defense i haven't touched modding in actual months but like. What do. i assume i have to add something to the local line?

function Card:set_seal()
    if not context.playing_card_added then
        SMODS.calculate_context({setting_seal = true })
    end
end```
#

as this just gives that "expecting a ( near :" error on the function line

robust marsh
#

is it possible to make a consumable not destroy itself when you press use?

zealous glen
#

then you overwrite the original function but call the reference inside

robust marsh
robust marsh
zealous glen
#

SMODS.Consumable.keep_on_use

grim remnant
slim ferry
#

copy the function

zealous glen
wispy falcon
slim ferry
robust marsh
robust marsh
grim remnant
#

oh, that's an... alarming? bug? it somehow crashed something in the basegame, like it's getting tripped up by the arguments within. i've tried having local set to Card:set_seal(_seal, silent, immediate), Card:set_seal() and even just Card:set_seal, and it errors like this. the first two do this exact error, the latter gives a simple "expected arguments" error

function Card:set_seal()
    if not context.playing_card_added then --actually tell the game setting_seal exists
        SMODS.calculate_context({setting_seal = true })
    end
    set_seal_ref(self)
end```
slim ferry
#

its just set_seal_ref = Card:set_seal

#

also you still need to keep any arguments the original Card:set_seal had

grim remnant
#

i mean, i try that, but it crashes for wanting arguments

slim ferry
#

yes because the hook doesnt have any arguments

#

and set_seal_ref is called without any arguments too (besides the self)

frosty rampart
#

the line function Card:set_seal() needs to be function Card:set_seal(_seal, silent, immediate) and then you need to call set_seal_ref(self, _seal, silent, immediate) at the end

chrome token
#

question-- is there any way to check if an ante has been beat besides checking if the boss blind's been beat?

red flower
zealous glen
slim ferry
#

uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

#

idk its whichever one vscode wont scream at you for

zealous glen
#

IIRC Card.set_seal is the method set_seal of the Card class

#

Card:set_seal is syntactic sugar either for defining a class method that uses self as the first argument, or for calling that method automatically passing self

grim remnant
#

game freaks out at both : and . but for different reasons? periods crash for this reason on trying to load the title screen, presumably since the title screen card... has a seal, thanks to talisman

function Card.set_seal(_seal, silent, immediate)
    if not context.playing_card_added then --actually tell the game setting_seal exists
        SMODS.calculate_context({setting_seal = true })
    end
    set_seal_ref(self, _seal, silent, immediate)
end```
slim ferry
#

it should be function Card:set_seal(...)

gilded goblet
#

i remember having a rlly hard time trying to understand classes

#

l o l

#

classes and objecs

zealous glen
#

I've mainly used OOB languages so Idk any FOP or whatever else exists

knotty orchid
#

Is there a way to enable a certain spectral card to spawn in shop?

slim ferry
#

in_pool

knotty orchid
#

so if in_pool's true it can also spawn in shop?

slim ferry
#

if in_pool is true it can spawn, if in_pool is false it cant spawn

red flower
#

no

#

spectrals cant spawn by default

slim ferry
#

oh true

#

i forgot about that

tough bloom
#

im trying to make the +5 message blue but its not:

if #context.full_hand == 4 then
card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_gain
returns[#returns + 1] = {
message = "+"..number_format(card.ability.extra.chip_gain),
color = G.C.BLUE, -- Make sure this is G.C.BLUE
chip = card.ability.extra.chip_gain,
card = card,
}
end

zealous glen
#

There is a new function to help manipulate pools

#

maybe that could help

knotty orchid
#

Which one?

red flower
#

it doesnt help with this

knotty orchid
#

🫡

zealous glen
red flower
#

SMODS.add_to_pool but it doesnt let you manipulate which pools spawn

zealous glen
#

SMODS.add_to_pool

knotty orchid
#

so that wouldn't really work

red flower
#

also it is kinda broken because im bad at coding

zealous glen
red flower
#

no, the shop is not a pool in the code

slim ferry
red flower
#

it has a roll for which pool spawns depending on that pool's rate

knotty orchid
#

I know ghost deck uses spectral_rate

red flower
#

yes

knotty orchid
#

but I want just a one card

#

not all of them

red flower
#

yeah

#

you would probably need to make something like an objecttype with your card and patch it into create_card_for_shop

grim remnant
#

okay, that much works, i just need to figure out editions, which i imagine would be similar, just with terms swapped out... and also, for some reason, if you use Cryptid on a playing card, it activates this six times. even with the attempts to be like "doesn't count if a card was added"

        if context.setting_ability or context.setting_seal and not context.playing_card_added and not context.remove_playing_cards and not context.blueprint then
            card.ability.extra.Emult = card.ability.extra.Emult + card.ability.extra.scaler
            return { message = "+^" .. tostring(card.ability.extra.scaler) .. " Mult" }
        end```
zealous glen
#

Quantum Enhancements make multiple set_ability calls

#

I wonder if another effect would also make extra calls

grim remnant
#

i feel like the fix would be to just like. maybe check "if not because of a card's creation" before even checking for setting_ability

tough bloom
slim ferry
#

why are you making a table for your returns

#

jjust return in each context individually

red flower
tough bloom
red flower
#

it also doesnt run in the shop? weird

#

oh this context just doesnt properly work with my mod, great

grim remnant
#

okay. weird. i tried adding the edition check, and now creating new cards via cryptid activates it ten times.

red flower
#

cryptid might be creating the card and then enhancing it

#

i think SMODS.add_card does that

#

but it's hard to catch that

grim remnant
#

this is with cryptid disabled, though, which is what's confusing me? :o

#

it's also a bit confused by death, activiating thrice (should probably only activate once)

#

i'm gonna go take a break rq bc i'm just generally feeling weird atm but i have. no idea why it's trying to proc for card creations even after telling it not to. like. am i just doing it wrong by using and not context.playing_card_added?

red flower
#

yes, i said before that doesnt do anything

grim remnant
#

ah. that'd do it. uh. what should i be using then? :o

red flower
#

dunno

daring fern
#

It has quantum everything.

slim ferry
#

oh yeah it has quantum cards

#

every fucking consumable 🔥

tough bloom
#

does anyone know how to make a joker show its stored values in its text box? i have the text showing up from the localisation file but its not showing the stored values. do i use the #1# and #2# method?

red flower
tough bloom
#

yeah i do

#

loc_vars = function(self, info_queue, center)
local chips = center and center.ability and center.ability.extra and center.ability.extra.chips or self.config.extra.chips
local mult = center and center.ability and center.ability.extra and center.ability.extra.mult or self.config.extra.mult
return {
vars = {
number_format(chips),
number_format(mult),
}
}
end,

#

i just got it to work the #1# method did it

lapis matrix
#

dont forget to set up loc_vars then spend 10 mins wondering why its not tracking the value ive made that mistake more times than ill admit

#

how should i detect what location in the joker hand a joker is? fairly new to modding balatro and still getting used to lua and smod shenanigans

next timber
#

What variable in shaders tells how the joker is tilted? im looking at the polychrome shader and i see the variables at the bottom like mouse_screen_pos and such, but they dont seem to be actually used anywhere

thick drift
#

TFW you have to rework a joker and find this in your comments: -- not sure if this is needed since I am using main_eval, but this is finally working and I refuse to debug working code

versed swan
#

is there a way to make seals not appear in the pool?

thick drift
#

like in the booster packs/magic trick?

daring fern
versed swan
#

oh wait sorry, i need to be more specific

#

is there a way to make certain seals not appear in the pool

daring fern
versed swan
#

Seals have that method?

daring fern
versed swan
#

and it's not documented..........

grim remnant
versed swan
#

alright thank you

umbral zodiac
#

is there a way to align sized text to the bottom instead of the top

hardy viper
#

NO!!!!!!!!!!!!!!!!!!!!!!!!!

umbral zodiac
slim ferry
#

so you could check if context.old_card exists

grim remnant
# daring fern What is the goal?

if context.setting_ability or context.setting_seal or context.setting_edition and not context.playing_card_added and not context.remove_playing_cards and not context.blueprint then
basically:

  • trying to check if the enhancement changes
  • if the seal changes (a custom context)
  • if the edition changes (a custom context)
  • but NOT if a playing card is added (Current problem child)
  • and NOT if a playing card is deleted (this might not actually need to be here but i'm crossing that bridge when i get to it)
  • and NOT if blueprint is calling this (this is determining a scaling ability)
#

if context.setting_ability is on card creation, i do wonder if the play would be to like. hook into whatever handles enhancements changing.

thick drift
#

I would wrap those or statements with brackets just to make sure the code is checking your and statements

daring fern
chrome widget
#

It applies some transformations based on the mouse position if the card is currently being hovered, as well as offsets shaders relative to the center of the screen so that cards and their shadows show depth

daring fern
grim remnant
#

nope, still activates a bunch when cryptid is used. (though, it's down from 10 to 8...?)

chrome widget
#

The actual specific resulting tilt value is, unfortunately, not intuitive. The vec4 matrix returned from the position function has an x and y coordinate and then two values after, with the fourth one being something along the lines of "percentage transformation from local space to world space?" I think? Matrix math is weird

daring fern
chrome widget
#

And so Balatro's shaders use the fourth one to do...... something. I wish I had a better explanation but it's not easily explainable even after trying to research it for my own shader work

grim remnant
next timber
#

so how does foil for example use it to change which rings are brighter? im still a little confused on how im meant to actually use it

daring fern
# grim remnant uhhh. how
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = '''local new_card = new_card or Card(other.T.x, other.T.y, G.CARD_W*(card_scale or 1), G.CARD_H*(card_scale or 1), G.P_CARDS.empty, G.P_CENTERS.c_base, {playing_card = playing_card, bypass_back = G.GAME.selected_back.pos})'''
position = "after"
payload = 'new_card.modprefix_from_copy = true'
match_indent = true

[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = '''
if other.params then
    new_card.params = other.params
    new_card.params.playing_card = playing_card
end
new_card.debuff = other.debuff
new_card.pinned = other.pinned
'''
position = "after"
payload = 'new_card.modprefix_from_copy = nil'
match_indent = true
grim remnant
frosty rampart
#

it's a lovely patch

daring fern
grim remnant
#

the lovely.toml file goes in the root folder of the mod, right?

red flower
chrome widget
#

Admittedly, the best I can recommend for shader work is Stealing From People Who Know What They're Doing and then trial and erroring your way into porting it to love 2D. I've stolen a lot from GodotShaders and older GLSL shader examples I've found online

next timber
#

yknow what. i think i might just. not do this shine shader after all. the card being big is enough for me

chrome widget
#

If you want you could steal an existing shader, if that would be good enough?

zealous glen
#

I think the Foil shader has two layers, maybe

chrome widget
#

The Voucher and Negative Shine shaders both do something like that

zealous glen
#

I think I remember one of the vanilla shaders had two layers

#

-# hi win'ter

chrome widget
#

Negative has two layers ("negative" and "negative shine")

next timber
#

the shader i wanted was just like, a strip of shine that moves depending on how the card is tilted, i feel like the voucher shader might be too excessive

zealous glen
chrome widget
#

However foil is the only vanilla card shader that specifically draws a transparent texture rather than redrawing fully opaque pixels mixed from the base texture

chrome widget
next timber
#

btw. really annoys me that the rest of the shaders don't use transparency. i have a card texture that kinda requires a shader to look as intended but having any edition breaks it

zealous glen
chrome widget
#

Oh yeah there's the example shaders too as options

zealous glen
chrome widget
next timber
# zealous glen What do you mean exactly

i have a deltarune prophecy joker that uses a shader to achieve the animated effect, but applying any edition other than foil applies a new opaque shader that pulls from the original sprite instead of the shadered one

zealous glen
next timber
next timber
zealous glen
chrome widget
#

Logically you could modify the shader effect to draw overtop the edition shader and simply cover the specific sections you want, while the rest of the black part of the card maintains the edition?

zealous glen
#

One solution is to split the Joker into layers

#

have the one with the custom shader in a layer without the Edition layer

#

and possibly manually apply the Edition shader if you want

zealous glen
grim remnant
chrome widget
#

Oh yeah I'll probably steal from the example shaders and just fudge some math for the edition I need to add

grim remnant
#

is it not meant to be literally just, lovely.toml in the base of the folder

chrome widget
#

Hamon Edition......

chrome widget
daring fern
grim remnant
#

...adding the patch didn't change much, using cryptid still pings the effect 8 times

crystal perch
#

how do i get a card's suit

#

not checking if it is a suit, just getting it

faint yacht
#

.base.suit

grim remnant
#

if ((context.setting_ability and context.old) or context.setting_seal or context.setting_edition) and not context.blueprint then
like... what am i missing here, if patching copy_card isn't it?

chrome widget
#

More card art

slim ferry
#

what if splash though

#

then what does it do

crystal perch
#

👅

#

splash value

chrome widget
#

Actually I'm not sure what I have it set up to do now

#

It would give mult for every scoring card according to my code

crystal perch
#

🙏

chrome widget
#

And I prefer that for the synergy so I should probably make that more obvious and modify the description slightly

#

Since you can argue splashed cards are each "high cards" since the game acts like they all are, but it's still a little ehhhhhh wording wise

#

"When you play a High Card, each scoring card gives Mult equal to its Rank"

#

It's just strange wording itself because it implies that there is more than one scoring card in a High Card by default

crystal perch
#

well you could argue that the splash high card just has five "high cards"

chrome widget
#

I mean yeah that's technically true, I'm just wondering if that's intuitive or not

crystal perch
#

🤷‍♀️

#

both are equally unintuitive

slim ferry
#

just rephrase it to "If played hand is a high card, each card gives mult equal to their rank"

#

or smth like that

crystal perch
#

*each scored

slim ferry
#

oh eah

chrome widget
#

No yeah it's the "each" part that gives me pause because high cards typically have only one scoring card. "Each card" is grammatically singular, it can refer to only a single valid card, but smth about it bugs me

#

My eternal struggle as a writer. "this is correct but it bugs me"

grim remnant
daring fern
grim remnant
#

it... now crashes if i use cryptid to duplicate cards. line 213 is
if ((context.setting_ability and context.old) or context.setting_seal or context.setting_edition) and not context.other_card.stla_from_copy and not context.blueprint then

faint yacht
#

Check for context.other_card existing.

grim remnant
#

i have no idea how to do that alongside the and not context.other_card.stla_from_copy check, admittedly. still errors out with roughly the same error. ^^;
if ((context.setting_ability and context.old) or context.setting_seal or context.setting_edition) and not (context.other_card.stla_from_copy and context.other_card) and not context.blueprint then

hoary spindle
#

Question from a non-coder: does anyone know how to fix the fact that mika's mod collection consistently gives +20 mult for lucky cards (even if they dont trigger), or even if you can just point me to where i should be looking in the .lua file

cursive gazelle
#

Mika’s mod ?

hoary spindle
#

Yup

cursive gazelle
#

Never heard of it

#

You should be asking mika

#

Fun fact i never heard of someone named mika in dev chat

hoary spindle
#

Mika is long gone, hence why I'm trying to manually edit the lua file locally

cursive gazelle
#

I see

#

When does this happen?

hoary spindle
#

Every time a lucky card is played

cursive gazelle
#

With certain joker or always ?

#

It might be something to do with taking ownership or lovely patches

hoary spindle
#

Its as though it's programmed to always give +20 mult (the probability check seems to be intact as jokers that rely on lucky card triggers still work as they ought to)

#

The lucky card still has a 1 in 5 chance to trigger jokers, but always gives +20 mult separately from that

daring fern
#

You need to add the card as an input to the other contexts.

hoary spindle
#

Is there a way I can ctrl-F the lua file (i can understand most of the coding logic - it seems like a relatively simple coding language, but I don't actually know how to code in lua or know what i should be looking for) to get close to what im trying to find?

cursive gazelle
#

Lua is pretty simple

#

That should give you and idea on how everything works

#

Also please read the wiki

#

N also made a repo containing a wiki basically recreating the whole vanilla objects and has a wiki explaining everything

hoary spindle
#

Okay, ty - I guess this is my sign to get back into coding

vernal path
#

lua is very simple, except for the fact that its pretty different to other languages, even other interpretive languages.

grim remnant
#

it also, for some reason, now procs twice if a seal is added.

grim remnant
#

is... that not what that block of code does?? :o

        --check if a playing card changed somewhere
        if ((context.setting_ability and context.old and not context.other_card.stla_from_copy) or context.setting_seal or context.setting_edition) and not context.blueprint then
            card.ability.extra.Emult = card.ability.extra.Emult + card.ability.extra.scaler
            return { message = "+^" .. tostring(card.ability.extra.scaler) .. " Mult" }
        end```
daring fern
grim remnant
#

...how, and where, exactly? for reference, this is the full block of code for the joker

high verge
#

How do I add color in the middle of text on a ui element? I'm trying to make the name Cynder purple colored but this doesn't even make it the attention color.

daring fern
grim remnant
#

...there is no SMODS.calculate_context, unless you mean putting it under calculate = function(self, card, context), but like... it already is?

grim remnant
#

oh, in the modded contexts

#

...dang it, what now. i assume i set up the "check to make sure this isn't from a copied card" wrong, as this once again crashes the title screen since the logo has a seal with talisman on

function Card:set_seal(_seal, silent, immediate)
    if (context.setting_ability and context.old and not context.other_card.stla_from_copy) then
        SMODS.calculate_context({setting_seal = true })
    end
    set_seal_ref(self, _seal, silent, immediate)
end```
daring fern
#
local oldsetseal = Card.set_seal
function Card:set_seal(_seal, silent, immediate)
    SMODS.calculate_context({setting_seal = true, other_card = self})
    return oldsetseal(self, _seal, silent, immediate)
end
timid zinc
#

Is there a context for after a card is scored but for individual cards?

grim remnant
#

okay, seals no longer proc twice, but cryptid still procs the joker 8 times

daring fern
grim remnant
winter flower
#

tried making a challenge and this was the crash message, what went wrong?

grim remnant
daring fern
pastel kernel
#

what's the code for destroying a scored/played queen card?

#

i have a joker named igor which destroys played queens

daring fern
grim remnant
pastel kernel
# daring fern ```lua if context.destroy_card and context.destroy_card:get_id() == 12 and conte...

i believe you can guess what i'm trying to do with this.

    calculate = function(self, card, context)
        if context.destroy_card and context.destroy_card:get_id() == 12 and context.cardarea == G.play then
                card.ability.extra.EEMTOTAL = (card.ability.extra.EEMTOTAL) + card.ability.extra.EEM
                return {remove = true}
        end
        if context.cardarea == G.jokers and context.joker_main  then
                return {
                    ee_mult = card.ability.extra.EEMTOTAL
                }
    end
end
daring fern
grim remnant
# daring fern What does the lovely patch look like?
version = "1.0.0"
dump_lua = true
priority = 1

[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = '''local new_card = new_card or Card(other.T.x, other.T.y, G.CARD_W*(card_scale or 1), G.CARD_H*(card_scale or 1), G.P_CARDS.empty, G.P_CENTERS.c_base, {playing_card = playing_card, bypass_back = G.GAME.selected_back.pos})'''
position = "after"
payload = 'new_card.modprefix_from_copy = true'
match_indent = true

[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = '''
if other.params then
    new_card.params = other.params
    new_card.params.playing_card = playing_card
end
new_card.debuff = other.debuff
new_card.pinned = other.pinned
'''
position = "after"
payload = 'new_card.modprefix_from_copy = nil'
match_indent = true```
daring fern
grim remnant
#

okay, it's at least not excessively proccing when it shouldn't, but it still procs once for every card duped, and also one for every joker obtained... or seen in a shop

daring fern
grim remnant
#

this at least fixed the behavior of duplicating cards activating entirely, but seeing jokers in the shop, as well as some methods of creating jokers (like judgement) still proc it somehow

livid nimbus
#

The partner is free and not in any cardarea.

grim remnant
grim remnant
#

would kinda need to see the code responsible for the challenge, as it's erroring out in the middle of card.lua, a file in the basegame

winter flower
#

thanks clyde for saying cam doesn't exist

#

DUDE

#

@grim remnant ^

compact valve
daring fern
shut monolith
#

I'm trying to make a deck that gives extra money for discards, but I cannot for the life of me figure out what I need to put as my vars

winter flower
shut monolith
#

THANK YOU!!!

lapis matrix
#

hey is anyone down to help me figure out the logic behind a rather unique joker im making for my gfs birthday? im very inexperienced with programming and struggling lol

rocky plaza
lapis matrix
# rocky plaza what do you want to make? like what effect

so, shes a speedrunner, so the idea is the joker starts with a certain set amount of xmult gain, but the longer you take to pick your hand/discard, it goes down fast, plateaus a bit, then when it crosses over into the negative(losing xmult) it begins to speed up again, think the shape of a parabola.

discarding/playing a hand would take the amount of xmult gained/lost and be added onto it, then being applied to the scoring hand/starting again if discarded hand, idea is high risk high reward wherein taking too long can lose all the built xmult on the joker

#

i think i explained that correctly, just got off of work so im still getting my brain on straight lol

#

not even sure if this is feasible which is why im asking around

rocky plaza
#

i think im reading that right

#

timer based mechanics are def possible

rocky plaza
#

and when you play a hand it'lll add the final value to its new initial value

#

correct?

lapis matrix
#

yep, and then rinse repeat so you can scale it by playing fast and against the timer

#

basically the shape of a parabola, starts with giving a certain x amount, but no limit on the negative side, so if you take waaay long you can lose all your built xmult, obviously the values themselves will take tweaking to balance but i think its a more unique joker concept and fits her perfectly

rocky plaza
#

i dont think i can explain delta time here in a reasonable time frame so imma have to work some magic here then

#

cuz events probably cant handle what you want

lapis matrix
#

if you're willing to assist me with this im definitely willing to vc and learn a thing or two while doing so, also doesn't have to be today or anything, right now im just getting an idea of if this is even feasible to implement

rocky plaza
#

if the decrease is parabolic then the math shouldnt be too funky

lapis matrix
#

yeah a parabolic shape should work perfectly and be tweakable enough to balance well

#

but in reality its whatever would work best, that's just what came to mind

rocky plaza
compact valve
#

how would you use this joker

rocky plaza
lapis matrix
#

np!

grim remnant
#

still trying to figure out how to exclude jokers from this, since for whatever reason, created jokers (from judgement/soul) and. Seeing jokers in the shop. procs this for some reason?

            card.ability.extra.Emult = card.ability.extra.Emult + card.ability.extra.scaler
            return { message = "+^" .. tostring(card.ability.extra.scaler) .. " Mult" }
        end```
daring fern
grim remnant
#

...extremely dumb question, how would i go about that?

#
function Card:set_seal(_seal, silent, immediate)
    SMODS.calculate_context({setting_seal = true, other_card = self})
    return set_seal_ref(self, _seal, silent, immediate)
end```
like, i assume the idea is to give the calculate_context line an (in shitty pseudocode) `if playing_card(_seal) == true then`, but like. How though
faint yacht
#

context.other_card.seal and/or context.other_card.ability.seal

oblique lotus
#

Is there a way to change the rarity of a Joker using a hook or patch?

grim remnant
#

didn't like that

function Card:set_seal(_seal, silent, immediate)
    if context.other_card.seal == true then
        SMODS.calculate_context({setting_seal = true, other_card = self})
    end
    return set_seal_ref(self, _seal, silent, immediate)
end```
compact valve
#

I had a concept in mind but no idea where to start making the effects

grim remnant
# grim remnant didn't like that ```local set_seal_ref = Card.set_seal function Card:set_seal(_s...

i figured out a hacky solution, tho it probably breaks cryptid a bit seeing as jokers can be sealed in that mod. ah well. in the context it's appearing in it's meant to be playing card-exclusive anyway

function Card:set_seal(_seal, silent, immediate)
    if self.ability.set ~= "Joker" then --this is such a hacky solution and probably breaks cryptid a tiny bit since you can actually seal jokers in that mod. too bad!
        SMODS.calculate_context({setting_seal = true, other_card = self})
    end
    return set_seal_ref(self, _seal, silent, immediate)
end```
tough bloom
#

is Xchips a base game thing or a cryptid thing?

grim remnant
faint yacht
tough bloom
#

does the github guide show how to use it or is it stright forward like xmult

faint yacht
#

Yes.

tough bloom
#

ty ty

grim remnant
#

also, question. i'm trying to make a consumable that, when used, just spawns. Any random consumable, of any kind. i already have most of the stuff for it as i've made similar cards before, but nothing that just takes. The Entire Breadth Of Consumable Types. what can i do for that?

        G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
        G.E_MANAGER:add_event(Event({
            trigger = "after",
            delay = 0.4,
            func = function()
                play_sound("timpani")
                SMODS.add_card{
                    set = "Tarot" --need to replace this
                }
                -- card:juice_up(0.3, 0.5)
                G.GAME.consumeable_buffer = 0
                return true
            end,
        }))
        delay(0.6)
    end,```
oblique lotus
#

(card and other card are dependent on the enviorment)

compact valve
#

thanks

daring fern
compact valve
#

but would it even be possible to check if a joker would trigger when it's debuffed?

daring fern
#

Also it still might trigger.

compact valve
#

I can barely scrape together joker effects from vanilla code atp I'd just pay money for someone to make it

grim remnant
#

any pointers for how to just grab any consumable category for SMODS.add_card? since uh. set = "Tarot, Planet, Spectral" did not work, and also this would skip any categories added by other mods

grim remnant
#

well that didn't work

timid zinc
#

I'm trying to make a joker that has a chance to apply an edition when a card is scored, but the only problem is that if i set it as a event manager event, it wont score the edition on retriggers, but if i don't to make it count the edition on retriggers, it will do it before the card is scored which visually doesn't make sense

final jewel
#

I dont understand why the apply alway goes on the else statement when the condition should be true and it just doesnt work the condition is false

grim remnant
# grim remnant well that didn't work

literally nothing is different between this and another consumable we have to summon from a category of consumables, EXCEPT the category being Consumables. what is happening???

        G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
        G.E_MANAGER:add_event(Event({ --make a spectral card!
            trigger = "after",
            delay = 0.4,
            func = function()
                play_sound("timpani")
                SMODS.add_card{
                    set = "Consumeables"
                }
                -- card:juice_up(0.3, 0.5)
                G.GAME.consumeable_buffer = 0
                return true
            end,
        }))
        delay(0.6)
    end,```
daring fern
timid zinc
# timid zinc I'm trying to make a joker that has a chance to apply an edition when a card is ...
    local current_card = context.other_card
    if context.other_card:get_edition() == nil and not current_card.bonus_joker_mark and SMODS.pseudorandom_probability(card, 'bonus_joker', 1, card.ability.extra.odds, 'bonus_joker') then
        local edition = poll_edition('bonus_joker', nil, true, true, { 'e_holo', 'e_foil' })
        current_card.bonus_joker_mark = true
        local target_card = current_card
        local chosen_edition = edition

        G.E_MANAGER:add_event(Event {
            trigger = 'after',
            delay = 0,
            func = function()
                target_card:set_edition(edition, true)
                card:juice_up(0.3, 0.5)
                target_card.bonus_joker_mark = nil
                return true
            end
        })
    end
end```
#

This is my current code for it.

#

I forgot to use current_edition

daring fern
timid zinc
#

And this wouldnt make it visually happen immediately as the hand is played?

olive hamlet
#

Hey everyone, i was just wondering, is there any way to change what the base/vanilla jokers do?

olive hamlet
high verge
#

Can someone tell me what is the atlas key for replacining the balatro logo.png?

high verge
#

Thanks I was trying logo xD

#

Do you know where the alt version is supposed to appear?

daring fern
lapis matrix
#

i hate gemstones and similar reflective things 😭

high verge
#

Oh, a surprising amount of unused content in these files.

lapis matrix
#

slowly improving my sprite art though

high verge
lapis matrix
#

its 1 of the 4, they synergize with the basic suit jokers to make them somewhat more useful

#

making them all lil gemstones :D

light canyon
#

do i need to install lua in visual studio?

daring fern
lapis matrix
#

literally one of the first recommended vsc extensions though

high verge
#

Me in the background using notepad++

high verge
#

Is it possible to choose what card is showing on the title screen?

light canyon
#

I wrote the code for the joker and nothing happened

high verge
#

Ah lovely, what would the code like that look like?

daring fern
high verge
daring fern
umbral zodiac
#

probably would be easier to hook Game:main_menu to do that rather than patching it

high verge
#

Mhm

#

I replaced the tarot with character cards so I wanted to put Blitzo's card on there.

daring fern
# high verge Mhm
[[patches]]
[patches.pattern]
target = "card_character.lua"
pattern = 'self.children.card.states.visible = false'
position = "before"
payload = "self.children.card:set_ability('c_modprefix_key')"
match_indent = true
high verge
#

Thank you very much I'll give that a try~

#

Oh hm, I'm getting an unexpected symbol error on the first line

daring fern
high verge
#

It's in the main lua.

daring fern
high verge
#

Oh that's a different thing.

#

Sorry I don't do much coding.

#

Hmm, I made a file called mainmenu.lovely and put it in there but it's not doing anything.

umbral zodiac
#

lovely files are .toml

high verge
#

Ah

umbral zodiac
#

also i think itll still work but its usually best practice to put them in their own 'lovely' folder

high verge
#

I'll do that

#

Still no change.

#

I'm guessing I need to add something into the main lua to actually call the toml file?

umbral zodiac
#

you shouldn't have to

high verge
umbral zodiac
#

i think the patch file needs a header too

#

something like this

high verge
#

Third or so tries the time or something like that xD

umbral zodiac
#

yeah pretty much

high verge
#

Nope

umbral zodiac
#

😭

#

i don't do patches enough to know what the issue is unfortunately

high verge
#

Hm I tried to do the card one as well but no dice

high verge
daring fern
high verge
#

The game is loading but the card on the menu is the same as standard.

#
version = "1.0.0"
dump_lua = true
priority = 0

[[patches]]
[patches.pattern]
target = "card_character.lua"
pattern = 'self.children.card.states.visible = false'
position = "before"
payload = "self.children.card:set_ability('c_hbp_chariot')"
match_indent = true```
#

I have this in a mainmenu.toml

daring fern
# high verge

Why is the lovely folder 3 folders away from the Mods folder?

high verge
#

I organize my mods into sub folders

#

But the lovely folder is within the mod's folder

daring fern
high verge
#

?

#

I haven't had issues before.

#

I'll try bumping it up.

#

No change.

gilded blaze
#

what are you trying to do

high verge
#

Oh I'm trying to replace the card showing on the main menu with a tarot card.

lapis matrix
#

jonklers :D

#

(placeholder art for the first 4 for suit themed jokers bc i cba to do that many sprites today)

foggy ginkgo
#

<@&1133519078540185692>

mystic river
high verge
#

I have no idea where that is I assume it's a part of the main game?

daring fern
mystic river
#

okay, so that's not the problem then

high verge
#
version = "1.0.0"
dump_lua = true
priority = 0

[[patches]]
[patches.pattern]
target = "card_character.lua"
pattern = 'self.children.card.states.visible = false'
position = "before"
payload = "SMODS.change_base(self.children.card, 'hearts', 'a')"
match_indent = true```
#

Am I missing something from the toml? This is trying it with the regular cards.

mystic river
#

look in your Mods/lovely/dump/card_character.lua and see if the patch is actually being applied or not

high verge
#

Will do

high verge
#

Changing that and doing again

#

I'm not seeing it in the card_character.lua

#

So the patch isn't being read

daring fern
high verge
#

Yes

#

Does the toml need to be named something specific?

daring fern
high verge
#

It is so that's not it.

#

I tried to change the value to true with my patch but no change.

#

Is there maybe a setting somewhere that needs to be enabled to use patches?

viral ember
#

So I have this chain of return messages but Is it possible to have a function happen after it's done?

high verge
#

The wi in will is capitalized in the last message.

#

I don't know what this mod is but it sounds interesting from this xD

viral ember
#

the entire will is capped

high verge
#

Oh wait all of the word

#

Yeah

viral ember
#

yeah lol

high verge
#

Nevermind

viral ember
#

Subversion of expectation as they say

high verge
#

Time for a deep and engaging narrative

viral ember
#

However funny that would be I think this should just be a 1 off lmao

daring fern
#

Also put what's in the function in an event.

viral ember
#

how do I do that again?

#

(It's been a hot minute since I did this lol)

high verge
#
    love.system.openURL("https://github.com/VRArt1/Helluva-Boss-Balatro")
end```
#

Not sure if it'd be helpful but here's a function I have for a button.

viral ember
#

WAIT YOU CAN OPEN LINKS

#

oh my god

#

I'm having so many ideas

high verge
#

I mean this is for a ui button but yeah

#

xDD

#

I'm hoping these are replaceable by malverk as well

#

Would be good for consistency

#

Or if not the atlas feature

#

Yeah not listed on malverk so I'll try atlas

#

Althought c_base isn't listed either so hmm

daring fern
viral ember
#

alr thanks!

daring fern
viral ember
#

oh lol

#

thx

foggy ginkgo
#

Keep forgetting return can have functions

#

I'm so dumb

viral ember
#

I fr just started making marble joker

#

I hate my life

high verge
viral ember
#

screw it, vineboom

high verge
#

What would the atlas for this be? I have the following but it's not changing it.SMODS.Atlas{ key = 'ui_assets', px = 72, py = 36, path = "ui_assets.png", prefix_config = {key = false}, }

#

Or maybe there's an atlas list somewhere...?

daring fern
high verge
#

Need to update my size but it did something so it's working xD

#

Thank you very much

viral ember
foggy ginkgo
#

Humanity greatest fear

viral ember
languid canopy
#

hello, this is a cry for help, this keeps happening, i did nothing but update my lovely injector and smods can you guys pls help ? (ping me)

high verge
robust marsh
#
 set_ability = function(self, card, initial, delay_sprites) 
        card:set_eternal(true) 
    end,

I'm trying to make my consumable eternal at all times but it becomes eternal only when pressed (not used). How exactly can I make this work?

lapis matrix
#

how would i detect if a joker is in the rightmost joker slot vs. any other for two separate effects depending on the location?

slim ferry
#

the rightmost joker is G.jokers.cards[#G.jokers.cards]

lapis matrix
#

thanks!

lapis matrix
slim ferry
#

# gets the length of a table

#

oh

lapis matrix
#

LOL

#

gotcha

#

so its basically just saying, joker position at length of table(furthest slot)

#

apologies for very basic questions, just picking up all the knowledge i can on my way lol

slim ferry
#

yeah it is

lapis matrix
#

sick!

#

also

#

is there anywhere i can find all colors availabe for the text using {X:x,C:x}

#

since id presume i cant just throw in hex

#

havent tried tbf

slim ferry
lapis matrix
#

tyyy, shouldve checked documentation, but presumed this wouldve been written off as common knowledge so i didnt think so lol

pastel kernel
#

I wanna make a custom poker hand called 3 Musketeers (3 Steel Aces) but how do I do that

slim ferry
#

you can also make new colours for text styling if you cant find something you need

lapis matrix
#

yeah i see that

#

sicko

#

ill probably do that when i flesh out this mod more

lapis matrix
#

iirc there was something in them that explain custom hands

robust marsh
#

I want to make my consumable jiggle(juice up) similarly to the Loyalty Card or Trading Card as long as a certain condition is met. I tried using juice_card_until but i'm kinda just clueless.. Can someone help me out?

slim ferry
lapis matrix
#

why are you low quality beetle LOL

#

sorry off topic

#

just noticed that

slim ferry
#

fubny

#

i made it like a while ago

slim ferry
#

ive been forgetting text motion modifiers

lapis matrix
#

wait

#

text motion modifiers??

#

:o

slim ferry
#

E:1 for wavy text (like "Legendary" on the soul), E:2 for text that does little hops ig kinda (card names have this by default, and used for "self destructs")

#

oh E:1 is also used on the "you win" text at the end of a run

lapis matrix
#

hey eris, another question, so if the joker is on the rightmost slot i want it to return the xmult to be used(obviously), but then i want to half it from what the current xmult was after its used, how would i order that to occur after returning the xmult? (sorry for obvious questions im learning 😭)

#

would i just add a , after the return then do the division there

red cradle
#

why "ERROR"?

slim ferry
#

missing badge

red cradle
#

what i need to do?

slim ferry
lapis matrix
#

yeah thought as much

#

gotcha

slim ferry
#

also since the new smods version theres now an SMODS.scale_card function. its optional but allows cards to be affected and detected by calc_scaling (scaling manipulation)

lapis matrix
#

would this actually update the visual of the xmult on the card as well?

slim ferry
#

if you have card.ability.extra.xmult in your loc_vars then yes

lapis matrix
#

(i have loc vars set up and all of that already, just clarifying since im likely asking stupid questions)

#

alright

#

sick

slim ferry
lapis matrix
#

time to see if this explodes or not

#

if this works first prototype

#

ill be very happy

#

Oh boy what did I break

lapis matrix
slim ferry
#

i have no fucking clue lmao

#

did the xmult apply though

lapis matrix
#

dunno, that started immediately and softlocked the game

#

LOL

#

after giving myself the joker

frosty dock
#

you have something firing in context.repetition

#

but without returning anything meaningful that would cause something to repeat

lapis matrix
#

which is worrisome

frosty dock
#

that means your context checks are probably bad

#

something is firing in context.repetition when it shouldn't

#

it's also probably too harsh of smods to spam you like this I guess

lapis matrix
#

here's the noobie code, what did i fuck up

slim ferry
#

the upgrade is outside of a context

lapis matrix
#

ah

frosty dock
#

if context.joker_main then
...
else
...
end

#

what did you expect

lapis matrix
#

oh wait

#

i see what i did

frosty dock
#

that fires in every context other than joker_main

slim ferry
#

also btw the upgrade message is k_upgrade_ex (with underscores)

lapis matrix
#

yeah i shouldnt be working on this while sleep deprived

#

p sure i fixed it

#

god that was such a blaring mistake

#

haha

#

works

#

fantastic, thanks for the help eris lol

slim ferry
#

hell yeah!

red cradle
slim ferry
#

you replied to yourself vro

lapis matrix
#

🔥

zealous glen
#

Answering your own questions is still useful

red cradle
#

what i mean

slim ferry
#

do you have your seal label in misc.labels

robust marsh
lapis matrix
# slim ferry hell yeah!

in context of game design and gameplay though, does this seem too niche for use in regular runs? or is it a neat joker idea as just an average run of the mill xmult gain

slim ferry
#

i feels very wordy

red cradle
slim ferry
#

in your localization file

lapis matrix
slim ferry
red cradle
#

file

slim ferry
#

then in misc > labels you should have the label for your seal under <key in lowercase>_seal

chrome widget
#

Morning modders

slim ferry
#

misc

lapis matrix
slim ferry
#

that seems fine yeah

lapis matrix
#

:D

#

idk why i didnt start making mods sooner

#

this is quite enjoyable

#

(programming is intimidating but cs50x is getting me out of my shell lol)

lapis matrix
slim ferry
#

i am

lapis matrix
#

so

#

mind if i dm you because i want to keep my beginner spam out of this channel?

slim ferry
#

sure

#

go ahead

#

i dont mind

gilded blaze
#

feels right

lapis matrix
#

shh its such a unique idea its never been done before you have no proof

hidden notch
#

I'm looking for something exactly this.....
-# But I think I'll go with Writing it at the Bottom of the Description for now x'3

chrome widget
#

If you want the code you can just take it

gilded blaze
chrome widget
#

I'm about to be airborne with no Internet though so you might have to wait like two hours

hidden notch
gilded blaze
#

yea, it's already been a month

gilded blaze
#

another thing, if you win the round without using it, it becomes an insurance joker for when a boss blind heavily breaks your build

#

once again, balanced for an Uncommon

lapis matrix
#

yeah, my idea right now more or less is just vanilla+ cards that could basically fit the base game

#

good practice and im bringing some neat ideas i had to life

slim ferry
#

can i return dollars in context.money_altered without it creating an infinite loop?

robust marsh
#

Does anyone know how I could make it so when a blind is selected you'd get a random boss effect added on top?

maiden phoenix
robust marsh
cursive gazelle
#

Not easy but i think someone made something similar

#

I totally forgot who

#

Ailoyori has blind icon thing

slim ferry
maiden phoenix
#

Is this thing tied to a card's calculate?

slim ferry
#

yeah

maiden phoenix
#
if context.money_aletered and not card.ability.dollars_given then
  card.ability.dollars_given = true
  return dollars

Here's a rough idea

slim ferry
#

hm yeah i see

maiden phoenix
#

You'd have to remove the flag with an else

robust marsh
slim ferry
#

is it possible to have an unlock similar to that of legendary jokers on a modded rarity (like that you can get them regardless of if they are unlocked, and they become unlocked when you create them)

daring fern
slim ferry
#

hm i see

next karma
#

does anyone know how to make a joker look for a specific joker and then destroy it?

daring fern
next karma
slim ferry
#

when you want to destroy the joker??? where else

next karma
daring fern
#

How would one draw a seal on the chips and mult?

cursive gazelle
manic rune
#

genuinely seal on everything 😭

#

whats next, the balatro app icon???

slim ferry
#

i mean the mod also has quantum cards

daring fern
faint yacht
reef condor
#

QUESTION FOR A FRIEND:
how to make pseudo-random effects?
Asked by @pastel kernel

pastel kernel
#

What the fuck

manic rune
#

wtf does that mean lol

daring fern
reef condor
pastel kernel
cursive gazelle
#

From the love2d wiki

reef condor
#

I'm tapping my foot
My friend needs his answer

slim ferry
reef condor
cursive gazelle
reef condor
#

Huh?

slim ferry
#

assuming you want it affected by oops

cursive gazelle
pastel kernel
slim ferry
#

i dont

reef condor
#

Ywah, what he said

reef condor
slim ferry
#

theres plenty of pseudorandom functions

rotund sable
#

there's now a parameter in SMODS.pseudorandom_probability to ignore oops

reef condor
rotund sable
#

smh

slim ferry
#

idfk

#

what does it even do

pastel kernel
reef condor
#

how do we make it like dat

rotund sable
#

also what the hell is that shulker box

slim ferry
#

use pseudorandom_element to get a random element from a table

#

or yk just

#

look at the yahimod code

reef condor
#

oahgghhhhh ok

#

@pastel kernel we got an answer

#

dig into Yahimod's code

chrome widget
pastel kernel
daring fern
pastel kernel
#

Does Yahimod still work?

cursive gazelle
#

Again from the love2d wiki

robust marsh
red flower
cursive gazelle
red flower
#

i dont think this is good

cursive gazelle
#

Joyous spring tarot

red flower
#

thats reimu

chrome widget
# robust marsh pondering

If you're willing to be an early adopter and put up with reporting some bugs, an API I made allows this generically. Doing this was very much A Lot so I wouldn't recommend doing it yourself unless you've got a lot of time and patience

flint maple
#

What should i do to have a caculate function trigger only on the first hand or a round

red flower
#

have you looked at DNA's code

flint maple
#

oh ye. my mistake

red cradle
#

how to check if poker hand is unlocked?

cursive gazelle
#

At least

daring fern
robust marsh
chrome widget
#

Cool

ripe comet
#

sry if this isnt the right channel but can you guys help me make a mod work that isnt mine?

red flower
ripe comet
#

alright thanks for the tip

pastel kernel
#

where's the code for the chocolate die

#

Yahimod's shulker box uses fucking math.random

slim ferry
#

wh

#

why the fuck does it use math.random that makes like zero sense

#

even outside of the fact that its not pseudorandom

slim ferry
pastel kernel
#

oh yeah, the 1 of 8 effects of auzzy's Neo Metal Sonic proposal are as follows:
Creates 5 random Negative Consumables.
Retriggers leftmost and rightmost jokers 2 times.
Retrigger all played cards once.
Doubles your Money, no limits.
Applies Eternal to all current jokers.
Squares all of your current chips and mult (Triggers After Scoring).
Gains 1.5XMult if a Soul is used, or a Legendary joker is to Neo Metal Sonic's right.
Create 7 random Negative Perishable jokers.

chrome widget
# hidden notch I would love that and I can wait no worries!~ ^w^

And yet another plug, part of my API Mod

https://github.com/Kekulism/Arrow

Back:

local ref_back_ui = Back.generate_UI
function Back:generate_UI(other, ui_scale, min_dims, challenge, ...)
    if self.effect.center.artist and not Galdur then
        local ret = ref_back_ui(self, other, ui_scale, min_dims, challenge, ...)

        ret.config.minh = 1.12
        ret.nodes[1].config.padding = 0.035
        ret.nodes[1].config.minh = 1.12
        ret.nodes[1].nodes[1].config.padding = nil
        return ret
    else
        return ref_back_ui(self, other, ui_scale, min_dims, challenge, ...)
    end
end

UI_definitions:

---------------------------
--------------------------- Deck crediting
---------------------------

local ref_run_setup = G.UIDEF.run_setup_option
function G.UIDEF.run_setup_option(...)
    local ret = ref_run_setup(...)

    if G.GAME.viewed_back then
        local args = {...}

        local credit = {
            n = G.UIT.R,
            config = {align = "cm"},
            nodes = {{
                n = G.UIT.O,
                config = {
                    id = nil,
                    func = 'RUN_SETUP_check_artist',
                    object = Moveable()
                }
            }}
        }

        if args[1] == 'Continue' and V(G.SAVED_GAME.GAME.smods_version or '0.0.0') == V(SMODS.version) then
            local back_desc_nodes = ret.nodes[1].nodes[1].nodes[1].nodes[2].nodes
            back_desc_nodes[#back_desc_nodes+1] = credit
        elseif args[1] == 'New Run' then
            local back_desc_nodes = ret.nodes[1].nodes[1].nodes[1].nodes[2].nodes[1].nodes[1].nodes[1].nodes[2].nodes
            back_desc_nodes[#back_desc_nodes+1] = credit
        end
    end

    return ret
end

function G.UIDEF.deck_credit(back)
    -- set the artists
    local vars = {}
    local mod = back.original_mod or back.mod
    if type(back.artist) == 'table' then
        for i, v in ipairs(back.artist) do
            vars[i] = ArrowAPI.credits[mod.id][v]
        end
    else
        vars[1] = ArrowAPI.credits[ mod.id][back.artist]
    end

    local name_nodes = localize{type = 'name', key = "artistcredit_"..#vars, set = 'Other', scale = 0.6}
    local desc_nodes = {}
    localize{type = 'descriptions', key = "artistcredit_"..#vars, set = "Other", vars = vars, nodes = desc_nodes, scale = 0.7}
    local credit = {
        n = G.UIT.ROOT,
        config = {id = back.name, align = "cm", minw = 4, r = 0, colour = G.C.CLEAR },
        nodes = {
            name_from_rows(name_nodes, nil),
            desc_from_rows(desc_nodes, nil),
        }
    }

    -- customized measurements
    credit.nodes[1].config.padding = 0.035
    credit.nodes[2].config.padding = 0.03
    credit.nodes[2].config.minh = 0.15
    credit.nodes[2].config.minw = 4
    credit.nodes[2].config.r = 0.005

    return credit
end
#

button_callbacks:

---------------------------
--------------------------- Deck crediting
---------------------------

G.FUNCS.RUN_SETUP_check_artist = function(e)
    if G.GAME.viewed_back.name ~= e.config.id then
        --removes the UI from the previously selected back and adds the new one
        if G.GAME.viewed_back.effect.center.artist then
            if e.config.object then e.config.object:remove() end
            e.UIT = G.UIT.O
            e.config.object = UIBox{
                definition = G.UIDEF.deck_credit(G.GAME.viewed_back.effect.center),
                config = {offset = {x=0,y=0}, align = 'cm', parent = e}
            }

            e.config.minh = nil
            e.config.maxh = nil
            if e.parent.parent.children[1] then
                e.parent.parent.children[1].config.minh = 0.45
                e.parent.parent.children[2].config.minh = 0.9
            end
        else
            if e.config.object then e.config.object:remove() end
            e.UIT = G.UIT.R

            e.config.minh = 0
            e.config.maxh = 0
            if e.parent.parent.children[1] then
                e.parent.parent.children[1].config.minh = 0.6
                e.parent.parent.children[2].config.minh = 1.7
            end
        end
        e.config.id = G.GAME.viewed_back.name
        e.UIBox:recalculate()
    end
end

Localization:

return {
    descriptions = {
        other = {
            artistcredit_1 = {
                name = "Artist",
                text = {
                    "{E:1}#1#{}"
                },
            },
            artistcredit_2 = {
                name = "Artists",
                text = {
                    "{E:1}#1#{}",
                    "{E:1}#2#{}"
                },
            },
            artistcredit_3 = {
                name = "Artists",
                text = {
                    "{E:1}#1#{}",
                    "{E:1}#2#{}",
                    "{E:1}#3#{}",
                }
            }
        }
    }
}

the only hiccup is you'll have to do something to define the values for your credited artists somewhere. In my API they're defined under a section dedicated to credits, a table indexed by the id of the mod, but you can change those references to whatever you want:

ArrowAPI.credits = {
    --- Table containing display names for all mod contributors, indexed by shortened key
    ArrowAPI = {
        ['gote'] = "BarrierTrio/Gote",
        ['keku'] = "Keku",
        ['cejai'] = "SagaciousCejai",
        ['eremel'] = "Eremel",
        ['yunkie'] = "yunkie101",
        ['joey'] = "Joey",
        ['winter'] = "TheWinterComet"
    },

    add_credits = function(mod, args)
        ArrowAPI['credits'][mod.id] = args
    end
}

Then, on the Back center object definition, just do artist = 'key' or artist = { 'key1, 'key2', ...}

#

Additionally you could just... use my API mod

wispy falcon
#

How do I check what cards are in this area right now?

maiden phoenix
#

G.hand.cards

pastel kernel
#

I thought it was just G.hand

#

Full deck is G.deck

#

And played hand is G.play

crimson tapir
#

is there a way to make wee joker retexture to a new texture instead of just a resized basic joker

slim ferry
gilded blaze
pastel kernel
gilded blaze
#

G.playing_cards

#

it's not a card area tho, just iterate G.playing_cards directly instead of like G.decks.cards

wispy falcon
#

Wait, is there a context that is before the cards are played? Because context.before is right after the cards are played but before they start scoring and that's too late

wispy falcon
#

Which one is it?

cursive gazelle
#

I Forgot

cursive gazelle
#

I think

pastel kernel
#

According to auzzy

manic rune
#

they said before the cards are played, though

pastel kernel
#

Not 1 in 6.

manic rune
#

so G.play.cards should be empty, which is correct

wispy falcon
slim ferry
#

does returning ["chips"] = <number> act the same as returning chips = <number>?

slim ferry
#

wait

#

why am i asking this

pastel kernel
#

i wanna use allow_duplicates now

#

how do you use it

red cradle
#

How to make joker perishable?

pastel kernel
#

stickers = {“perishable”} I believe

slim ferry
#

thats only when creating the card

pastel kernel
#

Oh

wispy falcon
#

And how do I get the suit of a card?

red cradle
#

playing_card:is_suit("Hearts")

manic rune
#

card.base.suit

red cradle
pastel kernel
#

How do you make it so that all jokers lose all their stickers?

grim remnant
#

silly question about my hooks from yesterday. is it possible to make it so the return call happens before my if statement (the obvious move of just, moving the return line, didn't work)?

function Card:set_seal(_seal, silent, immediate)
    if self.ability.set ~= "Joker" then --this is such a hacky solution and probably breaks cryptid a tiny bit since you can actually seal jokers in that mod. too bad!
        SMODS.calculate_context({setting_seal = true, other_card = self})
    end
    return set_seal_ref(self, _seal, silent, immediate)
end```
agile path
#

good afternoon

pastel kernel
cursive gazelle
thorn pumice
#

hii!

i'm struggling to do something that feels simple here

        if context.skipping_booster and not context.blueprint then
            local spawn_input = {
                function() FANATIC_UTIL.spawn_fart_card(context, card, true) end,
                function() FANATIC_UTIL.spawn_pee_card(context, card, true) end,
                function() FANATIC_UTIL.spawn_poo_card(context, card, true) end
            }
            
            local random_spawn = pseudorandom_element(spawn_input, pseudoseed('artistic_dice'))

            if SMODS.pseudorandom_probability(card, 'artistic_dice', 1, card.ability.extra.denominator) then
                --
            end
        end
    end

i'd like to set the spawned card to a negative edition, how could i do that?

cursive gazelle
#

Takes argument for cards and edition also enhancements

#

There’s pool_enhancement for random enhancement aswell

thick drift
red cradle
cursive gazelle
#

😭

red flower
#

joker:add_sticker("perishable", true)

#

or :set_perishable

#

iirc

pastel kernel
#

ok umm

#

how do you make specifically 5 random negative conusmables

cursive gazelle
#

Make or add ?

thick drift
#

anyone know why an event created in post-trigger is being resolved before the event created in the evaluation that triggered post-trigger?

agile path
#

i'm so rusty at this

red flower
agile path
#
        if context.joker_main then
            return {
                chips = card.ability.extra.chips
            }
        end
    end

would this be correct

manic rune
#

yes

thick drift
#

My code is doing what I want, the animations are just playing in reverse order

agile path
red flower
agile path
#

i forgot, do i need an extra{}?

    key = "covetous_ring1",
    atlas = 'covetous_ring',
    pos = { x = 0, y = 0 },
    rarity = 1,
    discovered = true,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,
    cost = 5,

here, for the chips i mean

manic rune
# grim remnant silly question about my hooks from yesterday. is it possible to make it so the r...
local set_seal_ref = Card.set_seal --add setting_seal context
function Card:set_seal(_seal, silent, immediate)
    local ret = set_seal_ref(self, _seal, silent, immediate)
    if self.ability.set ~= "Joker" then --this is such a hacky solution and probably breaks cryptid a tiny bit since you can actually seal jokers in that mod. too bad!
        SMODS.calculate_context({setting_seal = true, other_card = self})
    end
    return ret
end

in case u havent figured it out

manic rune
thorn pumice
# cursive gazelle SMODS.add_card

replacing what i was using before with like

function()
  SMODS.add_card {
    set = 'Silly',
  }
  G.GAME.consumeable_buffer = 0
  return true
end,
--etc

i would run

random_spawn:set_edition("e_negative", true)?

rocky plaza
agile path
#

is it possible to do xchips?

red flower
red flower
cursive gazelle
agile path
#

card.ability.extra.xchips?

thorn pumice
manic rune
#

xchips = card.ability.extra.xchips

cursive gazelle
agile path
#

Obg chat :3

thorn pumice
#

thank you!

cursive gazelle
#

Chips is the value stored in your extra

manic rune
#

modding-dev is surprisingly active today

thorn pumice
slim ferry
#

is G.C.JOKER_GREY the default colour used in joker descriptions?

cursive gazelle
#

You would do xchips=card.ability.extra.chips in your return

agile path
#

ah, yes

cursive gazelle
red flower
#

unless you mean something else

thorn pumice
cursive gazelle
#

The random has changed

#

So take account of that

#

Check vanilla remade wiki

pastel kernel
thick drift
manic rune
#

also you dont need to use pseudoseed('neo1')).key lol

pastel kernel
manic rune
#

just either pseudoseed('neo1') or 'neo1' (newer smods releases support the latter now)

red flower
slim ferry
agile path
manic rune
#

.

#

OH

#

i thought its taking the key from pseudoseed-

cursive gazelle
red flower
#

yeah

manic rune
#

sob

#

yeah no its correct

pastel kernel
#
"1. Creates {c:attention}#1#{} random {C:dark_edition}Negative{} consumables.",
manic rune
#

but you can just use a string instead of pseudoseed now

pastel kernel
#

i think this is done

red flower
#

although my set = "Consumeables" was shorter

manic rune
#

C:attention

#

true

pastel kernel
#

next one

"2. Retriggers leftmost and rightmost jokers {C:attention}#3#{} times.",
agile path
#

if in the chips = i put 1.5, in the return does it multiply the chips by 1.5?

cursive gazelle
#

Yes

manic rune
#

yes

slim ferry
#

set_ability is called on card creation, right?

red flower
#

yes

pastel kernel
agile path
#

goddamn it

manic rune
#

it looks like you are doing extra.chips there

#

🤔

#

or idk

cursive gazelle
manic rune
agile path
#

i could be that, yes

#

is it different for chips?

#
    key = "covetous_ring1",
    atlas = 'covetous_ring',
    pos = { x = 0, y = 0 },
    rarity = 1,
    discovered = true,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,
    cost = 5,
    config = { extra {chips = 1.2}},

        
            
    calculate = function(self, card, context)
        if context.joker_main then
            return {
                xchips=card.ability.extra.chips
            }
        end
    end
}
#

my wifi died for a sec, my bad

cursive gazelle
#

I think it’s extra= in config

manic rune
#

config = { extra = {chips = 1.2}}

pastel kernel
manic rune
#

you are missing a =

cursive gazelle
#

Smart bepis

manic rune
#

G.jokers.cards refers to the cards inside the cardarea, G.jokers is the entire cardarea

pastel kernel
#

oh

#

so it's G.jokers.cards[1]

manic rune
#

yes

agile path
pastel kernel
#

how do i make it so that both jokers can be retriggered?

#

oh wait

manic rune
agile path
# manic rune

i love adhd, i overlook the simplest of things, ffs

#

thank you

manic rune
#

its fine lmao

agile path
#

now the easiest part

#

the artwork

pastel kernel
cursive gazelle
#

I wish i can relate

pastel kernel
#

like this?```lua
repetitions = math.min(card.ability.extra.leftmostrightmostjokers, self.config.immutable.totalretriggerlimit)

manic rune
#

dont use self................

#

actually, wait, its immutable so it should be fine?

pastel kernel
#

I mean I can still use card.ability?

red cradle
cursive gazelle
#

Bepis my ui doesn’t work

#

I’m going to sleep

knotty orchid
#
    apply = function(self, back)
        Pokerleven.ina_manager_area.config.card_limit = self.config.managers

        G.GAME.round_resets.hands = G.GAME.round_resets.hands - 1
        G.GAME.round_resets.discards = G.GAME.round_resets.discards + 1
    end,

Shouldn't this set hands ands discards for a deck?

pastel kernel
manic rune
#

not being "random"?

pastel kernel
#

they have a joker that applies a random edition, seal, and enhancement

manic rune
#

well if its the same seed then yes

lofty elm
#

Sorry to interrupt, anyone happen to know why this would work while the joker is in the collection but return nil once I have it in my slots?
local copy_name = "None"
return { vars = {copy_name} }

#

This is in loc_vars in my joker

pastel kernel
#

does this actually double your money?

G.GAME.dollars = G.GAME.dollars * card.ability.extra.doublemoney
red cradle
#

ease_dollars(G.GAME.dollars)

#

maybe

pastel kernel
#
ease_dollars(math.min(card.ability.extra.doublemoney, card.ability.immutable.moneymultceiling) * G.GAME.dollars)
frosty rampart
#

well no, ease_dollars adds to your money, it doesn't set it

pastel kernel
#

effect #4 explicitly states: "Multiplies your Money by X#2#, no limits."

red cradle
ocean sinew
#

just do ease_dollars(G.GAME.dollars*(card.ability.extra.m_multiplier-1) )

pastel kernel
#

i'm so fucking lost but sure

cursive gazelle
ocean sinew
cursive gazelle
#

Seu pai my man

#

Did you released the thing

#

I wanna try it

ocean sinew
#

not yet

pastel kernel
#

i need to add an actual limit though, i don't want the game to fucking crash that's why i made a hidden immutable value to serve as the max limit

ocean sinew
#

me and my cousin are cooking some things

#

blood tag

#

and blood chalice

cursive gazelle
#

Dope

pastel kernel
#

imagine if you play this joker with cryptid

#

and you have oil lamp

cursive gazelle
ocean sinew
#

true

red cradle
pastel kernel
#
ease_dollars(math.min(card.ability.extra.doublemoney, card.ability.immutable.moneymultceiling) * G.GAME.dollars))
ocean sinew
agile path
#

chat, did i cook

red cradle
#

ease_dollars(math.min(limit, G.GAME.dollars))

ocean sinew
frosty rampart
#

well it should be math.min(limit - G.GAME.dollars, G.GAME.dollars)

cursive gazelle
red cradle
frosty rampart
agile path
#

works as intended too

#

gold stake plasma goes nuts

ocean sinew
pastel kernel
#

moneymultceiling = 1e100

grim remnant
#

question. how do i make a smeared-esque joker that pairs Hearts and Spades? i did see the code from moddedvanilla but i'm stuck on what the heck SMODS.smeared_check does, and literally every result for it is. Other people asking what it is.

    function Card:is_suit(suit, bypass_debuff, flush_calc)
        local ret = card_is_suit_ref(self, suit, bypass_debuff, flush_calc)
        if not ret and not SMODS.has_no_suit(self) and next(SMODS.find_card("j_stla_sacredHeart")) then
            return SMODS.smeared_check(self, suit)
        end
        return ret
    end```
frosty rampart
#

if it's a limit on how much money can be added then yea it's just limit in the math.min. but i took it as a limit on the total amount of money you can have

red cradle
pastel kernel
red cradle
#

The question is, do you need a limit on the money added or on the resulting money?

wispy falcon
#

How do I get the level (and with that the chips & mult) of a poker hand?

lofty elm
# cursive gazelle Try returning the string directly

It still had the issue, I think it has to do with the compatible tag which I just stole from blueprint in the vanilla remade thing, but i don't really understand how all that works tbh so not sure why it would cause that. But it only returns nil when the compatible tag is there.

red cradle
pastel kernel
#

doublemoney = 2

#

but the ceiling is immutable

#

so when you try to increase doublemoney using oil lamp

red cradle
#

you dont need "doublemoney", you can just add your money to your money (i think so)

#

oh

grim remnant
#

yeah, you just. add money to money, right?

pastel kernel
#

it multiplies money by X"doublemoney"

red cradle
pastel kernel
#

oil lamp increases joker values

#

specfically the joker to the right

#

by x1.2

#

this allows some jokers to give unholy mult

red cradle
#

And how does she do it?

pastel kernel
#

they have a whole function for it

#

in a separate file

#

but from what i can gather, they check for any values in the joker that is a number

#

and then increase it accordingly

red cradle
#

so

#

do you need the lamp not to go over the limit?

pastel kernel
#

they can't affect immutable values

red cradle
#

ok

#

so

pastel kernel
#

moneymultceiling is immutable

red cradle
#

ease_dollars(math.min(card.ability.immutable.moneymultceiling, G.GAME.dollars))