#💻・modding-dev

1 messages · Page 462 of 1

tropic timber
#

sweet thanks !

wild escarp
#

How do I set a cards rank?

daring fern
tropic timber
#

is there any way to for lack of a better word, "spawn in" a joker for testing purposes?

tropic timber
# daring fern Yes.

thats great :D could you direct me to where i could find the documentation on this? (or just tell me if thats easier lol)

tropic timber
#

thank you !!

wild escarp
#

How would I upgrade a specific hand in a joker?

daring fern
gilded blaze
#

@red flower oh btw
SMODS.merge_effects' behavior with retriggers is rather weird

wild escarp
#

How can I stop this from drawing when the joker is undiscovered?

draw = function(self, card, layer)
    if (layer == 'card' or layer == 'both') and card.sprite_facing == 'front' then
        local scale_mod = 0.05 + 0.05 * math.sin(1.8 * G.TIMERS.REAL) +
            0.07 * math.sin((G.TIMERS.REAL - math.floor(G.TIMERS.REAL)) * math.pi * 14) *
            (1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL))) ^ 3
        local rotate_mod = 0.1 * math.sin(1.219 * G.TIMERS.REAL) +
            0.07 * math.sin((G.TIMERS.REAL) * math.pi * 5) * (1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL))) ^ 2

        local image = Sprite(0, 0, 71, 95, G.ASSET_ATLAS["willatro_WillatroOrgans"], {x = 1, y = 0})
        image.role.draw_major = card
        image:draw_shader('dissolve', 0, nil, nil, card.children.center, scale_mod, rotate_mod, nil,
            0.1 + 0.03 * math.sin(1.8 * G.TIMERS.REAL), nil, 0.6)
        image:draw_shader('dissolve', nil, nil, nil, card.children.center, scale_mod, rotate_mod)
    end
end
daring fern
pastel maple
#

how do i stop my Bass-Bamb joker's Sprite not showing?

urban wasp
#

how do i make a joker have a numerator other than 1 in its probability?

daring fern
urban wasp
#

i don't believe so

daring fern
gilded blaze
urban wasp
pastel maple
#

oh mb it's showing nothing

daring fern
frigid cargo
#

how do i make it so a joker checks if the score of the hand played is equal to or greater than the blind size?

urban wasp
#

(or i might just be unlucky)

daring fern
urban wasp
#

that'll probability do it

flat mist
#

{
"id": "joker_one_punch_man",
"name": "One punch man",
"description": "Your hand size is 1. Played hands gain x5 mult.",
"type": "joker",
"rarity": "3",
"effect": {
"on_start_turn": {
"set_hand_size": 1
},
"on_hand_played": {
"multiply_score": 5
}
},
"art": "tunnel_vision.png",
"price": 10,
"tags": ["hand_size", "multiplier"]
}

Will this code work I made it using chatgpt . Set hand to 1 and give 5x mult

shell timber
#

uh,

#

No

#

you should learn the basics of lua and look at the smods wiki. chatgpt wont help you

#

it doesnt know anything about making balatro mods

#

or at least not that i know of

flat mist
#

Hmmm

frigid cargo
#

learning the basics of lua is very easy, it shouldnt be that hard. you can also check for references from other mods or online.

crisp coral
#

wtf gpt got joker tags before smods

viral ember
#

I know about SMODS.change_play_limit but is there a way to get the play limit?

crisp coral
#

that's insane

daring fern
viral ember
#

lemme check

#

sick

#

thanks so much!

tropic timber
#

Can't seem to find it on the wiki, how do you check what enhancement a playing card has?

unborn bay
#

SMODS.has_enhancement

manic rune
#

or SMODS.get_enhancements to get a table of what enhancements the card has

tropic timber
unborn bay
#

yep

#

like m_glass

fallow breach
#

does anyone know why the game would crash when you hover over your custom joker

tropic timber
# unborn bay like `m_glass`

sweet thanks :^) is there a reference somewhere for the name of each one? im specifically looking for the mult enhancement but cant find it

manic rune
fallow breach
manic rune
#

- whats the crash log
- whats the code

fallow breach
#

here's the code for it. ignore the funny stats it was just for testing

manic rune
#

unrelated but use mult instead of mult_mod :3

fallow breach
#

i don't know much about lua i've just been copying off of example code so i'm curious why it's crashing

#

the art and price show up fine in the shop but as soon as my mouse goes near it, it crashes

manic rune
#

vars in your loc_vars should be a table

#
loc_vars = function(self, info_queue, card)
  return{vars = {card.ability.extra.mult}}
end,
hasty mist
#

how would i check if the current joker is in the rightmost joker slot

fallow breach
manic rune
#

i did, send the code above

#

but uh

#

this part right here needs to be a table

fallow breach
#

alrighty

manic rune
hasty mist
#

tyty

#

which game variable stores the current ante?

manic rune
#

G.GAME.round_resets.ante? 🤔

#

could be wrong though, lemme check

#

yeah nevermind its correct

hasty mist
#

tyty

drowsy heath
#

So if I wanted a joker to remove hands and grant an xmult what would the calculate look like as such removing all hands but one and granting 5x mult

#

Because I'm a little confused as the context is different

#

Never done such thing before

tropic timber
#

hmmmm can anyone help me find out what's causing the error to throw? it looks like some bracket mess-ups but they seem to be all properly closed to me 🤔

hasty mist
#

is there a way to detect specifically when a boss blind is defeated?

hasty mist
#

how?

daring fern
daring fern
tropic timber
tropic timber
daring fern
tropic timber
#

was so caught up looking for brackets i didn't think about commas XD

tropic timber
#

i have

fallow breach
# fallow breach

does anybody know what's causing the extra yellow box text to appear after the initial "+6 mult" red box

fallow breach
#

so that doesn't remove the initial +6 mult message as well?

fallow breach
#

ah okay thanks

#

i'm reading this annotated lua code (from examplejokers mod) and some of the stuff they're saying is slightly off

frigid cargo
#
            if #context.full_hand == 1 and context.destroy_card == context.full_hand[1] and G.GAME.current_round.hands_played == 0 then
            return {
                remove = true
            }
        end```
i wanna make a variable increase but i cant put it in the return, where else can i put it?
daring fern
frigid cargo
#

oh, it was just not working earlier. ok thanks

tall wharf
#

wait no i meant

#

what guide are you following

tall wharf
#

soooo

#

i think you might want to look at vanillaremade

subtle merlin
#

Question: why can't I do SMODS.create_card({set = "Joker", area = G.jokers, key = G.jokers.cards[1].key}) to create the joker in the first slot? Ik G.jokers.cards[1].key works (It just makes a random joker)

rapid stag
formal parrot
#

Use a local variable

manic rune
subtle merlin
vast night
#

Hi Everyone. I have a rather hard question. I've already asked it yesterday and thankfully N gave me a hint, but also after looking in the source code and other mods, i still cant find out how to use G.STATE to create a new "Screen" (I want to have some sort of countdown with two tags displayed)
Edit: I know that each "state" is a screen (G.STATES.SELECTING_HAND = 1, G.STATES.TAROT_PACK = 9, etc.) so the last thing i need to know is how to create a state and how to define what comes in that state. (And what conditions there are to needing to modify the state)

summer furnace
#

Hey there! For some reason this line here crashes the game if jokerExists('j_FinusHD_totk') then decrementingTickEvent('j_FinusHD_totk',0) end With it saying attempt to call global 'jokerExists' [a nil value]

vast night
summer furnace
#

Oooooh, okay that makes sense hahaha

#

I thought that was like a standart method but no lmao thx

vast night
#

btw

#

while i was searching for something i found this
find_joker('Chaos the Clown')

summer furnace
summer furnace
vast night
summer furnace
vast night
#

its an easyer language for me tho so i alwways speak it when i dont need to speak english

summer furnace
#

makes sense

summer furnace
#

So I am trying to make an animated joker, but it for some obscure reason stretch the hell out on the vertical axis 😭
(first image is the strechted version the right is what it's supposed to be)

I am trying to "borrow" the yahimod code for subway surfers for that, but the code that is from that mod is credited (1/2)

    key = 'totkanim',
    path = 'highlighsvid.png',
    px = 71,
    py = 96
}

SMODS.Joker {
    key = 'totk',
    atlas = 'totkanim',
    pos = {x=0, y=0},
    cost = 6,

    pixel_size = { w = 71 , h = 96 },
    frame = 0,

    unlocked = true,
    discovered = true,
    blueprint_compat = false,
    eternal_compat = true,
    perishable_compat = true,

    config = {extra = {chips = 871,77, mult = 23}},
    loc_txt = {
        name = 'Willkommen zu den TOTK Highlights',
        text = {
            'Gibt die Anzahl an',
            '{C:chips}Chips{} basierend auf',
            'die total View Duration',
            'von allen TOTK Highlights,',
            '{C:mult}Mult{} basierend auf',
            'die Anzahl an TOTK Highlights',
            'und {C:money}Geld{} basierend auf',
            'die Einahmen von allen',
            'TOTK Highlights'
        }
    },

    calculate = function(self, card, context)
        if context.joker_main then        
            return {
                chip_mod = card.ability.extra.chips,
                mult_mod = card.ability.extra.mult, 
                message = 'Willkommen zu den Tears of the Kingdom Highlights, mit mir FinusHD!',
                sound = 'FinusHD_totksfx'
            }
        end
    end,

    calc_dollar_bonus = function(Self, card, context)
        return 0
    end
}```
#
local upd = Game.update
function Game:update(dt)
    upd(self, dt)
    -- tick based events
    if ticks == nil then ticks = 0 end
    if dtcounter == nil then dtcounter = 0 end
    dtcounter = dtcounter+dt
    dt = dt

    while dtcounter >= 0.010 do
        ticks = ticks + 1
        dtcounter = dtcounter - 0.010

        if SMODS.find_card('j_FinusHD_totk') then decrementingTickEvent('j_FinusHD_totk',0) end
    end
end

-- Yahimod lmao
function decrementingTickEvent(type,tick)
    if math.fmod(ticks,12) == 0 then
            local _subcardcenter = G.P_CENTERS.j_FinusHD_totk
            _subcardcenter.frame = _subcardcenter.frame + 1
            local _fr = _subcardcenter.frame
            _subcardcenter.pos.x = math.fmod(_fr,16)
            _subcardcenter.pos.y = math.floor(_fr/16)
            if _subcardcenter.frame > 253 then _subcardcenter.frame = 0 end
        end
end``` (2/2 sry for the huge wall of text lmao)
copper thorn
#

why isn't my decks texture here ?

formal parrot
#

Probably

copper thorn
#

(and yes my texutres are in the asset folder)

formal parrot
#

Send a screenshot of the sprite

copper thorn
#

the pos was indeed wrong i might have miss types

#

typed*

#

sorry for the lagyy asf recording my pc handles badly obs

formal parrot
#

Maybe check your atlas id

#

It should be different if they’re in different atlases

#

Wait is the background the problem ?

copper thorn
copper thorn
formal parrot
#

You sure G.jokers is correct ?

#

Wait

#

Oh

#

You forgot add to deck

copper thorn
#

it is here

formal parrot
#

Hmmm

#

You know that

#

This only

#

Emplaces the last card right ?

#

You have to do it after each addition of joker

copper thorn
#

seems*

formal parrot
#

Try that

copper thorn
#

still does it

formal parrot
#

Emplace and add to deck

#

For each card

copper thorn
#

i forgot the emplace part x)

#

now it works thanks :)

formal parrot
#

Cute boys

copper thorn
#

indeed

crisp coral
#

for future reference, SMODS.add_card is a function added that does the same thing as create_card then add_to_deck

formal parrot
#

Try using add_card inst

#

Lmao i was gonna say it

#

Thanks myst

copper thorn
feral tree
#

First time trying to do retriggers and such, trying to make a joker that's basically double sided blueprint

#

any tips?

copper thorn
#

have you tested it like this ?

formal parrot
copper thorn
#

but i rhink you should add a repetition = 1 in the config part

formal parrot
#

To do repetetions=

copper thorn
formal parrot
#

Jokers that double values , etc

feral tree
#

hol up so the rest of the code is correct??

copper thorn
#

it should be yeah

#

i don't see no issues

formal parrot
#

Depends on if you’re trying to trigger jokers or card

#

Or both

feral tree
#

jokers

formal parrot
#

G.jokers.cards

#

Or G.jokers

#

I the card area for jokers

tight hull
#

hi, does someone know how to change a sound using a mod? bcs im getting a brain aneurysm using gpt (I cant find any mods that do that, thats why im using gpt)

formal parrot
#

What do you want to do exactly

#

Like

#

Just play a sound ?

#

(ai won’t help )😭🫡

tight hull
tight hull
formal parrot
#

Do you know the basics of modding by any chance

#

Also you sound need to be ogg format ( you can find a convertor online )

tight hull
formal parrot
#

Okay i can help

#

But listen okay ?

tight hull
#

thnx

tight hull
formal parrot
#

Some people genuinely are brain dead , its simple just follow what i tell you to😭

#

Do you have any code editing software? Vscode preferably

tight hull
#

is notepadd++ ok?

formal parrot
#

Sure

#

You’re gonna make a basic mod folder

#

You need to file codes

#

First is .lua
Second is .json

#

Mods
└──your mod name
├── code.lua
└── assets
└── sounds
├── sound.ogg

tight hull
#

i have it like that

formal parrot
#

Great

tight hull
#

can assets be Assets or does it need to be "a"

formal parrot
#

No

#

Is your.json file full ?

#

Or empty file

tight hull
#

empty

formal parrot
#

Okay 1 sec

#
    "id": "VSMODS",
    "name": "Vanilla SMODS",
    "author": ["someone23832"],
    "description": "Turns some vanilla jokers into an SMODS format, and changes them to give some examples of what you can do.",
    "prefix": "mvan",
    "main_file": "ModdedVanilla.lua",
    "badge_colour": "c7638f",
    "dependencies": [
        "Steamodded (>=1.0.0~ALPHA-1225a)"
    ],
    "version": "1.0.0"
}```
#

Put this in your .json

#

And change the needed stuff

tight hull
#

ok, give me a sec

formal parrot
#

(Main_file)

formal parrot
tight hull
#

what is a prefix?

formal parrot
#

Its an identification for your mod

#

Name it whatever

tight hull
#

Oh ok

tight hull
formal parrot
#

Great work

tight hull
#

what should be the .json called? can it be mod.json?

formal parrot
#

Anything

tight hull
#

ok

formal parrot
#

But the lua file should be the same name inside the .json

#

In main_file

tight hull
#

its the same

formal parrot
#

Great

#

Now you’re gonna edit your lua file

tight hull
#

ok

formal parrot
#

You’re gonna do this

drowsy heath
#

so erm i knda need help i tried to restructure idol to only chose a rank and just wipe that rank out of the deck at the end of the round but its not working and i have no idea why

formal parrot
#

 path = {
     default= 'my_sound.ogg'
 }
Key=“something”,}
hasty mist
#

can jokers have the hidden attribute and appear in spectral packs

formal parrot
#

Uhhh ? No?

#

Okay which sound do you want to replace now ?

tight hull
#

whoosh1.ogg

hasty mist
#

okay hm

#

what is the soul_set parameter for buffoon packs

formal parrot
tight hull
#

thats the sounds name

#

or do you mean that to play my sound instead of this one? (like in one instance, and not to replace it permanently)

formal parrot
#

Oh

#

There’s a sound ingame called whoosh ?

#

Qqlmao

tight hull
#

yeah

formal parrot
#

Okay wait let me see

tight hull
#

it plays when the game is opened

formal parrot
#

Ohhh

tight hull
formal parrot
#

Okay

#

I CANT FIND THE KEY FOR THAT SOUND

#

F

tight hull
#

damm 😔

formal parrot
#

You should do something like this

#

Look for it in game code

tight hull
#

the first instance of it is on line 1435

#

but its just to play it

formal parrot
#

Check other files

tight hull
#

ok

formal parrot
#

Replace :

#

self:create_replace_sound(replace)

#

Try using the file name instead of key

tight hull
formal parrot
#

Like this

#

self:create_replace_sound(“whoosh.ogg”)

formal parrot
tight hull
tight hull
formal parrot
formal parrot
#

After key=

tight hull
#

oh ok

drowsy heath
#

what should i be using bcoz i tried everythig befre this lmao at that point i gave up and put anything i can think of

formal parrot
#

You need to do a for loop in playing_cards and when v==your card
Return {remove=true}

tight hull
# tight hull oh ok

it should look like this?```
SMODS.sound={

path = {
default= 'Witches_call.ogg'
}
Key="call",

self:create_replace_sound("whoosh1")
} or like thisSMODS.sound={

path = {
default= 'Witches_call.ogg'
}
Key="call",}

self:create_replace_sound("whoosh1")

formal parrot
#

1st

tight hull
#

ok

formal parrot
#

Add a ,

#

After path

#

After the }

tight hull
#

ohh

formal parrot
#

Yeah lua tend to do it a lot lmao

formal parrot
#

Local Card=your chosen card
For _,v in inpairs (context.playing_cards) do
If v==card then
Return {remove=true }
End
End

tight hull
formal parrot
#

For you the card is called deathnote

formal parrot
#

Did it crash ? Or just didnt work

tight hull
#

it still crashes

formal parrot
#

Oh

#

Can you screenshot your code

tight hull
formal parrot
#

You’re missing ,

#

After key=“call”

#

Wait i’ll send you a clean version

tight hull
#

ok

formal parrot
#
SMODS.sound={

 path = {
     default= 'Witches_call.ogg'
 },
Key="call",
self:create_replace_sound("whoosh1")
}```
#

Wait

#

Alright

#

This should work

tight hull
#

smth else now

formal parrot
#

Ohhh

#

Wait lemme double check

#

@daring fern NEED HELP

#

you might need to include

#

A function

tight hull
formal parrot
#

Ohhh

#

Got it

#

I think

tight hull
#

and yet im still here

formal parrot
#

Replace =function(self)
Return {self:the rest of the line}

#

End

#

I think !

#

Keyword think

#

Man i really don’t know

#

Wait

#

@tall wharf

#

HELP !!

tall wharf
#

hi

tight hull
#

hi

formal parrot
#

They want to replace a sound ingame

#

But i’m stupid and idk how

#

(I tried )

tight hull
formal parrot
#

😭sorry i couldn’t help

tight hull
#

or smth (idk if i translated it good)

tight hull
#

i didnt saw any mods that do that so its probobly hard

tall wharf
#

what do you want to replace

formal parrot
formal parrot
#

When you open the game

crisp coral
#

add replace = "whoosh1"

formal parrot
#

💀

tall wharf
#

doesn't replace = "whoosh1" work

formal parrot
#

I’m gonna kill myself

tight hull
tall wharf
#

SMODS.Sound

tight hull
tight hull
#

where do I put it? (the thing that im replacing with)

formal parrot
#

Aiko please stab me and throw my body in a bathtub full of acid

crisp coral
#
SMODS.Sound{
    key = "key",
    replace = "whoosh1",
    other variables
}
vast night
#

It's a me again.
I gave up on making a new ui since i for the love of god coulddnt find the code where ui defs are stored.
But I had another question. Is it theoretically possible to make some sort of notification popup. Like ik how to make ui but not how to make a persistent one that goes over every item and moves in and out

tall wharf
crisp coral
#

omw asking hiiragi to dmca aikoshen

tall wharf
#

😭

gilded blaze
#

how it feels to implement custom background music in story mode

tight hull
#

idk if thats what you are looking for

gilded blaze
#

mine only replaces vanilla when in story mode

tight hull
#

idk what a story mode is

gilded blaze
tight hull
#

oh

#

sorry but thats beyond my comcompetences

formal parrot
hasty mist
#

how do you use create_card to make a specific joker

vast night
#

And a second question: how can i make an event or function run after a set time

tight hull
formal parrot
hasty mist
tight hull
#

 path = {
     default= 'Witches_call.ogg'
 },
Key="call",
Replace =function(self)
Return {self:create_replace_sound("whoosh1")},
}```
hasty mist
#

a specific joker

#

not a joker set

formal parrot
#

I think add_card does that

#

 path = {
     default= 'Witches_call.ogg'
 },
Key="call",
Replace=“whoosh1”,
}```
#

Try this

formal parrot
hasty mist
#

it does

#

figured it out

tight hull
formal parrot
#

Good news is

hasty mist
#

i remembered that more fluff does it

tight hull
#

good news is that it doesnt crash

crisp coral
formal parrot
#

Lmao

tight hull
#

and bad that it doesnt work

formal parrot
#

yeah i’m on phone i have auto caps lock on

#

:3

crisp coral
#

the former

tight hull
#

im not an native english speaker so idk what that means

#

sorry

crisp coral
#

Sound{

tight hull
#

ok

#

IT WORKS

tight hull
#

if anyone is curious it sounds like complete ass

formal parrot
tight hull
#

for some reason it plays 3 times?

#

but that might be bcs the file is too long

formal parrot
#

Change them

tight hull
#

ok

formal parrot
#

Good luck

tight hull
#

thnx

#

i will need it

obtuse silo
#
            ch_c_mintconditioncards_money_limit = "Money held can not exceed {C:money}$#1#{}"
        }```
i want to create a challenge's restriction description but this just crashes the game on load
tight hull
#

bcs i dont understend a single bit of whats here or how to reverse it (its the part that plays the sound) ```if card.T.scale <= 0 then
if temp_i < 30 then
play_sound('whoosh1', temp_pitch + math.random()0.05, 0.25(1 - temp_i/50))
end

                            if temp_i == 15 then
                                play_sound('whoosh_long',0.9, 0.7)
                            end
                            G.VIBRATION = G.VIBRATION + 0.1
                            card:remove()
                            return true
vast night
#

Ok i hope this reaches the correct person:

Does anyone know how i can hook up a new state to a UI Screen. I've heard hardly anyone has done that. Please i need help

tall wharf
#

useful joker award

obtuse silo
#

the "the" rarity really sells this

humble matrix
#

im trying to make certain jokers in my booster pack show up less than other jokers and this doesnt work, knowing me im 100% doing something incredibly wrong (this is in the objectType btw)

obtuse silo
formal parrot
drowsy heath
tawdry oriole
#

how would i make different sell conditions for different jokers without overwriting one another's can_sell_card function?

tight hull
stiff quiver
#

hi i wanted to change the base game music but i dont understand what this means in the wiki, what code does it refer to? Your track's sound code must contain the string music if you are using this.

manic rune
obtuse silo
#

actually, one more thing
i want this hook to reduce the money to the money limit if the money exceeds the limit
but it's not doing anything

manic rune
#

this is what myst's firebird does

#

im guessing your if statement doesnt go through? 🤔

#

try putting a print in there to see

formal parrot
#

Lr haven’t you coded anything yet

stiff quiver
formal parrot
stiff quiver
#
SMODS.Sound{
  key = "BOOM",
  path = "BOOM.wav",
  select_music_track = function (self)
    return 99999999999999
  end
}
formal parrot
#

This is not how you replace

#

Also

#

Self doesn’t exist here

stiff quiver
#

oh

formal parrot
#

 path = {
     default= 'sound.ogg'
 },
Key="call",
Replace=“sound 2”,
}```
#

This is how to replace

#

Find “Sound 2” in the game code

#

The string for the main menu

obtuse silo
stiff quiver
#

ok thanks

obtuse silo
#

[behind the text is 14$ btw]

manic rune
#

mm the if statements are wrong then

#

idk watchu doin tho, is this limiting payout to a certain number?

obtuse silo
manic rune
#

oh, i think i see whats wrong

tawdry oriole
manic rune
#

the first one is checking whether G.GAME.modifiers is "money_limit", aka when its a string, and the second one seems to use G.GAME.modifiers like a table?

#

im pretty sure G.GAME.modifiers is a table anyways, so the first check is wrong 🤔

obtuse silo
#

oh
so how else would I check for the current rule

humble matrix
next timber
#

how do i make a shader always apply to a joker? i know ill need to use a drawstep of some kind most likely but i. do not understand drawsteps at all

manic rune
shell timber
#

isnt there a draw function on the joker

next timber
#

well yes but as stated i dont understand jack shit about it

stiff quiver
formal parrot
#

You can give it a table

#

Check the wiki

obtuse silo
tight hull
#

I have a mod that changes tarot cards and planet cards, is there any way to make a menu ingame to for example turn off the planet texture and only show the tarot card one?

formal parrot
#

Which is

#

HARD

tight hull
#

there is a first time for everything no?

stiff quiver
#

if im understanding correctly this should make the title song the song in the path right? ```lua
SMODS.Sound{
key = "BOOM",
path = "BOOM.wav",
replace = "music1"
}

red flower
humble matrix
hasty mist
#

im so confused

humble matrix
#

stupid game stop crashing

hasty mist
#

it was JUST working

tight hull
#

does it work?

tight hull
#

might be an old upload or smth tho

stiff quiver
#

i'll try with .ogg

#

cause currently it just disables all sound

humble matrix
tight hull
#

just a little bit

stiff quiver
#

Still nothing ```lua
SMODS.Sound{
key = "BOOM",
path = "BOOM.ogg",
replace = "music1"
}

formal parrot
#

You sure its the correct one

tight hull
formal parrot
#

There’s another method @stiff quiver

stiff quiver
formal parrot
stiff quiver
#

is that something balatro does or something i did wrong?

formal parrot
#

I think it slows it or something

#

Idk😭

tight hull
empty solstice
#

Making a simple deckskin mod using the example and there's both skin pngs and icon pngs. Does someone here know what the icon ones are used for?

gilded blaze
stiff quiver
#

i just had to change the pitch value to 1, now its correct

#

thanks you two!

formal parrot
#

No problemo

tight hull
tight hull
red flower
#

if it still shows the error then then some card has a bad return

empty solstice
# tight hull what do you mean?

I actually just found the answer in the documentation. I guess it's for the suit icons which... I currently have as part of the card images, but I guess I'm not supposed to.

gilded blaze
#

uh, how do I use that in this mess

#

💀

tight hull
#

damm

#

i didnt look into making deck skins yet

empty solstice
#

That seems to be what it's implying.

red flower
#

the problem is if one of them is nil you end up with a table like {extra = {}}

gilded blaze
#

💀

#

I mean, it's just a warning

red flower
#

do the work

gilded blaze
#

that during context.repetition, repetitions = num isn't returned

empty solstice
tight hull
bold gyro
#

Hey y'all, I'm trying to replicate those speech bubbles that Jimbo uses, based on vanilla code and code from the Partner mod. I seem to be very close to getting it to work, but for some reason no text is showing up.

function G.UIDEF.tf_speech_bubble(input_key)
    local text = {}
    localize{type = "quips", key = input_key, nodes=text}
    local row = {}
    for k, v in ipairs(text) do
        row[#row+1] = {n=G.UIT.R, config={align = "cl"}, nodes=v}
    end
    local t = {n=G.UIT.ROOT, config = {align = "cm", minh = 1, r = 0.3, padding = 0.07, minw = 1, colour = G.C.JOKER_GREY, shadow = true}, nodes={
        {n=G.UIT.C, config={align = "cm", minh = 1, r = 0.2, padding = 0.1, minw = 1, colour = G.C.WHITE}, nodes={
            {n=G.UIT.C, config={align = "cm", minh = 1, r = 0.2, padding = 0.03, minw = 1, colour = G.C.WHITE}, nodes=row}
        }}
    }}
    return t
end
red flower
humble matrix
#

so i would just put something like

#

key = 'legendary' or something

red flower
#

'Legendary' but yes

humble matrix
#

ok now the game doesn't crash when loading but crashes when the booster is about to open

#

im making progress!!!

red flower
#

whats the crash

humble matrix
#

wait did

#

i think i might have named something wrong

#

OK

#

i was supposed to name this rarity and not rarities
which is confusing cuz the smod documentation for ObjectTypes says its called rarities

red flower
#

looking at the code it looks like rarities is correct

humble matrix
#

i swear putting it rarities was making it crash

red flower
#

yes because something else was wrong

#

if you name it rarity then it just doesn't use it

humble matrix
#

yeah i just realized that lol ;-;

humble matrix
empty solstice
#

Well, the mod """Works""" but the cards come up as blank so I think I've probably misunderstood something about the template and/or its language.

#

Changed the icons back just in case and it didn't fix anything.

tight hull
#

how is it?

empty solstice
tight hull
#

uh

empty solstice
#

and the lc version is identical.

tight hull
#

show the code

empty solstice
#

I don't imagine the issue's in the json.

tight hull
empty solstice
#

...apparently.

tight hull
#

ok

empty solstice
#

I copy-pasted it and used Discord's "upload message as file". Maybe if I'd saved it as a text file and posted it that way the tabs would have come across.

tight hull
#

makes sesne

tawdry oriole
#

is there a way to reset a custom global variable when starting a new run?

languid canopy
#

hey sup, how do i make the floating sprite of a legendary joker actually appear ? i just get the BG of it ingame

tawdry oriole
#

that's the sprite of the floating one

languid canopy
#

aight

idle plaza
tall wharf
#

chat will this be useful

flat mist
#

whats the pixel size for 1x an2x joker assets

tight hull
#

its stolen but it works

tawdry oriole
#

2x is double that so 142x190

languid canopy
#

double it for the x2

#

oh you're fast

#

lmao

tawdry oriole
next timber
#

how do i feed an image into a shader? trying to make a shader that masks out a colour in a joker and puts another image under it

tawdry oriole
#

just setting it with G.GAME.globalname crashes the game

red flower
tall wharf
idle plaza
empty solstice
tall wharf
red flower
tawdry oriole
tight hull
tall wharf
#

i will donate this patch to steamodded yet again

red flower
#

I think it would be better to have {{} maybe

tall wharf
#

idk in my mind

#

it

#

uh

#

will clash

#

i think it's not as intuitive

red flower
#

i think \\{ is less intuitive imo

idle plaza
tall wharf
tawdry oriole
red flower
tall wharf
#

you can just double escape yeah

red flower
#

sounds annoying but probably not many mods use it so its fine

tall wharf
#

besides

idle plaza
native zinc
empty solstice
#

Okay well now the decks aren't blank, they're using the **default **images which... I expected it to go to one or the other if it was broken, but having both come up in different cases is a bit odd to me. Can't tell if it's an improvement.

Anyway I got other stuff to do at the moment.

tight hull
#

could you show the card images (that you are using)

vast bough
#

hello, does anybody know why my joker is crashing when specifically trying to create a hierophant tarot card. other tarot cards work perfectly fine, just specifically hierophant gives this crash. am i spelling it wrong or something or does smods refer to it by a different name?

tight hull
empty solstice
flat mist
#

i am tring to make an asset but the image is becoming blur

#

its my first time please help

tight hull
vast bough
humble matrix
#

i have a joker that randomizes its ability and i want it to show that value in its description but the colour tags or whatever you call them mess up and don't display

tight hull
flat mist
vast bough
tight hull
#

if it works it works i guess

vast bough
#

no other error would make sense because it was working with every tarot card except that one haha

tight hull
#

lol

tight hull
#

(pixels)

#

bcs its just compresed and idk how to get the letter to not have the outline

#

photoshop just does that

#

(most softwares do that if not all)

flat mist
#

it looks good at 2x

pastel kernel
#

How do you make it so that created card is an ace of clubs

red flower
#

SMODS.add_card{set="Playing Card", rank = "A", suit = "Clubs"}

tight hull
#

(still put the pixelated version in 1x bcs if you dont and someone turns on 1x the game just crashes)

humble matrix
tight hull
humble matrix
tight hull
pastel kernel
#

I need some feedback

red flower
#

yeah

red flower
humble matrix
red flower
pastel kernel
#

this one

red flower
#

whats not working

tawdry oriole
# tall wharf

also how did you make that description in three different boxes??

red flower
red flower
red flower
tawdry oriole
#

oh my god how come i've never seen that

#

thank you

red flower
#

its pretty new

pastel kernel
red flower
#

wide sleeve

pastel kernel
#

idk how

#

do i even need to use add_to_deck?

#
                if #G.deck.cards < G.deck.config.card_limit then
                    local new_card = SMODS.add_card{set = "Playing Card", rank = "A", suit = "Clubs",}
                    if new_card then
                        new_card:add_to_deck()
                        G.deck:emplace(new_card)
                    end
                end
humble matrix
#

now it just isnt showing anything

#

wait does it have to be the ENITRE joker description

red flower
#

same with emplace

red flower
#

like with name and text

#

you also need to put the whole text in

pastel kernel
#

ok what do i do with "local new_card = SMODS.add_card{set = "Playing Card", rank = "A", suit = "Clubs",}"?

red flower
#

nothing it adds it automatically
if you want it to be added to the deck do area = G.deck

chrome widget
#

When cards are added like that, do you still need to use playing_card_joker_effects?

red flower
#

yes

chrome widget
#

Cool

humble matrix
chrome widget
#

Uni!!!!!

pastel kernel
#

can i ditch local new_card?

red flower
#

if you want to

red flower
#

yes

pastel kernel
#
  for _ = 1, scored_count do
                if #G.deck.cards < G.deck.config.card_limit then
                    SMODS.add_card{set = "Playing Card", rank = "A", suit = "Clubs", area = G.deck}
                end
            end```
red flower
#

there's no deck card limit (it exists but it's usually equal to the amount of cards in deck)

pastel kernel
#

here's the full calculation snippet

    calculate = function(self, card, context)
        if context.joker_main and #context.scoring_hand > 0 then
            local club_count = 0
            local scored_count = #context.scoring_hand
            local base_chips = 0
            for _, scored_card in ipairs(context.scoring_hand) do
                if scored_card:is_suit("Clubs") then
                    club_count = club_count + 1
                end
                base_chips = base_chips + (scored_card:get_chip_bonus() or 0)
            end
            if club_count > 0 then
                card.ability.extra.xchips = card.ability.extra.xchips * (card.ability.extra.club_chips ^ club_count)
                card.ability.extra.xmult = card.ability.extra.xmult * (card.ability.extra.club_mult ^ club_count)
            end
            for _ = 1, scored_count do
                if #G.deck.cards < G.deck.config.card_limit then
                    SMODS.add_card{set = "Playing Card", rank = "A", suit = "Clubs", area = G.deck}
                end
            end
            return {
                xchips = math.floor(base_chips * card.ability.extra.xchips),
                Xmult_mod = card.ability.extra.xmult,
                card = card
            }
        end
    end,
#

the idea was to make the joker spawn club aces per played card in hand and gain x1 chips and mult per scored club card

red flower
#

what's the problem

drowsy heath
#

is it ossible to know what the next card in draw is

red flower
#

yes G.deck.cards[#G.deck.cards] is the next card

#

as long as the deck is not shuffled

pastel kernel
#

it doesn't actually add club aces

drowsy heath
pastel kernel
#

and i think the xchips and xmult aren't actually doing their thing

red flower
drowsy heath
#

so during blind its possible to know what the top card on deck is with such line

red flower
drowsy heath
#

thank you

pastel kernel
#

1.0.0 beta 0626b

wind steppe
#

how would i check (in an unlock condition) if the player has beaten painted deck gold stake?

hazy dew
#

Would it be possible to have an effect where it changes the scoring system to base 4 but keeps the blind requirements to base 10?

wind steppe
#

the number will be the same anyways itll just look different

subtle merlin
#

Question that I've had for awhile: What is the point of self in calculate when you use card to have the card refer to itself?

pastel kernel
subtle merlin
red flower
pastel kernel
#

all it does it grant you xchips based on how many cards you play

#

not intended

red flower
pastel kernel
#

it should give ace of clubs per card in played hand.

#

and it should gain xchips and xmult per played club card

red flower
#

it might be giving xmult too but the _mod is hiding the message

pastel kernel
#

my main concern currently is the club aces not showing up at my deck.

red flower
#

i played a pair

pastel kernel
#

and for every club card played, sans gains x1 chips and mult

subtle merlin
red flower
pastel kernel
red flower
drowsy heath
# red flower yes

how would i get that to display as text on a joker..... i cant get it to work i just get deck as a nil value crash

red flower
pastel kernel
red flower
#

1^x = 1

flat mist
#

Can we find out which card is coming next

flat mist
#

What does shuffle means

pastel kernel
flat mist
#

Does misprint not tells us the next card

pastel kernel
#

or wait

#

x = cards in played hand?

flat mist
#

I heard that in one short

red flower
#

shuffle means this

red flower
flat mist
#

So if your are in a blind you can check which card will come next

red flower
#

yes

pastel kernel
#

i'm a dumbass

flat mist
#

What about next 5 cards

red flower
#

they're in order in the deck array from last to first

empty solstice
# tight hull i have no idea, try to tweak this?

The only thing I can think of is maybe I'm supposed to format my images differently, like separating the suits into different rows or some such... or it doesn't like the fact that I don't have a spade suit (because it'd be redundant)

...would you have one of the images that go with this so I could compare the layout?

flat mist
#

Ok so if you are in blind is there any way to destroy all card of a specific rank in hand and in deck also

red flower
#

yes, during score calculation?

flat mist
#

Yes

#

At end of blind

formal parrot
#

Definitely possible

tired moat
#

if anyone needs ideas for jokers for their mod i can help

#

ive been writing down a lot

drowsy heath
tired moat
#

and im never gonna make a mod because

  1. coding too hard
  2. drawing too hard
#

i could learn but im lazy

drowsy heath
red flower
# flat mist At end of blind

then not during score calculation lol

i think by that time the cards in hand are already shuffled into the deck so you would have to loop through G.deck.cards and check if card:get_id() is the id of the rank you want and then call SMODS.destroy_cards(card)

drowsy heath
#

yeah i tried to figure it out on my own basing it off of idol and just using the rank selector and i got lost

pastel kernel
#

my extra ace clubs aren't showing up

#

it's instead cloning other playing cards

#

i have more ace of hearts than ace of clubs

red flower
#

dunno works fine for me

hushed field
#

Is there a way to check whether the current context is happening within the scoring window? I'm wanting a joker to give xmult on post_trigger for the adjacent joker, but the simplest implementation of that would trigger even when scoring shouldn't happen

pastel kernel
#
    calculate = function(self, card, context)
        if context.joker_main and #context.scoring_hand > 0 then
            local scored_count = #context.scoring_hand
            for _ = 1, scored_count do
                    SMODS.add_card{set = "Playing Card", rank = "A", suit = "Clubs", area = G.deck}
            end
        end
    if context.individual and context.cardarea == G.play then
        local base_chips = context.other_card:get_chip_bonus() or 0
        if context.other_card:is_suit("Clubs") then
            card.ability.extra.xchips = card.ability.extra.xchips * card.ability.extra.club_chips
            card.ability.extra.xmult = card.ability.extra.xmult * card.ability.extra.club_mult
            return {
                xchips = math.floor(base_chips * card.ability.extra.xchips),
                xmult = card.ability.extra.xmult,
                card = card
            }
        end
    end
end
pastel kernel
#

do i have to add key_append = sans?

hushed field
#

Oooh, yeah, that might work

red flower
drowsy heath
#

well i dont even know what to say

red flower
#

a card is a table yes

drowsy heath
#

how come it says this and not the card

red flower
#

because it's a table

#

you need to manually check for the properties you want to display

pastel kernel
drowsy heath
red flower
#

if cryptid doesnt work with my smods features im going to explode

red flower
drowsy heath
#

the card which is next to be drawn

#

i used the line you told me to and it gives me that

red flower
#

yes i get that, which properties of the card

drowsy heath
#

the rank and suit

#

ohhhh

#

i feel stupid

red flower
#

if you want to show the card graphic itself you need a cardarea and stuff

drowsy heath
#

yeah after it was dumbed down i get it

pastel kernel
#

oh my god, it exponentially rises

#

oh fuck

#

i just realized

#

it's supposed to be + 1, that's why it exponentially rises

#

when i reenable cryptid

#

it creates clones of random playing cards

#

but if i play vanilla

#

it gives ace clubs

red flower
#

i hate cryptid

#

i will see if i can fix it for them

#

it's probably their create_card override

#

whats the question mark

daring fern
tardy juniper
#

how can i make a joker award money only on the boss blind?

red flower
pastel kernel
tardy juniper
#

can i just use that in there?

pastel kernel
#

this is a snippet from my noisette joker

if context.end_of_round and context.game_over == false and context.main_eval and not context.blueprint and G.GAME.blind.boss then

#

there's the G.GAME.blind.boss

red flower
#

god cryptid doesnt have an issues page?? do i have to join the discord

empty solstice
red flower
#

i already reported it

flat mist
#

Text (joker) is appearing bluey in Photoshop is there any solution

empty solstice
#

Got something when I accidentally exported the full sprite sheet instead of just the grid sections with content. I might be on to something. Scribbled some stuff into the empty spaces and I'm gonna see if that gives me a better idea of what's happening.

pastel kernel
chrome widget
#

Hey N' can you help me out with smth?

vast night
#

Hey. I'm experiencing a weird crash with my custom ui. I understand the error, and in the game code it seems to try to find the alpha value of a color, but i can't find the object where it cant index it since there is no trace.

                UIBox {
                    definition = {
                        {
                            n = G.UIT.ROOT,
                            config = {r = 0.1, minw = 8, minh = 6, align = "tm", padding = 0.2, colour = G.C.BLACK},
                            nodes = {
                                n = G.UIT.T,
                                config = { text = "Hello, world!", colour = G.C.UI.TEXT_LIGHT, scale = 0.5 }
                            }
                        }
                    },
                    config = { }
                }
vast night
tepid crow
#

try removing one of the {} around the ROOT node

red flower
#

or dont use cryptid

red flower
rancid flare
#

is there a way to easily define a table like G.mytable.myvar = (G.mytable.myvar or somthing)

empty solstice
#

IT IS FUNCTIONING PROPERLY!

subtle merlin
#

How can I make a joker "store" another joker for a round? I was thinking of deleting and recreating the joker, but if it was something like green joker, then doing that would reset it and I don't want this to reset the joker

red flower
chrome widget
# red flower shoot

I have a joker that changes the values of Glass Cards upon being picked up.

G.P_CENTERS.m_glass.config.extra = card.ability.extra.glass_break

for _, v in pairs(G.I.CARD) do
    if v.config and v.config.center and v.config.center.key == 'm_glass' then
        sendDebugMessage('updating glass cards')
        v.ability.extra = card.ability.extra.glass_break
        v.ability.x_mult = card.ability.extra.glass_mult
    end
end```

This does work for *new* glass cards, but the changes to existing ones upon adding or removing the joker from the deck don't seem to work right? Usually it ignores the changes to the Xmult properties even though afaik the code for Glass Cards in `generate_card_ui` uses `center.config.Xmult` which I *do* change for the center itself
#

So I get results like this, where I sell the card and it reverts the destruction chance (1 in 2 -> 1 in 4) but the Xmult doesn't change back to X2

#

Do I have to also change like card.ability.Xmult????

rancid flare
chrome widget
#

Ugh I hate the fact that there are two Xmult properties and they do the same thing and one just assigns to the other

red flower
chrome widget
#

...yep that was it

#

Hate

empty solstice
#

Anyway if anyone could tell me what it is about this that forces the cards to be stuck in the far right of a ridiculously oversized image I would appreciate it, but I'm pretty happy with how it is now.

paper elbow
#

How would I do a "complete conversion" mod? So removing all default vouchers, consumables, and jokers before adding more.

normal crest
#

Try using 'ranks' instead

subtle merlin
red flower
#

yes but i wouldnt do it in G.discard, i would create a new area for it

#

check banishing in joyousspring for an example :3

subtle merlin
vast night
#

definition dosent take an array

tepid crow
#

👍

red flower
#

i have been going yugioh for a while

vast night
paper elbow
red flower
paper elbow
#

Sweet

empty solstice
signal lotus
#
            card.ability.extra.scored_suits = {}
        end
        if context.individual and context.cardarea == G.play then
            if context.other_card.base.suit 
            and not card.ability.extra.scored_suits[context.other_card.base.suit] 
            then 
                card.ability.extra.scored_suits[context.other_card.base.suit] = true 
                return {
                    x_mult = card.ability.extra.xmult
                }
            end
        end
    end```

why doesnt this work with blueprint
subtle merlin
empty solstice
rancid flare
subtle merlin
rancid flare
#

oh okay

pastel kernel
#

My sans joker acts weird, I’ll ask for some help later.

#

It’s kinda actually broken

#

In the literal sense because I don’t remember making it give chips based on your cards

faint leaf
#

i honestly have no idea where i couldve possible went wrong

subtle merlin
rancid flare
faint leaf
#

yea that was it LMAO

idle plaza
# signal lotus ``` if context.before and context.main_eval then card.ability...

Blueprint and similar active rely upon the copied card's abilty.extra, rather that its own, for triggering the copied effects. So by the time Blueprint takes a turn, the scored_suits[suit] value for that card is already true, and whichever card runs second can't do anything.

You should run a second table in the ability.extra, something like scored_cards[suit] that tracks the exact card that the bonus is granted for. If other_card is this card, automatically return the xmult and don't bother with the rest of the function.

This will also retrigger the xmult whenever the other_card retriggers. If this is how you want it, great! If not, you'll need to more radically change the function. Likely by switching to the joker_main context and running a for k, v in ipairs(context.scoring_hand) do loop.

faint leaf
# faint leaf yea that was it LMAO

okay well now it says 20 in 14 chance..... i GENUINELY dont know how to fix that... its taking my dollar value and putting it in the chance 💔

vast night
#

Hey does some1 know what the transparent hand background is reffered to internally?

vast night
#

make the text

"{C:green}1 in #2#{} chance to",
"earn {C:attention}$#1#{} at the end of round
green hare
#

hi there, I've been trying to edit a pokermon joker to make an upgraded version
the joker in question is scizor, it kills the joker to the right and if it had a edition, it steals it and it stacks, been trying to make it so it works with negatives too.
been able to make it get negative if it kills a negative joker, but I don't know how I could make it stack or add extra joker slots anyone could help me please?

#

thanks in advance btw ❤️

robust falcon
#

What does the T property in card stand for?

idle plaza
green hare
#

thanks a lot

#

and probably I should hold that data in the joker itself , the amount of max jokers added, so if it is removed you go back to the normal amount right?

idle plaza
#

Yeah

green hare
#

I have it declared as
scizor_negatives = 0
and they are added I think.. not sure how to make it pop into the ui xD

#

yet*

#

and then I would do the same code you dropped but instead of +1 it would be - scizor_negatives

fallow breach
#

thoughts on how balanced this would be

green hare
#

eh.. I ike it :3 it sounds funny heh

#

perhaps chance could be slightly bigger but only make it trigger after boss blinds?

idle plaza
# fallow breach

You can do {X:Mult,C:White} to make it more like typical XMult styling.

fallow breach
#

thanks

green hare
#

oof heh bouncing from so many different programming languages

#

is there a sort of like print function to debug? like writting in the console?

#

eh probably normal lua should work right?

idle plaza
#

print()

green hare
#

ye just googled print in lua and it was just print xD

signal lotus
#

how do I fix the little lines on either side

brittle tide
#

Is there a way to get a joker to trigger when a specific planet card is played?

green hare
#

for some reason I'm not able to print the local vars that the card has .. well better said I don't know how to reach the vars..

print(" amount of negatives added = ",self.config.extra.scizor_negatives)
#

tried, also without the self, but it crashed :3

red flower
brittle tide
#

alr

green hare
#

this is the declaration of the variable itself

local scizor={
  name = "scizor", 
  pos = {x = 0, y = 6},
  config = {extra = {mult = 0, scizor_chips = 0, scizor_Xmult = 1, mult_mod = 4,scizor_negatives = 0}},
green hare
#

ah really?

#

lets see if it works

red flower
#

that appends the two strings

gilded blaze
#

where did you put the print

green hare
#

does it needs to emm be touching the next variable?

#

as in ..self.config and such or
.. self.config.etc

red flower
#

both work

green hare
#

ah oki

gilded blaze
green hare
#

the print is inside an if statement inside the local declaration of scizor

gilded blaze
#

so, you declare scizor

#

and try to get print to work

#

what makes you think you can't declare stuff

green hare
#

???

#

scizor already exists

#

its declared

#

and im working inside scizor's code

gilded blaze
#

then what's the print for

#

is it inside calculate

green hare
#

ah yes its inside calculate

gilded blaze
#

then switch from self.config.extra.scizor_negatives to card.ability.extra.scizor_negatives

green hare
#

oki

gilded blaze
#

self.config serves as a blueprint for an object
its content gets copied over to card.ability, which tracks the card's in-game state

green hare
#

it borked worse xD

#

broke set_ability method

idle plaza
#

What's the error and current code?

green hare
#

let me see if I didn't missed something obvious

gilded blaze
#

was it attempt to call method 'set_ability'

green hare
#

attempt to index local "center" (a nil value)

#

card.lua:268

sonic cedar
#

so im trying to figure out how to make this apply to only one specific new suit but i cant seem to wrap my head around it

#

would i set new_suit to the suit i want it to be somewhere? if so, how?

sonic cedar
green hare
#

weird

#

was thinking that perhaps it crashed for trying to use card before it was like created, but earlier code in the calculate function does use it without issues

#

even I added code like it a few lines before and didn't crash

if card.edition.negative then
 card.ability.extra.scizor_negatives = card.ability.extra.scizor_negatives + 1
end
vast night
# red flower wdym

im searching for it rn but i want to hide that "playing card holder" like the round eval does

sonic cedar
#

or no i guess itd have switched by then

#

so then like i have an old_suit variable?? or like a table that stores the number of cards of each suit before the change??

gilded blaze
#

check for card count per suit inside the object's update function

#

that's how Steel and Stone Joker calculate theirs

green hare
#

okay made it work, I'm a dumbass xD

green hare
#

thanks a lot ❤️

sonic cedar
#

let me workshop something rq

green hare
#

in essence.. I thought elseif was else if

#

and that borked everything

gilded blaze
#

I'm suggesting immutable for Cryptid compat, you can ignore it

sonic cedar
#

wont hurt

sour garden
#
    name = "Carl",
    key = "carl",
    config = {
        extra = {
            moneycheck = 0,
            moneygive = 25
        }
    },
    loc_txt = {
        ['name'] = 'Carl',
        ['text'] = {
            [1] = 'If exactly {C:money}$#1#{} is held at',
            [2] = 'end of round, gain {C:money}$#2#{}'
        }
    },
    pos = {
        x = 5,
        y = 2
    },
    cost = 8,
    rarity = 2,
    blueprint_compat = false,
    atlas = 'CustomJokers',

    loc_vars = function(self, info_queue, card)
        return {vars = {card.ability.extra.moneycheck, card.ability.extra.moneygive}}
    end,

    calculate = function(self, card, context)
        -- At the end of the round
        if context.end_of_round and not context.individual and not context.repetition and not context.blueprint then
            if G.GAME.dollars == moneycheck then
                ease_dollars(card.ability.extra.moneygive)
                return {
                    message = "SUPPLY FUNDS.",
                    colour = G.C.MONEY,
                    delay = 0.45, 
                    remove = true,
                    card = self
                }
            end
        end
    end
}

anyone know why this doesn't work? it's intended to give 25 dollars if you have 0 dollars at the end of round, but it does nothing currently

signal lotus
#

idk what that means

#

sorry

#

@pure salmon can you listen to this dude and rewrite it

sonic cedar
gilded blaze
#

update is used for actions that update every frame

sonic cedar
#

im blind disregard

#

mb 🧎‍♀️

sonic cedar
#

(you're missing the card.etcetc)

sour garden
#

i may have the stupid

#

thanks

sonic cedar
#

np 👍

signal lotus
#

how could I make this

next timber
# signal lotus how could I make this

have a list of scored suits that resets when a hand is played, when a card is scored check if it's suit is in the list, if not add it and score x1.5 mult

signal lotus
#

im trying to figure ts out

next timber
#

uhhh dunno

signal lotus
#

I had this but it doesnt work with blueprint

#

so im rewriting it

#

and also its not mine someone else gavei t to me

next timber
#

maybe add an extra array to store the cards that score 1.5x, and check if they have a new suit OR if theyre in that array

#

so blueprints can check if theyve already been scored 1.5x and do that again

signal lotus
#

idk how to do that

next timber
#

same as the scored_suits array but instead of setting the suit index, just do table.insert(card.ability.extra.scored_cards, context.other_card)

#

and if the table contains that card already then score 1.5x

signal lotus
#

Yeah idk

gilded blaze
#

this is how Photograph works

#

just store the cards in an array and check if context.other_card is one of the stored cards

signal lotus
#

idk how to do that

#

wait

#

hold on

#

yeah nevermind

#

that card is too complicated

red flower
#

i dont exactly know how the game does it but you can do G.hand.states.visible = false