#💻・modding-dev

1 messages · Page 242 of 1

tall wharf
halcyon osprey
#

EXPLOOOSION

manic rune
#

dont you love when you basically have an entirely new calculation system to yourself because of how convoluted your mod is :3

#

to the point you need a gazillion functions to make them working

#

yipee

minor furnace
#

well this is a weird error for hovering over a consumable

halcyon osprey
#

no clue what im doing tbh LOL

paper zealot
sturdy compass
manic rune
#

:3

minor furnace
sturdy compass
#

Also not sure if is_card is a function

halcyon osprey
manic rune
#

but if it works then its fine

#

:3

minor furnace
# minor furnace well this is a weird error for hovering over a consumable

this is the consumable definition if it helps at all

    key = "p_reverse_phobos",
    set = "Planet",
    atlas = "Reverse_Tarots",
    pos = {x = 0, y = 0},
    loc_txt = {
        name = "Phobos",
        text={
            "{S:0.8}({S:0.8,V:1}lvl.#1#{S:0.8}){} Level up",
            "{C:attention}#2#",
            "{C:mult}+#3#{} Mult and",
            "{C:chips}+#4#{} chips",
        },
    },
    config = {hand_type = 'reverse_parity'},
    loc_vars = function(self, info_queue, center)
        return {
            vars = {G.GAME.hands["reverse_parity"].level,
            "reverse_parity",
            G.GAME.hands["reverse_parity"].mult,
            G.GAME.hands["reverse_parity"].chips}
        }
    end,
    can_use = function(self, card)
        return true
    end,
    use = function(self, card, area, copier)
        update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname="reverse_parity",chips = G.GAME.hands["reverse_parity"].chips, mult = G.GAME.hands["reverse_parity"].mult, level=G.GAME.hands["reverse_parity"].level})
        level_up_hand(used_tarot, "reverse_parity")
        update_hand_text({sound = 'button', volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = '', level = ''})
    end
}```
manic rune
#

your loc_vars vars

#

wait

#

nvm

#

:3 i didnt see it already having the {}

tall wharf
#

so close

manic rune
minor furnace
#

Oh shoot you're right

manic rune
#

and also

#

is the S:0.8 meant to represent the size change?

#

it should be lowercase "s", if thats the case

paper zealot
manic rune
minor furnace
manic rune
#

oh

#

huh, S probably works then

minor furnace
#

Oh I realize what I need to pass to V but I don't know how to. Because it's the color corresponding to the hand level

#

or rather, I don't know where it's stored

sturdy compass
manic rune
#

o

#

thought context.using_consumeable already refers to the consumable card being used, sorry

sturdy compass
#

Nah it’s a joker checking on what consumable is being used

minor furnace
#

anyone have a clue where the hand level colors are stored?

halcyon osprey
#

lmao, i think im just misunderstanding it all or something. no crash though

#

😭

sturdy compass
#

paper zealot
manic rune
#

im pretty sure thats not what i + jeromeraom said

#

💔

tall wharf
manic rune
#
if context.using_consumeable and context.consumeable.config.center.key == "c_earth" then

probably that?

sturdy compass
#

You beat me

manic rune
#

:3 i was actually uncertain of my code a bit so i let you type for a few more seconds lol

tall wharf
#

i think that's correct

sturdy compass
#

Damn mobile hindering my typing speed

halcyon osprey
minor furnace
manic rune
# tall wharf

i was thinking about just making the button bust in flames but thats good too, damn

halcyon osprey
#

thank u for the help, Im just getting confused

sturdy compass
#

😭

manic rune
#

jereome

#

:3

#

i will call you max astra maximus then

tall wharf
#

i was wondering if purple flame would look cooker

manic rune
#

why did i have autocorrect installed in my hands

minor furnace
#

ourple

sturdy compass
manic rune
#

yeah but

#

"max"imus

#

:3

sturdy compass
#

Yeah I know

manic rune
#

how about mus then

sturdy compass
#

Just astra I beg 😭

manic rune
#

soo i?

rose dragon
manic rune
#

max "i" maximus

sturdy compass
#

I’m gonna go insane

minor furnace
#

so close
colours = {G.C.HAND_LEVELS[G.GAME.hands["reverse_parity"].level]}

sturdy compass
minor furnace
#

but at least it doesn't crash

manic rune
#

i should probably learn special characters in strings

sturdy compass
manic rune
#

like % ^ v smt smt

#

...i dont even know how i got the coloring function working almost seamlessly without learning that lmfao

paper zealot
minor furnace
#

ah, right

manic rune
#

question: this will always be a number >= 0 right?

#

considering it picks the highest number

#

nice, just learnt that from a website

#

-# should have probably learnt that earlier, most of my functions had a "if >= 0 then = 0"

#

its a miracle my code even works at this point, considering how inexperienced i am with lua lmfao

paper zealot
tall wharf
#

hmmmmm

manic rune
#

wouldve brought this down by at least 50 lines or so, idk

minor furnace
#

and we're in business with the planet card now 🫡

#

however, it is 3:16 am now and I need some sleep

manic rune
#

-# weak

#

good night :3

final wagon
#

is there a way to get an array of all jokers, including modded ones?

halcyon osprey
#

yippee it works

tall wharf
tall tangle
#

MAAAAAN YOU CAIN'T HAVE SHIT IN DETROIT

tall wharf
#

made it move less

#

made it higher res

halcyon osprey
#

angy tent time. this one will incrase Xmult for every Joker Sold, or Destroyed

#

Kinda like Fireplace but weaker Scaling and only on jokers lmao

#

Might have something else for holding onoto jokers too, like +mult per joker in hand

tall wharf
#

oh...

#

cryptid mod goes crazy

halcyon osprey
#

gwuh

reef belfry
#

big block of text

halcyon osprey
#

i guess there is no _removed isnt there

zealous glen
tall wharf
#

omg hi vicrtin

zealous glen
#

Humpty Dumpty Voucher that gives your rightmost Joker $2 sell value per round

zealous glen
halcyon osprey
#

oh i think i got it working lol

fading geyser
#

Hi, I have a Steamodded question and was hoping someone could point me in the right direction

#

I'm making a custom joker and I need to pull the value for the blind target score (e.g. 300 for ante 1 small blind). How would I be able to do this?

halcyon osprey
#

so how to make this work for Destroyed Jokers? Selling works but destroyed isnt

fading geyser
#

Oh, apologies if I'm interrupting a conversation

halcyon osprey
#

your not sorry

fading geyser
#

thanks!

tall wharf
#

if it crashes don't forget to check if it's nil

fading geyser
#

if it's nil then you wouldn't be able to progress anyway, as it's naneinf, correct?

halcyon osprey
tall wharf
#

nil =/= naneinf

fading geyser
#

oh okay

#

thanks!

tall wharf
#

just do if G.GAME.blind and G.GAME.blind.chips then whatever end

halcyon osprey
#

not just jokers

tall wharf
#

i think you'll just have to hook on cards getting destroyed

halcyon osprey
#

dont know how to do that

#

context destroy card or remove cards Doesnt work

#

and cardarea G.jokers also didnt work

#

i dont understand this at all god i hate hopw this works. How is selling random Planett cards apart of Jokers??!?!?!??!?!?!?!?!?! and again No clue how to make destroyed cards do their thing

why isnt there a context.playing_card_removed

deft niche
#

is G.hand.cards an array?

tall wharf
#

yes

deft niche
#

so #G.hand.cards will give me the size of the array, correct?

#

sorry if it's a very basic question, I'm new to lua

deft niche
#

ty

halcyon osprey
#

I, Genuienly cannot do thios

frosty dock
#

wait no you have that

halcyon osprey
#

and it doesnt work

frosty dock
#

remove the area check

zealous glen
#

You can test what object is by set

#

Not CardArea

halcyon osprey
#

how3 so?

zealous glen
#

I think it’s card.ability.set == “Joker” for example

halcyon osprey
#

cause i just want this joker to grant x0.1 mult for each joker sold or destroyed and its not seeing the destroyed ones and its going for every sold card

zealous glen
#

Might be ”Jokers” or the set isn’t in ability

frosty dock
#

remove_playing_cards is only for playing cards, there isn't a context for destroying jokers

zealous glen
#

But this is the way to test what type of object something is

#

Paperback implement their own IIRC

deft niche
#

how do I read a card's rank? is this correct?

zealous glen
#

If you want a reference

frosty dock
#

in selling_card you can check context.card.ability.set == 'Joker'

frosty dock
deft niche
#

appreciate it, thanks a lot

frosty dock
halcyon osprey
vast fractal
#

it is possible to make a blind to do All additive modifiers to Mult affect Chips instead or do i need a lot of patching?

zealous glen
#

Betmma does it too

#

Thunk didn’t need this context so they never added it

vast fractal
#

peak pain again

zealous glen
#

new new calc: the newnewening

#

-# it adds Blind calc

vast fractal
#

like +4 Mult -> +4 Chips

zealous glen
#

Maybe with post triggers?

tall wharf
#

sell context

zealous glen
#

sell grapes?

#

🦆

tall tangle
#

YA GOT ANY GRAPES???

zealous glen
#

quack quack quack

opal spade
#

time for magic trick 4 ig

deft niche
#

is context.destroy_card used for when I want to destroy a card or if I want an effect to trigger when a card is destroyed?

#

I don't get how to properly set the context or assign which card I want the game to destroy

#

right now the effect simply does nothing

#

my intention is to create a joker that destroys the highest card in your hand whenever you use a consumable

halcyon osprey
#

im just gonna have the card work with selling i suppose

vast fractal
#

what is the self.ability.name of these jokers?

deft niche
#

you mean this?

vast fractal
#

i forgor to clarify the question 💀

i meant if pic is called Suit Mult then what is jolly/../... is in code

hushed field
#

I'm not sure I understand what you're after

vast fractal
#

im trying to find the code when these jokers proc

hushed field
#

if self.ability.effect == 'Suit Mult' in the calculate joker func

#

If I want to hook something that affect all created cards, which function should I target? I'm not sure I know exactly how the shop, boosters and everything differ in the way they spawn in cards

vast fractal
hushed field
vast fractal
#

thank you

shell timber
#

is this card sufficiently yucky

rose dragon
manic rune
#

this was, fucking just 10 lines.

#

💔

#

all because i decided to add debuffs whose name counts as other debuffs', but at the same time they can have specific effects blah blah blah

#

shouldnt have pulled myself into this hellhole

karmic arch
shell timber
#

it goes after scoring

tall wharf
carmine kindle
#

Hi, I don't know if this is a frequently asked questions, but does anyone know if there's an actual guide to mod the game (I'm new to modding and I have no clue where to start from :D)

brisk basin
#

okay, this is weird, im trying to do a deck with certain cards removed but its not working properly and debugging it shows that G.playing_cards is not including kings and 10s for some reason

karmic arch
#

11 jacks
12 Queen
13 King
14 Ace?

brisk basin
#

thats what i understand from the wiki

karmic arch
#

In your deck you have only 10 and king?

brisk basin
#

right now?

karmic arch
#

Huh

brisk basin
#

my idea is to remove kings as well, not 10s but funny that they doesnt show up either

hushed field
#

are you running any other mods, or is it just that code and smods?

brisk basin
#

the logger, debugplus

#

and i think the mod i did yesterday, let me disable that one

tall wharf
#

i think you'll have to hook into apply to run

brisk basin
#

hook?

frosty dock
#

nah, apply function does the same

hushed field
#

I do think there's just the a no_ranks thing you can set with a deck, no?

#

or is that just for challenges?

#

<@&1133519078540185692>

grand violet
hushed field
#

eggsecuted

karmic arch
brisk basin
#

i think i just copied some of the examples in the smods github and tried to do this

hushed field
# deft niche up

you're combining contexts! You can't be in the using consumeable context while you're in the destroy_card context!

deft niche
#

ok

#

do I put them inside one another instead?

hushed field
#

No, then they'd still be combined!

deft niche
#

huh

next timber
#

theres only one context happening at a time

#

you cant check for two contexts at once thatll never happen

deft niche
#

ok

next timber
#

i think.

deft niche
#

is there a function that I can use to destroy cards without a specific context?

#

so I keep the consumable context but still destroy the card

next timber
#

i had to patch that functionality in

hushed field
# deft niche huh

pseudocode_testfunc({arrayofinfo})
if variable_A == true and variable_B == true then
Do thing
end

If I then do
pseudocode_testfunc({variable_A = true})
pseudocode_testfunc({variable_B = true})

Then there's no moment at which the function runs in which both are true at the same time. If I'd rewrite the function to look like this:
if variable_A == true then
if variable_B == true then
Do thing
end
end

then for Do thing to happen, both would still need to be true at the same time, they're just checked after each other, instead

deft niche
#

variable A and variable B can be contexts?

hushed field
deft niche
#

i assume not

brisk basin
#

okay, update to my issue, doing like the abandoned deck and set the remove_faces = true for the back's config, now it work as expected, but still weird

deft niche
#

i'll keep that in mind

hushed field
#

no, sorry, should've made it clear that those are really just names I picked to function as an example for the logic. None of that code would work in any real language, haha

deft niche
#

by searching on card.lua for hanged man, immolate and trading card I still couldn't find the proper function to destroy a card

#

maybe I'm not looking deep enough

hushed field
#

but that's not the code from the base game, that's in your lovely dumps. the base game is a bit more hacky

deft niche
#

this doesn't actually do anything?

karmic arch
hushed field
#

or, hacky, it's less modular, but taht was fine for thunk's purposes, haha

karmic arch
#

wait no

next timber
deft niche
#

I'm not trying to trigger an effect when a consumable destroys cards, I'm trying to destroy a card when a consumable is used

brisk basin
next timber
#

ignore me

hushed field
# deft niche but this is a check, right?

this is a confirmation of the cards being destroyed. The logic for card destruction on the consumeables is still handled by the consumables itself, iirc, let me check

deft niche
#

darn

#

thanks for the patience

brisk basin
deft niche
brisk basin
#

maybe its related to how ipairs work, idk much about lua

hushed field
#

I'd definitely ask eremel or aure for the best way to do this if they're around, because I know that I definitely had some problems pop up when I destroyed outside of the proper context. It was a bit of a wonky system, but I don't know how SMODS currently handles it because I haven't had to use it, haha

brisk basin
next timber
#

what the
big cards can't be bought in a booster pack if you have only 1 free slot left, which is the behaviour i want because they're meant to take up 2 slots, but you can still buy them from the shop with only one left, which leaves you with 5/4 jokers
do shops run different space checking logic to booster packs???

brisk basin
#

btw did this funny deck sprite

deft niche
tall wharf
hushed field
brisk basin
#

the same as the abandoned deck, just wanted to try to do it without looking at the abandoned deck's code (and i forgot also about the abandoned deck existing lol)

tall wharf
#

deck but no numbers

brisk basin
#

that would be funny too

deft niche
rose dragon
karmic arch
#

ace count as number? like it count in todd

brisk basin
#

i think it does

#

now no numbers

deft niche
#

nvm it's 14

deft niche
#

but yes still a number

deft niche
brisk basin
next timber
#

wow you only have like. 3 hands before you run out of cards

brisk basin
#

basically

next timber
#

but also GUARANTEED FOUR OF A KIND LETS GOO

karmic arch
# brisk basin

maybe make copy for each card but it has not/negative(if work) base value for balance

brisk basin
#

do you know the function to add a copy?

rose dragon
warped marsh
#

Is there a document that lists all the coloured text available?

brisk basin
next timber
#

lmao, wee joker with the Big edition is almost the size of a normal joker

#

almost, its still noticably smaller lol

warped marsh
paper zealot
#

Man i should really finish my documentation of text styling

warped marsh
#

im making a little joke Joker and i wanted a little of fancy text!

paper zealot
hushed field
#

If I want to increase the weight of a specific booster pack depending on the deck, is the easiest way to do that to take ownership? I guess I can define some globals I can edit to set the weight too

tall wharf
#

where does the game use edition colour again

paper zealot
tall wharf
#

i think edition tooltip most of the time uses dark edition I'm not sure

next timber
#

ugh i can't figure out how to scale the floating sprite on a joker, i've managed to scale the joker main sprite with card.role.draw_major.T.w but i can't find any way of scaling the foating sprite that actually shows up

verbal wyvern
#

I have been struggling to take ownership of invisible joker for about an hour now only for me to realize I was spelling invisible wrong and that fixed it immediately

paper zealot
next timber
#

the floating sprite is one of those situations

paper zealot
#

Also try VT.scale

next timber
#

doing T.scale on the main sprite actually does also scale the floating joker, but it doesn't scale the hitbox for clicking, hovering etc

next timber
hushed field
#

Can I make the deck display messages just like cards can? 🤔

next timber
#

man big jokers was funny in concept but this is acting a nightmare to program

#

is there an easy way to make an edition cause the card to retrigger whenever it's triggered?

paper zealot
manic rune
#

im cooked

#

-# it didnt work

neat plover
#

how would i create a random wild card????

#

lovely, now that the code induabitably runs to this specific section of the codeblock my ass

old bane
# neat plover how would i create a random wild card????

there should be a function that allows you to create a playing card, and if it asks you to specify the suit and rank, you can just have it pull from SMODS.Suits and SMODS.Ranks respectively with pseudorandom_element, then you can apply the enhancement with Card:set_ability(G.P_CENTERS.m_wild, nil, true)

neat plover
#

well i dont know the context tho, but many thanks

#

oh a function

long sun
#

hiya!

#

i've made two Joker sheets

#

my main script has an atlas, and Jokers that reference the first sheet

#

how can i create a second script, with a second atlas?

hushed field
#

just define it with a different key

neat plover
#

someone tell me where the card is created

#

im so losttt

gaunt wolf
brisk basin
#

abandoned deck? i was trying to do something like that by myself

reef belfry
#

What does this look like

neat plover
#

an ice totem

next timber
#

ice road with an ice city at the end

#

the joker text being clouds is cool but id make it a little more visible

#

or not do whatever 🤷

zealous glen
#

I believe

zealous glen
neat plover
#

i wanna create a card and i cant wahhhh

reef belfry
#

Ywah i dont think i have the capability of making an ice throne with like 12 pixels to spare

next timber
#

it IS being patched into the code, it's just not doing anything??

neat plover
old bane
#

im also unsure if SMODS has a function that does the same thing but better

neat plover
#

well i cant find it

old bane
#

should be in common_events.lua

paper zealot
next timber
#

oh what the

#

idk if this is because of the patch or smth else but with blueprint specifically the big edition creates a second floating sprite

#

and its not shaded with the same shader

next timber
#

wait how do you patch smod code

#

is it the same as normal

zealous glen
#

SMODS provides utilities for this

#

you can either use a specific class' draw method or SMODS.DrawStep

#

I'm not sure if the duplicated sprite is a vanilla thing, but it exists because all children will be automatically drawn, but if you also manually draw them they're being drawn twice

#

either way you can just tell SMODS to not draw it the first time around

next timber
#

so if i give an edition a draw function, will that be called to draw the joker instead of the default drawing function?

zealous glen
#

Maybe. Idk if Editions have a draw function but they do have a shader

#

In any case, you can check the wiki (or just try)

next timber
#

problem is shaders seem to be bound to the original size of the joker so theyre not good for resizing

neat plover
next timber
#

ok editions do not have a draw function. awesomeee

#

all this for like. 6 of 150 jokers

#

lol

zealous glen
#

I think that's what the scale parameter does

zealous glen
#

for other cards

brisk basin
#

behold my new joker (sprite is just temporary)

next timber
neat plover
#

i just want SOMEtHing to create a playing card thats it

red flower
#

create_playing_card?

neat plover
#

what are the parameters

next timber
brisk basin
#

thx ^^

neat plover
zealous glen
#

actually I wonder if you even need a shader for this

#

you can just change the card's scale parameter directly

#

card.VT.scale IIRC

next timber
#

that doesnt change its mouseover hitbox

#

i dont think

zealous glen
#

card.T.scale?

next timber
#

maybe im wrong

red flower
next timber
#

thats the one i tried

zealous glen
#

I tried it and it worked for me

next timber
#

i can try VT scale again, i think i tried it while testing

#

but maybe

neat plover
#

what are the parameters yall i dont get the meaning

zealous glen
#

Still, you also can manually increase the hitbox size

next timber
#

does that work with the floating sprites?

zealous glen
#

you can change card.T.scale and it will work

reef belfry
#

TRUE

dense vector
#

I'm just thinking of the part where KSI is on his ice throne

#

LMAO

neat plover
#

im in the joke of it, everybody mults

next timber
#

im in the bal of it, everybody tros

neat plover
next timber
#

i assume that if it's true it appears instantly

#

instead of appearing with an animation

dense vector
#

From the cards, to the deck, to the queen, to the king

next timber
manic rune
#

is it possible to move the entire game's window

#

rhythm doctor style

shell timber
#

yes!!

#

the Window Dance in question:

#

damn that's almost a year ago huh

manic rune
#

oh shit

shell timber
#

what the hell morefluff is already a year old

#

huh???

manic rune
#

i may or may not have an idea for a boss blind...

shell timber
#

The Rumble

long sun
#

hai sorry i'm back ^^

#

i've tried to add a second script, but that hasn't worked

#

i put it into items, but the game hasn't seen it

manic rune
#

o wait

manic rune
shell timber
#

yeah

manic rune
#

o

#

😭 i just knew that

next timber
manic rune
#

cool mod :D

shell timber
#

thanks!

long sun
#

this is the start of the script

manic rune
long sun
#

i don't know how to get my mod to see it

next timber
#

oh dear

manic rune
#

if my mod's jokers are busted, then i will counter it with strong boss blinds

#

smiple...

next timber
#

imagine a blind that moves the window so a specific card is always at the center of your screen

manic rune
#

i was thinking of a boss blind

#

that when you try to press Play Hand

#

it shifts the window so that your cursor is on Discard instead

#

:3

next timber
#

thats. mean

long sun
#

oooooooh so in more simple wording

#

Must use all discards?

manic rune
#

likely

#

but its not so fast that you can't move your mouse back to Play Hand

#

its there mostly to catch you off-guard

#

:3

next timber
#

the helpful Burnt Joker:

long sun
#

^^

long sun
manic rune
shell timber
#

good sign

long sun
#

ya but like. what's the "usual"? i've never done this before

manic rune
#

assert(SMODS.load_file(your_file_name.lua))()

next timber
#

what on earth does a 45 degree rotated tarot even do

long sun
#

and where do i put that?

manic rune
#

in main.lua

ionic cobalt
manic rune
#

if you put the file in a folder then it will be folder/your_file_name.lua instead

long sun
#

grand

#

so like, just in the script? not in any functions?

manic rune
#

this is my code to do that easily :3

long sun
#

grand, thanks ^^

#

will give that a try

dim steeple
#

Is there a way to access the soul floating sprite draw function via SMODS?

manic rune
#

from what im seeing in your picture, its likely assert(SMODS.load_file(items/BFDI2.lua))()

long sun
#

mhmhm :D

dim steeple
#

I can add shaders through card.children.floating_sprite:draw_shader() on the card draw function, but this occurs after the dissaolve shader is already drawn

manic rune
#

probably this

dim steeple
#

This is exactly what I'm after, thanks!

long sun
#

hmm, getting "Attempt to concatenate a nil value" on line 12

#

assert(SMODS.load_file(allFolders[i].."/"..allFiles[allFolders[i]][12]..".lua"))()

#

WAIT NVM I SEE IT 😭

#

i need new glasses :P

#

wondered why it was index 12 :)))

#

hmm okay, new error

next timber
#

how do i change the mouseover hitbox size of a card? ive scaled the card up but the hitbox hasnt scaled with it so its kinda jank

long sun
#

oop no, i fixed it :D

#

thanks!!!

neat plover
#

well i still dont fucking know how to create a card, which shouldnt be this hard

dim steeple
#
...
if type(self.config.center.soul_pos.draw) == 'function' then
    self.config.center.soul_pos.draw(self, scale_mod, rotate_mod)
...

This is interesting, if card.center.soul_pos.draw is a function then it executes that function

red flower
long sun
#

where does cryptid animate Jimball? i can't find the script that's in

neat plover
#

does this work???

#

because its not for me

#

actually im dense

#

it does

manic rune
#

what is the function when you press Play Hand called?

#

i want to hook smt to it to act as a "Turn" :3

#

-# playing one hand = 1 turn

agile thistle
next timber
long sun
#

looking to make this an animated Joker but i can't find how

long urchin
#

what if there was a joker that worked similarly to midas mask but with steel? itd have to be harder to activate than just any face cards in order to be balanced

long sun
tardy wind
#

check cryptid's code

long sun
#

i have 😭 i can't find it

hushed steeple
#

Hey folks, I've started modding the game just yesterday and I've already created 4 joker cards, but today I hit a hurdle on a more complex card. Basically it acts as Baseball Card joker but with another string instead. Can anyone more familiar with the code tell me where my mistake is? The card currently works ingame, but the X mult does not calculate.

    config = {
      extra = 0.5, -- Multiplier for each Corote Joker
    },
    set_ability = function(self, card, initial, delay_sprites)
        -- Ensure the multiplier value is set correctly
        card.ability.extra = 0.5
    end,
    calculate = function(self, card, context)
        if context.other_joker then
            -- Check if the other joker's name contains "Corote" and it's not this card
            if context.other_joker.name and string.match(context.other_joker.name, "Corote") and context.other_joker ~= card then
                -- Add visual effect to the other joker
                G.E_MANAGER:add_event(Event({
                    func = function()
                        context.other_joker:juice_up(0.5, 0.5)
                        return true
                    end
                }))
                
                -- Return multiplier bonus
                return {
                    message = localize{type='variable',key='a_xmult',vars={card.ability.extra}},
                    Xmult_mod = card.ability.extra
                }
            end
        end
    end,
    in_pool = function(self,wawa,wawa2)
        return true
    end
}```
long urchin
#

welder joker: uncommon joker
Scored [rank] become steel
rank changes every round

#

would that be balanced? worth picking up?

mossy ivy
#

Before I even start this, once this is up and running it will be able to work in game mode? Id hate to have to switch to desktop mode each time I hop on Balatro

maiden river
tall apex
#

hey does anyone know how to ban a voucher in a challenge? it isn't working quite right but im prob wording it wrong

tall apex
last shale
#

i'm not super familiar with lua but i'm sure i could learn it in time with my experience in other more complex languages, but i come to question how would i get started making my own mod? i have an idea for a joker that "enhances" the joker to the right of it, similar to blueprint. by "enhance" i mean that it gives it a new ability or enhancees its ability even further, if anyone's ever played the Fargo Souls Mod in Terraria, it works pretty much exactly the same as the wizard enchantment in that mod (seeing as i would call the joker the Wizard Joker)

red flower
tall apex
#

i was doin this

red flower
#

im pretty sure yeah vouchers are cards afaik

next timber
tall apex
long urchin
maiden river
#

I see

minor furnace
#

Time to try and find where the game stores the number of cards per row in collection view

minor furnace
neat plover
minor furnace
long urchin
minor furnace
#

no that was me talking to myself

long urchin
#

alright

minor furnace
#

sometimes it helps me think

neat plover
red flower
strong jacinth
#

Uhh, this works, for the first time

#

Then it is the standard +4 mult joker

manic rune
#

do you happen to only have one Chemical card made rn

strong jacinth
#

Yes

minor furnace
manic rune
#

thats probably why, it probably doesnt want to create duplicate cards

minor furnace
#

oh wait I didn't match the full line oops

manic rune
#

so since theres no Chemicals card left, it chooses Joker

#

-# just a theory

strong jacinth
#

But theres only the joker

manic rune
#

mhm

strong jacinth
#

Nopt the joker and the chemical

manic rune
#

its always the Joker afterwards, right?

mossy ivy
#

All locations where the word vampire shows up will be replaced with Werewolf? I hope that's how it works cuz that would be perfect with what I'm doing

strong jacinth
#

After anything, yeah

minor furnace
#

We're in business

manic rune
#

:3 Joker is probably the default placeholder for when there's no other card to search

#

had it happen to me when i only made 1 Relic for a Relic pack with 4 slots

minor furnace
#

now, can I get this thing to appear next to Saturn in order 🤔

red flower
#

can't you set a default object to objecttypes

granite turret
#

you can make infinite Jimbos if you run out of any class of Joker to collect

granite turret
#

same with any source that can't find more Jokers

strong jacinth
manic rune
#

dont you love it when your pc is so ass it corrects true to tonumber

#

:3

strong jacinth
#

I hate that

manic rune
#

i had it correct _ to a longass function before

minor furnace
tall apex
#

does anyone know the key for the red seal?

tall wharf
#

😭

tall apex
#

...

#

is it just red_seal?

tall wharf
#

i don't know if that will work

tall apex
tall apex
strong jacinth
manic rune
#

i think its Red

neat plover
long sun
tall apex
manic rune
long sun
#

mhm, done that

manic rune
#

then uhhhhhhhhhhhhhhhh

strong jacinth
#

Then set the type to animated atlas

manic rune
#

cycle through that

#

wait

strong jacinth
neat plover
long sun
#

will give that a go, thanks!!

strong jacinth
#

You gotta have frames and atlas_table

red flower
strong jacinth
manic rune
long sun
#

it's completely undocumented, as per usual 😭

indigo mesa
#

im tryna make it so this joker give +18 mult for every gold card in ur hand but it gives it for every scored gold card, what am i doing wrong?

      if context.before then
          card.ability.extra.gold_count = 0
          for i = 1, #context.full_hand do
              if context.full_hand[i].ability.name == "Gold Card" then
                  card.ability.extra.gold_count = card.ability.extra.gold_count + 1
              end
          end
      end
      if context.joker_main and context.full_hand == G.play.cards then
          return {
            mult = card.ability.extra.mult*card.ability.extra.gold_count,
            card = context.other_card
          }
      end
  end```
manic rune
#

-# guess im throwing this away

minor furnace
#

so I assume this is how the game decides the display order of the planets on the collection page

strong jacinth
indigo mesa
strong jacinth
red flower
minor furnace
long sun
manic rune
long sun
#

i didn't think it was an atlas thing 😭😭😭 sorry

manic rune
tall wharf
#

n where did you steal the description dummy

strong jacinth
#

How do i check the first card in a card area

red flower
tall wharf
#

😭

#

what are you using it for

red flower
#

displaying poker hands in the tooltips nicely

tall wharf
#

it is literally just a center but it does nothing but be a description dummy

minor furnace
long sun
#

so the docs say
frames: for animated sprites, you must provide the number of frames of the animation. Each row should contain one animation, with each column showing one frame.

indigo mesa
#

im highkey confused rn

strong jacinth
manic rune
#

...uh, thats not how you do it

long sun
#

does that mean that my sheet has to have a row with 19 frames? [the animation has 19 frames]

tall apex
#

it seems like everything i write gives me "expecting } to close line 1"

strong jacinth
#

How would i open the Debugplus cmd

indigo mesa
minor furnace
noble schooner
manic rune
# indigo mesa im tryna make it so this joker give +18 mult for every gold card in ur hand but ...
  calculate = function(self, card, context)
      if context.before then
          card.ability.extra.gold_count = 0
          for _,v in ipairs(G.hand.cards) do
             if SMODS.has_enhancement(v, "m_gold") then
                card.ability.extra.gold_count = card.ability.extra.gold_count + 1
             end
          end
      end
      if context.joker_main and context.full_hand == G.play.cards then
          return {
            mult = card.ability.extra.mult*card.ability.extra.gold_count,
            card = context.other_card
          }
      end
  end
strong jacinth
long sun
#

i think it's /

manic rune
#

on your keyboard

strong jacinth
#

Thats the american keyboard variant.

strong jacinth
#

Like which key

manic rune
#

to run commands, put "eval" first

EX:
eval print("hi mom")

long sun
#

like, idk if it'll work with this sheet

manic rune
minor furnace
tall wharf
strong jacinth
#

Next to? ex 3 and 1

manic rune
indigo mesa
manic rune
#

the code is shit, but look at it for reference

#

you dont have to make a new spritesheet

minor furnace
tall apex
#

hey goobers, is there any way to level down a hand?

manic rune
#

in love2d community too?? 😭

hushed field
manic rune
#

thought thats a general lua question

red flower
#

game devs are more likely to be beginners i guess

tall wharf
manic rune
#

true

tall apex
tall wharf
#

actually

#

i will add fire to everything

red flower
manic rune
#

just realized for the thing that only animates one card

#

the table actually doesnt save through the run

manic rune
#

cuz i forgot

#

:3

#

silly me

tall apex
tall wharf
#

hi

manic rune
#

goodbye

next timber
#

how would i go about making a joker retrigger via an edition?

neat plover
#

i give up

manic rune
#

:3

neat plover
#

idk why its so hard to create a card

manic rune
#

idk how

neat plover
#

but i fucking give up

indigo mesa
#

is there any way to check if the score sets on fire?

neat plover
#

8 fucking hrs

manic rune
neat plover
#

im so done

next timber
#

if score is greater than blind

manic rune
#

💀

#

dont give up just like that, noober

red flower
tall apex
#

rome isn't built in a day, just as skills aren't mastered in one

manic rune
#

sometimes we get stuck at those parts, but thats just something we have to overcome

red flower
#

i mean i literally sent a function that makes a random playing card

manic rune
#

when you get it working then you will also learn how to get it work faster, making you a better coder overtime

#

soooo yeah, dont give up :3

manic rune
tall apex
manic rune
#

i rewrote most of my shit at least 4 times already

tall apex
#

ever have a hand that you physically cannot score because it goes away when you select a card?

manic rune
#

its tiring as hell, but at least i know it will help me in the future

tall apex
manic rune
#

this shit used to be 15 lines

#

kill me

#

💔

next timber
#

oh damn looks like aikoyoris shenanigans has a function that does what i originally wanted big jokers to do before deciding itd be too hard

#

maybe

manic rune
#

if you are in doubt

#

check JoyousSpring

opal holly
#

hmm if i want to create a joker that gives +1 Ante on pickup how should i go about implementing that

tall apex
#

oh does anyone have the context to check for a specific hand type?

long sun
#

hmm. so even after making a new atlas, it's throwing this error

modern kindle
#

hello chatters, fine day

long sun
#

[this]

indigo mesa
#

checking scored chips is G.GAME.chips right?

modern kindle
#

yea, thats scored chips

manic rune
indigo mesa
#

bet ty

tall apex
#

mmmmmmmmmmmmmmm chip

manic rune
#

hello didly

indigo mesa
#

choclate chip cokies

modern kindle
#

bepis i thought u did it again

manic rune
#

:3 hehe

hard flume
#

Hi

modern kindle
#

ghost whats ur atlas code look like

opal holly
#

is the config just {ante = 1}?

manic rune
#

nop

long sun
#

atlas is this:

SMODS.Atlas {
  key = "Puffball",
  path = "Puffball.png",
  px = 71,
  py = 95,
  atlas_table = "ANIMATION_ATLAS",
  frames = 19
}```
manic rune
#

config is just something you save for future use

strong jacinth
#

Should work, yeah

neat plover
long sun
#

joker is this [temp ability]:

SMODS.Joker {
  key = 'puffball',
  loc_txt = {
    name = 'Puffball',
    text = {
      "Earn {C:money}$#1#{} for each",
      "{C:blue}hand{} remaining",
      "at the end of",
      "the {C:attention}round{}"
    }
  },
  config = { extra = { is_contestant = true, given_money = 2 } },
  rarity = 2,
  atlas = 'Puffball',
  pos = { x = 0, y = 0 },
  cost = 7,
  blueprint_compat = false,
  loc_vars = function(self, info_queue, card)
    return { vars = { card.ability.extra.given_money } }
  end,
  calc_dollar_bonus = function(self, card)
    if G.GAME.current_round.hands_left > 0 then
      return card.ability.extra.given_money * G.GAME.current_round.hands_left
    end
  end
}```
manic rune
#

me too noober, me too

long urchin
#

whats the command to send a message in the joker lua file again

manic rune
#

getting the description pages working wasnt easy at all, so i can relate to your pain

hard flume
#

I'm taking a small break, but I have all the mechanics for the Yume Nikki World figured out

manic rune
long sun
#

in case the issue is there

opal holly
strong jacinth
#

Try it, if theres an error we can help you, it will be faster.

long sun
#

there is

manic rune
manic rune
#

they really sent a ghost to bump

#

💔

long sun
#

-# 😭

manic rune
#

i have my own code to add animated sprites so never touched those before :3

modern kindle
#

well then give ghost ur freaking code nerd

long sun
#

i meeeeeeeean i wouuuuuuld use that

manic rune
#

i did

modern kindle
#

oh

manic rune
#

but honestly, he probably shouldnt use it

#

its shit lmfao

long sun
#

just, i'd prefer-

tall apex
#

i had a 'wait my code launched and didn't crash??' moment just to realize the joker im working on isn't loaded in LMAO

manic rune
#

its mostly just for reference if anything

modern kindle
#

if it works it cant be shit

long sun
manic rune
#

faoifmosa

#

MY BAD 😭

long sun
#

allg ^^

tall apex
manic rune
tall apex
long sun
#

just, i'd prefer to use SMODS's solution

#

batro golden_joker

manic rune
#

yeah, usually using something already provided by mods is better

strong jacinth
#

So uh, it should work. But can you show the lovely/dump/engine/sprite.lua:11

manic rune
#

-# i would use it too if i knew its existence 💔

long sun
#

suresure

manic rune
#

gotta get my github up tomorrow for wednesday's playtest bsr release

#

yipee

#

cant wait for everyone to marvel at how shit my mod actually is ❤️

long sun
#

hmm, i don't think i have the right file

#

self.zoom = true

modern kindle
zealous glen
#

bepis releasing the pepsi tomorrow

modern kindle
#

ive don a ton fo work on it

strong jacinth
long sun
#

ah no i found the right file

#

self.scale = {x=self.atlas.px, y=self.atlas.py}

manic rune
#

pepsi > cola smh

neat plover
#

will this work

modern kindle
#

root beer goated...

noble schooner
#

is there a way to automatically restart the game without having to exit out entirely?

neat plover
#

PEPSIMAN!!!!

neat plover
noble schooner
neat plover
manic rune
modern kindle
#

if you mean just an easier way to restart for testing purposes you can throw this in your main file

SMODS.Keybind{
    key_pressed = 'f5',
    action = function(self)
        SMODS.restart_game()
    end,
}

and then just press f5

but otherwise i have no idea on not closing the game at all

noble schooner
#

ah, alrighty

neat plover
manic rune
strong jacinth
modern kindle
manic rune
shell timber
manic rune
#

-# is that sarcasm

shell timber
#

no

hushed field
#

m

modern kindle
#

hello ice

tall apex
#

am i the stupid tm?? i dont see the skissue ;w;

neat plover
#

im crying

modern kindle
#

hi crying, im Dilly_The_Dillster

#

(what ails you)

neat plover
#

I CANT FUCKING BELEIVE THE CODE WAS IN THE MAIN CODE THE WHOLE TIME

i cant stress this enough, 8 HOURS TO COPY TWO LINES OF CODE

modern kindle
#

it happens, it took me awhile to get things started before

shell timber
#

programming is just like that sometimes

modern kindle
#

i know for one joker of mine i had to leave it half functional for a cople of weeks before coming back to it

#

and then realizing it wasnt as hard to get

manic rune
#

lets not talk about me getting the retrigger_joker wrong for 1 ENTIRE WEEK

tall apex
manic rune
#

:3

neat plover
#

but i can finally sleep tonight!! :3

modern kindle
#

sometimes the secret is sleeping

unironically ive been stuck on problems, will sleep, and then my dream self will reveal the code to me

long sun
#

alright so i've found whereabouts the issue is

#

removing:

atlas_table = "ANIMATION_ATLAS",
frames = 19```
works
shell timber
#

even just walking away can help

long sun
#

as in, it doesn't crash

#

maybe i need to update my SMODS then

tall apex
strong jacinth
tall apex
#

frame 1 overshadowed message oml

manic rune
#

not animate though

long sun
#

aware

#

trying to figure out why adding that breaks it

strong jacinth
#

You sure theres 19 frames?

long sun
#

mhmhm

#

8 + 8 + 3

hushed field
# modern kindle hello ice

what's up. I'm immediately reminded of what thing it is this time that I forgot to do in my latest Kino update, haha. I'll make sure to add you to the credits proper when I have time

tepid crow
strong jacinth
manic rune
#

i dont think the number of frames should cause the crash, since its just reading the png file and positioning the sprite

long sun
#

no

tall apex
strong jacinth
#

Then why 8 + 8 + 3?

tall apex
manic rune
#

its like if i set my sprite_pos to {x = 1000, y = 1000}

tall apex
#

mfw working on the wrong file

modern kindle
long sun
#

that's what it was in the old atlas

manic rune
#

it will just show nothing

long sun
#

i moved everything around in the new one

strong jacinth
long sun
#

mhmhm. i don't have those though

strong jacinth
#

You sure it is referencing the new atlas?

tepid crow
long sun
#

yeah

strong jacinth
#

And you have it in both 1x and 2x

long sun
#

yeah

modern kindle
#

i didnt even know atlas_table used frames in it, i was seeing aiko not use them but maybe its cause it was a diff situation

long sun
manic rune
#

I'm taking that

modern kindle
#

im sending it to my lady, shes an ornithologist as well so i think it fits

hushed field
modern kindle
strong jacinth
long urchin
#

i cant find the code that changes the idol's selected card or mail-in rebate's selected rank, does anyone know how i can choose a random rank based on whats in the deck?

long sun
strong jacinth
#

They are the same size...

manic rune
#

then takes the suit/rank from there, dunno

neat plover
#

ok, before i have a mental breakdown, someone tell me how to put an ENHANCEMENT oon the created card

long sun
zealous glen
#

I forget the one to select a single item tho

strong jacinth
#

the two that you sent are, afamms

zealous glen
#

look for pseudorandom or pseudoshuffle

long sun
#

2X fills the screen

#

1X does not

manic rune
strong jacinth
#

True, sure that they are the exact same name?

long sun
#

ya

tall apex
#

waiwaiwai is this a nil value? this is what the arm is doing

modern kindle
tall apex
#

its attemting to index a nil value on the top line

manic rune
#

G.P_CENTERS.m_wild, pretty sure

long urchin
manic rune
#

it will probably crash

#

G.playing_cards doesn't exist outside a run

#

and you need to grab its rank too

#

what pseudorandom_element(G.playing_cards) does is picking out a random card from your deck

#

afterwards, you need to manually get its rank/suit for your joker to use

strong jacinth
brisk basin
#

I know this joker is broken in terms of balance but it is also broken in terms of code and i dont know how to fix it

modern kindle
#

thats a nice 2 you got there

brisk basin
#

ye xd

#

im not really sure how to fix it, in fact i dont really know how i made that joker in the first place

#

too much trial and error

modern kindle
#

well until youve posted your code nobody will be able to help too much, so id prob start there

tall apex
#

does anyone know why xchips is being considered a nil value here?

#

i declared it as 1 x-x

brisk basin
#

xChips in the config table doesnt exist, xChips_gain is duplicated

#

thanks discord

#

i really appreciate removing all tabs

tall apex
#

same issue :(

#

it does the mult fine, but not the chips

warped marsh
#

im having a weird texture issue, here i have my Joker sprites lined up nicely and for the square one you can see a thin line of pixels, even though there isnt any pixels present

warped marsh
#

are these type of Jokers supposed to be arranged differently/coded?

noble schooner
#

sorry, had to point that out

warped marsh
#

Vegetable Juice!

tall wharf
#

i don't have that problem i think

#

maybe because i use a python script to rescale my image

warped marsh
#

hmmm its not a big deal but just looks weird

noble frigate
#

hey chat quick question idk but debugplus is brokey and idk what happened

#

anyone else have weird keybinding issues?

scarlet spire
#

is there a way to block custom planet cards from being created by blue seals? I'm making a bunch of planet cards build around unique effects for existing hand types, but the hand type config can't be empty or else it crashes, and if I set it to an existing hand type it overrides the vanilla planet for that hand type from appearing via blue seal

mellow widget
#

what is the sizes of the sprites in 2x and 1x?

noble frigate
#

scratch that another mod was interfering kek

mellow widget
neat plover
#

AFTER SO MUCH HARD WORK? IT FINALLY PAYSOFF

#

IM SO DONE

indigo mesa
#

for checking if the score sets on fire it would be like this, right?

        if context.after then
            if G.GAME.chips > G.GAME.blind.chips then
                return {
                    Xmult = card.ability.extra.Xmult,
                    message = localize { type = 'variable', key = 'a_Xmult', vars = { card.ability.extra.Xmult } },
                    message = 'X' .. card.ability.extra.Xmult,
                    colour = G.C.MULT
                }
            end
        end
    end,```
long urchin
#
SMODS.Atlas{
    key = 'Welder',
    path = 'Welding Mask.png',
    px = 71,
    py = 95
}

function reset_weld_rank()
    G.GAME.current_round.weld_card.rank = 'Ace'
    local valid_weld_cards = {}
    for k, v in ipairs(G.playing_cards) do
        if v.ability.effect ~= 'Stone Card' then
            valid_weld_cards[#valid_weld_cards+1] = v
        end
    end
    if valid_weld_cards[1] then 
        local weld_card = pseudorandom_element(valid_weld_cards, pseudoseed('weld'..G.GAME.round_resets.ante))
        G.GAME.current_round.weld_card.rank = weld_card.base.value
        G.GAME.current_round.weld_card.id = weld_card.base.id
    end
end

SMODS.Joker{
    key = 'welder',
    loc_txt = {
        name = 'Welder Joker',
        text = {
            'Played {C:attention}#1#\'s{} become {C:attention}steel{},',
            'rank changes every round'
        }
    },
    atlas = 'Welder',
    rarity = 1,
    pos = {x = 0, y = 0},
    config = { extra = {
            rank = 'Ace'
        }
    },
    loc_vars = function(self,info_queue,card)
        return {vars = {card.ability.extra.rank}}
    end,
    calculate = function(self,card,context)
        if context.end_of_round and context.game_over == false and context.main_eval then
            reset_weld_rank()
        end
    end
}``` so i copied the code from the mail in rebate- would this work?
modern kindle
indigo mesa
#

so how do i check for the number of chips scored in a hand?

#

imma try to find out, ty

dense vector
warped marsh
dense vector
#

The triple baka and PoPiPo jokers I mean

#

💀

warped marsh
#

Thank you

#

There’s a reason why I have glasses

dense vector
#

I have glasses too but I pay extra attention

warped marsh
#

Wait so how do I have to shift them?

dense vector
#

Or hyperfixate on certain things

#

You move the PoPiPo joker up by one pixel

#

Problem solved

warped marsh
#

Okay

#

Jesus thank you

#

It’s been bugging me

long sun
#

just wondering, is there a way to make a joker unable to be destroyed, and to run code when something tries to destroy it?

neat plover
#

this joker is frying my brain

#

create 3 wild cards when blind is selected, if a wild card is the highest scored card, x2 mult and gains x0.5 mult

old bane
neat plover
#

ik, its a comparison

old bane
#

can you send a ss so i can see

neat plover
neat plover
next timber
#

yes but which line is 53

faint yacht
#

...is Talisman involved?

high eagle
#

how would i summon a specific joker i made?

#

(so i can check if it works)

formal parrot
#

Mod*

#

Hold tab and you’ll see the stuff you can do

#

Discover /summon / duplicate/copy

high eagle
#

i seee! ty

formal parrot
#

Good luck modding

neat plover
next timber
#

ugh wtf is gros michael doing this time

old bane
# neat plover its up

is it this?
if context.scoring_hand[i].config.center > card.ability.extra.highest_ranked then
or this?
if context.scoring_hand[card.ability.extra.high_id].config.center == G.P_CENTERS.m_wild then

high eagle
formal parrot
high eagle
#

no debug menu

formal parrot