#💻・modding-dev

1 messages · Page 280 of 1

chrome widget
#

This is bizarre. I gotta shower but I'll keep cracking at this

normal crest
#

Can you send your current version of your consumabletype

#

And if you have debugplus try to do eval G.P_CENTER_BLINDS.Stand

chrome widget
#
    key = 'Stand',
    primary_colour = G.C.STAND,
    secondary_colour = G.C.STAND,
    collection_rows = { 8, 8 },
    shop_rate = 100,
    default = "c_stand_star",
    prefix_config = false,
    rarities = {
        {key = 'StandNormal'},
        {key = 'StandEvolved'},
    },
    can_stack = false,
    can_divide = false,
    inject_card = function(self, center)
        local pool_key = center.config.evolved and 'EvolvedPool' or 'StandPool'
        SMODS.insert_pool(G.P_CENTER_POOLS[pool_key], center)
    end
}```
#

I do have debugplus

#

(But again lemme shower first)

normal crest
#

this

#

you're still overriding the function completely so your cards aren't being added to the 'Stand' pool

chrome widget
#

No they definitely are

#

I removed it because they were added twice by putting it manually

#

Hence the log of the contents of G.P_CENTER_POOLS.Stand

normal crest
chrome widget
#

Fairly certain yes

normal crest
#

Hmm, I really don't know then

chrome widget
#

Time to get my hands dirty

mental nacelle
#

four blinds per ante is now a thing (challenger deep rule/modifier)

pseudo cape
#

if I wanna add a new custom item type, not like a new type of card or joker or seal etc, but a whole new smaller mechanic, where would be the best place to start do you all think?

#

I've made some jokers and decks and stuff in the past messing around, and I know some basic lua, but was looking for some sort of API that would allow for easier custom elements and couldn't find anything

rugged pier
#

im really confused by the implementation i wont lie

sturdy compass
#

What exactly is confusing you?

rugged pier
#
loc_vars = function(self, info_queue, card)
        if G.GAME.current_round.zombie_target.card ~= nil then
            local copied_key = G.GAME.current_round.zombie_target.card.config.center.key
            info_queue[#info_queue + 1] = G.P_CENTERS[copied_key]
            return {
                vars = { G.localization.descriptions.Joker[copied_key].name }
            }
        else
            return {
                vars = { 'Inactive' }
            }
        end
    end,
    calculate = function(self, card, context)
        if G.GAME.current_round.zombie_target.card and not context.no_blueprint then
            context.blueprint = (context.blueprint and (context.blueprint + 1)) or 1
            context.blueprint_card = context.blueprint_card or card
            local zombie_target_ret = G.GAME.current_round.zombie_target.card:calculate_joker(context)
            context.blueprint = nil
            local eff_card = context.blueprint_card or self
            context.blueprint_card = nil
            if zombie_target_ret then
                zombie_target_ret.card = eff_card
                zombie_target_ret.colour = G.C.GREEN
                return zombie_target_ret
            end
        end

where is the next target being set? and how are you setting "G.GAME.current_round.zombie_target.card.config.center.key" and what does "ret" and "eff" mean and what does blueprint have to do with selecting a card ability

sorry some of these questions might be basic

heady siren
#

What's the weight and rate of Rare jokers? I wanna make a rarity that's slightly higher but can appear in shops

sturdy compass
#

In main.lua

rugged pier
sturdy compass
#

I have it broken up into regions for a reason

#

If you’re looking at the code thru VSC instead of GitHub, just collapse the regions to make it more maneuverable

rugged pier
#

found the zombie related stuff very quickly

sturdy compass
#

Yes

#

Good

rugged pier
#

what if the zombie infeccts an eternal card btw

chrome widget
#

Seemingly my issue has to do with the rarities. The rarity pool is returning a pool length of 0 even if the main Stand pool has items in it

fallen tendon
#

how can you make a deck unlock when beating a modded stake?

chrome widget
#

I guess that's the question: am I able to use rarities on cards that aren't Jokers?

chilly tendon
#

Hello balatro modding community

#

Is it difficult to change the music in balatro, like does the new theoretical track need to meet any specific requirements or anything

fallen tendon
#

also it has to be sped up by some amount that i kinda forgor

chilly tendon
sturdy compass
#

The effect was made with that in mind so Zombie is a lot stronger on higher-stake runs

scarlet spire
#

i've asked this a few times before but nobody's had an answer, how can I disable the shadow on a floating sprite? it kind of ruins the whole effect here, but I still want the joker part to float around a bit

brazen tusk
#

i have no idea but i will say it looks great

rose dragon
scarlet spire
#

I don't believe alpha changes shadow rendering

#

I have an enhancement with transparency and it still has a shadow

rose dragon
#

the hologram is partially transparent and doesn't have a shadow so i assumed

rapid stag
#

still looking for help with this cirLost

i'm pretty stumped and my thoughts are that if i take ownership of red seal, then have calcuate_seal() call the seal's calculate() when it's a joker... how do i set up events such that the progression during joker calculation is, on a joker with a red seal:

normal joker calculate(),
'again!' message,
normal joker calculate() again,
next...

because from the video i show and with what i show here, it's clear that getting that to happen does not seem... possible? cirLost

#

wait, i might be looking at this wrong - what if i instead had calculate_seal() do nothing if it's a red seal on a joker and instead patched hooked calculate() calculate_joker() to check if the joker has a red seal and then just runs it a second time

scarlet spire
sturdy compass
fallen tendon
#

what does get_deck_win_stake() spit out for modded stakes?

rapid stag
heady siren
sturdy compass
#

I feel like that would end up with some wonkiness idk

rapid stag
digital niche
#

what is the variable in the balatro code that says how many money you have?

chrome widget
digital niche
rapid stag
digital niche
rapid stag
digital niche
#

like an enhancement that does that

rapid stag
digital niche
#

yes yes

tired skiff
#

im looking at the extra credit mod to learn and i see pos and im assuming that means position but positon of what?

daring fern
rapid stag
# digital niche yes yes

in your enhancement then, you'll probably want to try something like

calculate = function(self, card, context)
  if
    context.main_scoring
    and context.card_area == G.play
  then
    return {
      bonus = G.GAME.dollars
    }
  end
end

in your enhancement table

although i'm not familiar with how enhancements work, but a quick skim of the wiki page on SMODS.Enhancement gives me the feeling that this should be like this

tired skiff
ancient gorge
#

It's where you store your cards textures

digital niche
ancient gorge
#

read the github, watch the videos

tired skiff
#

ok

ancient gorge
digital niche
ancient gorge
#

here you go

rapid stag
gilded narwhal
#

Guys what's a good solution to legendary bloat

#

Like I'm making a mod that adds like a lot of legendaries

#

And idk it seems like it wouldn't be fun for the only way to get those would be though the soul

rapid stag
#

more opportunities to get a soul card might be interesting...? like a rare joker that if you sell it, has something like a 1 in 4 chance to create a soul card

#

idk

tired skiff
scarlet spire
#

could just patch the soul (or take ownership) to make it more common

#

more opportunities is also interesting

stark geode
#

how does one make a main file that calls other files

digital niche
#

x is lenght, y is width

rapid stag
scarlet spire
ancient gorge
tired skiff
ancient gorge
#

then from there it gets the image using the card size which i dont remember right now

#

theres also a video

#

on there if you wanna watch it, its dated a bit tho

#

but it explains the atlas

tired skiff
scarlet spire
#

0,0 is the top left joker

tired skiff
#

any info is gold cause im stupid

ancient gorge
#

i fumbled there

scarlet spire
#

I make that mistake too sometimes

#

lua normally counts from 1

#

but then the atlas coordinates count from 0

tired skiff
#

so what do you set the x and y to?

chilly tendon
stark geode
#

are you on replit?

scarlet spire
ancient gorge
#

its #2 on the list

#

that channel also has a consumables tutorial

tired skiff
scarlet spire
#

ah

stark geode
#

the standard atlas

tired skiff
#

yes

stark geode
#

now i have a py script

rapid stag
stark geode
#

im dumb

scarlet spire
#

x = 1 y = 0 would be the one to the right of that

#

x = 0 y = 1 would be the one below the top left joker, etc

tired skiff
#

what context

#

are we talking in the collection screen

#

or in the 1x file

#

i feel so stupid rn

scarlet spire
#

in the atlas texture

stark geode
#

in you textures file

tired skiff
#

so x0 y0 is the first one

scarlet spire
#

an atlas usually consists of multiple jokers in one image

scarlet spire
#

setting your joker's x and y pos to 0 would make that joker use the top left sprite from the atlas

stark geode
tired skiff
#

OHHHHHH

#

ok i understand it all now

#

thank you

scarlet spire
stark geode
scarlet spire
#

what does it do

stark geode
scarlet spire
#

ooh

#

negative playing cards

tired skiff
#

so am i correct in saying that the atlas is the image with all the images of the joker sprites

stark geode
#

well

#

its whatever sprites you want

scarlet spire
#

an atlas can have any cards, but basically yeah

#

if you want to (DON'T DO THIS) you can put literally everything in one atlas

scarlet spire
#

for reference this is vanilla's joker atlas

#

discord messed it up a bit. I don't know why

#

it sent a bit of the left of the image to the right side

stark geode
tired skiff
#

could you theoreticly say have differant files inthe 1x and 2x and then do sperate smods.atlas for each

scarlet spire
#

hmm

stark geode
#

you must have the same files in both

scarlet spire
#

you can't, i'm not sure why you'd want to do that since those are purely used for having pixel art smoothing on/off

tired skiff
scarlet spire
#

well, you can have them both be different art but they'd both have the same smods atlas object

radiant plank
#

i want to hook into Game:init_game_object and generate a random suit for a joker im working on at game initialization. I did so using the example on the steamodded wiki and unfortunately the functions pseudorandom and pseudorandom_element gave me a nil access to G.GAME, crashing the game.

I then decided to instead send an Event within the hook to ensure my data is setup in G.GAME after the initialization of G.GAME object. Doing this removed the nil access but now my screen is black on launch until I click. What is the proper way to do this? Here is my code for the hook:

function BC.random_valid_bluecrystal_suit()
  if not G.playing_cards then
    return BC.bluecrystal_card.default_suit
  end
  local valid_bc_cards = {}
  for _, v in ipairs(G.playing_cards) do
    if not SMODS.has_no_suit(v) then
      valid_bc_cards[#valid_bc_cards + 1] = v
    end
  end
  if valid_bc_cards[1] then
    local bc_card = pseudorandom_element(valid_bc_cards, pseudoseed('bc' .. G.GAME.round_resets.ante))
    return bc_card.base.suit
  else
    return BC.bluecrystal_card.default_suit
  end
end

local init_game_object_hook = Game.init_game_object
function Game:init_game_object()
  local ret = init_game_object_hook(self)
  G.E_MANAGER:add_event(Event({
    trigger = 'before',
    delay = 1.0,
    func = (function()
      G.GAME.current_round.bluecrystal_card = { suit = BC.bluecrystal_card.default_suit }
      local suits = {'Spades', 'Clubs', 'Diamonds', 'Hearts'}
      local suit = BC.random_valid_bluecrystal_suit()
      G.GAME.current_round.bluecrystal_card = { suit = suit }
    end
  )}))
  return ret
end
stark geode
tired skiff
#

yeah i know

scarlet spire
#

you can have 1x and 2x be different, it just means your jokers will look different depending on whether or not you have pixel art smoothing on

tired skiff
#

so they all textures have to be in Jokers.png

stark geode
#

it can be whateveryou want

tired skiff
#

but could you say on top of jokers.png have say tarrot.png

scarlet spire
#

no, you can name the atlas texture anything you want as long as you make an smods atlas object that properly links to it

scarlet spire
tired skiff
#

ok got it

stark geode
#

assuming you write an atlas

tired skiff
#

ight

#

thank you all for the help and explaining this to me

#

is the code to the original 150 jokers accesible?

digital niche
#

what is the thing you use to make the text be the collor of the money

#

like that little orange $3 in the gold card

tired skiff
#

lemme check

#

G.C.MONEY

#

or C:attention?

hushed briar
#
            --Scoring
            print(card.ability.extra.chips)
            if context.joker_main and card.ability.extra.chips > 0 then
                return {
                    chip_mod = card.ability.extra.chips,
                    message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chips } },
                    colour = G.C.CHIPS,
                    card = card,
                }
            end
        end```
now why the hell is the fourth line here giving a "attempt to compare number with table" error
digital niche
#

tyty!

daring fern
digital niche
#

oh tyty!

radiant plank
narrow iron
#

probably unsual question, is it possible to make the text in a card description in italics?

daring fern
radiant plank
#

it needs to be when a game begins, the joker will function similarly to castle

stray warren
#

Anybody know the list of contexts available in Blind:calculate? I don't think it is on the Wiki

radiant plank
#

i got this paradigm from the example castle implementation on the steamodded github

rapid stag
daring fern
sturdy compass
#

I do not know 😭

#

I’m gonna be working on my own implementation of this soon tho and I will tell you if I have any breakthroughs

rugged pier
#

its been howmany every hours and im no closer to implementing my joker

manic rune
#

or cards.lua, i forgot

rapid stag
# daring fern What are you trying to do?

i just want red seals on jokers to retrigger the joker the way you'd expect, but funny thing is if you just natively slap a red seal on a joker via set_seal(), it basically acts like it's seltzer

and i've been bashing my head against this for the past two days now

daring fern
#

I forgot to check if the seal is red though.

#
oldcalcseal = Card.calculate_seal
function Card:calculate_seal(context)
    if context.retrigger_joker_check and not context.retrigger_joker and self == context.other_card and self.seal == "Red" then
        return {
            repetitions = 1,
            card = self
        }
    end
    if self.ability.set == 'Joker' then return nil end
    return oldcalcseal(self, context)
end
radiant plank
rapid stag
sturdy compass
#

if self.ability and self.ability.set == ‘Joker’

rapid stag
digital niche
#

how would i make something like a lucky card?

rapid stag
#

...maybe i should make the old func a global instead...? cirThink

sturdy compass
#

Nah

tired skiff
#

im trying to make a joker that gives x1 mult if the scored hand is a flush five so would i use context.joker.main

rapid stag
native zinc
#

card_

daring fern
daring fern
rapid stag
#

but

rapid stag
daring fern
rapid stag
#

......you're right cirDerp

minor furnace
rapid stag
manic rune
#

i think it would be cool if u release a lib to make seals compat with jokers

#

:3

rancid bridge
daring fern
rapid stag
gilded narwhal
radiant plank
# daring fern What does your joker do?

sorry, had to step away. my joker has an effect that varies depending on the suit just like castle does, as i said in my previous message. the suit needs to be instantiated the start of a game and changed at the end of every round.

daring fern
# radiant plank sorry, had to step away. my joker has an effect that varies depending on the sui...

This is what castle uses ```lua
function reset_castle_card()
G.GAME.current_round.castle_card.suit = 'Spades'
local valid_castle_cards = {}
for k, v in ipairs(G.playing_cards) do
if v.ability.effect ~= 'Stone Card' then
valid_castle_cards[#valid_castle_cards+1] = v
end
end
if valid_castle_cards[1] then
local castle_card = pseudorandom_element(valid_castle_cards, pseudoseed('cas'..G.GAME.round_resets.ante))
G.GAME.current_round.castle_card.suit = castle_card.base.suit
end
end

radiant plank
#

yeah im doing that.

#

want to see the full context?

daring fern
radiant plank
#

i don't think you're understanding my issue

digital niche
#

how would i make something like a lucky carrd?

radiant plank
#

there are two moments this needs to happen - game start and round end. it needs to happen at game start so the joker starts the game with a suit

daring fern
radiant plank
#

when i set this up in the Game:init_game_object hook i've created, i must create an event because G.GAME isn't yet setup (obviously) and thus calls to pseudorandom fail due to nil access

#

what do you mean? it needs to start with a suit right

daring fern
radiant plank
#

hover over castle in collection

#

it has a suit even if you don't have one in your lineup

#

why wouldn't it happen at game start?

digital niche
#

what is the context used when making the lucky card?

rancid bridge
#

trying to make a joker with this effect
stuck on calculate...

daring fern
rancid bridge
#

the thing is...
i actually have no clue what to put in the calculate section...

rapid stag
# daring fern I think that is because joker editions happen after the joker triggers and the s...

how should i prevent this weird hiccup cirThink

actually wait, this probably should work on fortune teller, but the problem there is that it's based on a run variable that gets incremented - so it should go up by 2 each time? but can't double the value because what if you use a bunch of tarots and then get a red seal on fortune teller - and also how do you parse the upgrade in this way

paper zealot
#

@oblique ember Tutorial for reference:
You would have to create a mod to be loaded by Steamodded:

  • Make a new folder in Mods called NoCardLimits
  • Inside that folder, create NoCardLimits.json containing:
{
    "id": "NoCardLimits",
    "name": "NoCardLimits",
    "author": ["MAGO"],
    "description": "Removes joker and consumeable card limits.",
    "prefix": "nocardlimits",
    "main_file": "nocardlimits.lua",
    "version": "1.0.0"
}
  • Create nocardlimits.lua containing:
local game_start_run_ref = Game.start_run
function Game:start_run(args)
    local ret = game_start_run_ref(self, args)
    G.consumeables.config.card_limit = 1e100
    G.jokers.config.card_limit = 1e100
    return ret
end
manic rune
#

where is the

#

chosen boss blind's key stored?

EDIT: it was G.GAME.round_resets.blind_choices.Boss

#

if i want to check whether this is a showdown boss blind or not, im guessing i will need to grab the key and go through the entire blind's pool to see whether its a showdown blind or not

EDIT: the pool is G.P_BLINDS

manic rune
#

oh we are SO back

#

i had to dig so deep for this im probably a cave diver now

#

💔

rancid bridge
#

do NOT go into that 0.000001 inch crack in the ground.

manic rune
#

i will.

#

watchu gonna do about that :3

rapid stag
daring fern
rapid stag
daring fern
rugged pier
#
SMODS.Joker
{
    key = 'tensoon',
    loc_txt = 
    {
        name = 'TenSoon',
        text = 
        {
            'Copies ability of a random',
            '{C:attention}Joker{} each {C:attention}round{}',
            '{C:inactive}(Currently copying {X:attention,C:white}#1#{C:inactive}){}',
        }
    },
    atlas = 'scadrial',
    pos = {x = 0, y = 0},
    rarity = 'csmr_preserver',
    cost = 4,
    blueprint_compat = true,
    config =
    {
        extra =
        {
            selectedJoker = nil,
        }
    },
    loc_vars = function(self,info_queue,card)
        if card.ability.extra.selectedJoker then
            return {vars = {localize({ type = "name_text", set = "Joker", key = card.ability.extra.selectedJoker.config.center.key })}}
        else
            return {vars = {'None'}}
        end
    end,
    calculate = function(self,card,context)
        if context.setting_blind then
            local jokerList = {}
            for i,v in ipairs(G.jokers.cards) do
                if v.ability.name ~= 'TenSoon' and v.config.center.blueprint_compat then
                    jokerList[#jokerList + 1] = v
                end
            end
            if #jokerList > 0 then
                card.ability.extra.selectedJoker = pseudorandom_element(jokerList,pseudoseed('tensoon'))
            end
        end
        local other_joker = card.ability.extra.selectedJoker
        if other_joker ~= nil then
            context.blueprint = (context.blueprint and (context.blueprint + 1)) or 1
            local copy_return = other_joker:calculate_joker(context)
            if copy_return then
                return other_joker:calculate_joker(context)
            end
        end
    end
}

can someone help me figure out why this joker crashes the game everytime i select a card. I get a stack overflow error.

the joker randomly copies the ability of a joker that is held in hand

rapid stag
# daring fern The message order.

yeah, it's because i put message = localize('k_again_ex') in the return table with the values that tell it to do repetition, so it does it first. that's why i'm thinking of putting it in an event manager

tawny narwhal
#

Hey can someone explain what juice_up(0.3, 0.3) specifically does and what the variables affect? I can't seem to get it right for some reason...

tawny narwhal
#

In a functiuon for an event where a card upgrades

rugged pier
#

yes but show me the function lol

tawny narwhal
#
G.E_MANAGER:add_event(Event({
                    trigger = "after",
                    delay = 0.15,
                    func = function()
                        card:set_ability("j_LSingle_singular")
                        card:juice_up(0.3, 0.3)
                        return true
                    end,
#

oh this is the case where a card changes

#

same diff

rugged pier
#

can you show the whole calculate function

digital niche
#

would this work as a lucky card?

tawny narwhal
# rugged pier can you show the whole calculate function
        if context.before and context.scoring_name == "High Card" and not context.blueprint then
            -- Increment count
            card.ability.extra.high_card_count = card.ability.extra.high_card_count + 1

            -- Check if it should transform
            if card.ability.extra.high_card_count >= card.ability.extra.high_card_limit then
                play_sound('LSingle_StellarTransform', 0.7, 1.3)
                G.E_MANAGER:add_event(Event({
                    trigger = "after",
                    delay = 0.15,
                    func = function()
                        card:set_ability("j_LSingle_singular")
                        card:juice_up(0.3, 0.3)
                        return true
                    end,
                }))
            end

            -- Normal progress message
            if card.ability.extra.high_card_count < card.ability.extra.high_card_limit then
                return {
                    message = "Collapsing...",
                    sound = 'LSingle_StellarUpgrade',
                    colour = G.C.ATTENTION,
                    card = card
                }
            end
        end
    end```
rugged pier
#

afaik lucky cards can do both

#

just do if and if

digital niche
#

anything else?

rugged pier
#

youre also returning the function within the ifs

#

so if either trigger then the function just ends

#

because you returned it prematurely

digital niche
#

what should i change then?

#

like, where do i return the function

tawny narwhal
digital niche
rugged pier
#

then just ends the function

#

because "return" ends it

tawny narwhal
#

return terminates an if function

digital niche
rugged pier
tawny narwhal
#

so anything nested with it in said 'if' function wont happen

rugged pier
digital niche
#

do i use something else isntead of a "return"?

manic rune
#

what the fuck

digital niche
#

or just use the "return" a different way

manic rune
#

i got the boss switching working SO QUICKLY i refuse to believe its actually working

rugged pier
manic rune
digital niche
rugged pier
#

couldnt be me

daring fern
#

How would purple seal work on a joker?

digital niche
manic rune
rose dragon
manic rune
#

as shrimple as that

digital niche
tawny narwhal
bitter linden
#

Question, is there a way to mod the text to change the suits?

Like say I'm making a themed deck and wanna change hearts to say... another item, like Rubies or something, how hard is that?

manic rune
rugged pier
manic rune
#

i thought i would need to do much more complicated stuff tha that

#

but NOPE

#

IT WORKS

#

HAHAHAHAHA

manic rune
#

WE ARE SO FUCKING BACK

digital niche
rugged pier
digital niche
rugged pier
#

sorry

#

=0

#

as in it doesnt add anything

digital niche
#

i still dk im really new to modding, today i my third day only 😭

rugged pier
#

im probably not explainign it well

#

one sec

digital niche
rugged pier
#

so i can just copy it

rapid stag
rugged pier
radiant plank
#

how do i debuff a card before scoring begins? is it just something like this?

  if context.before and context.cardarea == G.play then
    -- card selection doesn't matter for sake of example
    local card = context.scoring_hand[1]
    G.GAME.blind:debuff_card(card)
  end
rapid stag
# rugged pier how do i do this :3

it's a funky fix if it works, but right after calculate() (as in, at the start of the function) try something like

if context.cardarea == G.hand then
  return nil, true
end
```?
digital niche
# rugged pier can you send this as text
calculate = function(self, card, context)
        if context.cardarea == G.play and context.main_scoring == card and pseudorandom('lucky') < G.GAME.probabilities.normal/5 then
            return { perma_chips = 50 }
        if context.cardarea == G.play and context.main_scoring == card and pseudorandom('lucky') < G.GAME.probabilities.normal/15 then
            return { p_dollars = 40}
        end
    end
end})```
rapid stag
tawny narwhal
#

Okay, another Question. What is the context for beating a blind in a single hand?

rapid stag
tawny narwhal
#

Or how would I best go about it if there isn't a specific context

rugged pier
#
local chip = 0
        local dol = 0
        if context.cardarea == G.play and context.main_scoring == card and pseudorandom('lucky') < G.GAME.probabilities.normal/5 then
            chip = 50
        end
        if context.cardarea == G.play and context.main_scoring == card and pseudorandom('lucky') < G.GAME.probabilities.normal/15 then
            dol = 40
        end
        return {permachips = chip, dollars = dol}, true
#

try this

manic rune
#

what function is run when you win a blind?

daring fern
willow void
#

hey guys, i have a joker idea but i am hard stuck on an implementation, would anyone be up to take a look at it?

rapid stag
manic rune
#

nvm, probably end_round()

rapid stag
rugged pier
digital niche
manic rune
#

:3

rugged pier
#

im also new to modding

#

lol

digital niche
#

im not sure how to test other than just seeing if the game will crash so lets just hope it does i gues lol

manic rune
tawny narwhal
# rugged pier :3

You probably have a problematic loop in there if you're stack overflowing, right?

manic rune
#

thats

#

painful

#

💔

willow void
# manic rune i can try

basically, im trying to make a card that says "X3 Mult if scored hand contains a 2 and 7 of different suits" (reference to the worst hand in poker) but i don't know what i am doing, like, at all. here's my code so far but i am aware that it is just a start.

SMODS.Joker {
    key = 'sevendeuce', 
    loc_txt = { 
        name = 'Seven-Deuce',
        text = {
        '{X:mult,C:white}X#1#{} Mult if played hand',
        'has a scoring 2 and 7',
        'of different suits'
        
        }
        },
     
    atlas = 'Jokers',
    config = {  extra = { x_mult = 3 } },
    rarity = 2,
    cost = 6, 
    unlocked = true, 
    discovered = true, 
    blueprint_compat = true, 
    eternal_compat = true,
    perishable_compat = true, 
    pos = {x = 0, y = 0}, 
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.x_mult } }
    end
    calculate = function(self, card, context)
            local suits = {
                ['2Hearts'] = 0,
                ['2Diamonds'] = 0,
                ['2Spades'] = 0,
                ['2Clubs'] = 0
                ['7Hearts'] = 0,
                ['7Diamonds'] = 0,
                ['7Spades'] = 0,
                ['7Clubs'] = 0
            }
            if context.other_card:get_id() == 2 
              if context.other_card:is_suit('Hearts') then suits['2Hearts'] = suits['2Hearts'] + 1 end
              elseif context.other_card:is_suit('Spades') then suits['2Spades'] = suits['2Spades'] + 1 end
              elseif context.other_card:is_suit('Spades') then suits['2Diamonds'] = suits['2Diamonds'] + 1 end
              elseif context.other_card:is_suit('Spades') then suits['2Clubs'] = suits['2Clubs'] + 1 end
            if context.other_card:get_id() == 7 
                if context.other_card:is_suit('Hearts') then suits['7Hearts'] = suits['7Hearts'] + 1 end
                elseif context.other_card:is_suit('Spades') then suits['7Spades'] = suits['7Spades'] + 1 end
                elseif context.other_card:is_suit('Diamonds') then suits['7Diamonds'] = suits['7Diamonds'] + 1 end 
                elseif context.other_card:is_suit('Clubs') then suits['7Clubs'] = suits['7Clubs'] + 1 end
            
           
       
        if context.scoring_hand do
}
manic rune
#

i get a stack overflow everytime my ram is filled to the brim

rugged pier
tired skiff
#

is this right?

manic rune
#

close everything

#

thats all i can say

#

💔

manic rune
#

that should allow you to do card.ability.extra.Xmult

tawny narwhal
# rugged pier is that how that works

"A stack overflow is a type of buffer overflow error that occurs when a computer program tries to use more memory space in the call stack than has been allocated to that stack."

tired skiff
#

and is flush five "Flush_Five"

manic rune
#

run the loop in context.before

tawny narwhal
rapid stag
# rugged pier yup

no clue then
but i would confirm whether or not its your joker doing that as your calculate function should not progress past what i said if it's crashing when selecting a card cirDerp

manic rune
#

i think you are on the right track there, albeit looking a bit messy

willow void
#

im trying, lol

tawny narwhal
#

Oh bepis you're here

manic rune
#

mhm, hi

tawny narwhal
#

maybe you can help me

rugged pier
#

oh true

tawny narwhal
manic rune
willow void
manic rune
#

then in context.end_of_round, do that

willow void
#

that works too

daring fern
rapid stag
willow void
manic rune
willow void
#

mmmmm

#

that sounds right, thank you!

#

ill see what i can do

tawny narwhal
#

So G.GAME.current_round.hands_played == 1 would be what I'm looking for?

#

YESSS

manic rune
#

yes, that sounds right

tawny narwhal
#

I'm learning

manic rune
#

good job :D

rugged pier
#

thats why i get stack overflow

#

for some reason

#

even with your code

#

it actually goes further

tawny narwhal
manic rune
#

oh, is this not how you check if its a boss blind?

#

hm

manic rune
#

a round ending means that you beat the blind

tawny narwhal
#

Or during, sorry

manic rune
#

uhhhh, no, its a separate context from that

rugged pier
#
local other_joker = card.ability.extra.selectedJoker
        if other_joker ~= nil then
            context.blueprint = (context.blueprint and (context.blueprint + 1)) or 1
            local copy_return = other_joker:calculate_joker(context)
            if copy_return then
                return other_joker:calculate_joker(context)
            end
        end

so this part is causing stack overflow even though my ram is fine :3

manic rune
#
if context.end_of_round and G.GAME.current_round.hands_played <= 1 then
  --do your stuff here
end
tawny narwhal
#

Actually wait no, you were right, Joker should upgrade after the blind has been beaten...

rugged pier
manic rune
#

i mean, you earned it if you somehow won it with no hands

#

:3

#

i like synergies

rugged pier
#

lol

rugged pier
tawny narwhal
#

"Look Mum, No Hands!"

tired skiff
#

im getting a error where it is attepting to field 'joker' [ a nil value]

#

what have i messed up

manic rune
#

...what

chrome widget
#

I'm still baffled why I can't seem to get custom rarities to work

manic rune
chrome widget
#

The rarities aren't seeming to apply to my object type, so every time it tries to poll for rarities in the pool, the pool size is 0, and it returns a Jimbo Joker

tawny narwhal
#
if G.GAME.current_round.hands_played > 1 and context.end_of_round then --- RESET IF 'UPGRADE' NOT FULFILLED - MORE THAN ONE HAND PER BLIND IS USED
            card.ability.extra.Xmult = 1
        end

Is this how I'd reset the Xmult to 1? or is this jank?

manic rune
#

oof

digital niche
manic rune
#

i dont do rarities poll stuff since my mod doesnt use it, sorry :(

#

cant help with that one

manic rune
tawny narwhal
#

🍎

digital niche
#

doing the enhancements is being easy, now the "fusing" part is what im actually scared

tawny narwhal
#

First test of my Fighter Jet Mod... Fingers croseed

rapid stag
digital niche
willow void
manic rune
#

you got the suit tables for 2 and 7 already, right?

willow void
#

i believe so

#

the way i am doing it right now checks if the number is > 0 and then goes from there but it breaks when doing weird scoring stuff

tawny narwhal
#

Uhhhhhhh

#

idek

manic rune
#

you need to check if all the suits in the first table are found in the second table

#

.

#

actually

#

wait wait, i just realized the flaw of my approach

willow void
#

yeah

#

its. interesting

manic rune
#

lemme write one rq

willow void
#

mkay

rugged pier
#

okay fuck it

#

we are not copying jokers

#

scrapping this idea

chrome widget
#

FINALLY got the rarities working

#

I really did just have to override everything that was going on here huh

#

well

tawny narwhal
#

Happened when I tried to look at the card in the collection

rapid stag
#

where on earth is repetitions even stored when it's returned from calculate_seal()

bitter linden
#

Toying around with creating a fallout shelter themed texture pack. (the 3 of hearts is my main testing of how to re-format the layout of the cards, this is still very early.)

#

Also replaced the red deck icon, with the shelter cards too.

chrome widget
#

For some reason this shader effects the UI buttons????

radiant plank
#

im calling SMODS.debuff_card on a card in context.before and the card is being debuffed, but its still being scored. whats happening here? how can i prevent the card from being scored?

rose dragon
#

is there any documentation for extending SMODS.Center?

manic rune
# willow void mkay
if context.before then
         local two_allSuits = {}
         local seven_allSuits = {}

         for _,v in ipairs(context.full_hand) do
            if v:get_id() == 2 then
               local isUniqueSuit = true
               for _,existingSuit in pairs(two_allSuits) do
                  if existingSuit == v.base.suit then isUniqueSuit = false break end
               end

               if isUniqueSuit then two_allSuits[#two_allSuits+1] = v.base.suit end
            elseif v:get_id() == 7 then
               local isUniqueSuit = true
               for _,existingSuit in pairs(seven_allSuits) do
                  if existingSuit == v.base.suit then isUniqueSuit = false break end
               end

               if isUniqueSuit then seven_allSuits[#seven_allSuits+1] = v.base.suit end
            end
         end

         if two_allSuits ~= {} and seven_allSuits ~= {} then
            for _,suit1 in pairs(two_allSuits) do
               local isUnique = true
               for _,suit2 in pairs(seven_allSuits) do
                  if suit1 == suit2 then isUnique = false break end
               end
   
               if isUnique then
                  --condition is met :3
               end
            end
         end
      end
#

probably works, dunno

daring fern
manic rune
#

i love it

rugged pier
#

do you have this posted anywhere

daring fern
tawny narwhal
#

Bit more of a basic question. In card descriptions, how should I go about figuring out where to put {C:Attention} and whatnot?

chrome widget
#

It's kind of a feel thing based on how the vanilla game words things, and where it chooses to highlight

#

That said, its own logic isn't completely consistent

bitter linden
#

So, a question with the decks: Is it possible to give each deck a uniquely themed background/set of cards?

I doubt it, but I'm curious if I could theoretically create myself unique themed decks

willow void
# manic rune ```lua if context.before then local two_allSuits = {} local se...

this is what i had before lol

loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.x_mult } }
    end,
    calculate = function(self, card, context)       
        if context.before then 
            for i,v in ipairs(context.full_hand) do 
                local suits = {
                    ['2Hearts'] = 0,
                    ['2Diamonds'] = 0,
                    ['2Spades'] = 0,
                    ['2Clubs'] = 0,
                    ['7Hearts'] = 0,
                    ['7Diamonds'] = 0,
                    ['7Spades'] = 0,
                    ['7Clubs'] = 0
                    }
            end
        end
            if context.other_card:get_id() == 2 then
              if context.other_card:is_suit('Hearts') then suits['2Hearts'] = suits['2Hearts'] + 1 end
              elseif context.other_card:is_suit('Spades') then suits['2Spades'] = suits['2Spades'] + 1 end
              elseif context.other_card:is_suit('Diamonds') then suits['2Diamonds'] = suits['2Diamonds'] + 1 end
              elseif context.other_card:is_suit('Clubs') then suits['2Clubs'] = suits['2Clubs'] + 1 end
            end
            if context.other_card:get_id() == 7 then
                if context.other_card:is_suit('Hearts') then suits['7Hearts'] = suits['7Hearts'] + 1 end
                elseif context.other_card:is_suit('Spades') then suits['7Spades'] = suits['7Spades'] + 1 end
                elseif context.other_card:is_suit('Diamonds') then suits['7Diamonds'] = suits['7Diamonds'] + 1 end 
                elseif context.other_card:is_suit('Clubs') then suits['7Clubs'] = suits['7Clubs'] + 1 end
            end
        if context.scoring_hand then
            if (suits['2Clubs'] > 0 or suits['2Diamonds'] > 0 or suits['2Spades'] > 0 and suits['7Hearts'] > 0) or
               (suits['2Diamonds'] > 0 or suits['2Spades'] > 0 or suits['2Hearts'] > 0 and suits['7Clubs'] > 0) or
               (suits['2Spades'] > 0 or suits['2Hearts'] > 0 or suits['2Clubs'] > 0 and suits['7Diamonds'] > 0) or
               (suits['2Hearts'] > 0 or suits['2Clubs'] > 0 or suits['2Diamonds'] > 0 and suits['7Spades'] > 0) then
                return {
                    x_mult_mod = card.ability.extra.x_mult,
                }
            end
        end  
    end,
radiant plank
#

how do i properly debuff a played card?

rapid stag
manic rune
#

you will tell the joker to return x_mult in context.joker_main when the condition is met

willow void
#

silly mistake lol

daring fern
rapid stag
#

still does before any calculation on the joker

daring fern
rapid stag
#

it does the message before both calculates

so what i was doing didn't even matter anyway because the internal timing appears to be off

manic rune
bitter linden
#

Gonna toy with porting the fallout new vegas collectors deck first
(The Ace)

willow void
#

not trying to like, hound you for answers or anything lol

tawny narwhal
#

I've had an idea

rose dragon
#

using drawstep, how can i draw an object onto a card?

tawny narwhal
#

"Thermonuclear Bomb" - Sell the Joker to automatically win the current Ante, but destroy half your jokers and half your deck at random

tawny narwhal
willow void
# manic rune odd

disregarding the fact that it doesnt work for modded suits, what can i return from my original context.before to make it go?

manic rune
#
if context.before then
         local two_allSuits = {}
         local seven_allSuits = {}

         for _,v in ipairs(context.full_hand) do
            if v:get_id() == 2 then
               local isUniqueSuit = true
               for _,existingSuit in pairs(two_allSuits) do
                  if existingSuit == v.base.suit then isUniqueSuit = false break end
               end

               if isUniqueSuit then two_allSuits[#two_allSuits+1] = v.base.suit end
            elseif v:get_id() == 7 then
               local isUniqueSuit = true
               for _,existingSuit in pairs(seven_allSuits) do
                  if existingSuit == v.base.suit then isUniqueSuit = false break end
               end

               if isUniqueSuit then seven_allSuits[#seven_allSuits+1] = v.base.suit end
            end
         end

         if #two_allSuits > 0 and #seven_allSuits > 0 then
            for _,suit1 in pairs(two_allSuits) do
               local isUnique = true
               for _,suit2 in pairs(seven_allSuits) do
                  if suit1 == suit2 then isUnique = false break end
               end
   
               if isUnique then
                  print("hi")
               end
            end
         end
      end
#

here, this one should work properly

manic rune
willow void
#

will not returning anything just work?

manic rune
#

mhm

daring fern
#

How do I check if cryptid is installed?

manic rune
#

you dont always need to return in contexts

manic rune
#

maybe this one?

digital niche
#

if i want to make a card take out money when held in hand i just need to make {h_dollars = -1} right?

manic rune
#

i think so, yes

digital niche
#

tyty!

#

lua is so much easier to learn than any language i tried before im actually having fun

daring fern
manic rune
#

dunno, you can check it here

digital niche
#

i think its just cry

manic rune
#

thats the prefix, but its likely its that too

bitter linden
digital niche
#

nvm just checked @daring fern

manic rune
#

you gotta go all in

#

replace the sign with the wooden sign

bitter linden
#

I did the logo itself, but I'd love to change more of the UI design, but I'm only sticking to texture modding atm.

#

ideally boosters would be different tem flakes, lol

manic rune
#

in the texture itself

manic rune
narrow iron
#

if context.before and context.cardarea == G.play then
would this be the proper thing to put in my calculate function to run it when i play a hand, before any cardS score?

manic rune
#

cardarea is unnecessary, im pretty sure

#

context.before only runs once anyways afaik

#

just if context.before then alone will suffice

narrow iron
#

okay, how could i access which cards are being played?

manic rune
#

G.play.cards or context.full_hand, both will work

#

if you want scoring hand instead then context.scoring_hand

willow void
#

i am being given this error for the following lines of code:

if context.other_card:get_id() == 2 then
              if context.other_card:is_suit('Hearts') then csuits['2Hearts'] = csuits['2Hearts'] + 1 
              elseif context.other_card:is_suit('Spades') then csuits['2Spades'] = csuits['2Spades'] + 1 
              elseif context.other_card:is_suit('Diamonds') then csuits['2Diamonds'] = csuits['2Diamonds'] + 1 
              elseif context.other_card:is_suit('Clubs') then csuits['2Clubs'] = csuits['2Clubs'] + 1 end
            end
manic rune
#

ah, ic u decided to use ur code instead

willow void
#

any idea why it would fail to index?

#

yeah

manic rune
#

context.other_card doesnt exist in context.before

narrow iron
manic rune
#

mhm

manic rune
willow void
#

scoring hand

manic rune
#

yeah, that

#
for _,other_card in ipairs(context.scoring_hand) do
  --stuff
end
willow void
#

what is with the underscore before other card

#

is that just a lua thing

manic rune
#

oh, you can name it anything u want

willow void
#

ah

manic rune
#

_ is usually used when you dont use it

willow void
#

i see

manic rune
#

its like, the universally accepted name for what you dont use :3

tawny narwhal
#

YOooo

#

So

#

Kinda works

#

Kinda doesn't

manic rune
#

watchu doin

tawny narwhal
digital niche
#

how do i add little "tags" to enhancements? like how there are food jokers

tawny narwhal
#

Not sure why the recording is jittery, oh well

tawny narwhal
# tawny narwhal

It should only upgrade once, and the upgrading is scaling way out of hand for some reason

daring fern
tawny narwhal
#
SMODS.Joker {
    key = 'SCruise',
    loc_txt = {
        name = 'Super-Cruising',
        text = {
            "For every {C:attention}consecutive blind{} beaten",
            "with a {C:attention}single hand{},",
            "this Joker gains {X:mult,C:white}x#2#{} Mult",
            "{C:attention}Resets{} if more than {C:attention}1{} hand is played",
            "{C:inactive}(Currently {X:mult,C:white}x#1#{}{C:inactive} Mult){}",
        }
    },
    config = { extra = { Xmult = 1, Xmult_gain = 1.75 } },
    rarity = 2, -- Uncommon
    atlas = 'SuperCruiseatlas',
    pos = { x = 0, y = 0 },
    cost = 5,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.Xmult, card.ability.extra.Xmult_gain } }
    end,

    calculate = function(self, card, context)
        if context.joker_main then
            return {
                message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xmult } },
                Xmult_mod = card.ability.extra.Xmult,
            }
        end

        -- UPGRADE CONTEXT 'IF' - BEAT STAKE IN A SINGLE HAND
        if G.GAME.current_round.hands_played <= 1 and context.end_of_round then
            card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_gain
            return {
                message = 'Cruising!',
                sound = 'LJet_SCruiseUpgrade',
                colour = G.C.MULT,
                card = card
            }
        end
        
        -- RESET IF 'UPGRADE' NOT FULFILLED - MORE THAN ONE HAND PER BLIND IS USED
        if G.GAME.current_round.hands_played > 1 and context.end_of_round then
            card.ability.extra.Xmult = 1
            return{
                message = 'Subsonic...',
                sound = 'LJet_SCruiseReset',
                colour = G.C.ATTENTION,
                card = card
            }
        end
    end
}
tawny narwhal
#

._.

daring fern
# tawny narwhal the wha

When it upgrades you need to check for context.cardarea == G.jokers so it wont upgrade for every card in hand.

manic rune
#

how do i grab the enhancement key from a card

slow ocean
#

basically nest the upgrade statement inside an if statement with context.cardarea == G.jokers

digital niche
manic rune
#

label?

digital niche
#

when making an enhancement there is a "label" part

slow ocean
#

try referencing some lucky cat

manic rune
#

no no, thats not what i meant

digital niche
#

oh nvm than

tawny narwhal
manic rune
#

i want to grab the enhancement's key from this

tawny narwhal
#

Or have I done something extra wrong

digital niche
#

how can i make the game recognize a certain group of enhancements? like how there are "food jokers" that are recognized as food

tired skiff
daring fern
manic rune
#

this one?

tired skiff
#

yeah thank you

radiant plank
#

why are debuffed cards still being scored using this piece of code to debuff a card?

if context.before and context.cardarea == G.jokers then
  local debuff_card_n = 1 + math.floor(#context.scoring_hand * pseudorandom("j_lemon"))
  local card_to_debuff = context.scoring_hand[debuff_card_n]
  G.E_MANAGER:add_event(Event({
    func = function()
      card_to_debuff:juice_up()
      SMODS.debuff_card(card_to_debuff, true, "j_lemon")
      SMODS.recalc_debuff(card_to_debuff)
      card_to_debuff.debuff = true
      return true
    end
  })) 
  return {
    message = localize("k_debuffed"),
    colour = G.C.RED
  }
end
slow ocean
#

this is how i made food jokers for "Cut the Cheese" in JankJonklers, i just used joker keys in that case

tawny narwhal
manic rune
# radiant plank why are debuffed cards still being scored using this piece of code to debuff a c...
if context.before and context.cardarea == G.jokers then
  local debuff_card_n = 1 + math.floor(#context.scoring_hand * pseudorandom("j_lemon"))
  local card_to_debuff = context.scoring_hand[debuff_card_n]
      SMODS.debuff_card(card_to_debuff, true, "j_lemon")
      SMODS.recalc_debuff(card_to_debuff)
      card_to_debuff.debuff = true
  G.E_MANAGER:add_event(Event({
    func = function()
      card_to_debuff:juice_up()
      return true
    end
  })) 
  return {
    message = localize("k_debuffed"),
    colour = G.C.RED
  }
end
#

try this instead

#

maybe it will work

tired skiff
manic rune
#

aesprite

tired skiff
daring fern
tawny narwhal
#

swagger

slow ocean
#

first_names = { john, jack, larry, tom }

tawny narwhal
#

cheers something

slow ocean
#

first_names[0] returns john

willow void
radiant plank
digital niche
slow ocean
#

aye

digital niche
#

tyty!

manic rune
radiant plank
#

want to have the debuff to activate like a midas mask turns face cards gold but this debuffs the cards before it gets put into the "scoring area" of the screen

manic rune
slow ocean
#

its been a while

#

what about the steel joker? i forgot the name

#

i used to know how to fetch this

#

oh

#

let me rummage through old jankjonkler code

crisp coral
#

hiii lyman

slow ocean
#

hi bestie

crisp coral
#

:3

manic rune
#

oh, this seems like it, thanks

slow ocean
#

if context.other_card.ability.name == 'Glass Card' then

#

that works ye

manic rune
slow ocean
#

adjust it accordingly but basically its .ability.name == [KEY]

manic rune
#

isnt that the enhancement's name?

slow ocean
#

whoops

crisp coral
#

.config.center.key == key

slow ocean
#

did not mean to ping there

#

yeah there we go myst got it

manic rune
#

nice, thanks :3

slow ocean
#

if you were to want to do it by name you could do an array like

digital niche
#

oh wwait no misunderstood

crisp coral
#

i'm the only weird one here

digital niche
#

im a little slow rn sorry haha

slow ocean
#

valid_enchs = ['Steel Card', 'Glass Card']

#

then iterate that

digital niche
crisp coral
#

guh

slow ocean
#

one day if i ever get the hutzpah to code again i'd like to make a tag api

slow ocean
#

not like skip tags but like tags for cards, so stuff could be automatically labeled as "food" joker or "joker with jimbo in the art"

daring fern
manic rune
#

ohh yeah, that would be nice

unkempt thicket
slow ocean
#

would be nice to not have to update my old jokers for cross compatability

crisp coral
#

jokers with too many lines of text

manic rune
#

was that directed towards me myst

#

🪫

slow ocean
#

my honest reaction

crisp coral
#

idk man

tawny narwhal
#

@daring fern It works perfectly now. You're a tru blu legend

slow ocean
#

what would even be useful tags anyway

manic rune
#

food jokers is definitely useful

slow ocean
#

food jokers, obviously
suit jokers probably would make sense
stuff that effects specific enchantments?

#

chip/mult jokers

daring fern
#

How could one check if a joker doesn't score at all during a hand?

crisp coral
#

iirc food and space themed

slow ocean
manic rune
#

i want to cave dive ngl

#

:3

slow ocean
#

after the score check check if said boolean is true

crisp coral
#

uhhh i guess via context.post_trigger??

slow ocean
#

but yeah also depends on what context youre trying to access

unkempt thicket
manic rune
#

sfasdsal 5k5 lines

slow ocean
#

if youre checking if other jokers scored, uhhh, good luck

crisp coral
#

fecundity my beloved

manic rune
#

gepard left, here we go

tired skiff
#

or things i should know

manic rune
#

uhhhh watch a tutorial or something, im bad at it myself

#

;3

#

sorri

tired skiff
#

ok

crisp coral
#

i love gaslighting my players

tired skiff
manic rune
#

blind was certainly something else

rose dragon
#

why isn't the atlas that i created with SMODS.Atlas not appearing in G.ASSET_ATLAS but works fine with other things?

digital niche
#

what should i make for the fusion between wild+wild?

crisp coral
#

It's only added to G.ASSET_ATLAS after SMODS atlases have been injected

tawny narwhal
#

Little more help needed. I have:

        if G.GAME.current_round.hands_played > 1 and context.end_of_round and context.cardarea == G.jokers then
            card.ability.extra.Xmult = 1
            return{
                message = 'Subsonic...',
                sound = 'LJet_SCruiseReset',
                colour = G.C.ATTENTION,
            }
        end```

This resets the joker at the "end of round", but I want it to reset as soon as the first hand has scored and failed to win the round. What would I do to check that specifically?
crisp coral
#

context.after

tawny narwhal
#

Holymoly

#

bruh you right

crisp coral
#

that triggers after any hand is played

daring fern
#

Where does cryptid define its colours?

crisp coral
#

loc_colours

unkempt thicket
tawny narwhal
#

So I'd say if G.GAME.current_round.hands_played >= 1 and context.after and not context.end_of_round and context.cardarea == G.jokers then?

daring fern
crisp coral
#

uhhh iirc hands_played gets incremented after after triggers

#

actually

#

yeah looks good

crisp coral
tawny narwhal
#

So that would reset the card in the after but ONLY if the round isn't won in a single hand?

crisp coral
#

it would trigger from the second hand onwards

manic rune
crisp coral
#

not necessarily round isn't won

manic rune
tawny narwhal
manic rune
#

this is truly the potential joker of all time

digital niche
#

i think ill end modding for today, cant think of something for wild+wild, maybe tomorrow ill be able, gn everyone!

manic rune
#

gn rafaelly

tawny narwhal
#

gn good sir

gilded narwhal
#

hey gang how does one create their own context

#

I need to make one that's specifically after cashing out

scarlet spire
#

it's genuinely as simple as patching in a call for SMODS.calculate_context

#

let me get an example, one second

#

here's a patch I made for a context of when the ease_dollars function is called

#

you just call SMODS.calculate_context({name_of_context = true})

#

you can add other variables to the table too, like how i'm defining context.dollars_added as the ease_dollars mod

gilded narwhal
#

omg that's so great

#

when was that added

scarlet spire
#

I think that's just been a part of the contexts system for a while

#

not too knowledgeable of it, I just know it exists

gilded narwhal
#

that wouldve been nice to know a while ago lmao

daring fern
gilded narwhal
#

oh that's a thing?

#

didn't know that

daring fern
chilly tendon
#

Oh god seals on jokers is an insane thought

#

But does that mean that something like hanging chad scores a card 3 times or 4?

daring fern
chilly tendon
#

I see

#

Photochad combo would reign supreme

rose dragon
#

Why isn't this drawing anything onto the card?

SMODS.DrawStep{
    key = "pin",
    order = 100,
    func = function (card, layer)
        if card.ability.pin then
            local sprite = KMOD.pins[card.ability.pin].sprite
            sprite.role.draw_major = card
            sprite.VT = card.VT
            sprite:draw_shader('dissolve', 0, nil, nil, card.children.center, 0.1, nil, nil, nil)
        end
    end,
    conditions = { vortex = false, facing = 'front' },
}
tired skiff
#

my art for a joker im working on (still work in progress)

#

opinions?

daring fern
last sentinel
#

if v is a glass card will next(SMODS.get_enhancements(v)) return 'm_glass' ?

fickle stag
#

are there any guides / templates for making joker art?

normal crest
last sentinel
#

I need the key for whatever enhancement the joker has, could be any enhancement

normal crest
#

get_enhancements returns a list of enhancements a card has, I think smods has an optional feature to allow cards to have multiple enhancements

last sentinel
#

ahhh i see

night juniper
onyx sonnet
#

So you can do message_card = card

daring fern
#

How could one make jokers show up in the shop with seals?

tired skiff
#

yeah they do need contarst

#

this one looks better

chilly tendon
willow void
#

is there any way to carry a variable between to if context statements?

#

im trying to take a condition being met in context.before and make a joker score in context.main dependent on the result

#

this seems very simple but i am blanking hard lol

tired skiff
#

LETS GOOOOOO

#

i just relised my wording mistake but ehh

tall salmon
tired skiff
tall salmon
#

lmao fair

crisp coral
#

thank you John Polybridge

native zinc
hexed heath
chilly tendon
#

You think it'd be possible to make a joker that adds quick time events into balatro

chilly tendon
#

I think it'd be funny if the quick time events were based on the hand you played

#

You play a flush if with like an Ace 8 4 2 and King and then you'd have to type A 8 4 2 and K in a random order

daring fern
#

How could one make it so jokers in the shop have a chance of having a seal?

rose dragon
#

patches*

tall wharf
gleaming jungle
#

Hey all,
trying to make a resource pack as a mod rather than overwriting original files, and getting stuck on replacing the Soul in the centers atlas. The rest of the centers atlas sheet works, but not that one. Code is here, any help appreciated :>

rain slate
#

like how the legendaries are two sprites layered on top of each other

gleaming jungle
#

oh really? i missed that part

#

i don't mean the resulting jokers to be clear i just mean the actual Soul card itself

daring fern
rain slate
#

the soul card is also 2 sprites

gleaming jungle
#

oh that i do know

#

crystal heart (row two, column one) and heart (row three, column three)

#

the card itself works but not the heart on top

tall wharf
#

when i made my resource pack i used malverk which allows you to do something like in Minecraft with the resource pack selector when

gleaming jungle
#

oh cool

tall wharf
#

but the mod has to be specifically made for it

gleaming jungle
#

hadn't heard of that, i will look into it (especially because that way it'll let me overwrite individual ones if i want)

#

for the time being though i would just like to know why the soul over-layer isn't working

hushed field
#

atlas keys are case sensitive no?

#

i'm not entirely sure whether they are, but if they are, you want to use the key centers, not Centers

gleaming jungle
#

i was just using the ones from the original code

hushed field
#

are you sure? the original code isn't capitalized, I think

gleaming jungle
#

...nevermind, i could've sworn it was

#

i swear if it's just that lmao

tall wharf
#

also it seems you're adding custom playing cards

gleaming jungle
#

yeah i've been meaning to move that over to the friends of jimbo smods api

#

just haven't been doing much of it myself recently

#

nah, made it centers and no change

#

my assumption is that it's because it's technically an animated asset, but I can't find any smods documentation on it

hushed field
#

the soul isn't an animated sprite

#

it's just a static sprite placed atop a moving ui element

daring fern
#

Is there a way to change the seal text if its on a joker?

gleaming jungle
hushed field
#

I don't know why it wouldn't override if you've properly set up the keys. Strange.

gleaming jungle
#

especially because before moving it over to a mod, just overwriting the enhancers png in the extracted exe worked fine

hushed field
#

I think it'll be more worthwhile just setting this up through Malverk, rather than trying to diagnose this

gleaming jungle
#

you're not wrong but i'd still like to know :P

#

definitely will be dw

hushed field
#

yeah, no clue why it's not loading in. The soul is grabbed from that atlas, it's not loading in at a strange moment or anything. Something else is preventing that atlas from being overwritten in some way, I think

#

maybe it gets set in a weird way in an additional place, but if that's the case, the source code doesn't tell me

rose dragon
#

why isn't this drawing the sprite?

local sprite = KMOD.pins[card.ability.pin].sprite
sprite:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil, card.children.center, 0, 0)
hushed field
#

does talisman mess with the usability of math.floor, math.max and math.min?

plush cove
#

not really

#

you just need to do to_big

rain slate
#

just gotta use that like everywhere

plush cove
#

to_big = to_big or function(x) return x end

rain slate
#

everywhere you'd use numbers?

plush cove
#

yeah

rain slate
#

like... literally everywhere?

#

like does this need to be to_bigged? cuz that's kinda annoying context.card.config.center.rarity == 4

#

or this card:juice_up(0.8, 0.8)

hushed field
#

only in comparisons

maiden phoenix
#

Usually the problematic ones are dollars and planet level, the rest shouldn't require to_big, also yea it's used for comparisons

rain slate
#

weird

#

I'd expect it to be used in something like return { mult = x }

rose dragon
#

is there ANY good documentation on how to draw objects onto a card using DrawStep? nothing is working for me

crisp coral
#

which object

#

Cards require a CardArea

#

Sprites and Text can be added via Object nodes

rose dragon
#

like drawing images like seals and stuff onto a card

crisp coral
#

n = G.UIT.O, config = {object = SpriteObj }

rose dragon
#

?

crisp coral
#

oh

#

card

#

SMODS.DrawStep

rose dragon
#

yea i am using that

#

the shader system is too confusing

hushed field
#

I've not been able to set this up in a way that's Talisman proof, honestly

crisp coral
#

are you drawing sprites or shaders????

rose dragon
# crisp coral SMODS.DrawStep

this doesn't do anything for some reason

function KMOD.draw_extras(card, layer)
    if card.ability.pin then
        local sprite = KMOD.pins[card.ability.pin].sprite
        sprite.role.draw_major = card
        sprite.VT = card.VT
        sprite:draw_shader('dissolve', 0, nil, nil,
                    card.children.center, 0.1, nil, nil, nil)
    end
end
primal robin
#

He's definitely cooking smth

foggy fox
#

Can I have some help with modding, im not really experienced in it, how do i create my own rarity?

reef belfry
maiden phoenix
graceful prawn
#

Hey quick question, is there a zip file somewhere that contains all 150 joker pngs?

dreamy thunder
vagrant moth
jagged radish
#

If I might ask, what's the thing that makes gamepass unmoddable?

manic rune
#

not unmoddable

#

just that its still being worked on

maiden river
#

is there a way to get the number of chips a hand is (like the blue number)

#

I'm cooking up something evil

maiden river
#

what a hero

#

is it just hand_chips?

crisp coral
#

yeah

daring fern
#

Yes.

crisp coral
#

it's a global

maiden river
#

oh I see

#

here's what I'm cooking btw

next timber
#

how can i retrigger multiple other cards from a seal's calculate?

daring fern
next timber
#

yes

daring fern
#

You could check if context.other_card is the card you want.

next timber
#

how to i specify to retrigger the other card? i thought i just needed to return card = context.other_card but thats still just retriggering the card with the seal

lavish folio
#

Is there a place to get started with modding?

#

As a developer?

#

Not seeing any guides outside of "how to install mods in balatro"

lavish folio
#

my goat

daring fern
next timber
#

im trying to make a seal that retriggers every other scored card with one of a list of seals

#

wait hang on i may be stupid

#

i may just not be testing correctly

#

no im not

#

yeah it isnt working

daring fern
next timber
#

thats what im doin

#

its only retriggering itself

#

im trying to send screenshots of my code but my comptuers being a bitch

#

and ill send my table contains function hang on

tall wharf
#

i think i forget to check the deck lmaooooo

#

was trying to prevent softlock

daring fern
# next timber

I think you would have to hook calculate to check a card has that seal then checking for other cards that have a seal then retriggering those.

next timber
#

seems like a pretty simple thing to have to hook for

daring fern
next timber
#

can i just patch calculate to provide context.other_card to seals

#

seems like a simple fix

daring fern
graceful prawn
#

anyone have a string array of all 150 jokers lying around 💔

graceful prawn
daring fern
#

Why doesn't context.post_trigger count retriggers?

#

The gold seals give $3 when the joker its on is triggered.

rancid bridge
#

unrelated but the fact you didn't go for the straight flush..

heavy canopy
#

Where can I find documentation about creating your own joker ?

daring fern
heavy canopy
#

thx

reef belfry
#

Would the lighting look weird in game

stark geode
#

is there a way to make the game rip 200 wheel of fortunes

daring fern
stark geode
#

yes

#

i want to test if wheel is in fact

#

1 in 4

wintry solar
#

It is 1 in 4

hushed field
#

people are just bad at what judging what 1 in 4 is supposed to feel like

analog pilot
#

people also misunderstand what “1 in 4” actually means, it is a little misleading

minor magnet
analog pilot
#

it makes it seem like every four times you spin, you should get it at least once

#

but each spin is an independent event

stark geode
analog pilot
#

I know I was just sayin it to say it lol

#

I’m in a statistics class at the moment it makes me feel smart to talk about this

tall wharf
stark geode
#

Stat teacher said if I bring him the data we can run the numbers on it

analog pilot
#

lol that’s real

stark geode
#

I gotta rip 200 wheels

turbid maple
#

im sure someone has analyzed balatro's pseudorandom scheme by now

runic pecan
hushed field
tawny narwhal
#

Hola peoples

hushed field
#

yo yo yo

tawny narwhal
#

Hep pls

heavy canopy
#

Is there a functino similar to joker:set_edition() but to add a sticker to a joker ?

#

like would joker:set_sticker() work ?

heavy canopy
stark geode
#

Cryptid

manic rune
#

good morning chat

stark geode
manic rune
#

gambling

stark geode
#

200 wheels 200 jimbos

runic pecan
#

I've been dwelling in mod devving instead of playing the game for far too long, to the point that I forgot some other mod stuff.

tawny narwhal
#

I have a joker that "For every consecutive blind beaten with a single hand, this Joker gains x1.75 Mult Resets if more than 1 hand is played"

The joker works, but the reset is being problematic.

turbid maple
native zinc
tawny narwhal
# tawny narwhal I have a joker that ` "For every consecutive blind beaten with a single hand, th...

Here is what I have so far.

-- RESET IF 'UPGRADE' NOT FULFILLED - MORE THAN ONE HAND PER BLIND IS USED if G.GAME.current_round.hands_played >= 1 and context.end_of_round and context.cardarea == G.jokers then card.ability.extra.Xmult = 1 return{ message = 'Subsonic...', sound = 'LJet_SCruiseReset', colour = G.C.ATTENTION, } end

ATM it triggers over and over. I need more defined 'if' so that it only resets the one time (right after first hand is played and blind isn't won)

turbid maple
#

Is there a good way to check when Ante is over that's not checking whether you beat a boss blind

runic pecan
tawny narwhal
#

Do you mean and not card.ability.extra.Xmult = 1??

hushed field
runic pecan
tawny narwhal
#

Oh valid you right

stark geode
#

So the wheels are done ripping

#

Wheel of hope is at 72.5

brazen tusk
#

what am i doing wrong here? says other_card is returning nil

stark geode
#

145 fails

frosty dock
gleaming jungle
#

is there something similar to malverk for fonts/language files?

frosty dock
#

why do people always forget about ~=

runic pecan
frosty dock
stark geode
lament agate
#

is there any reference that i can read to mod the language file

#

im going to make a language mod thats similar to BUMod

gleaming jungle
frosty dock
#

I'm saying not expr == 1 can't possibly be true because not expr is a boolean for any expression

lament agate
stark geode
gleaming jungle
#

in what sense?

lament agate
#

people crashed because of your mod

lament agate
stark geode
#

Don't you dare blame the perk