#💻・modding-dev

1 messages · Page 653 of 1

lethal stratus
#

man this shit is weird

white hull
#

Also if you're trying to edit game.lua in the lovely folder, that's not what you should be doing

#

The lovely folder contains a dump - a copy - of the code

lethal stratus
#

im not

white hull
#

To patch the code, you'll need to write a lovely patch

lethal stratus
#

im looking for the code name

white hull
#

Ah fair

red flower
#

the vanillaremade wiki has some info on stuff

white hull
lethal stratus
#

which appears to be a massive waste of time

red flower
#

you should also check out other vanilla effects

lethal stratus
#

is handsize also G.handsize:change_size(1)

red flower
red flower
white hull
#

This is just above my patched code
⁨```lua
if G.GAME.modifiers.enable_eternals_in_shop and eternal_perishable_poll > 0.7 and not SMODS.Stickers["eternal"].should_apply then
card:set_eternal(true)
elseif G.GAME.modifiers.enable_perishables_in_shop and ((eternal_perishable_poll > 0.4) and (eternal_perishable_poll <= 0.7)) and not SMODS.Stickers["perishable"].should_apply then
card:set_perishable(true)
end

red flower
white hull
#

Ohh

red flower
#

basically so if you take ownership that code doesnt run

white hull
#

So I should add that to my sticker so smods doesn't try to spawn it using its own logic?

coral notch
#

wrong channel teehee >.<

lethal stratus
#

how do i do like
message = "+1 " statChosen " slot"

#

going insane

red flower
#

"+1 ".. statChosen.. " slot"

lethal stratus
#

trying too hard

#

is this ok...

#

added the dots

#

(on my end not in the ss)

white hull
#

I mean, if it works then it's okay lol

red flower
#

statChosen should be a local variable

lethal stratus
#

ah

red flower
#

G.shops should be G.shop_jokers

white hull
# red flower maybe?

Added this to the sticker and it's still not spawning. Where exactly do the vanilla stickers have should_apply = false, so I can look?
⁨```lua
should_apply = function(self, card, center, area, bypass_reroll)
return false
end

lethal stratus
#

why is it specifically jokers thats odd

red flower
#

localthunk

red flower
#

and its literally should_apply = false

#

not return false

white hull
#

Oh

#

Alright

lethal stratus
#

still an issue

white hull
#

IT WORKSSSSS

#

Thank you N' :]

red flower
lethal stratus
#

oh im so smart

#

oh i might be smart

red flower
#

consumeables

#

with the typo

lethal stratus
#

IT FUCKING WORKS

#

YEAAAAAAAAA

#

the only one that doesnt work is the shop slots

#

it just... squishes the cards

red flower
#

ah there's a function for it i forgot

lethal stratus
#

tysm btw

white hull
lethal stratus
#

whats the full command?

#

im oopid

red flower
#

that

lethal stratus
#

oh thats it??

#

G. or no

white hull
#

just copypaste my dude

lethal stratus
#

its FREAKING out in my code editor

white hull
#

Well a lot of things seem to be freaking out in your code editor lol

lethal stratus
#

when increasing hands and discards, it only increaes in the next blind

#

is there any way to see it increase automatically?

red flower
#

yes, i recommend you check vanilla jokers

#

like drunkard

white hull
#

Does Card:add_to_deck normally run for jokers showing up in the shop or did I fuck something up?

red flower
#

no

white hull
#

I'm doing my sticker functionality (-1 hand size) with hooks like this
⁨```lua
---- Baneful sticker functionality (obtaining or undebuffing Joker)
local card_add_to_deck_ref = Card.add_to_deck
function Card:add_to_deck(from_debuff)

local ret = card_add_to_deck_ref(self, from_debuff)

if self.ability.set == "Joker" and self.ability.nancy_baneful and G.hand then G.hand:change_size(-1) end

return ret

end

---- Baneful sticker functionality (removing or debuffing Joker)
local card_remove_from_deck_ref = Card.remove_from_deck
function Card:remove_from_deck(from_debuff)

local ret = card_remove_from_deck_ref(self, from_debuff)

if self.ability.set == "Joker" and self.ability.nancy_baneful and G.hand then G.hand:change_size(1) end

return ret

end

#

Oh actually it's remove_from_deck that runs

#

Cuz I just see a few stickered jokers in the shop and my hand size goes up

#

Even tho I don't actually buy them

red flower
#

hmm they might run but the function usually checks self.added_to_deck or something like that

white hull
#

As a sidenote, I had to add the set == "Joker" check because I could go to the collection, stickers, view the sticker, and then exit and my hand size went up

#

So looks like remove_from_deck ran

white hull
#

Thanks so much for your help ❤️

lethal stratus
#

should i make this blueprint compat just like cola

white hull
#

Why not?

lethal stratus
#

:3

lyric wadi
#

:3

lethal stratus
#

anyways i dont know how to generate random tags its so over

lyric wadi
#

pool i think

lethal stratus
#

im assuming add_tag is accurate but i dont know how to pull from the pool

lyric wadi
#

a pool is just a list of keys

lyric wadi
#

you can use a pool that's buried somewhere in g.game

#

or you can also just

#

use a list

lethal stratus
#

WHY DOESNT IT HAVE A SEARCHING FEATURE

#

ITS SO ASS

red flower
#

yeah

lyric wadi
#

yeah

red flower
lethal stratus
#

i see

#

do i just copy that top part

#

👁️

red flower
#

yeah

white hull
lethal stratus
#

ctrl+f for tags gave me like 30 results and i couldnt find it 😭

white hull
#

🫡

lethal stratus
#

what does it do here

wanton jolt
#

i believe it adds a tag

#

a random one

lethal stratus
#

"it" not the whole thing

sturdy compass
#

“it” is short for “iteration”

#

Its only use here is changing the pseudorandom seed to be different each attempt so it doesn’t hit the same result on a fail

wanton jolt
#

it is iteration

#

hope this helps

#

and since its in context.selling_self, this happens when you sell the card

white hull
#

Worth noting that in the next smods release there will be a function that returns a pool of objects without UNAVAILABLE entires

#

So this won't be necessary when that comes out

lethal stratus
#

ah!

lethal stratus
#

will say, when selling for vouchers, the packs are claimed weird

#

like it isnt automatically processing

sturdy compass
#

Yeah those tags trigger under specific circumstances

red flower
wheat notch
#

how i can make a strong course on a balatro mod. but without any bit of bind or anything

red flower
#

can you elaborate

sturdy compass
lethal stratus
#

retrigger based legendaries are hard to make

white hull
#

spreadsheet 👀

lethal stratus
#

yeah

ripe thicket
#

is it possible to change the scored hand played into a different one? Like if I played a pair but the hand gets scored as if it was a straight

lethal stratus
#

is it possible to make text pink

red flower
lethal stratus
#

message text

red flower
#

the background or the text itself

lethal stratus
#

text itself

red flower
#

hmm i dont think so

#

i mean you can patch it but i don't think it's in the api

lethal stratus
#

.w.

ripe thicket
sturdy compass
#

That is incorrect

ripe thicket
#

how do I do it then

#

boooo scamer

still hedge
#

booo

lethal stratus
#

sorry for pinging but RAGGH

#

<@&1133519078540185692>

winter flower
#

boooooooooooo

lethal stratus
#

how do i check specifically the last card in a hand? ive been struggling because first card is much easier

ripe thicket
#

maybe like context.scoring_hand[#context.scoring_hand]
?

red flower
ripe thicket
#

I'm seeing this

red flower
#

yeah

#

the paragraph explains how to use it

#

oh it's replace_scoring_name not hand it still hasn't been fixed

ripe thicket
#

oop

lethal stratus
#

that didnt work

#

😭

#

it retriggered every card

#

gg

red flower
#

code?

lethal stratus
#

was trying to find a last played card thing somewhere and i couldnt

red flower
#

context.other_card == context.scoring_hand[#context.scoring_hand]

#

also you dont need message or color or card

#

repetitions does all of that

lethal stratus
#

I'm going to go fix like 2 other jokers then

lethal stratus
#

is this too weak?

bold sleet
#

Probably...

#

I don't see how useful it would be anyways...

lethal stratus
#

fair

#

it would trigger ancient joker on every 5 card hand, every 5 card hand would be playable(its like splash but more points basically)

#

how do i check if something happened in only one hand? like if you won on the first played hand

loud summit
#

SMODS.overshot in context.after i believe

lethal stratus
#

didnt work

white hull
#

How can I get the price increase on a joker from an edition?

lethal stratus
#

is this like... possible to code

white hull
#

What's a past copy

normal ridge
crisp coral
#

just save every jonker

#

also thats just invis joker without the timer

normal ridge
normal ridge
#

Already sold ones

#

Invis
But almost invis

white hull
#

Visible Joker

normal ridge
#

Nuh

Schrodinger's joker i guess

#

"I don't know if the joker is dead or alive until i watch inside the box"
"Laughter"
"Shut up"

lethal stratus
#

well it might be easier if i make a save and a load instead

tidal hemlock
#

gamba

normal ridge
#

Lost edition already have a Schrodinger's cat joker
But it's a boring 50/50 (non fixed) chance to get 120 chips

tidal hemlock
lethal stratus
#

making suit jokers out of v/s weapons

#

which suit for each? i dont know!

tidal hemlock
lethal stratus
#

yes!

tidal hemlock
#

yay hi fellow v/s player

lethal stratus
#

player :)

tidal hemlock
#

i finished story in v4.2 and decided to restart story for the 5.0 release

lethal stratus
#

good idea

normal ridge
lethal stratus
#

im so happy for you

#

allison should be hearts, and maybe saturday should be spades
dawn/tsuki clubs/diamonds isnt that crazy

tidal hemlock
lethal stratus
#

OH GOD YOURE SO RIGHT FOR THIS

tidal hemlock
#

make all of the boundary shatter songs into gimmick jokers /j

lethal stratus
#

was gonna make a song pack actually

tidal hemlock
#

oooo

#

make unraveling stasis into stone card support lol

lethal stratus
#

what is each suits weakest point

#

hearts is really good for x mult and money because of smeared

#

so maybe chips

tidal hemlock
#

clubs has double vision

lethal stratus
#

hmm true

#

was giving spades X mult(saturday) since her legendary is similar

faint yacht
willow flower
#

WHERE WAS THIS WHEN I NEEDED IT FOR SHRUNKEN ART

clear ocean
#

when developing a mod is there any way to ensure compablity with both talisman and amulet

frosty rampart
#

if something works in talisman but not in amulet that's amulet's fault

sturdy compass
#

With amulet it should be automatic, but talisman you need to use ⁨to_big()⁩ in your comparisons

clear ocean
#

so this should be fine since amulet and vanilla does that but talisman needs that

sturdy compass
#

That's a fallback for if talisman isn't installed. You should pass in numbers you use in comparisons to that function for it to actually do anything

clear ocean
#

yeah that's the plan

granite jay
#

Is there any way to make it so cards played or discarded return to deck?

sturdy compass
#

You can do it with patching, though I'm pretty sure there is a SMODS solution being worked on

granite jay
#

Ah

#

I'll just do a copy destroy trick for now

sturdy compass
#

Up to you how you wanna solve it tbh

granite jay
#

Also how do you directly modify the round score for things like boss blinds?

loud summit
#

G.GAME.blind.chips

sturdy compass
granite jay
loud summit
#

oh

sturdy compass
#

Oh that

loud summit
#

G.GAME.chips

sturdy compass
granite jay
#

The display didn't update tho

#

what's the function to do that?

loud summit
#

theres no easy way to change the visual

sturdy compass
#

I actually recently implemented something that does the visuals nice, lemme find it rq

loud summit
#

the problem is the tally at the end uses the value its at at the moment of scoring

loud summit
#

i set the chips display to read a temporary variable and swapped it on an event

granite jay
#

I'll just try a jank solution and wait for the next SMODS update

sturdy compass
#

I simply ran this during ⁨context.setting_blind⁩ and it worked a charm. Modifier is just a value calculated prior to the event
Lua G.E_MANAGER:add_event(Event({ trigger = 'ease', blocking = false, ref_table = G.GAME, ref_value = 'chips', ease_to = math.floor(G.GAME.blind.chips * modifier), delay = 0.5, func = (function(t) return math.floor(t) end) }))

#

I'm sure it works on other contexts too

loud summit
#

you just cant set it that well since it either updates instantly after scoring calcs, or gets overriden by the final tally

clear ocean
#

balancing...

daring fern
loud summit
#

that is a mean boss btw

granite jay
#

Ah lemme see

loud summit
#

are you trying to set the chips or subtract from it

granite jay
#

Set the chips

#

tho looks like that solution works

#

jk no

#

it flipped the chips to negative

clear ocean
loud summit
granite jay
#

thx

#

I'm doing this in context.after btw

#

not final_scoring_step

loud summit
#

well youre setting the chips

#

before its being multiplied

#

tho the way this boss is set up, you can actually do something a LOT easier

granite jay
#

Oh?

loud summit
#

just set G.GAME.chips in the context.after step

#

lol

granite jay
#

Btw context.after triggers AFTER scoring

loud summit
#

correct

#

oh wait then it would be context.final_scoring_step

#

thats the one plasdeck uses

#

and visually its probably fine if the setting to 0 part happens "before" scoring

#

also SMODS.calculate_round_score() to get the total the hand scoes

granite jay
#

Managed to get it working properly

#

thx

daring fern
#

wicked heron
#

Does anybody know how to check if a Joker is a "triggering" joker rather than a passive one (like Four Fingers and Shortcut)?

#

I want to check before applying a Joker retrigger

slim ferry
#

Well

#

Joker retriggers wont apply anyway unless the joker actually triggered

#

They arent calculated in the first place unless something was returned by the joker to be retriggered

wicked heron
#

hmmmm, I'm looking to retrigger two random jokers

slim ferry
#

Youd probably just set two jokers as a target and randomize the targets in some context

#

Since joker retriggers can happen basically anywhere

wicked heron
#

right, so triggers can occur outside of joker_main. That changes things

#

ty

past spade
#

I love floating point

neat terrace
#

Hi I have 10 years coding experience I can help

past spade
#

I've fixed it

long sun
#

does SMODS.ConsumableType require c_prefix, prefix or no prefixes?

faint yacht
#

⁨```lua
SMODS.ConsumableType{
key = "togaitem",
primary_colour = HEX('5f0000'),
secondary_colour = HEX('5f0000'),
no_collection = true,
}

is how I've done it.
long sun
#

oh sorry i meant the default ;u; i'm tired

#

my hanafudas define ⁨default = "phanta_pine_chaff_a"⁩ but i'm not sure if that's correct

faint yacht
long sun
#

so like, the default consumable that appears if you see all of them at once

faint yacht
#

key⁩, ⁨primary_colour⁩ and ⁨secondary_colour⁩ are required.

#

But I'd assume any setting of a "default" involves the proper full key, including the ⁨c_

long sun
#

gotcha ^^;

#

thanks :3

faint yacht
#

🤝

loud summit
long sun
#

i'd like to display a multiline localisation variable with formatting in my UIBox, how may i do that?

#

(think ability texts)

#

(i'd look for where they're defined but i can't find them)

daring fern
#

subtle hawk
#

Is ⁨rate = 0.3⁩ on SMODS.Sticker based on vanilla rates? And do all vanilla stcikers use the same rates?

subtle hawk
daring fern
wanton jolt
faint yacht
wanton jolt
#

oh fuck

faint yacht
wanton jolt
#

i wanted to add the utah teapot too

faint yacht
#

Then go for it - there's a reason I named this GLTeapot.

wanton jolt
#

true

#

mine is a roblox hat anyways lol

#

what is the gl in reference to? opengl?

#

or is it the utah teapot itself

#

nvm i found why

viscid talon
#

This might be complete bullshit but I decided to annotate the functions of a certain Joker for those who may be completely new to VScode. Again, I may be completely wrong with what each variable does, but this was how I personally understood it

daring fern
rocky plaza
#

@pastel kernel
⁨⁨⁨⁨⁨```lua
local image_file = assert(NFS.newFileData(SMODS.current_mod.path .. "assets/misc/your_image_file.png"))
local image_data = assert(love.image.newImageData(image_file))
YOUR_MOD_TABLE.YOUR_IMAGE = assert(love.graphics.newImage(near_spear_data))

--- Hook love.draw
local draw_ref = love.draw
function love.draw()
draw_ref()
--- Inside the if statement, check to see if the sprite should be drawn
if ... then
local width, height = love.graphics.getDimensions()
local x_factor = width / 1920
local y_factor = height / 1080
local image_width = ... -- width of image goes here
local image_height = ... -- height of image goes here
love.graphics.setColor(1, 1, 1, 1)
love.graphics.draw(
YOUR_MOD_TABLE.YOUR_IMAGE,
0, -- x position
0, -- y position
0, -- rotation of image
x_factor * 1920 / image_width, -- x stretching
y_factor * 1080 / image_height, -- y stretching
0, -- x offset for image origin
0, -- y offset for image origin
0, -- x shear
0 -- y shear
)
end
end

Let me know if you need a specific location for where the image should be drawn and I can send you the appropriate params (unless you can figure that out - the love2D docs should help with that)
pastel kernel
#

It should cover the entire screen

rocky plaza
pastel kernel
#

About as large as a pc screen

rocky plaza
pastel kernel
#

The intention was that if you tried to play the mod with pwx on, it would make you unable to play the hands section.

pastel kernel
#

As in

#

It auto updates

#

To match the balatro game resolution

viscid talon
rocky plaza
daring fern
viscid talon
#

oe

rocky plaza
#

i might be off with my math because of that (my mental math kinda sucks sometimes)

lethal stratus
#

When Sold, Create a Past copy of a Joker you had when you first acquired this Joker.
How difficult of an idea is this to code

frosty rampart
#

creating a new copy isn't hard; just save all the keys of all the other jokers in this joker's add to deck, and then in context.selling_self create a random joker from that set of keys
creating an exact copy (e.g. tracking the state of scaling jokers) is more difficult, because you can't/shouldn't save whole cards to a joker's ability table

mystic river
#

(aka what meta said :v )

daring fern
mystic river
#

oh huh
how would that work

clear ocean
#

Joker idea: Mitosis - Something related to card duplicating, maybe when you add a card to your deck make a copy

bold sleet
#

Hello. Is there a way to like, expand these tables and what not?

honest light
viscid talon
#

my current localisation file crashes whenever i try to load my decks and i have a feeling its because of ts

#

what do i do

winter flower
#

what exactly is the crash

viscid talon
#

lemme load it up again

red flower
viscid talon
viscid talon
winter flower
#

oh i did not notice that while skimming

#

😭

wanton jolt
#

uhhhhh

viscid talon
#

lets try that again

#

yayy it work

wanton jolt
red flower
white hull
#

it means },

viscid talon
#

how do i add an extra tooltip to this?

#
    Editions = {
        e_hatch_divine = {
            name = "Divine",
            text = {
                "A {C:enhanced}temporary evolution{}",
                "Lasts {C:attention}5{} rounds"
            },
        },```
#

i want to add an art credit to cassknows for the shader

red flower
viscid talon
#

oh hm

#

thats difficult 😭

#

ill try

#

ok idk whats going on

#

en-us.lua code:

        Other = {
            hatch_burdened = {
                name = "Burdened",
                text = {
                    "Take up",
                    "an extra slot",
                },
            },
            hatch_divinecredit = {
                name = "Credits",
                text = {
                    "Credit to {C:attention}cassknows",
                    "for the shader",
                },
            },
        },
    },
    dictionary = {
    },
    misc = {
        labels = {
            hatch_burdened = "Burdened"
                 }
                }
            }
        }
    }```
#

edition code:

SMODS.Shader({ key = 'divine', path = 'divine.fs' })
-- Credit to cassknows for the shader art

SMODS.Edition {
    key = 'divine',
    weight = 14,
    sound = { sound = "gong", per = 1.2, vol = 0.4 },
    shader = 'divine',

    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue+1] = { key = "divinecredit", set = "Other" }
    end
}```
red flower
viscid talon
#

o

#

same error

#
SMODS.Shader({ key = 'divine', path = 'divine.fs' })
-- Credit to cassknows for the shader art

SMODS.Edition {
    key = 'divine',
    weight = 14,
    sound = { sound = "gong", per = 1.2, vol = 0.4 },
    shader = 'divine',

    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue+1] = { key = "hatch_divinecredit", set = "Other" }
    end
}```
#

code looks like this now

red flower
#

that looks correct but the fact that the edition is also not working makes me think there might be something else wrong with your localization file

viscid talon
#

hm

#

i decided to remove the extra tooltip

#

shes already credited in the credits.txt file + i hope to make credits ui eventually

surreal mason
past spade
#

is there some function to get a random rank or do I just make my own table with all of them and pseudorandom that?

tawdry bloom
#

what variable should i use for increasing x_mult in my jokers config, i cant find a variable name looks right, does the name even matter?

red flower
tawdry bloom
#

ok

#

thx

#

i keep getting this error
Oops! The game crashed:
[SMODS Crossover "jokers/jokers.lua"]:635: attempt to perform arithmetic on field 'morex_mult' (a nil value)

mystic river
#

post the joker code tbh

tawdry bloom
#

SMODS.Joker{
key = "gardenspade",
config = { extra = { x_mult = 1, morex_mult = 0.1} },
pos = { x = 0, y = 0 },
rarity = 3,
cost = 10,
blueprint_compat = true,
eternal_compat = false,
unlocked = true,
discovered = true,
effect = nil,
atlas = 'gardenspade',
soul_pos = nil,

calculate = function(self,card,context)
    if context.individual and context.cardarea == G.play and not context.blueprint then
        for _, scored_card in ipairs(context.scoring_hand) do
            if scored_card:is_suit("Spades") then
                return{
                    x_mult = card.ability.x_mult
                }
            end
        end
    end
    if context.end_of_round then
        card.ability.x_mult = card.ability.x_mult + card.ability.morex_mult
    end
end,
loc_vars = function(self, info_queue, card)
    return { vars = {card.ability.extra.x_mult }, key = self.key }
end        

}

#

behold the garden spade

mystic river
#

extra

tawdry bloom
#

EXTRA

#

OHH

#

THX

mystic river
#

also, wrapping code blocks in triple backticks will make them monospace and much easier to read

tawdry bloom
#

will do!

dapper sun
#

what node is the root? i'm trying to add a uibox to the game area but idk what to set the parent to

rocky plaza
#

for a parent for a uibox

dapper sun
#

ty

#

i'm doing something kinda similar to your stockstuff devilsknife present but the custom renderer stuff scares me so i'm trying to uibox instead

rocky plaza
dapper sun
#

yea

#

i'm trying to make wordle 😭

rocky plaza
#

But that also requires that you know how to update the UIBoxes yourself

dapper sun
#

i've done uibox stuff before

sturdy compass
#

I wonder if CanvasSprite could apply here

dapper sun
#

canvassprite?

frosty rampart
#

new PR that got merged to smods recently, that allows you to create a sprite object that uses a love2d canvas as its image data

rocky plaza
# dapper sun canvassprite?

Basically
You do similar rendering techniques I used for devilsknife, draw it to the canvas sprite, then put that sprite in an object node within your ui

dapper sun
#

ah

frosty rampart
#

it's similar tech to how cardsauce renders the tetris game on that one joker

viscid talon
#

hi meta

frosty rampart
#

hiii

dapper sun
#

i thought about the possibility of making my wordle game fit in the joker image but idk how i'd do that

rocky plaza
dapper sun
#

ok

frosty rampart
#

it does, but you might be better off handling it in a custom drawstep for the purposes of wordle

#

so that you can highlight letters and whatnot

dapper sun
#

here's the current joker art, maybe i'd be able to do this with a custom text atlas

frosty rampart
#

yea a custom text atlas would work too (entropy is gonna have something similar, to update the text on one of those slay the spire inspired jokers)

dapper sun
#

okii

frosty rampart
#

oh it's actually already in the entropy dev version

white hull
#

How would I get the amount of unscored cards in played hand? I know you can specify context.cardarea == 'unscored' but how do I get the cards

frosty rampart
#

#context.full_hand - #context.scoring_hand

white hull
#

Fair enough lmao, that's what I did

#

Was wondering if there was a better way

lethal stratus
wanton jolt
#

The Thought

dapper sun
#

ok

#

_ _

#

this is nothing like what i'm doing

broken rivet
wanton jolt
frosty rampart
#

in a joker, not in a boss blind
also probably not interacting with aikoshen letters at all

wanton jolt
#

oh wow

#

good luck

dapper sun
#

did you not even look at the aikoshen blind 😭 /nsrs

viscid talon
#

i have a niche issue and idk what to do

#

i made this logo for a specific mod

#

but its not showing up on the title screen

#

its just showing the default logo

stoic void
viscid talon
stoic void
#

Can you send it as a message

#

I’m not on pc

viscid talon
#

SMODS.Atlas({
    key = "modicon", 
    path = "ModIcon.png", 
    px = 34,
    py = 34,
    atlas_table = "ASSET_ATLAS"
})

SMODS.Atlas({
    key = "balatro", 
    path = "balatro.png", 
    px = 333,
    py = 216,
    atlas_table = "ASSET_ATLAS"
})

SMODS.Atlas({
    key = "CustomJokers", 
    path = "CustomJokers.png", 
    px = 71,
    py = 95,
    atlas_table = "ASSET_ATLAS"
})

-- ASSERTS

assert(SMODS.load_file("src/jokers.lua"))()

-- Unsure what this does
local NFS = require("nativefs")
to_big = to_big or function(a) return a end
lenient_bignum = lenient_bignum or function(a) return a end

SMODS.current_mod.optional_features = function()
    return {
        cardareas = {} 
    }
end

stoic void
#

Oh, hmmmm

viscid talon
#

i wonder if its priority ot smth

#

idk

mystic river
#

atlases add mod prefixes by default

viscid talon
#

idk what im doing;-;

stoic void
#

This is what my mod does

frosty rampart
#

^ that prefix config should do it

viscid talon
#

oh hm, do i need to have prefix_config off or

#

oke

#

prefix_config = { key = false },

stoic void
#

Yup

#

That should work

viscid talon
#

if it works ill push it forward on the repo

dapper sun
#

did you make the 2x sprite correctly

viscid talon
#

i dont think so

#

will try again

#

we did it

#

now how do i change the colors and the ace of spades in the title screen?

stoic void
#

Ima just check my GitHub again

frosty rampart
#

wait for the next smods update, i have a PR merged that'll make changing the title screen cards easier

wintry solar
#

wait for SMODS.menu_cards

fading rivet
#

Is it possible to have one deck skin pull from 2 different files?

umbral zodiac
fading rivet
#

like one file for queen and king, another for jack

viscid talon
#

oke

fading rivet
lethal stratus
#

how many jokers is too many for a vanilla adjacent modpack

slim ferry
#

Depends really

viscid talon
#

i would say 30-45 is a good number

slim ferry
#

All in jest does a pretty good job of being vanilla adjacent and it adds like 470 jokers

lethal stratus
#

im at 42 right now

viscid talon
#

but then there are cases like all in jest yeah

slim ferry
#

So you can really do whatever

lethal stratus
#

and im like nowhere near done 😭

viscid talon
#

it really depends on how good you are at balancing things

slim ferry
#

And also how many unique jokers you can make

lethal stratus
#

doing a vivid/stasis pack

slim ferry
#

Because tbf all in jest also has like

#

Especially a lot of legendaries that are just an existing joker but better

lethal stratus
#

i think every single legendary i have(12) is unique

#

there are a lot of important vivid stasis characters

#

that unfortunately leads to legendary creep

#

so i think subtracting legendaries id probably do... 45/60 additional for a total of 55-70 jokers

frosty rampart
slim ferry
#

Yeah idk

#

It could also definitely use some more sources of legendary jokers with how many it adds

lethal stratus
#

my worry is that adding a legendary source feels too outside the realm of reasonability

#

maybe making the joker packs i make include the legendary pool could help

#

i also don't have an artist that wants to work on this rn .w.

#

who likes placeholders!!! wooo!!!!

wanton jolt
#

@red flower is it supposed to gain 3 times the x0.2 mult every time i play a card

wanton jolt
#

oh ok cool

red flower
#

ash blossom is definitely not a he/him tho

viscid talon
#

anyways how do i change the colors in the main menu background

viscid talon
#

i see,,, so ill have to make a separate general_ui.lua file? then

red flower
#

no

#

you can put that hook wherever

#

and just change the colour_1 and 2

viscid talon
#

ill put it in the main.lua file then

viscid talon
#

what do i doooo 😭 😭

red flower
#

you can remove that condition if you dont have a config

#

also this will crash if you dont change it to a real color balatro has

#

oh wait

#

dont change these 😭

viscid talon
#

wot

#

then what do i doooo 😭

#

@red flower the code rn

local game_main_menu_ref = Game.main_menu
function Game:main_menu(change_context)
    local ret = game_main_menu_ref(self, change_context)

    if not smallpox.config.disable_main_menu then
        G.SPLASH_BACK:define_draw_steps({
            {
                shader = "splash",
                send = {
                    { name = "time",       ref_table = G.TIMERS, ref_value = "REAL_SHADER" },
                    { name = "vort_speed", val = 0.4 },
                    { name = "colour_1",   ref_table = G.C.JOY,  ref_value = "EFFECT" },
                    { name = "colour_2",   ref_table = G.C,      ref_value = "BLACK" },
                },
            },
        })
    end

    return ret
end
#

idk what im doing

red flower
#

⁨```lua
-- Main Menu Colours (Credit to Cryptid and JoyousSpring)
local game_main_menu_ref = Game.main_menu
function Game:main_menu(change_context)
local ret = game_main_menu_ref(self, change_context)

    local colours = { c1 = HEX("3F528C"), c2 = HEX("89ACEB") }
    G.SPLASH_BACK:define_draw_steps({
        {
            shader = "splash",
            send = {
                { name = "time",       ref_table = G.TIMERS, ref_value = "REAL_SHADER" },
                { name = "vort_speed", val = 0.4 },
                { name = "colour_1",   ref_table = colours,  ref_value = "c1" },
                { name = "colour_2",   ref_table = colours,      ref_value = "c2" },
            },
        },
    })

return ret

end

#

that should work i think

viscid talon
#

oke

#

OHHH THIS LOOKS SO CLEAN

umbral zodiac
red flower
#

thats a 5 year old

tidal hemlock
umbral zodiac
pastel kernel
#

How do you invert G.GAME.Dollars to be negative money

#

Or debt idk

tidal hemlock
pastel kernel
#

How does ease_dollars work again

frosty rampart
#

ease_dollars(x) adds x dollars, it doesn't set it
x can be negative

torn remnant
#

does anyone know off the top of their heads the base shop weight for rare jokers?

frosty rampart
#

0.05

torn remnant
#

thanks!

pastel kernel
#

???
G.GAME.dollars = G.GAME.dollars * -1

torpid flicker
#

is there an escape charecther i can use in strings like \n? im using misprints random text stuff and cant seem to make things be on multiple lines

#

did you ever figure this out?

lethal stratus
#

/genq, is it possible to store joker data like scaling value at all?

sturdy compass
#

What do you mean by that?

sonic musk
#

gng what does this mean

#

im just tryna play

torpid flicker
sonic musk
#

ho mb

#

thank you

torpid flicker
dapper sun
#

how do i add a soul layer that's bigger than the base layer?

#

preferably with the soul layer in a separate atlas

lethal stratus
#

how difficult is this to do as a joker name

dapper sun
#

kinda easy

#

just get the save name and feed it into loc_vars

lethal stratus
#

ah ok gotcha

dapper sun
#

the name can use loc_vars too

frozen hamlet
#

should i delete or add something?

dusk cargo
#

How do i go make a joker destroy itself and then create a joker in the spot that it was in?

red flower
dusk cargo
#

Thank you

lethal stratus
#

trying to think of something unique is hard

lethal stratus
#

i wanna make a mult/chips joker for a number thats the weakest, which one should i do?

frosty rampart
#

considering just vanilla balatro, 7 is definitely the weakest (it only synergizes with odd todd). but it's definitely gotten a lot of modding attention both because of that and because of the "lucky 7" connection
6 is probably another good target, it only gets even steven and sixth sense

half peak
#

What would be the best way to approach making a poker hand that upgrades non-linearly?

true jasper
#

how do i make a color global so i can do G.C. whatever with that color

winter flower
#

you can either do a patch OR do

loc_colour()
G.ARGS.LOC_COLOURS.modprefix_your_colour_name = HEX('FFFFFF')

winter flower
true jasper
#

how would i change the mod badge text color to be a gradient

lethal stratus
#

the voucherCount local var isnt incremeneting properly

#

oh i fucked up the if

#

uhhh

#

i need a voucher specific purchasing if

red flower
true jasper
frozen hamlet
#

i split it in 2 just for be sure

viral ember
#

Is there a way to reload an atlas in real time?

true jasper
junior tapir
#

@torpid flicker I used this logic instead, just change the descriptions in total

agile path
#

hi chat, long time no see
what part of the vanilla remade allows me to check what i need to do to alter these?
i'm trying to do a texture
or do i just edit this in the assets folder of the mod folder?

pastel kernel
#

How do I make it so that a joker would always appear with a specific edition? I know how add to deck works but idk how to make it always spawn with an edition.

shell timber
#

look at cryptids stardust

past spade
#

is there some way to permanently change blind scoring requirements, or would that require something like a hook to get_blind_amount?

lethal stratus
#

Cape Soya is the northernmost point in Japan, is this a good joker for it?

past spade
#

can you also affect all future blinds?

red flower
#

i gave you two options 😭
but yes for that you would need to hook get_blind_amount iirc

agile path
#

okay so, i'm losing my shit
i can't make the custom card skins to load and i'm losing it

tawdry bloom
#
    key = "wildmoney",
    config = { extra = {} },
    pos = { x = 0, y = 0 },
    rarity = 2,
    cost = 6,
    blueprint_compat = false,
    eternal_compat = false,
    unlocked = true,
    discovered = true,
    effect = nil,
    atlas = 'wildmoney',
    soul_pos = nil,

    calculate = function(self,card,context)
        if context.individual and context.cardarea == G.play then
            for _, scored_card in ipairs(context.scoring_hand) do
                if SMODS.has_enhancement(scored_card, 'm_wild') and not context.repetition then
                        ease_dollars(3)
                end
            end
        end
    end,
    loc_vars = function(self, info_queue, card)
        return { vars = { mult }, key = self.key }
    end   
}```
#

why does this give me 75 dollars

#

with 5 wild cards

#

its supposed to 3 per card, so 15

wicked heron
#

when you use context.individual, it goes over a single card

#

You are then looping through the whole scoring hand

tawdry bloom
#

so im giving the money for the full hand every card?

wicked heron
#

yeah - if you remove "for _, scored_card in ipairs(context.scoring_hand)"

#

that should be alright

#

I think

slim ferry
#

and then replace the scored_card with context.other_card in the enhancement check

wicked heron
#

oh yeah, that's how you refer to the card that context.individual is currently checking over

#

Does anyone know how to use a Joker's calculate function to block a glass card shattering? I want the cards to do something else instead

#

I'm messing around with patches currently and it's causing me more problems than solutions

red flower
#

i dont think you can with calculate

#

i would just take ownership of glass cards

agile path
#

hi N :>

red flower
#

hewwo

tawdry bloom
#

yay my joker works!

#

thx for the help

agile path
#

could you help me rq please? i can't make it work and it's infuriating me

wicked heron
agile path
#

if it's a texture, shouldn't it just... work? i've made a pack before and it worked.

#

essentially, my custom skin doesn't work

red flower
#

ah no idea about that stuff

agile path
#

do i need a .lua file for that?

red flower
#

yes, if it's a playing card skin you need to use SMODS.DeckSkin and if it's for something else you would use Malverk

#

im not sure how either works tho

agile path
#

i'm trying to look here and i can't really understand much 💀

#

like, this is confusing me

red flower
mystic river
#

at work rn (nobody tell mothcharmshh ) so i can't actually look at the code, but that's my first idea

wicked heron
red flower
#

smods takes ownership of it already

#

so you can copy that and add your effect

wicked heron
#

I'll give that a shot

#

was looking in lovely/dump

agile path
#

@red flower

    key = "QueensHC",
    path = "suit_queens_hc.png",
    px = 71,
    py = 95,
}

local atlas_lc = SMODS.Atlas {
    key = "QueensLC",
    path = "suit_queens_lc.png",
    px = 71,
    py = 95,
}

so far, i have this

wicked heron
agile path
#
    key = QueensHC,
    path = "suit_queens_hc.png",
    px = 71,
    py = 95,
}

local atlas_lc = SMODS.Atlas {
    key = QueensLC,
    path = "suit_queens_lc.png",
    px = 71,
    py = 95,
}

SMODS.DeckSkin {
    key = Queens,
    suit = "Hearts",
    
    palettes = {
        {
            key = lc,
            ranks = {'2', '3', '4', '5', '6', '7', '8', '9', '10', 'Jack', 'Queen', "King", "Ace",},
            display_ranks = {"King", "Queen", "Jack"},
            atlas = QueensLC,
            pos_style = '2',
        },
        {
            key = hc,
            ranks = {'2', '3', '4', '5', '6', '7', '8', '9', '10', 'Jack', 'Queen', "King", "Ace",},
            display_ranks = {"King", "Queen", "Jack"},
            atlas = QueensHC,
            pos_style = '2',

            ---colour = HEX("1E2C30"),
        },
    }
}```

i don't know what i'm doing wrong, i'm also looking at the examples and i don't understand
#

like, what key am i missing

slim ferry
#

The keys in the atlases arent strings

#

Put them in quotes

agile path
#

these " " or these ' '

slim ferry
#

Either

#

They both serve the same function

agile path
#

literally same thing

slim ferry
#

Both of the atlases

#

And the deckskin too im seeing now

agile path
#

but what's wrong with it?

slim ferry
#

The keys arent strings

#

So it references the value with the given name which does not exist making the key also not exist

agile path
#
    key = "QueensHC",
    path = "suit_queens_hc.png",
    px = 71,
    py = 95,
}

local atlas_lc = SMODS.Atlas {
    key = "QueensLC",
    path = "suit_queens_lc.png",
    px = 71,
    py = 95,
}

SMODS.DeckSkin {
    key = "Queens",
    suit = "Hearts",
    
    palettes = {
        {
            key = "lc",
            ranks = {'2', '3', '4', '5', '6', '7', '8', '9', '10', 'Jack', 'Queen', "King", "Ace",},
            display_ranks = {"King", "Queen", "Jack"},
            atlas = "QueensLC",
            pos_style = '2',
        },
        {
            key = "hc",
            ranks = {'2', '3', '4', '5', '6', '7', '8', '9', '10', 'Jack', 'Queen', "King", "Ace",},
            display_ranks = {"King", "Queen", "Jack"},
            atlas = "QueensHC",
            pos_style = '2',

            ---colour = HEX("1E2C30"),
        },
    }
}```
#

?

slim ferry
#

Yeah thats correct

#

Should be at least

agile path
#

that's giving me the error

slim ferry
#

If this doesnt work idk

agile path
#

i fixed the issue

rigid solar
#

wanted to change the sprite for when my actives are undiscovered (by default it just showed the sprite with the overlay question mark) so I did this, but hum only the overlay seems to work properly?

#

It does work properly for my loot cards, tho these are ConsumableType not ObjectType so I assume that plays a part in it

#

but then again it's supposed to work with any ObjectType

rigid solar
#

but i dont see how the sheet itself matters

stoic void
#

oh hmmmm

#

-# (I just wanted to check if it was smth silly)

lethal stratus
#

this is alternate universe version of minecraft from the v/s universe but i have no idea what i can do with it x3

viscid talon
#

localisation bros, how do i add that little "from (Name)" subtitle underneath the title?

broken rivet
viscid talon
#

ooooh how do i do that :o

broken rivet
#
    "text",
    "more text on a new line"
}```
#

and any formatting tags work on joker names too

red flower
#

i wonder who added that feature

wanton jolt
#

i wonder why it has been added

wanton jolt
analog yarrow
#

hi I'm an absolute noob in balatro modding, how can I make a localization mod/patch

rigid solar
#

on the contrary that's the only thing working properly lol

wanton jolt
#

oh i get it now

wanton jolt
#

i hope this helps

rigid solar
#

Yeah that's a ConsumableType

#

And I got that working

viscid talon
#

woohoo

#

thanks

weary sun
#

guys, is it futile to try to make a balala mod with 0 Lua knowledge or I can bruteforce it?

rigid solar
#

do you have coding knowledge
if so you're good because lua is simple

weary sun
#

not really, very basic

#

like the best i can do is loops in python....

hushed field
#

If you know loops in python, you won't be able to make an insane mod by tomorrow, but you'll be able to make a lot of stuff already, and learn enough to make an insane mod over time

weary sun
#

thanks

#

i was wondering because i found a handy guide today

mystic river
#

i learned lua by frankensteining together parts of existing mods until it clicked
you'll be fine, probably

wanton jolt
#

@hushed field i can show you a placeholder card with the 3 sigils atlasses overlayed on top to show you an example

hushed field
weary sun
hushed field
#

Oooh, yeah, it's that one, that's pretty decent

#

I really recommend checking out VanillaRemade as well

hushed field
#

I know there's a guide floating around that I think is based on the smods guide that is very outdated, so I thought it was that one, for a second, haha

hushed field
#

The VanillaRemade repo has every vanilla objects remade through the modding framework, which is great reference, but its wiki (https://github.com/nh6574/VanillaRemade/wiki) is even better if you're just getting started

GitHub

Contribute to nh6574/VanillaRemade development by creating an account on GitHub.

wanton jolt
hushed field
# wanton jolt

Is that how you hope they'll get laid out in the end, or is that already your current implementation?

weary sun
#

i will get started

wanton jolt
#

thats how the three atlasses layer on top of each other (i selected a different sigil for each)

#

if you look closely

broken rivet
hushed field
#

Is each sigil its own sticker?

viscid talon
#

ok chat

#

dumb question

#

how do i make a showman deck

#

this is the code i have rn

#
SMODS.Back {
    key = 'showman',
    pos = { x = 0, y = 0 },
    config = {},
    
    unlocked = true,
    discovered = true,
    no_collection = false,

    atlas = 'CustomDecks',
    locked_loc_vars = function(self, info_queue, back)
        return { vars = { 4 } }
    end,
}

local smods_showman_ref = SMODS.showman
function SMODS.showman(card_key)
    return smods_showman_ref(card_key)
end```
#

i also wanna make an unlock condition where it only activates if you two showmans in your hand

daring fern
viscid talon
#

where in the hook would i put that

#
function SMODS.showman(card_key)
    if G.GAME and G.GAME.selected_back and G.GAME.selected_back.effect.center.key == 'b_smallpox_showman' then 
        return true 
        end
    return smods_showman_ref(card_key)
end```
#

?

daring fern
viscid talon
#

oke

#

ok i think it works

#

all i need to do is figure out how to program the unlock condition in

#

bc idk

mystic river
#

give it

check_for_unlock = function (self, args)
 return #SMODS.find_card("j_ring_master") >= 2
end
viscid talon
#

danks

tawdry bloom
#

how would i get the level of the lowest level hand

mystic river
#

local num = math.huge, then iterate through G.GAME.hands and do num = math.min(num, v.level)

tawdry bloom
#

thx

daring fern
mystic river
#

it's also v.level to get level, not v.played to get play count

could've sworn I've seen huge as a function before but eh, that's why i always double check this stuff when I'm actually coding

wanton jolt
#

i can't figure out a system for positions

#

for example, the first sigil on the card should take atlas one, the second atlas two, the third atlas three

#

a maximum of 3 sigils, if there is a new one added, it overwrites the third one

#

LIFO

red flower
#

live in and find out

hushed field
mystic river
#

i want to copy the thing asteroglyph does where it sends you less far back each time you use it, but I'm looking at it and
am i missing something or would this not just do 0 once and then repeat 1 forever? i have to be missing something but i can't work out where it is in the code

GitHub

An unbalanced Balatro mod. Contribute to SpectralPack/Cryptid development by creating an account on GitHub.

frosty rampart
#

no yea they tried to make it scaling based on the amount of times the voucher is used, but 1^1.13 is still 1

mystic river
#

hm
I've never actually used asteroglyph multiple times; i think the only way to do that is with either doe or trade shenanigans? so it's entirely possible this bug just went unnoticed until now...

frosty rampart
#

it's still pretty surprising that no one ever noticed it, because 95% of cryptid's playerbase runs nothing but doe and antimatter /lh

mystic river
#

nah that's just the youtubers :v

frail sigil
#

what kind of lua object is SMODS.Keybind and the other SMODS classes? It's my understanding that lua doesn't have classes.

red flower
mystic river
granite jay
#

How do you make it so a Blind disables your discard/play hand button and the ability to rearrange your cards?

frosty rampart
#

The Coda in paperback disallows rearranging cards (and jokers too)

mystic river
#

hook Moveable:drag() for the movement bit (as paperback does)
and look for the play/discard button definitions for their callback function (s) and hook the ones that determine when they work

granite jay
#

Ah thx

lyric wadi
#

how do you check if a card in hand is faced down

rigid solar
#

.facing = "back"

next timber
#

how would i go about leveling up a poker hand by 0.1? it increases the values correctly but when it tries to get the colour for lvl 1.2 it crashes (idk why it doesnt crash for 1.1)

lyric wadi
#

is there a way i can switch the face and back sprite of a joker

#

like i want a joker that's face down the entire time but if it gets flipped in the boss blind it reveals its face

#

i think that'd be a funny detail

red flower
lyric wadi
#

do i need to redefine those or can i literally just swap them naively

red flower
#

you can just swap them i just tested

#

you would need to do it when the joker is created and on reload tho

lyric wadi
#

oh yeah speaking on reload

#

how do you update a sprite on reload, i've been trying to fix jokers with changing sprite reverting to the default state on reload

#

lots of thing i have to learn

red flower
#

probably with set_sprites

lyric wadi
#

yeah but i mean how do i trigger it on reload

red flower
#

i mean the set_sprites function on a joker

#

it runs when the object is created

hushed field
#

Bit of a shot in the dark, but I'm trying to convert the Playset code I wrote in Kino to their own repo, and for some reason, I'm getting crashes. They happen when I hover over any content package object that is generated by the code. This only happens in the Blockbuster Playsets repo. In the Kino repo, the text is properly displayed. The code is identical with the exception of two lines in a drawstep, where I change a modkey.

I suspect I must be doing something in the broader Kino code, somewhere, but I have no clue what it could be. The only lead I have is that if I print the localization entries, in the Kino repo, they are tables that contain a name, text, name_parsed and text_parsed, while in the Blockbuster Playsets repo, they only contain name and text. I don't know what I could be doing in Kino's other code that would change how their localization is registered, though

#

This is the process_loc_txt function, btw

wintry solar
#

are you running init_localization somewhere else in kino (function name might be wrong)

hushed field
#

I'm not. I don't think I'm running any function at all that has the word localisation in it. It's the term I've been trying to find and see if I used somewhere, haha

wintry solar
#

try with the z 🤣

hushed field
#

nope

#

I wish that'd be the issue, though, damn, haha

#

For a second I thought it could maybe relate to load priority, somehow, but nope. Wonder if there's a chance that the order files get processed could be the cause, though

white hull
#

I sometimes ask the AI in vscode questions and it just told me that if key == 'key1' or key == 'key2' then can be rewritten as if key in ('key1', 'key2') then. Is that true?

wintry solar
hushed field
#

The way I've currently set it up is that Blockbuster's all part of Kino, and gets ran pretty quickly, and the API mods are just me tearing them out, haha. If another mod would call it, I don't know why it'd change. The way I've set it up is that either Kino or Blockbuster is enabled, and in both cases all the other mods would be the same

versed swan
#

anyways, reject ai, just look it up on stackoverflow

wintry solar
hushed field
#

I'm not entirely sure what the details are of how init_localization works, but I'll try that

wintry solar
#

you can also make your own init stuff that targets just your additions, similar to how the potato patch utils work now

hushed field
#

I suspect I indeed just have to call init_localization again, yeah. It seems that the way I've set it up in Kino, I should be experiencing the same bug, but I've accidentally already solved it by calling something else that calls it, haha

#

but yeah, calls it before, and then not again, while Kino calls it twice, after

sour garden
#

i'm reworking the retcon voucher to make the shop reroll button reroll booster packs as well
am i hooking the shop reroll right? i'm not sure if this getting the voucher or not. had a test block of code inside that was supposed to run where the comment is, but nothinhg was happening

#

wait actually i might be stupid

#

hold on

white hull
#

use SMODS.find_card

#

it works for vouchers

hushed field
#

Gonna mess around to see if I can figure out why it gets called in Kino, just so I know, but it definitely works now

sour garden
white hull
#

if next(SMODS.find_card('v_retcon')) then

#

SMODS.find_card returns a table of all cards you have that fit the key

#

if in your mod you can have multiple copies of retcon and you wanted to do something for each copy, then you'd do for _, v in ipairs(SMODS.find_card('v_retcon')) do

sour garden
#

okay, then i'll keep the for statement then

slim ferry
#

With each value being true or nil

#

So just check if G.GAME.used_vouchers.v_retcon

sour garden
#

the only problem with the if statement is that i'm not sure how to get the extra variables from a voucher that way
i was looking at v.ability.extra in the voucher for another check

white hull
#

I think it returns card objects

#

So you could save next(SMODS.find_card('v_retcon')) in a local variable and then check for attributes on that

red flower
#

keep in mind next returns the key, value pair

#

so local _, voucher = next(SMODS.find_card('v_retcon'))

lament agate
#

anyone has any ideas whats the lua that contains how mult sounds works

#

it getting pitched up and whatnot

red flower
#

as in when a card gives mult?

lament agate
#

yes!

#

whenever it pitches up

red flower
#

should be in card_eval_status_text

lament agate
#

theres alot of stuff in here

#

hold on

#

i really just want to modify xmult hit sounds

#

and nothing else

#

im afraid im just patching the whole thing

white hull
#

I just discovered that context.modify_scoring_hand doesn't work for debuffed cards, they don't get added to the hand

#

Can I fix that somehow?

wintry solar
#

I will fix this in smods

white hull
#

Thank you :)

#

I just tested it and it does work with Splash

#

So yeah, must be a bug

torpid flicker
#

how do i use my gradient in en-us.lua

SMODS.Gradient { key = "Typ0", colours = {HEX('A4C2F4'), HEX('EAF4A4')} }

"{s:0.5}Created by {s:0.5,C:typ0}Jimbo{}{}"

everything shows up correctly the gradient just isnt happening and its gray

stoic void
#

I think it is X
I Might be wrong

red flower
#

should be C:Typ0

#

ah wait

torpid flicker
#

i tried that and it didnt work

red flower
#

also C:modprefix_Typ0

hushed field
#

Do gradients not need to be added to the G.ARGS.LOC_COLOURS table?

torpid flicker
#

got it

#

smods auto does it

red flower
hushed field
#

Oooh, sick

#

I was very much unaware, haha

red flower
#

at some point they didnt

hushed field
#

Well, if you want to change the key, you can add them that way, at least, as that's how I'm handling them, haha

torpid flicker
#

its just gray

red flower
torpid flicker
#

yup

red flower
#

🤷‍♂️ that should work

torpid flicker
#

"prefix": "smallpox",

#

well it isnt

#

ill just manually add it like kino does

red flower
#

maybe it is lower case actually

torpid flicker
#

ill try it

red flower
torpid flicker
#

sick

#

thanks!

white hull
#

is card.ability.wheel_flipped universal for any scenario where cards are flipped?

red flower
#

no

#

what do you need it for

white hull
#

I'm looking at vremade blinds that draw cards face down and they all set card.ability.wheel_flipped to nil when disabled

#

So I assumed it just tracks whether the card is flipped

#

And wheel in the name doesn't mean anything

red flower
#

it is set automatically when emplacing a flipped card in hand

#

but not when flipping a card in hand i think

#

anyway you can just check if the card is flipped directly if you need that

white hull
#

Eh I'm just making a blind that draws editioned cards face down

#

So I think it's fine leaving it as is

#

Just incase lol

sour garden
#

is there any example code on how to have the reroll button reroll booster packs? i'm still struggling to wrap my head around this

red flower
white hull
#

You could probably yoink the code that puts them there in the first place, remove existing packs, then run it again

sour garden
red flower
#

ohh thats a bad way to word it then lol

#

i remembered theres something that did that let me look again

red flower
sour garden
#

cardsauce has a joker that says it can reroll packs but looking at the code it's still going over my head

#

guess i'll download cardsauce as well to see how it works

crisp coral
#

i coded that one

#

its just hooking

#

,,,wait no i coded the one that adds packs on reroll

red flower
#

it looks like a hook

#

the only problem is that it uses vanilla functions (yuck) and events for timing but you can probably just copypaste

sour garden
#

okay yea, koffing is what i'm looking for

crisp coral
#

yea unless it got reworked then i did that one

white hull
#

Is context.setting_blind calculated before or after cards in deck are shuffled?

red flower
#

after

#

im pretty sure

white hull
#

Strange then...

viscid talon
#

myst

#

hai

white hull
#

I'm trying to make a blind that puts editioned cards at bottom of deck but it's not doing the thing

crisp coral
#

i think to reroll boosters is a bit more nuanced,,?

#

hii marii

viscid talon
#

waves at u

crisp coral
#

waavee

red flower
white hull
#

Yeah fair enough

crisp coral
#

good job

white hull
#

I guess I'll have to hook the shuffle effect then to do it

red flower
#

as you can see i have a patch to stop the shuffling lol

white hull
#

Yeah

#

But hooking is better right?

red flower
#

i dont have a reason why either would be better

white hull
#

That's the general sentiment I read everywhere

#

Hook instead of patching if you can

red flower
#

i personally say that as hyperbole for people that are new because they dont understand how to make patches not clash

#

but if you know then either is the same i usually prefer hooks because they're easier to read

white hull
#

I think I can be considered new, how do you make patches not clash? Avoid using the at placement?

#

I try to do that but sometimes you gotta overwrite the code

pastel kernel
#

How do you make it so that a joker can spawn rare consumables but excludes omega consumables

white hull
#

Fair enough lol

crisp coral
#

if you use at you better have a good reason to use it p much

red flower
sour garden
# crisp coral its just hooking

i don't think there's anything else other than the hook? but also plugging the function in as is. i can't get it to work, even after switching objects
gonna see if i can find a patch

sour garden
#
local reroll_shopref = G.FUNCS.reroll_shop
function G.FUNCS.reroll_shop(e)
    local ret = reroll_shopref(e)

    for _, v in ipairs(SMODS.find_card('v_retcon')) do
        if G.GAME.Biased_Balance.can_reroll_shop then
            G.E_MANAGER:add_event(Event({
                trigger = 'immediate',
                func = function()
                    if #G.shop_booster.cards > 0 then
                        for i = #G.shop_booster.cards, 1, -1 do
                            local c = G.shop_booster:remove_card(G.shop_booster.cards[i])
                            c:remove()
                            c = nil
                        end
                    end

                    G.GAME.current_round.used_packs = G.GAME.current_round.used_packs or {}
                    for i = #G.GAME.current_round.used_packs+1, #G.GAME.current_round.used_packs+2 do
                        if not G.GAME.current_round.used_packs[i] then
                            G.GAME.current_round.used_packs[i] = get_pack('shop_pack').key
                        end

                        if G.GAME.current_round.used_packs[i] ~= 'USED' then 
                            local card = Card(G.shop_booster.T.x + G.shop_booster.T.w/2,
                            G.shop_booster.T.y, G.CARD_W*1.27, G.CARD_H*1.27, G.P_CARDS.empty, G.P_CENTERS[G.GAME.current_round.used_packs[i]], {bypass_discovery_center = true, bypass_discovery_ui = true})
                            create_shop_card_ui(card, 'Booster', G.shop_booster)
                            card.ability.booster_pos = i
                            card:start_materialize()
                            G.shop_booster:emplace(card)
                        end
                    end
                return true
                end
            }))
            G.E_MANAGER:add_event(Event({ func = function() save_run(); return true end}))
            G.GAME.Biased_Balance.can_reroll_shop = true
            break
        end
    end
    return ret
end

i have can_reroll_shop always set to true just to get it working

red flower
#

if you print SMODS.find_card('v_retcon') at the top what does it do

crisp coral
#

ah okay koffing got reworked

sour garden
red flower
#

both

sour garden
#

print(SMODS.find_card('v_retcon'))
is this how you print or is it a different command

red flower
#

ye

#

if it prints nothing then its not running at all, if it prints an empty table then find card doesnt work

sour garden
#

wait

#

i may be incredibly stupid

#

i never loaded the file

crisp coral
#

cinema

sour garden
crisp coral
#

im confused why its searching for retcon vouchers but im. not gonna ask

red flower
#

retcon rerolls b

sour garden
#

mod reworks base game vouchers. replaces the original effect

#

already have lovely patches in place that remove the old ability

crisp coral
#

gotcha

#

-# and not take_ownership smh

sour garden
#

i use take_ownership for everything except what i can't use it with

#

there's a few hardcoded edgecases, like a few upgrade messages on jokers like red card

#

unfortunately, retcon is one of those "very much hardcoded" cases

crisp coral
#

right

#

im oopid

hardy vessel
#

Question about seals. Is it possible to make a seal not show up until certain requirements are met?

red flower
#

in packs?

white hull
#

defining the in_pool function on it should do the thing

#

Nevermind they don't have one

#

lmao

sour garden
red flower
#

they probably should tho

hardy vessel
#

Like, I'm working on something atm where I don't want Blue or Purple seals to show up

red flower
#

at all?

hardy vessel
#

Currently, yes

red flower
#

i would take ownership and give them a weight of 0 for random stuff

#

for fixed stuff like the spectrals it depends on what you want them to do but you can also take ownership of those and remove them from the pool

pastel kernel
#

does this work?⁨```lua
if v.hidden and not v == "jen_omegaconsumable" then pool[#pool+1] = v.key end

red flower
#

for other things you can hook set seal but it will be wonky

hardy vessel
tidal hemlock