#💻・modding-dev

1 messages · Page 624 of 1

viscid talon
#

and the joker should be spawning with this edition

#

but i dont know if the shader is defined or

#

im confused

terse merlin
#

hm

viscid talon
#

i have the .fs file here

terse merlin
#

you have debugplus

viscid talon
#

yeas

terse merlin
#

and it is supposedly defined as an edition

#

try cycling on a random joker with Q to give it that edition

#

or ctrl + q but that by default closes the window so

#

config

viscid talon
#

only have the main 4

terse merlin
#

so the edition isnt properly defined

#

doesnt jokerforge which youre using handle that alone?

#

you just export it with a defined edition, and then just swap out the shader

viscid talon
#

it doesnt, no

#

it always goes for the default editions

terse merlin
#

no you dont have the edition in the first place

#

like it doesnt register

#

unless you specifically hid it from collection and debugplus

viscid talon
#

wait, that might be it

#

wait no

terse merlin
#

i dont know, im an artist not a bala programmer sorry

viscid talon
#

idk either, it ok

sleek siren
#

It's been a while since I've done balatro modding, so I'm a bit rusty, how would I be able to destory the leftmost card after a hand is finished playing?

slim ferry
faint yacht
#
if context.destroy_card and context.destroy_card == context.full_hand[1] then return { remove = true } end
slim ferry
#

so that would be why it isnt there

viscid talon
#

o

viscid talon
#

@slim ferry what do i do 😭

slim ferry
#

An on mobile

#

Cant read

daring fern
viscid talon
#

loading?

#

i dont think so? im not sure how you load a file

daring fern
viscid talon
#

,,,,ohhh

#

ITS BEAUTIFULLLLLLLLLLLLLLLLLLLLLLL

solid salmon
#

coll

#

*cool

terse merlin
slim ferry
#

Oh thats what that shader was for

#

Peak

solid salmon
#

this code is not makin spectrals

daring fern
#

solid salmon
#

heck ass hallucination hates non tarots

viscid talon
#
        if not blind.disabled then
            if context.setting_blind then
                blind.hands = {}
                for _, poker_hand in ipairs(G.handlist) do
                    blind.hands[poker_hand] = false
                end
            end
            if context.debuff_hand then
                if blind.hands[context.scoring_name] then
                    blind.triggered = true
                    return {
                        debuff = true
                    }
                end
                if not context.check then
                    blind.hands[context.scoring_name] = true
                end
            end
        end
    end```
#

anyway i can modify this so that you cant play two suits consecutively?

#

e.g. spade -> spade

#

nvm made it work >:)

#

this blind is evil LOL

sleek siren
#

is there a way I can get the blind requirement for a round?

daring fern
sleek siren
#

thank you!

sleek siren
#

How can I add something to the score directly after the chips and mult are calculated?

red flower
sleek siren
#

Total score

red flower
#

you want context.after probably

sleek siren
#

Thanks! ^^

sleek siren
red flower
#

hmm you probably need an event then

sleek siren
#

That worked! Thank you!

daring fern
#

copper perch
#

Would there be a way I can have 2 different odds defined in my local variables? My plan is to do a roll for 1/1000 and then 1/25.

    config = {
        jack_odds = 1000,
        win_odds = 25,
        extra = {
            gamble_cost = 3,
            norm_dollars = 5,
            jack_dollars = 100,
        }
    },
    loc_vars = function(self, info_queue, card)
        local probabilities_normal, odds = SMODS.get_probability_vars(card, 1, card.ability.odds, "Wyfole_GAMBLE")
        return { vars = { probabilities_normal, odds } }
    end,
        calc_dollar_bonus = function(self, card)
        return card.ability.extra.dollars
    end
copper perch
#

How would I randomize both though? Cause for 1 you need something akin to local probabilities_normal, odds = SMODS.get_probability_vars(card, 1, card.ability.jack_odds, "Wyfole_GAMBLE_JACKPOT") in loc_vars but I'd need to define 2

frosty rampart
#
local probabilities_normal1, odds1 = SMODS.get_probability_vars(card, 1, card.ability.jack_odds, "Wyfole_GAMBLE_JACKPOT1")
local probabilities_normal2, odds2 = SMODS.get_probability_vars(card, 1, card.ability.win_odds, "Wyfole_GAMBLE_JACKPOT2")
#

and then return all four variables

#

and use #1# through #4# in the localization

copper perch
#

oh, I thought they greyed out text when I typed odds1 meant it couldn't work. Thanks

#

whats the {C:} for the gold color, like in golden joker?

obsidian spear
#

why does
SMODS.get_enhancements(context.other_card)[1]
return nil but
SMODS.get_enhancements(context.other_card) returns a table of strings

daring fern
obsidian spear
#

so why doesnt #SMODS.get_enhancements(context.other_card) work

#

and instead give 0

daring fern
obsidian spear
#

how do i get if theres any enhancements

daring fern
reef belfry
#

how do you check if a certain consumable has been used before throughout the entire run

daring fern
reef belfry
#

another question, how would you set an existing poker hand (i.e Flush) into not being visible using SMODS.is_poker_hand_visible

daring fern
urban wasp
#

isn't there some smods function to look for a specific joker that a player owns

urban wasp
#

oh so literally just like SMODS.find_card("j_joker")

daring fern
urban wasp
#

so like this?

if next(SMODS.find_card('j_chm_rotten')) then
#

easy enough i've just never had to use it lol

reef belfry
#

Ive been jabbing away at this for the past minute and ive got 0 clue whats happening to it

daring fern
spiral mural
#

im trying out a shader thing and im getting a error about a shader uniform not existing

{
    // Take pixel color (rgba) from texture at texture_coords, equivalent of texture2D in GLSL
    vec4 tex = Texel(texture, texture_coords);
    // Position of a pixel within the sprite
    vec2 uv = (((texture_coords)*(image_details)) - texture_details.xy*texture_details.ba)/texture_details.ba;

    vec4 hsl = HSL(tex); // convert texture to HSL values
    vec4 bhsl = HSL(tex); // make a base copy of HSL values

    vec4 hslInvert = hsl;
    hslInvert.x = hslInvert.x;
    hslInvert.y = hslInvert.y;
    hslInvert.z = 1-hslInvert.z
    
    tex = sepiaVec;

    // required
    return dissolve_mask(tex*colour, texture_coords, uv);
}```
umbral zodiac
spiral mural
umbral zodiac
#

yea you have to use the variable somewhere

spiral mural
#

use it for what though

umbral zodiac
#

if you dont want to use it add something like

if (greyscale.y > greyscale.y*2) {tex = vec4(0);}
#

it really doesnt matter , it just has to be used once for glsl logic

spiral mural
#

gonna test it

umbral zodiac
#

this is assuming you have defined greyscale as a uniform beforehand

reef belfry
umbral zodiac
#

just remove the == false/true, which will default it to if it exists at all

#

if you want to check for it not existing do not G.GAME.consumable_usage['c_jupiter']

daring fern
reef belfry
#

I seeee

spiral mural
spiral mural
#

nvm found out

#

hsl was being parsed as rgb

feral tree
#

how do i get an event to detect when the ante changes?

daring fern
reef belfry
#

ok last last last thing, how do i remove the planet consumable from a pool until it is visible? (v is hand type and k is its respective consumable)

feral tree
daring fern
daring fern
spiral mural
# spiral mural why did it come out as evil and green and purple (basically same code expect for...

now its just messing with me, that's just a inverted joker!
code:

vec4 effect( vec4 colour, Image texture, vec2 texture_coords, vec2 screen_coords )
{
    // Take pixel color (rgba) from `texture` at `texture_coords`, equivalent of texture2D in GLSL
    vec4 tex = Texel(texture, texture_coords);
    // Position of a pixel within the sprite
    vec2 uv = (((texture_coords)*(image_details)) - texture_details.xy*texture_details.ba)/texture_details.ba;

    vec4 hsl = HSL(tex); // convert texture to HSL values
    vec4 bhsl = HSL(tex); // make a base copy of HSL values

    vec4 hslInvert = hsl;
    hslInvert.x = hslInvert.x;
    hslInvert.y = hslInvert.y;
    hslInvert.z = 1-hslInvert.z;
    hslInvert = RGB(hslInvert);
    
    tex = hslInvert;
    if (greyscale.y > greyscale.y*2) {tex = vec4(0);}
    // required
    return dissolve_mask(tex*colour, texture_coords, uv);
}```
#

what it should look it roughly

reef belfry
daring fern
reef belfry
#

ok everything works as intended, thank you very much!!

wintry solar
reef belfry
#

actually there is one more thing, 3oak, 4oak, and i presume 5oak still score all cards instead of 2 in the default pair, would stopping any other card that isnt in the first pair have something to do with context.evaluate_poker_hand?

azure ember
#

I want to start working on a mod that drastically changes a lot of mechanics instead of adding objects inside preexisting boundries. For example, I want to make jokers that have a use option like a consumable that debuffs them for the round, and also change how cards are positioned and score in the played area. How can/should I do this best?

daring fern
#

final monolith
#

I was looking inside the vanilla reforged jokers, and I read this function in Blackboard

playing_card:is_suit('Spades', nil, true)

what do the arguments nil, true do?

strong plume
#

Chat i've been trying to make a joker that only appears when I have a seal in deck, but I keep crashing. Does anyone know what I should be doing instead?

EDIT: nvm it was just smack dab in the middle of the calculate function for some reason

lament agate
#

@sly peak whats the name of your mod that recreates the custom hand leveling system thats similar to Jen's Almanac

slim ferry
#

I assume the last is bypass_debuff but im not sure, its most likely joker forge jank

#

Just look at vanillaremade instead

final monolith
#

it's the exact same in vanilla remade lol

slim ferry
#

Oh well then its probably the one thats true being bypass_debuff

final monolith
#

bypass_debuff sounds like it should be a boolean so I doubt that's the nil one

slim ferry
#

i mean nil is identical to false in a lot of ways (unless someone uses == false for whatever reason)

final monolith
#

Is there a straightforward way to pick a random tarot in code?

#

not generate it just pick it out of the 22

long sun
#

i currently have this code for creating Hanafuda cards. however, this allows for duplicates

#

what do i need to do to disallow duplicates, like Tarots and Planets do?

crisp coral
#

cull the chaffs pool, see common_events.lua at --cull the pool

#

heres a shortened version for lobcorp

umbral spire
#
local Card_click_ref = Card.click
function Card:click()
    if self.label == 'j_mc_kaballah' then
        if G.jokers.cards then 
            for k, v in ipairs(G.jokers.cards) do 
                if k ~= MC.my_pos(G.jokers.cards) then 
                    MC.manipulate_values(G.jokers.cards[k].ability, self.ability.extra.x_amt)
                end
            end
        end
    end
    return Card_click_ref(self)
end
final monolith
#

I found this in the documentation, but it just doesn't seem to be true

#

"card" seems to be referring to the joker that's doing the calculation, not the card being sold

obsidian spear
#
        elseif context.repetition and context.cardarea == G.play and context.other_card.ability.Bitters_s_target then
            return {
                repetitions = card.ability.extra.repetitions
            }

INFO - [G] 2025-11-23 00:56:48 :: WARN :: DefaultLogger :: Found effect table with no assigned repetitions during repetition check
INFO - [G] 2025-11-23 00:56:48 :: WARN :: DefaultLogger :: Found effect table with no assigned repetitions during repetition check
why...

#

i know its smth dumb

tired kestrel
#

has anyone have an idea on how I can get something like this to work?

umbral spire
#

also i'm making this stat thingy on each of my flag jokers and idk if this is the most efficient way to define every single flag's stickers like this

SMODS.Sticker{
    key = "stats_afghanistan",
    default_compat = true,
    atlas = "Stickers",
    pos = {x = 1, y = 0},
    rate = 0,
    badge_colour = HEX("92118e"),
    sets =  { ["Joker"] = true },
}
SMODS.Sticker{
    key = "stats_albania",
    default_compat = true,
    atlas = "Stickers",
    pos = {x = 1, y = 0},
    rate = 0,
    badge_colour = HEX("92118e"),
    sets =  { ["Joker"] = true },
}
..etc..
lament agate
#

is it G.jokers

#

or is it G.jokers.card

umbral spire
tired kestrel
#

were you all refering to what I'm doing?

#

or trying to make

#

that I had trouble with?

umbral spire
umbral spire
#

bc i think that'll update it

#

wait not atlases

#

localization files

tired kestrel
umbral spire
#

so like K, Q, J, 9, 7?

#

it'll count as a straight?

tired kestrel
# tired kestrel

if you see the example, there's a 10 missing. from K, Q, J, 9 you need a 10 so that joker would make it up to fill in the gap

umbral spire
#

oh

#

so Ace, King, Queen, Jack counts as a straight, basically?

tired kestrel
#

hm...

umbral spire
tired kestrel
#

The reaso nwhy I thought about this is because I want to make the function from Pai gow where the joker can make itself into a straight

umbral spire
#

I have no clue how a Joker would turn into a Playing Card.

#

when would it transform anyways.

#

in the middle of play?

tired kestrel
#

cause when I saw pai gow they use a joker like this.

umbral spire
umbral spire
tired kestrel
umbral spire
#

does it self-destruct after use?

#

or there forever

tired kestrel
#

but rather make it count as a playing card.

tired kestrel
#

not one time use

umbral spire
#

This sounds like Four Fingers.. kind of..

tired kestrel
#

Yeah four fingers, except it automatically fills in the gap if you have this joker.

#

and depending on how many of this joker you have the more gaps you can fill in.

final monolith
umbral spire
#

oh soo like Ace, King, Jack, 10 will count as a Straight? (because it fills in as a Queen?)

#

@tired kestrel

lament agate
#

why doesnt this register?

final monolith
umbral spire
# tired kestrel Yeah.

Hm.. I'm not sure how to change the hand to a straight, but it'll maybe look something like:
which will insert 12 (queen) if you have something like 14, 13, (missing 12 here), 11, 10

            local hand = context.full_hand
            table.sort(hand, function(a, b) return a > b end)

            for i = 1, #hand - 1 do
                local curr = hand[i]
                local nextv = hand[i + 1]

                -- if there's a gap bigger than 1, that's your missing card
                if curr - nextv > 1 then
                    local missing = curr - 1
                    table.insert(hand, missing)
                    break -- dip out since we only wanna fill one gap
                end
            end
final monolith
tired kestrel
umbral spire
long sun
umbral spire
#

how do i do X for each joker with Y sticker?

tired kestrel
umbral spire
tired kestrel
#

||```
SMODS.Joker {
key = "holyecasino",
loc_txt = {
name = 'Hoyle Balatro (GBC)',
text = {
[1] = "Pai gow"
}
},
unlocked = true,
blueprint_compat = true,
perishable_compat = false,
rarity = 2,
cost = 5,
pos = { x = 0, y = 0 },
atlas = 'j_placeholder',
display_size = { w = 71, h = 95 },
config = { extra = { t_chips = 0, }, },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.t_chips, } }
end,
calculate = function(self, card, context)
if context.before and not context.blueprint and not context.repetition then
local hand = context.full_hand
table.sort(hand, function(a, b) return a > b end)

        for i = 1, #hand - 1 do
            local curr = hand[i]
            local nextv = hand[i + 1]

            -- if there's a gap bigger than 1, that's your missing card
            if curr - nextv > 1 then
                local missing = curr - 1
                table.insert(hand, missing)
                break -- dip out since we only wanna fill one gap
            end
        end
    end
    if context.joker_main then
        return {
            chips = card.ability.extra.t_chips
        }
    end
end

}

#

this

#

it's in-complete but yeah.

umbral spire
# tired kestrel ||``` SMODS.Joker { key = "holyecasino", loc_txt = { name = 'Hoy...

try this:

local ranks = {}

for _, card in ipairs(context.full_hand) do
    table.insert(ranks, card:get_id())
end

-- now sort the rank list
table.sort(ranks, function(a, b) return a > b end)

-- detect a missing value in the straight
local missing = nil

for i = 1, #ranks - 1 do
    local curr = ranks[i]
    local nextv = ranks[i + 1]

    if curr - nextv > 1 then
        missing = curr - 1
        break
    end
end
#

i forgot i hadd to check for the actual id (num)

#

;-

tired kestrel
#

uhh... this happened.

umbral spire
tired kestrel
umbral spire
final monolith
#

how can I prevent custom jokers to appear in the shop twice without showman?

daring fern
normal crest
#

that's default behavior tho

final monolith
#

mb

tired kestrel
#

in the meantime cna you also do the id thing?

umbral spire
#

i did there with the :get_id()?

tired kestrel
#

oh

#

nvm

final monolith
#

is there a quick way to reference a specific tarot chosen randomly?

solid salmon
#

hey guys

lament agate
#

how do you define audio again

solid salmon
#

little issue with this (and some other jokers)

#

they wont get stronger

solid salmon
lament agate
#

thanks walp

solid salmon
#

(under specific conditions)

crisp coral
lament agate
lament agate
solid salmon
#

also it still can turn played cards into wild cards

lament agate
solid salmon
#

i dont know what nxkoo is

#

like

#

am i supposed to make it kris the joker?

lament agate
#

sure

#

dark world kris

#

with dog ears

long sun
#

just to be sure, if my Joker is Blueprint-incompatible, do i need to wrap if not context.blueprint then ... end around its calculate function?

slim ferry
#

as of now yes

long sun
#

grand

#

thanks :D

slim ferry
#

pretty sure thats going to be automatic next release

long sun
#

ah awesome

#

(whenever next release will be, hehe)

sly peak
solid salmon
#

also the key wont alternate for this

lament agate
sly peak
lament agate
#

oh right thats ruby

solid salmon
lament agate
solid salmon
#

mmmmmmmmmmmmmmmmmmmmmm

#

best i can do is just copy and paste the image onto a joker card

lament agate
#

thats okay

#

how does planet card even work anyways

#

cause theres no use function here

#

@foggy ginkgo help me

normal crest
#

if there's no use function it just uses the default card:use_consumeable

#

So you gotta look at that one

normal crest
#

In card.lua

#

All Card methods are there

foggy ginkgo
lament agate
#

is there any mods wwith custom planet that i can look

foggy ginkgo
#

Cryptid :3

lament agate
#

fuck no

#

shoot me

foggy ginkgo
#

Pew

red flower
lament agate
#

im still trying to figure out why mods do this

red flower
#

which part

lament agate
#

almost every mods i saw, they always make their items local

#

like they dont even have SMODS.blabla

red flower
#

some of them do it to control the loading order

lament agate
#

oooohhh

red flower
#

there's probably an SMODS[obj.object_type] somewhere

lament agate
foggy ginkgo
#

N the goat

red flower
lament agate
#

AIJ only does mult and chips independently

sly peak
lament agate
viscid talon
#

cryrpid and pekreo

lament agate
#

RELEASE MEEEEE

lament agate
#

how can i replicate the glitching screen effect

sly peak
sly peak
# lament agate how can i replicate the glitching screen effect

You'll need to send your own variables to the CRT Shader
Mayhem patches like this

# Glitchiness during Transcendence
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = "G.SHADERS['CRT']:send('glitch_intensity', 0)--0.1*G.SETTINGS.GRAPHICS.crt/100 + (G.screenwipe_amt) + 1)"
position = "at"
payload = '''
    G.SHADERS['CRT']:send('glitch_intensity', transcendence_glitch or 0)
    G.SHADERS['CRT']:send('noise_fac', transcendence_noise or 0)
    G.SHADERS['CRT']:send('bloom_fac', transcendence_bloom or 0)
    G.SHADERS['CRT']:send('crt_intensity', transcendence_crt or 0)
'''
match_indent = true

# Cryptid compatibility
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = "G.SHADERS['CRT']:send('glitch_intensity', glitched_intensity or 0)"
position = "at"
payload = '''
    G.SHADERS['CRT']:send('glitch_intensity', glitched_intensity or 0)
    G.SHADERS['CRT']:send('noise_fac', transcendence_noise or 0)
    G.SHADERS['CRT']:send('bloom_fac', transcendence_bloom or 0)
    G.SHADERS['CRT']:send('crt_intensity', transcendence_crt or 0)
'''
match_indent = true
lament agate
sly peak
#

Man nice indentation

tired kestrel
solid salmon
#

@lament agate i think i overdid something

lament agate
lament agate
solid salmon
#

i just need to put "joker" somewhere

sly peak
lament agate
#

like 1

sly peak
#

Probably not gonna work but add 2 events, the first sets the variables to the desired values and the second has trigger = 'after' and a huge delay

#

Delay could potentially be multiplied by game speed so its normalised

solid salmon
#

congratulations nxkoo

#

you are now a jonkler

lament agate
#

thank you walp

solid salmon
#

now to add it to the sprite sheet

#

i put you next to astro :3

#

(ps astro gave me the astro art)

#

yk what its too perfect im adding a stray pixel like toby intended

#

nvm

daring fern
lament agate
solid salmon
#

gonna force yall to fuse later

stoic void
#

oh dear

hardy viper
#

hpot_unbreedable

lament agate
#

cg shut up

stoic void
#

😨

solid salmon
lament agate
#

THEYRE 14 CG

#

HEY

stoic void
#

I am

tall wharf
#

...

stoic void
solid salmon
#

im confused

stoic void
solid salmon
#

i was just making a joke about forcing fusions and then boom

tall wharf
#

oh you don't know the horrors

stoic void
#

uhhh you should help me make my minecraft mod

#

you as in the general population

stoic void
#

yes

#

really ideas are the things i want

solid salmon
#

im kinda busy with the miracle system of my mod

#

(well not that busy)

stoic void
#

thats fine

solid salmon
#

well hypothetically

#

if i said yes

#

what would you want me to do (no art i am geniunely ass)

lament agate
#

@lucid owl i remember your mod has a soul card in it

#

how do you draw the custom soul sprite

stoic void
solid salmon
stoic void
#

look at the message i replied to

#

but if you have none, thats fine

solid salmon
#

like i get you want minecraft stuff but like

#

what?

#

give me an idea and i could PROBABLY program it

stoic void
#

nah, i can try do code

solid salmon
#

... im so confused

stoic void
#

I need ideas only

#

if you have none, thats ok

#

"really ideas are the things i want"
"but if you have none, thats fine"

solid salmon
#

well tell me what already exists so no repeats

stoic void
solid salmon
#

ok uh 3 ideas

#

first food jokers based of minecraft foods

stoic void
solid salmon
#

second

#

maybe fusion compat for golden foods or something

#

third, allay: at the end of the shop creates a minecraft consumable or food joker

stoic void
#

thx

#

Ima adding you to the credits list just so i dont forget

lucid owl
#

check the code of soully

#

it's not documented

#

basically you can define a draw function in soul_pos

#

i just mostly copied over soul code from vanilla and removed unneeded parts, then tweaked values at random until it looked a little different

stoic void
#

actually

solid salmon
#

i kinda wanna help out

tired kestrel
#

finally figured out.

lament agate
#

where did you save soully

tired kestrel
stoic void
#

the google sheets can be commented on by anyone

lucid owl
gusty compass
#

i think the new steamodded update broke something, im very certain its SMODS.scoring_calculation and SMODS.scoring_parameter 🥀

#

cus it was working a bit earlier

lucid owl
#

steamodded hasn't been updated in a while

#

release wise

gusty compass
#

prob, but it mentions it changed something with SMODS.scoring_parameter

#

it was working in 1.0.0~BETA-0827c but not in the latest one

umbral spire
#

how do i get a jokers' sticker

umbral spire
umbral spire
#

wait are you making a Minecraft mod? :0

daring fern
umbral spire
daring fern
umbral spire
#

oh

umbral spire
#

how to check for a specfic sticker

daring fern
cyan lagoon
#

how can i make an enhancement works as a consumable?

umbral spire
#

You want it to be "use-able"?

cyan lagoon
#

i want a card that would have the use button like consumables

#

on it's own it doesn't do anything

#

like ccd cards

umbral spire
cyan lagoon
#

doingthe opposite got me kinda close, but it didn't get shown in the deck proper

versed swan
gusty compass
#

But it could be outdated and I'd need to tinker with it

solid salmon
#

is there a way to add voucher slots in the shop?

#

oh wait

#

there is

gusty compass
#

But it could be that my other parameter doesn't use smods.gui.operator

#

Idk

versed swan
gusty compass
#

Yea I have it hooked already

#

Its most likely SMODS.scoring_parameter

versed swan
#

I got no clue then

gusty compass
#

Yea I just tried to get rid of operator ui, same deal 😔

versed swan
#

I wanna see if I can fix this crash with an smods PR (since yours seems nonetheless similar to the crash I had before); is it okay if you send me a link tk your mod's repo?

gusty compass
#

I could send the main.lua file if that's ok

versed swan
#

Are you modding on like one file or smth

gusty compass
#

I'm coding the parameter on main.lua, the rest are separate files

versed swan
#

Ah

#

Yeah feel free, you can send it via dms if you wish as well

gusty compass
#

Alright

versed swan
#

Alright, ill read through it after I get back from work, thank you

gusty compass
#

thanks a lot

#

FYI I'm doing this on the latest steamodded version if that helps

solid salmon
#

guys

#

is there a way to remove vouchers from the shop

daring fern
solid salmon
#

that didnt work

daring fern
solid salmon
daring fern
solid salmon
#

you told me Card:remove

#

also do i put a value for that?

daring fern
solid salmon
#

ok i added it to the adding a voucher to the shop

cyan lagoon
#

how can i make a card immune to changes (enhancements, seal etc)?

daring fern
cyan lagoon
#

now, how do i id that card if it's a consumable?

wintry solar
cyan lagoon
daring fern
cyan lagoon
#

a playing card made into a consumable

daring fern
tired kestrel
#

it kinda works... but still I just wanted it to like detect an already number that doesn't get spaced in. though I have an idea about it.

lament agate
#

how do i detect if a boss blind is a showdown blind

cyan lagoon
cyan lagoon
daring fern
gusty compass
daring fern
cyan lagoon
wintry solar
solid salmon
#

@daring fern how am i supposed to make it remove vouchers

gusty compass
wintry solar
#

You want the scoring calc all of the time when your mod is installed?

gusty compass
#

i guess so

wintry solar
#

Then hook Game:start_run iirc

gusty compass
#

also the thing was working in 1.0.0~BETA-0827c, the code executed the calculation fine

#

yea i have it hooked

wintry solar
#

You don’t in the code you sent

gusty compass
#

did i not?

wintry solar
#

No you have it in a reset game global function

gusty compass
#

oh

wintry solar
#

That’ll be called part way through start run, I’m away from my dumps right now but I imagine that’s before the HUD is created

gusty compass
#

so how would i switch this to after the HUD is created, since my knowledge over hooking sucks

wintry solar
gusty compass
#

fair enough

#

alr let me try that

solid salmon
#

chat how do i make this remove vouchers after selling it

wintry solar
solid salmon
wintry solar
#

Oh right it doesn’t remove it

tired kestrel
solid salmon
wintry solar
#

Just remove the last card in the area

gusty compass
#

Just for clarification, would I have to override Game:start_run to apply this change or can I somehow call it and change it there

solid salmon
gusty compass
#

Alright

wintry solar
tired kestrel
#

eh. Y'know what I think I'll keep ti like that but still want to like for the 3rd card to be scored

gusty compass
#

welp i tried 😭

tired kestrel
#

nvm I got it to work somehow

solid salmon
#

is there a way to increase booster slots?

gusty compass
#

SMODS.change_booster_limit(mod) i believe

viscid talon
#

what do i do

daring fern
tired kestrel
#

why isn't the joker giving chips with a custom message?

viscid talon
#

oke

viscid talon
#

also all consumables seem to be broken 😭 😭 idk what the fuck jokerforge is doing but ill have to figure this out

tired kestrel
# daring fern Code?
SMODS.Joker {
    key = "holyecasino",
    loc_txt = {
        name = 'Hoyle Balatro (GBC)',
        text = {
            [1] = "Hoyle Balatro Strategy",
            [2] = " ",
            [3] = "Five-card the {C:attention}straight{} and insert  ",
            [4] = "{C:attention}Joker{} to the five-card missing gap.",
            [5] = "Scores {C:chips}12{} chips in a {C:attention}straight{}.     ",
            [6] = " ",
            [7] = "Reason: This sets up {C:attention}straight{} into  ",
            [8] = "{C:attention}striaght flush{} and fills in a       ",
            [9] = "missing gap for a {C:attention}striaght{}.        ",
            [10] = " ",
            [11] = " ",
            [12] = " "
        }
    },
    unlocked = true,
    blueprint_compat = true,
    perishable_compat = false,
    rarity = 2,
    cost = 5,
    pos = { x = 0, y = 0 },
    atlas = 'j_hoylebalatro',
    display_size = { w = 21 * 3.1, h = 30 * 3.1 },
    config = { extra = { t_chips = 12 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.t_chips } }
    end,
    calculate = function(self, card, context)
        if context.modify_scoring_hand and not context.blueprint then
            --[[return {
                add_to_hand = true
            }]]--
        end
        if context.before and not context.blueprint and not context.repetition then
            -- temporary
        end
        if context.joker_main then
            if next(context.poker_hands['Straight']) or next(context.poker_hands['Straight Flush']) then
                return {
                    message = 'WIN',
                    colour = G.C.CHIPS,
                    chips = card.ability.extra.t_chips
                }
            else
                return {
                    message = 'PUSH',
                    colour = G.C.FILTER
                }
            end
        end
    end
}
daring fern
solid salmon
#

GUYS

#

me shez wont update the variables

#

like this

#

(this works for d20 for some reason)

viscid talon
daring fern
solid salmon
solid salmon
#

also

#

numerator and denominator is a part of the vars

daring fern
#

Also you should be using card instead of self in SMODS.get_probability_vars

viscid talon
daring fern
# viscid talon ?

return {vars = {numerator, denominator, card.ability.extra.multvar}}

solid salmon
tired kestrel
#

it didn't even update the chips

tired kestrel
# daring fern Code?
if context.joker_main then
            if next(context.poker_hands['Straight']) or next(context.poker_hands['Straight Flush']) then
                return {
                    chip_message = {message = 'WIN', colour = G.C.CHIPS, sound = 'chips1'}
                }
            else
                return {
                    message = 'PUSH',
                    colour = G.C.FILTER
                }
            end
        end

this

#

hopefully I didn't do this wrong but yeah.

daring fern
tired kestrel
tired kestrel
tired kestrel
solid salmon
#

no i mean

#

like

#

that makes no sense

#

(but since its poker its chips)

tired kestrel
#

I'm confused.

solid salmon
#

guh

#

oh yeah

#

these values arent getting update for some reason

gusty compass
#

im so lost 😭

spiral mural
#

voided

gusty compass
#

didnt realise attempting to reset a scoring parameter caused the whole game to self destruct

#

🥀

solid salmon
#

im going to blow up my mod

gusty compass
#

same

midnight trellis
#

engine/ui.lua:693: attempt to index field 'colour' (a nil value) <- This error can just go suck me dry. There's no indication whatsoever if I'm on the right node depth. Hope that helps someone not waste 2 hours of their life.

red flower
#

i might put this in the vremade wiki

viscid talon
wild escarp
#

I've got this DrawStep for one of my Jokers, but it ends up lagging the game out over the course of a run, I'm assuming it's because it just keeps drawing over and over, but how do I fix it?

SMODS.DrawStep {
    key = 'willatro_heart',
    order = 50,
    func = function(card)
        if card.config.center.key == "j_willatro_heart" and (card.config.center.discovered or card.bypass_discovery_center) 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,
    conditions = { vortex = false, facing = 'front' },
}
gusty compass
#

i have absolutely no idea how i hook Game.start_run properly, since either it crashes or the game just becomes black upon starting a run, tried returning args, not returning args etc etc. im so lost 😭

red flower
#

should be something like this

slim ferry
#

(also SMODS.current_mod.reset_game_globals can do the same things usually)

gusty compass
#

i was doing something like this because i was told overriding was not a good idea: ```lua

Game.start_run = function(self, args)
SMODS.set_scoring_calculation("GG_powerCalc")
end

slim ferry
#

this is overriding

gusty compass
#

yea it was working before i updated SMODS

slim ferry
#

you need to run the original function

sharp arch
#
            end``` this is fine, right?
red flower
#

and only make it if it doesnt exist

red flower
#

notice the consumEables

sharp arch
loud summit
#

how do get the unscoring cards?

sharp arch
#
    loc_vars = function(self, info_queue, card)
        local fish_tally = 0
            for _, consumeable in ipairs(G.consumeables.cards) do
                if next(SMODS.find_card("c_jabong_bass")) or 
                next(SMODS.find_card("c_jabong_trout")) or 
                next(SMODS.find_card("c_jabong_tuna")) then 
                     fish_tally = fish_tally + 1
                end
            end
        return { vars = { card.ability.extra.dollars, card.ability.extra.dollars * fish_tally } }
    end,
    calc_dollar_bonus = function(self, card)
        local fish_tally = 0
        for _, consumeable in ipairs(G.consumeables.cards) do
                if next(SMODS.find_card("c_jabong_bass")) or 
                next(SMODS.find_card("c_jabong_trout")) or 
                next(SMODS.find_card("c_jabong_tuna")) then 
                     fish_tally = fish_tally + 1
                end
            end
        return fish_tally > 0 and card.ability.extra.dollars * fish_tally or nil
    end``` ok i fucked some shit up BAD
loud summit
#

how do you getthe unscoring cards

sharp arch
loud summit
#

in the before step i mean

sharp arch
#

well i guess itd be context.before instead of individual

#

ive never done that before

daring fern
loud summit
#

how do you destroy a card outside of context.destroy_card safetly

viscid talon
#

is it possible to have a specific consumable set appear in a store once you've successfuly redeemed one?

#

idk how to explain it

wind steppe
viscid talon
#

i have a consumable (daat) that has a specific requirement. i want it so that after i redeem daat, i want the rest of the divine cards (e.g. soul of hatchet) to be spawnable in a store

sharp arch
red flower
viscid talon
#

but i also want it to be a permanent unlock, much like how you can always get blueprint if you win a run

#

tldr how do you give consumables an unlolck requirement like some jokers

wind steppe
#

for consumables its The Exact Same As A Joker if you want unlock requirements

#

your case sounds like this isnt the best way to do it though

#

I'd patch into create_card_for_shop and add a chance to spawn divine cards if a specific profile setting is true

#

and set the profile setting when you redeem daat

viscid talon
#

profile setting?

#

oh okay, thats what i wanna do

wind steppe
#

G.PROFILES[G.SETTINGS.profile] is a table you can store things to

#

saved on reloads

#

its tied to the profile so if you reset profile itll reset too

red flower
wind steppe
#

when would you modify it though

red flower
#

at the start of the run

wind steppe
#

oh right

red flower
#

or when the unlock is met

wind steppe
#

nvm ignore me thats definitely better

#

keep the profile setting though

viscid talon
#

ok so i learned what a career stat is

#

im guessing i have to create a "career stat" that activates once i use daat

slim ferry
#

career stats already exist for most things

#

like consumable usage

viscid talon
#

thats true, but how can i make a specific one just for daat usage

slim ferry
#

so you can check for that

wind steppe
#

Every consumable has its own career stat

viscid talon
#

ooh i see

#

what would it be called then

wind steppe
#

idk

#

go dig around in the lovely dump or something

viscid talon
#

would it be smth like return G.PROFILES[G.SETTINGS.profile].career_stats.c_hatch_daat > to_big(1)

#

wots a lovely dump

wind steppe
#

in your mods folder

#

lovely folder

#

dump folder

#

That's Balatro's source code after it's patched

viscid talon
#

oke, checking rn

wind steppe
#

Might also be in SMODS folders

viscid talon
#

hmm

#

wouldnt it be easier to create a flag that triggers when daat is used

#

and then have that flag trigger the unlock condition?

wind steppe
#

not really

#

flag already exists

#

no need to make something new

slim ferry
viscid talon
#

hmm

wind steppe
#

Also talisman doesn't bignumify stats afaik

viscid talon
slim ferry
#

i think so

wind steppe
#

check_for_unlock probably isnt the best way to do it

slim ferry
#

this would run very often so it should basically unlock whenever

wind steppe
#

you want every divine card to appear in the shop after daat right

viscid talon
#

yes

#

EXCEPT daat

#

since daat has a "soul" like function

wind steppe
#

give daat an in_pool and modify consumable rate for divines when starting a run or using daat

main pebble
#

hey is there a default context for when playing cards are purchased? the closest thing i found is hologram's playing_card_added but i'm looking for a context that applies to jokers and consumables as well

slim ferry
#

context.buying_card?

main pebble
#

thanks

viscid talon
#

🤔

#

i tried what eris suggested and got this error

slim ferry
#

fuck

#

okay i guess it isnt initialized that early

viscid talon
#

maybe ill just make it smth you get by default

wind steppe
viscid talon
#

i reset my balatro profile and got this error

wind steppe
#

check_for_unlock?

#

oh reset profile

#

yeah probably modify consumable rate with a hook on run start

#

(and when daat is used)

viscid talon
#

idk how to do any of that

sharp arch
#
      local tally = 0
        for _, consumeable in ipairs(G.consumeables.cards) do
                tally = tally + 1
            end
        if tally >=1 then
            for _, consumeable in ipairs(G.consumeables.cards) do
                
            end
        end
    end,
     can_use = function(self, card)
        return (G.consumeables and #G.consumeables.cards < G.consumeables.config.card_limit) or
            (card.area == G.consumeables)
    end``` how would I destroy every consumable in the are like this
wind steppe
slim ferry
#

what does that mean

daring fern
slim ferry
#

oh

#

area

wind steppe
#

minor spelling mistake

slim ferry
#

right

wind steppe
#

what happened to somethingcom
are they going to start reacting with ❗

sharp arch
wind steppe
#

you dont need any loop just run the destroy_cards once

sharp arch
#

ok

slim ferry
#

why is the single excalamation mark just called exclamation but the double is called bangbang

wind steppe
#

for ⁉️ of course

#

this obviously means blunder should actually be called interrointerro

sharp arch
#

ok now how would I create a random tag per the destroyed consumeable (which is the tocreate car)

local tally = 0
        for _, consumeable in ipairs(G.consumeables.cards) do
                tally = tally + 1
            end
        local tocreate = tally
        if tally >=1 then
           SMODS.destroy_cards(G.consumeables.cards)
              for i = 1, tocreate do
                
            end
        end
    end,```
wind steppe
#

You don't need two loops

slim ferry
#

first of all you should just do tocreate = #G.consumeables.cards

wind steppe
#

Instead of incrementing a tally just. Create the tags as they're looped through

#

and then destroy after

slim ferry
wind steppe
#

or destroy as you go through

sharp arch
#

'modprefix_seed can just be whatever, right

slim ferry
#

yes

viscid talon
#

ok so ive given divine cards a shoprate, all i need to do is figure out how to not let daat itself count for that

#

im guessing i have to do the soulable whatsit right

#

in daat.lua?

slim ferry
#

i mean it shouldnt spawn regardless if it has hidden set to true

viscid talon
#

ooh okay

#

done

wind steppe
sharp arch
#

this is so confusing 😭

red flower
gusty compass
#

Finally figured that shit out, apparently I had to run the function first to set G.HUD, relief

viscid talon
#

almost ready for release, just two isseus

  • sephirot packs still say "ERROR" when you get them, and idk how to fix that
  • divine hatchet doesnt create a hatchet when it "devolves"
#

wait nvm it does

#

ok so error 2 is fixed

#

error 1 however idk what to do

#

how do i make it not say "ERROR" :sovb

sharp arch
#
        name = "Mega Balaal Pack",
        description = {
            "Choose #2# of up to #1# {C:attetnion}Balaal{} jokers."
        },
        group_name = "Balaal Pack"
    },```
viscid talon
#

ill give that a shot

sharp arch
#

my descriptions dont show up though so take this with a grain of aslt

viscid talon
#

attetnion

sharp arch
#

i keep FUCKING DOING THAT AAAAAAA

slim ferry
wind steppe
#

or use a proper localization file

viscid talon
#

soon

slim ferry
viscid talon
#

one called "en_us.lua" right

wind steppe
#

with a hyphen

slim ferry
#

inside a localization folder

wind steppe
#

also inside localization foler

viscid talon
#

mmmmm

#

im currently merging my jokers under a single src file

sharp arch
#
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = G.P_CENTERS[card.ability.mod_conv]
        return { vars = { card.ability.max_highlighted, localize { type = 'name_text', set = 'Enhanced', key = card.ability.mod_conv  } } }
    end,``` If I wanna check if a card has a specific enhancement for this consumable to be used, i'd need the long code for this, im guessing
chrome widget
#

I just realied that Magic Deck doesn't actually directly use the Tarot color palette and that bugs the hell out of me

daring fern
#

subtle merlin
#

I have some ideas that i need help implementing so i thought id ask here:
blind 1: removes all text (including tooltips) for the blind
blind 2: the screen doesn't visually react to what you do until you hit play (this is the best way i can describe it)

main pebble
spiral mural
#

how do i add to the debt cap

main pebble
#

yeah but that triggers with booster skip tags as well

daring fern
daring fern
main pebble
#

i see

#

thanks

spiral mural
#

i need to alter money given from a joker, how do i do that 😇
(more specifically, making it so the amount given goes into a different value (decreasing G.GAME.bankrupt_at))

daring fern
daring fern
# spiral mural yes

if context.post_trigger and context.other_card.ability.set == 'Joker' and context.other_ret.jokers and (context.other_ret.jokers.dollars or context.other_ret.jokers.p_dollars or context.other_ret.jokers.h_dollars) then local value = (context.other_ret.jokers.dollars or context.other_ret.jokers.p_dollars or context.other_ret.jokers.h_dollars) context.other_ret.jokers.dollars, context.other_ret.jokers.p_dollars, context.other_ret.jokers.h_dollars = nil G.GAME.bankrupt_at = G.GAME.bankrupt_at - value end

spiral mural
spiral mural
daring fern
spiral mural
#

i need to know what the card is

wintry solar
#

yes it's the card value in your calculate function

spiral mural
#

now im getting this error

daring fern
spiral mural
# daring fern Code?
        if context.post_trigger and context.other_card.ability.set == 'Joker' and context.other_ret.jokers and (context.other_ret.jokers.dollars or context.other_ret.jokers.p_dollars or context.other_ret.jokers.h_dollars) then
            local value =  (context.other_ret.jokers.dollars or context.other_ret.jokers.p_dollars or context.other_ret.jokers.h_dollars) 
            context.other_ret.jokers.dollars, context.other_ret.jokers.p_dollars, context.other_ret.jokers.h_dollars = nil 
            G.GAME.bankrupt_at = G.GAME.bankrupt_at - value 
        end
    end```
daring fern
spiral mural
#

ew

spiral mural
daring fern
obsidian spear
#
engine/sprite.lua:109: Shader uniform 'warmsh' does not exist.
A common error is to define but not use the variable.```
help I hate shaders
spiral mural
obsidian spear
#

great

spiral mural
#

if you really don't want to use it, just add this in the effect code
if (warmsh .y > warmsh .y*2) {tex = vec4(0);}

obsidian spear
#

the fs name is warm tho

spiral mural
#

are you sure its like that everywhere

obsidian spear
#

no

#

lol

#

wait no

#

i can fix this

spiral mural
# daring fern It's `self, card, context` not just `card` in the inputs.

ok so its still not doing anything

        if context.post_trigger and context.other_card.ability.set == 'Joker' and context.other_ret.jokers and (context.other_ret.jokers.dollars or context.other_ret.jokers.p_dollars or context.other_ret.jokers.h_dollars) then
            local value =  (context.other_ret.jokers.dollars or context.other_ret.jokers.p_dollars or context.other_ret.jokers.h_dollars) 
            context.other_ret.jokers.dollars, context.other_ret.jokers.p_dollars, context.other_ret.jokers.h_dollars = nil 
            G.GAME.bankrupt_at = G.GAME.bankrupt_at - value 
            print(G.GAME.bankrupt_a)
            card_eval_status_text(scored_card, 'extra', nil, nil, nil, {message = "Debt!", colour = G.C.RED, delay = 0.2})
        end
    end```
wintry solar
#

you need to turn the post trigger optional feature on

spiral mural
lone estuary
#

ok so im doing an old mod and for some reason when i put odds on 1/3 and mult for X2 it swaps on the desc (its still 1/3 and x2 ingame and the pop up is also x2), im new with modding so sorry if this is a rookie mistake

lone estuary
#

and ty too

obsidian spear
#

the #_# is to get the variable

#

number inbetween is the index

lone estuary
#

oh

#

nvm

#

ty for the explanation

gaunt folio
#

how can i check a specific SOLD joker's rarity? card.config.center.rarity isn't working but my code is probably missing something

frosty rampart
#

just card.config.center.rarity is the card that's currently calculating
context.card.config.center.rarity will get the rarity of the card being sold

gaunt folio
#

aight thanks

daring fern
reef belfry
#

where will i patch how money is displayed? (i.e making a money cap indicator)

gaunt folio
#

it works tho

daring fern
gaunt folio
#

fair enough

spiral mural
versed swan
# gusty compass Yea I have it hooked already

You did not hook Game:start_run; [mod object].reset_game_globals is run before G.HUD is created, and setting the scoring calculation while G.HUD is non-existent causes the crash. You'll need to do the following to prevent crashes related to setting the scoring calculation at the very start of the run:

local game_startrun_ref = Game.start_run
function Game:start_run(args)
  game_startrun_ref(self, args)
  if not args.savetext then
    SMODS.set_scoring_calculation("GG_powerCalc")
  end
end
#

at least until an update for SMODS.set_scoring_calculation is made that first checks for G.HUD

viscid talon
#

can someone help me figure out why sets.lua is causing interference

#

its saying hatch-kether in empty pool or smth

main pebble
#

is there a way to make the upgrade message show up for every iteration of the for loop instead of only upon returning?

daring fern
# main pebble is there a way to make the upgrade message show up for every iteration of the fo...
local effects = {}
local cards = SMODS.shallow_copy(G.playing_cards)
for i=1, G.GAME.current_round.discards_left do
    card.ability.extra.x_mult = card.ability.extra.x_mult + 0.25
    local _card, index = pseudorandom_element(cards , 'random_destroy')
    table.remove(cards, index)
    SMODS.destroy_cards(_card)
    table.insert(effects, {colour = G.C.RED, message = localize('k_upgrade_ex')}
end
return SMODS.merge_effects(effects)
#

Also use context.main_eval instead of not (context.individual or context.repetition)

main pebble
#

i see

#

thanks

reef belfry
stuck ore
#
if card.ability.extra.two_count <= 2 then
                if current_twos <= 2 then
                    if context.other_card:get_id() == 2 then
                        card:juice_up(1,0.5)
                        context.other_card.ability.perma_x_chips = context.other_card.ability.perma_x_chips or 0
                        context.other_card.ability.perma_x_chips = context.other_card.ability.perma_x_chips + card.ability.extra.xchips
                    end
                    current_twos = current_twos + 1
                end
            end

So I'm trying to make it to where if a hand is played with exactly two 2's then they will gain xchips on the card permanently however the code I used before that added permenant x_mult didn't transfer one to one and I'm confused on how what the code for making the cards have xchips is or if that is something possible within the default code.

#

Nevermind sorry I had my variables written wrong so they couldn't work correctly

#

(Works now)

brazen kite
#

question: i want to have my custom deck turn all cards that are given any enhancement immediately into wild cards. how could i go about doing this?

#

should i like hook into set_ability or is there a better way

daring fern
brazen kite
#

okay

reef belfry
#

how do you check when an ante changes outside of calculate...

daring fern
reef belfry
#

create a tag after an increment in ante

frosty rampart
#

what gives this effect exactly

reef belfry
#

it should be universal for any deck and run

frosty rampart
#

put it in the mod's global calculate function then

reef belfry
#

i see

frosty rampart
#
SMODS.current_mod.calculate = function(self, context)
  -- do stuff here
end

put that in your main file or wherever you want to organize it
and yes it has to be specifically current_mod, that's not a placeholder

twilit tundra
#

yeah uh

you should check that its a playing card first :P

brazen kite
#

yeah lmao

stuck ore
#

what is the code for brown? like G.C.BROWN but like, that doesn't work so what might the correct one be?

daring fern
brazen kite
#

yes i figured it out i just thought it would be funny to post my mishap

#

ugh now i have to figure out how to make this work for standard pack pickups

brazen kite
#

i'll ask for help if i can't figure it out once i give it a go

#

i'm just anxious about having to do it :p

#

(i'm pretty new to modding)

stuck ore
#

Is there an area we have all the G.C colours or am I foolish and you can make hexcode ids work somehow

daring fern
#

­

frosty rampart
mystic river
brazen kite
#

ohcool

stuck ore
frosty rampart
#

yea like i said it's not very documented
the first example i can think of is paperback, but i'm pretty sure that it actually does it in a fairly bad way (it uses a patch when it really doesn't need to)

stuck ore
#

ah gotcha

mystic river
frosty rampart
#

ok here's what you can do to fully integrate a color

loc_colour()
G.C.BROWN = HEX("...") -- fill in the hex code you want here
G.ARGS.LOC_COLOURS["brown"] = G.C.BROWN
#

this additionally lets you use {C:brown}brown text here{} in localization files

stuck ore
#

Sorry twas not at my computer, thanks a ton

final jewel
#

So, I'm trying to make certain consumable uncopiable like I know its weird but I need it to balance my mod, so yeah ! If you know my mod you'll understand what I am talking about. I did a hook but it doesnt seems to work with perkeo.

brazen kite
#

ok is there a context for when a playing card is added to the deck

#

i feel like there ought to be something simple because hologram

daring fern
brazen kite
#

huh

#

okay

#

i tried that and nothing happened earlier so ig im doing something wrong hmm

#

oh i see

daring fern
final jewel
#

but which card is destroy

brazen kite
final jewel
reef belfry
#

how do i check what round it is

#

oh nvm

final jewel
#

G.GAME.round

final jewel
#

oh yeah

chrome widget
#

'flat color seance isn't real, it can't hurt you'

flat color seance:

golden field
#

question: is there a way have it cards that have been played this ante retrigger

mystic river
#

look for whatever the pillar uses and return { repetitions = 1 } in the appropriate context

daring fern
golden field
#

thanks

urban wasp
#

why doesn't this work?

info_queue[#info_queue + 1] = G.P_CENTERS.tag_negative
daring fern
urban wasp
#

ah

golden field
daring fern
obsidian spear
#

shader question,

how would I make part of a shader be like transparent, kinda like burnt joker's holes but without the grey parts

#

some noise map or smth idk

golden field
#

ah thanks

golden field
#

wondering why this doesn't work

SMODS.Joker {
    key = "nun",
    blueprint_compat = false,
    rarity = 2,
    cost = 4,
    pos = { x = 2, y = 1 },
    atlas = "nun",

    calculate = function(self, card, context)
        if context.before then 
            if context.drawing_cards and #context.full_hand <= 3 and (G.GAME.current_round.hands_played ~= 0 or G.GAME.current_round.discards_used ~= 0) then
                return {
                    cards_to_draw = 3
                }
            end
        end
    end
}

-# supposed to be like conditional serpent, if discarding/playing up to 3 cards always draw 3 cards

daring fern
golden field
daring fern
golden field
vocal helm
#

Real quick, how would I localize the name of a booster pack within the context of a joker/description?
i.e. how would I make the localize function return Jumbo Arcana Pack if I put in arcana_jumbo_1 as the key

daring fern
vocal helm
#

ty!
would it be p_arcana_jumbo_1 or just arcana_jumbo_1

daring fern
vocal helm
#

ty :>

#
localize({ type = 'name_text', key = 'p_arcana_jumbo_1', set = 'Other' })
``` it's like this, right?
#

ah wait, just removing the "_1" makes it work

#

thank you!

mossy anchor
#

is there a site with everything in a regular jokers calculate functions context variable and what they do

cerulean rose
mossy anchor
#

i dont think thats everything considering context.mod_probability doesnt exist there

cerulean rose
#

yeah wiki is out of date

tired kestrel
#

why does chips didn't work?

cyan lagoon
#

so, i told it to not draw cards to hand. how would i go about having the buttons appear?

tired kestrel
wintry solar
obsidian spear
#

can some1 guide me through making ui
i just want text on a black box ontop of a joker

obsidian spear
#

tryna not to laugh

golden field
#

question: any way to make it so that when you discard you get 2 extra cards drawn

prisma loom
#

Is it possible to make let's say a Seal or Enhancement not be shown in the collection but still exist and function in the game?

red flower
prisma loom
bold gyro
#

@obsidian spear okie i'm able to help you out now, apologies in advance if i'm unable to solve all of your difficulties cus i'm not the best with ui either

obsidian spear
#

like how to place it somewhere specific

#

other than that im doing alright

#

I also do want to know how to add UIcorners

bold gyro
#

UIcorners?

obsidian spear
#

smooth corners

#

rounded

solid mesa
#

border, radius

obsidian spear
prisma loom
#

Can I use SMODS.add_card to add card to deck?

obsidian spear
red flower
obsidian spear
#

tyy n

red flower
#

i just put the function above that in the joker's update

obsidian spear
#

ah i see

obsidian spear
#

since the player shouldnt be able to move anything while its there

red flower
#

that only places them once

obsidian spear
#

wait so which stuff specifically

bold gyro
#

okay here's a simple ui i made for my mod, the most important things that control the position of the ui (in my case literally a blank box) are in the UIBOX's config table's offset and major values

#

you should be able to set major = <your joker here>, and when the function is called, it'll place the ui at the joker

obsidian spear
#

ah alr

bold gyro
#

G.ROOM_ATTACH is basically the whole screen, and it's great if you want to set something to a (basically) arbitrary position not linked to other ui

obsidian spear
#

mmhmm

prisma loom
#

so this is a table for scoring hand: context.scoring_hand[i]
the table for deck would be: context.deck[i]

#

right?

red flower
#

no, G.deck.cards

#

it's also indexed in reverse order

obsidian spear
prisma loom
#

local cards = {}
cards[i] = SMODS.add_card { set = "Base", rank = 'Ace', enhancement = enhancement.key }

Does this add to deck or hand?

red flower
#

hand

prisma loom
red flower
#

what

prisma loom
#

it just says "cards"

#

not hand or deck

chrome widget
#

I have something devious in the works....

red flower
red flower
chrome widget
#

Hi N'!!!!

prisma loom
chrome widget
#

I spent five hours today painstakingly color correcting all set-relevant cards in vanilla to use consistent palettes

red flower
prisma loom
red flower
#

yes

chrome widget
#

Hopefully by tomorrow or Monday I will have an API feature for programmatic palette customization for vanilla consumable types

red flower
prisma loom
#

Why does this keep popping up?

#

Am I missing something in the vars/config?

golden field
#

still dont really get it but i'll try-

obsidian spear
#

how would I update this down the line?

            local my_menu = UIBox({
                definition = createMajorMenu({
                    { n = G.UIT.T, config = {align= "cm", text = string.sub(word, 0, #completed+1), colour = G.C.WHITE, scale = 0.75 } },
                    { n = G.UIT.T, config = {align= "cm", text = string.sub(word, #completed+1, #word), colour = G.C.INACTIVE, scale = 0.75 } },
                }),
                config = {id = "btr_enMajText",type = "cm", major = c, bond = "Weak", instance_type = "POPUP"}
            })
            local my_menu_node = {n=G.UIT.O, config={object = my_menu, type = "cm"}}
#

or more how I was gonna do it, how do I destroy it

prisma loom
#

Is this function for checking the rank of the card only?

#

I want to make a hook for an enhancement

stoic void
#

line 152 is
add_tag(Tag((poll_tags(nil, nil, true, true))))

red flower
#

there's no poll_tags

prisma loom
#

Who made VanillaRemade?

red flower
#

also if the joker just has the option between 2 tags you dont need to poll all of them

red flower
prisma loom
# red flower hi

How did you make stone cards not show up "Rank of Suits" in the textbox?

#

Or how do stone cards override that

red flower
prisma loom
#

Replace base card? I think I missed that

#

Thanks!!!

prisma loom
#

vanilla remade is a treasure trove

stoic void
#

bercuase i think i might have a idea that uses 3 instead

slim ferry
#

the same

#

because pseudorandom_element exists

#

just use that on a list of tag keys

stoic void
#

can i have an example on what it would look like?

gusty compass
#

Would you guys know what context is used to retrigger a joker?

slim ferry
#

should look like this

stoic void
#

yup ok

slim ferry
#

but then with the tag keys different

stoic void
#

also damn those were the 3 tags i was gonna use 😭