#💻・modding-dev

1 messages · Page 178 of 1

past forge
#

im asking because i dont know 😭

#

the wiki doesnt specifies how to call the card that you want to add the seal to

frosty dock
#

you call SMODS.poll_seal, which returns you a string that is a seal key or nothing

#

you then put that seal key into card:set_seal(seal)

#

Also the docs clearly say the arguments are a single table

past forge
#

so like this?

quasi comet
#

i can't seem to get the full_hand to work ? i probably forgot something in there

frosty dock
#

I don't recall off the top of my head what the default rate for seals is

bold sleet
#

reply message

fallen vigil
#

will this work or am i missing anything

frosty dock
frosty dock
fallen vigil
#

well darn

frosty dock
#

the cards go in cards

fallen vigil
#

oh gotcha

frosty dock
past forge
frosty dock
#

it's a different thing

#

if you want it to be affected by oops, you can use mod = 12.5*G.GAME.probabilities.normal

fallen vigil
#

is this right or am i still missing something/formatting wrong

frosty dock
plush cove
frosty dock
#

ah yes

fallen vigil
plush cove
#

(I'm still trying to figure out the best way to guarantee all probabilities)

frosty dock
#

I mean this is your best bet

past forge
#

so isnt this supposed to be guaranteed to add a random enhancement to current??

spring lantern
#

wait a second

#

if repetitions = 1 does it just not retrigger

frosty dock
spring lantern
#

dammit not even sacrificing a jimbo to the twins fixes the issue

#

i am completely stumped

#

like this should be fine right

past forge
frosty dock
spring lantern
#

wait

frosty dock
#

do you have the optional feature for joker retriggers enabled?

spring lantern
#

the what

frosty dock
frosty dock
#

SMODS.current_mod.optional_features = { retrigger_joker = true }

spring lantern
#

is this a new thing

past forge
spring lantern
#

last time i tested this joker was on the really old build

frosty dock
spring lantern
#

daym

#

thanks so much

#

will keep in mind for the future

frosty dock
#

that's for editions

past forge
frosty dock
#

I'm on mobile

past forge
#

wait

frosty dock
#

can you please just send a screenshot

spring lantern
frosty dock
#

[this is editions, which should mean enhancements no longer crash]

past forge
#

im trying to do a little bit complex effect here

#

but im getting everything right until the part where it has to add the modification

frosty dock
#

set_enhancement isn't real, and you're polling an enhancement to use as an edition

#

same for seals

past forge
#

copypasting my own code is going to kill me someday

frosty dock
#

you need to use poll_edition and SMODS.poll_seal respectively

#

the way you set an enhancement is current:set_ability(G.P_CENTERS[newMod])

past forge
#

so no add_edition?

frosty dock
#

I'm not talking about editions

#

enhancements, editions and seals are fundamentally different things

past forge
#

okay the enhancement is working now

frosty dock
#

Also the way you're checking for editions and seals existing is wrong

spring lantern
#

hoping this'll be less unbalanced

frosty dock
#

you just check for card.edition and card.seal respectively

fallen vigil
#

why does it only make jimbo 😭

spring lantern
quasi comet
#

How do you return how many cards are in the full hand?

spring lantern
#

so it's not reading the cards table properly i fear

fallen vigil
timid star
#

been staring at talisman and jens alamac code for a while now and can't seem to figure out how i could talk to talisman to be able to use stuff like e_mult for scoring calculations

past forge
#

why does poll_edition doesnt need the SMODS. at the start?

vital rapids
#

I've learned to not ask questions about why things work the way they do, they just work

past forge
#

lol

#

true

lavish lake
paper zealot
#

os.date() returns a string of the date or time formatted according to the format string, the first argument.
Documented here: https://www.lua.org/pil/22.1.html
os.date('%H:%M') would return 20:57, for example.
os.date('%x') would give you the full date formatted according to the system locale, something like 15/2/2025 or 2025-2-15. This will change if users change their locale or date preferences on their system.
os.date('%d') would give you just the day of the month, 15. I'd probably compare that to check if the date has changed.

past forge
#

i dont even know why this happens

normal crest
past forge
safe token
#

Wheres can i find this file?

past forge
#

this is my code, but the crash happens in balatro's code (misc_functions) doesnt even try to concat at line 338

night pagoda
#

it's not from vanilla

safe token
fallen vigil
safe token
#

i cant apply destroy card to my enhancement

#

idk how

normal crest
past forge
#

this is the wiki

normal crest
#

yeah that doesn't say it takes a table

#

just tells you what each argument is

past forge
#

so just newMod = poll_edition ?

normal crest
#

no, it's a function with 5 parameters

past forge
#

im sorry, what does that mean?

normal crest
# past forge

you need to call the function and pass the values you need in the order its mentioned here

past forge
#

like this?

normal crest
#

Use parenthesis instead of curly brackets

past forge
#

nicee

#

thanks

#

now ill try to do the seals

#

oh wait tha seals already work

#

:D

#

Now i just need to make it so this happens 1 in 4 times

#

is there a function for that so its compatible with oops all sixes?

normal crest
#

Not a function, but you can take a look at any chance joker in the base game code

#

Like bloodstone

past forge
#

im currently looking at gros michel code

normal crest
#

if you see G.GAME.probabilities then that line is the one making the random chance

past forge
#

done :)

fallen vigil
#

how do i raise the blind score requirements

prisma loom
#

What can be causing this?

modern kindle
# prisma loom \

i had something similar, try this in pokerhand instead of text

    name = "5 Stone Cards",
    description = {
        "A hand consisting of six cards that",
        "all share the stone enhancement."
    }
},```
#

change the text to whatever you want obviously

prisma loom
#

oh wait

modern kindle
#

no, instead of text =

prisma loom
#

I see

prisma loom
past forge
#

I want to add some delay before the enhancement is added because right now is added instantly as you press "play hand" instead of when the jokers activate

plush cove
# prisma loom

i dont know if Balatro was coded with enhancements in mind for the hand example UI

prisma loom
#

ig so

balmy sphinx
#

So in the SMODS documentation ive seen the function of
update(self, card, dt)
Would it be possible to write a function that makes it so when certain parameters are met the cards update?
Say i want to update the texture of a card when a card gets powered up enough. Like make the vampire's card gain a blood moon behind them when it hits X3.

Is that possible to do using either Malverk or SMODS current systems?

modern kindle
balmy sphinx
#

Hmm not gonna lie, im a little lost with that. Do you have any of the wiki pages related to that i can read up on more?

past forge
#

is there a way to change an specific probability?? e.g glass breaking or lucky cards triggering

limpid flint
#

is it possible for these kind of effects to not count secret hands?

past forge
#

i want to make something like the dice but for some specific cards

modern kindle
balmy sphinx
#

Would you be okay if i shoot you a question or two in DM's or ping you here if i get stuck as im trying to look this over?

modern kindle
#

youre fine to dm yea, ill warn its late for me so i might not respond until tomorrow as long as thats alright

balmy sphinx
#

Oh yea its no stress at all mate, I appreciate it all 😄

#

So for the context of vampire to trigger a update when the power change happens.
Should i use the
if context.post_trigger then (after a Joker has triggered.), if context.post_joker then (used for xmult), or just the one for whenever a card is played?

Also starting to wonder if its better to just set up a new card entirely and disable the original Vampire joker instead to avoid having to mess with taking ownership of the texture

past forge
#

i dont know if there is a way to do that

safe token
#

Im new in coding and modding, rn trying make my own enhancement, but its cant destroy, whats wrong? can someone help me

crisp coral
limpid flint
#

so i am wondering if I can modify it a bit in my fork

frosty dock
#

it's possible for sure

past forge
#

This works now, the issue is that i just want the 4s to not break and if I play any hand containing a glass four, all of the cards of the hand wont break

#

also, the G.GAME.probabilites.normal stay at 0 after the hand is played

past forge
tidal edge
limpid flint
lavish lake
#

Guys how do I check when it's the end of an ante?

hushed field
#

so unless you're changing how the blinds work, that should do it

lavish lake
#

I don't know though

hushed field
#

are you changing how the blinds work, then?

lavish lake
hushed field
#

because otherwise I'd really just do it the same way campfire does it

past forge
#

im trying to take another approach, and im trying to detect if a card is going to be destroyed, and if is a glass 4, changing remove to false, but it doesnt seems to work this way

paper zealot
# limpid flint I know it must be possible, just not sure how

In Alices Annum.lua, modify get_least_played_poker_hand() and get_least_played_poker_hand_level() to also check if G.GAME.hands[v].visible

function get_least_played_poker_hand()
...
    for _, v in ipairs(G.handlist) do
        if G.GAME.hands[v].visible and v.G.GAME.hands[v].played <= played_hand_count then
            result_hand = v
...
hushed field
#

the removed property is checked for joker interactions, but I think by then the glass cards that will shatter are already in a table. So if you change the remove property afterwards, it doesn't get checked again when .shatter() is called on that card

past forge
#

and if so, how do i prevent the shattering

hushed field
past forge
#

this is what the wiki says about that context

hushed field
#

I'm not sure I can think of a neat way without injects or wonky scripts to prevent shattering while also showing the player that a shattered card was prevented. I think in the joker logic, on context.destroying_card, you could call pseudorandom('glass'), and kinda fake the shattering, by just calculating the chance earlier, and then marking the card as not going to shatter. 🤔

#

no wait, nvm

opal spade
#

glass card destruction happens in evaluate_play at functions/state_events.lua

hushed field
#

that doesn't matter. You'd need to inject with lovely regardless, I think, because after the calculate_joker() that uses context.destroy_card, the glass shattering is separately calculated and would overwrite it

past forge
#

so the effect is even more complex than I thought

#

any guides on lovely injecting?

hushed field
#

I found card destruction to be unexpectedly complicated, haha, so I feel you. I'd suggest somethings for lovely, but I haven't found a great guide besides the documentation yet, and I'm just kinda stumbling through it! good luck with it though! 😄

paper zealot
opal spade
past forge
opal spade
hushed field
junior pine
#

does anyone know where in the card table the description for a joker is in either G.shop_jokers.cards[] or G.jokers.cards[]?

limpid flint
paper zealot
unkempt thicket
#

whats the better calc version of this? if G.GAME.dollars >= card.ability.money then

young dew
#

i'm trying to make a sticker that retriggers card but it won't work for jokers, does anyone know why?

calculate = function(self, card, context)
        if
            -- Joker (doesn't work)
            (context.retrigger_joker_check and not context.retrigger_joker and context.other_card == card)
            -- Playing Card
            or ((card.ability.set == "Default" or card.ability.set == "Enhanced") and context.repetition)
        then
            return {
                message = localize("k_again_ex"),
                repetitions = 1,
                card = card,
            }
        end
    end
manic rune
#

whats "context.retrigger_joker"?

young dew
#

i think it indicates when jokers are retriggered

manic rune
#

oh, my joker which retriggers another dooesnt actually use that so i dont think thats necessary, idk

#

this is what i did

#

im pretty sure stickers should be the same

desert marlin
#

does someone know how you can make a joker with a random mult? (like misprint)

obtuse silo
#

ok so how would I make sure this detects if a hand contains a 7 and a 10 because iirc this code doesn't work

#

maybe it's because i'm referring to "context.scoring_hand" which is a boolean?

young dew
young dew
obtuse silo
#

ah so this is all right

young dew
#

in theory your joker should work

obtuse silo
#

because the code flow is this:
-declares "has seven" and "hasTen" flags
-checks each card in scoring hand for 7s and 10s, marks as true if the respective rank is found

  • if both are true by end of hand, applys mult
obtuse silo
#

oh yeah it does work

#

dunno what i was thinking

obtuse silo
#

okay, so
the issue i'm seeing with this is that everything operates locally. Looking at Fortune Teller's code shows that there's a separate "tarot usage counter" that's constantly tracked, hence why you can find it with more mult than normal as opposed to having to have it in one of your joker slots to scale it
this code doesn't track the total times Coffee Cup was sold, so the effect doesn't work.
Might need a hook for this

smoky talon
young dew
paper zealot
obtuse silo
smoky talon
#

that's what i was thinking, i just wasnt quite sure the best way to store it

paper zealot
manic rune
#

question, currently i have this function which clears some stuff my jokers inflict on playing cards

however, is there a way for me to make it so that this function runs without the need of having to manually put it in jokers' calculation?

paper zealot
smoky talon
#

just need it once

#

thanks though!

paper zealot
#

You could also account for if it's open more than a month straight, when the day wraps around again, but that may be overkill

smoky talon
#

yeah way too much

paper zealot
#

If you want it to work through the game being closed and reopened, you'll need to store the value in SMOD's config

smoky talon
#

now how do i have it instantly vanish instead of being whenever i start a blind or something?

#

i know i need some sort of context, just not sure what one would always be active

paper zealot
#

Not sure, someone else might be able to assist with that. There's always Game:update, but the less things being checked every frame, the better.

smoky talon
#

i can live with it being when setting a blin for now

obtuse silo
young dew
# obtuse silo so... how would I go about doing that?

you could do something like this

if context.joker_main then
    return {
        xmult = card.ability.extra.currentxmult + card.ability.extra.xmult * (G.GAME.coffeecup_xmult or 1)
    }
end
if context.selling_self then
    G.GAME.coffeecup_xmult = (G.GAME.coffeecup_xmult or 1) + 1
end
obtuse silo
#

ohi it really is that simple-

#

i'll test it rq

spare elk
#

yeah i couldnt figure out how to fix the pool stuff, though i think its coming from the code of Wheel of Fortune*? not sure tho

obtuse silo
smoky talon
#

I'm sure this is really easy but how do i destroy the joker after the day changes? I tried copying the cavendish code but it really didnt like it lol it complained about like all of the variables

#

i assume there's an smods destroy but i cant find it

#

i looked on the page with all the creation and debuffing functions, no luck

undone flicker
#

How would I be able to add my joker to the end of round cash-out screen?

cursive glade
# smoky talon i assume there's an smods destroy but i cant find it

I use the same method that j_madness uses:

local destructable_jokers = {}
for i = 1, #G.jokers.cards do
    local current = G.jokers.cards[i]
    if current ~= self and skpac_utils.getCardKey(current) ~= 'j_[your_prefix]_[joker_key]' and not (current.ability and current.ability.eternal) and not current.getting_sliced then
        destructable_jokers[#destructable_jokers + 1] = current
    end
end
if #destructable_jokers > 0 then
    local joker_to_destroy = pseudorandom_element(destructable_jokers, pseudoseed('madness'))
    if joker_to_destroy then
        play_sound('slice1', 0.96 + math.random() * 0.08)
        extraMessage = "Random Joker Destroyed!"
        joker_to_destroy.getting_sliced = true
        G.E_MANAGER:add_event(Event({ func = function()
            joker_to_destroy:start_dissolve({G.C.RED}, nil, 1.6)
            return true
        end }))
    end
end

My 3rd line with current ~= self just identifies itself as not able to be destroyed.
The rest of it picks a random destructible joker and destroys it.
It also explicitly excludes eternal and cards already marked for destruction.

obtuse silo
undone flicker
#

oh perfect

#

thank you

obtuse silo
#

np!

smoky talon
obtuse silo
cursive glade
smoky talon
#

alright

jovial harness
#

Trying to get a snippet of code to run once for every card in played hand, including unscoring. context.individual only seems to count scored cards, and includes retriggers (e.g. Hack). Should I be doing a loop through every card in context.before instead?

smoky talon
manic rune
#

i dont think thats how you are supposed to do it

paper zealot
manic rune
#

the joker_to_destroy part is supposed to be a card

smoky talon
#

i used the joker key

manic rune
#

so i believe it should be smt like:

calculate = function(self,card,context)
  if context.setting_blind then
    G.E_MANAGER:add_event(Event({
      card:start_dissolve...... etc etc
    ))}
  end
end```
cursive glade
#

Right, sorry. I'm sick and heavily medicated. I shouldn't be doing code lol

It's supposed to be the table of the card you want to destroy (probably self tbh)

smoky talon
#

ah

manic rune
obtuse silo
smoky talon
#

i changed it to self and now it doesnt like the dissolve part

manic rune
#

you should use card instead of self in this case i believe

cursive glade
#

Did you try card?

smoky talon
#

card works

#

thanks!

cursive glade
#

Thought so. self and card are identifiers pointing to itself, I just haven't investigated their proper use cases. I just usually throw stuff together and bash my head against it until it works.

manic rune
#

same, i remember someone explaining what self is and i still havent exactly figured that out lol

#

but in most cases you use card if you want to refer to the joker which is doing the whole calculation stuff

cursive glade
#

Is there a global or smods variable for the current blind's score requirement, and the current (or final) round score?

tidal edge
#

help im having a stroke its been a while since i've been making shit

#

what is this enhancement missing

gray apex
#

Is there a way to change the color of an {X:<color>} in a joker's description using loc_vars?

cursive glade
#

That's an interesting one

tidal edge
manic rune
#

i think its possible actually?

young dew
junior pine
#

is there a table in G that contains the blind information for selection? like blind name, required score, rewards and tag if skipped?

manic rune
obtuse silo
tidal edge
#

alright, the problem is that it isnt showing up in the menu

obtuse silo
gray apex
manic rune
#

the "self.chips" part seems to be the chip requirement

#

so i believe it should be G.GAME.blind.chips (for example) to get the chip requirement

gray apex
#

I know you can use {V:1} to modify text colors based on desired conditions, but is there a way I can make {X:<color>} behave in the same way?

tidal edge
#

does anyone have an example for how to do an enhancement

#

steamodded doesnt have them anymore

manic rune
#

uhh lets see, lets say in loc_vars, you have
card.ability.extra.color
...and
{X:#1#} (the #1# part being card.ability.extra.color)

MAYBE if you change card.ability.extra.color to a string which represents color stuffs, like "mult", "chips", "white",... then it will work? im actually curious if this is possible or it will just be
{X:mult}...{} in the description lol

manic rune
#

version 1 🗣️

#

dang, ultrakill reference

#

goated

#

V2 when

gray apex
#

lmao

storm sedge
#

Can someone help me

gray apex
obtuse silo
storm sedge
manic rune
storm sedge
#

I'm on Android btw

obtuse silo
#

you mean.. you're trying to mod mobile?

manic rune
obtuse silo
#

no can do.

manic rune
#

i will have to imprison you there

gray apex
manic rune
#

ah i see, dw

#

hm

storm sedge
obtuse silo
#

just make sure you read the rules next time, m'kay?

manic rune
#

if that doesnt seem to work then u probably cant do that 💀

#

it would be interesting if it actually worked though

storm sedge
#

Why is it illegal though

manic rune
#

🤷‍♂️

#

i actually dont know myself

storm sedge
#

So you're telling me that modding a game on pc is fine but modding on a mobile device with the same game is really bad for no reason

gray apex
obtuse silo
#

yeah
just
air on the side of caution

manic rune
#

wait wtf

#

wait

#

probably related to this

#

idk

storm sedge
#

Wait this seems interesting chat pauae

manic rune
#

reddit is currently blocked in my country so i dont know whatever is in there lol (and im lazy to turn on vpn)

storm sedge
#

So modders aren't just interested in modding Mobile games

fluid pecan
obtuse silo
hearty sedge
#

i did find something about it some days ago 'cause i wondered if could play modded on my phone too when i was away from pc, people found all sorts of things related to the conversion of the modded save folder and version.dll but seems like it takes a lot

manic rune
#

not #1#

#

.

#

wait

#

nvm

storm sedge
#

There is a way i know but again against the rules to talk about it

manic rune
#

uhhh

#

alright got it

#

so

#
       if context.selling_self then
            G.GAME.coffeecup_xmult = (G.GAME.coffeecup_xmult or 0) + 1
        end

this part is the problem

#

i think?

red flower
#

the second value in loc vars should be card.ability.extra.currentxmult + card.ability.extra.xmult * (G.GAME.coffeecup_xmult or 0)

fluid pecan
nocturne garnet
fluid pecan
#

shouldn't it be #card.ability.extra.currentxmult#X{}?

#

new to balatro modding tho

#

but i have written mods for other games so just an idea

manic rune
gray apex
fluid pecan
#

oh wait

#

i understrand it now

manic rune
nocturne garnet
nocturne garnet
fluid pecan
#

no wait

#

im dumb

fluid pecan
#

oh it is

obtuse silo
manic rune
# obtuse silo sure here's the code for the relevant joker
SMODS.Joker{
    key = "coffeecup",
    loc_txt = {
        name = "Coffee Cup",
        text = {
            "",
            "This and all copies",
            "of this {C:attention}Joker{} gain",
            "{X:mult,C:white}#1#X{} Mult when sold",
            "{C:inactive}(Currently {X:mult,C:white}#2#X{} {C:inactive}Mult){}"
  
        },
    },
    config = { extra = {xmult = 1, currentxmult = 1} },
    loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.xmult, card.ability.extra.currentxmult} }
    end,
    blueprint_compat = true,
    rarity = 1,
    atlas = "MintConditionCards",
    pos = {x = 5, y = 0},
    cost = 4,
    calculate = function (self, card, context)
        if context.joker_main then
            return {
                xmult = card.ability.extra.currentxmult
            }
        end
        if context.selling_self then
            for i,v in pairs(G.jokers.cards) do
              if v.ability and v.ability.name == card.config.center.key then
                v.ability.extra.currentxmult = v.ability.extra.currentxmult + v.ability.extra.xmult
              end
            end
        end
    end
}```
nocturne garnet
obtuse silo
#

yeah i just did it for uniformity but I ended up using someone else's solution that made it redundant-

tidal edge
#

hey anyone know why this wont show up in the collection

red flower
obtuse silo
#

yeah

obtuse silo
#

hence the G.GAME variable

fluid pecan
manic rune
nocturne garnet
manic rune
#

wait actually?

fluid pecan
obtuse silo
fluid pecan
#

oh wiat

#

that sounds very logical

manic rune
#

yeah i see

#

(isnt that a bit too broken tho ngl)

nocturne garnet
hearty sedge
#

soo how do you add/make jokers? 029_psi_nervous

nocturne garnet
hearty sedge
#

uere

nocturne garnet
#

or alternatively

fluid pecan
# obtuse silo hence the G.GAME variable

yeah so what ur doing inside of the text is using a variable that you reset back to 1 every time, but to the calculator u pass the global object which does increase

red flower
fluid pecan
#

if i inderstand it correctly

nocturne garnet
#

nevermind

manic rune
# nocturne garnet not really

its like gros michel but you dont have to rely on the 1 in 6 to break itself and get the upgraded ver of it afterwards

obtuse silo
nocturne garnet
manic rune
nocturne garnet
#

2 times for it to be as good as cavendish

hearty sedge
red flower
#

imagine "balancing" jokers

manic rune
#

and if you run a lucky card deck, you can farm a lot of $ to keep rerolling for coffee cups

nocturne garnet
hearty sedge
#

im gonna take a look at these rq

fluid pecan
#

@nocturne garnet just dm it to them

obtuse silo
nocturne garnet
obtuse silo
#

i'm just funneling ideas into a thing

fluid pecan
#

whoever cares about self promotion wwhen you want to help someone who asks for it

nocturne garnet
#

it may be in dms but it'd be like a bot dming everyone on the server

#

also my tutorial is probably like hella old now

fluid pecan
hearty sedge
#

i mean... im here, if i say you're a bot im the one who should be banned

manic rune
manic rune
nocturne garnet
obtuse silo
#

works great with Showman

nocturne garnet
manic rune
#

a joker having inf scaling is pretty insane for a common though

fluid pecan
nocturne garnet
#

i should lowkey make more tutorials

#

mayb next week when i got time

fluid pecan
#

i got a lot of time this coming week 😅

#

is that what ur talking about

#

or the week after that

tidal edge
#

hey anyone know why this wont show up in the collection [again since noone saw the last one]

nocturne garnet
fluid pecan
obtuse silo
# nocturne garnet

tested this
it scales but the current value shows up as 1 less than the actual mult

nocturne garnet
#

oh

#

i guess just add 1 lmao

obtuse silo
#

i guess i could fix this by setting the loc_vars specifically to just "or 1"

nocturne garnet
#

oh right yea

obtuse silo
#

hm?

fluid pecan
#

not sure at all tho

nocturne garnet
#

whar

fluid pecan
#

sorry i should keep my mouth shut

#

holdon

#

'ill come back later

nocturne garnet
#

its in loc_vars.....

fluid pecan
#

oh

#

they changed it

#

whoopsie

#

🙃

obtuse silo
#

ookay that only fixes the issue when no coffee cups have been sold

#

maybe the +1 was the right way to go

fluid pecan
nocturne garnet
#

hold on

tidal edge
nocturne garnet
#

change this from or 0 to or 1 aswell?

obtuse silo
#

0 Cups Sold
1 Cup Sold
2 Cups Sold
and it functions as intended!

nocturne garnet
#

also

#

peak drawing 🙏

obtuse silo
#

ty :3

nocturne garnet
#

joeka

#

im the joeka baby

obtuse silo
#

yea i wanted that to be how "joker" was written because of how baristas mispell names-

manic rune
#

average starbucks experience

#

shouldve colored the cup like a starbucks cup ngl

#

since its pretty much their signature

obtuse silo
#

ehhh i just used a basic coffee cup as reference

tidal edge
#

im sorry i keep reposting but im desperate for help

#

whyisnt this showing up in collection im confused

crisp coral
#

remove the = between enhancement and {

tidal edge
#

im going to dissolve

#

ajkwrajrawjr

obtuse silo
#

that's what tripped you up

tidal edge
#

now it isnt giving chips

#

rip

obtuse silo
#

that's because you don't have a calculate function

tidal edge
#

im so ass at making this shit its ben so long

tidal edge
obtuse silo
#

yea
also make sure you have a loc_vars for your bonus chips

tidal edge
#

thanks for the help though

obtuse silo
#

np
do rest if you feel the need to

gray apex
#

Holy heck I finally figured it out

obtuse silo
#

NICEEE

gray apex
#

I had to replace the vanilla localize function with a modified variant so that it has a new text modifier {B:1} which functions basically the same as {V:1} except it affects the text background

#

-# Hopefully this doesn't cause any compatibility issues oh boy

#

This is the sole reason I spent the last 5 hours on this 😭

fluid pecan
#

this about conway's game of life?

gray apex
#

Yeah, it'll give like 2 or 3 chips per living cell, and reset to a random state when all cells die

fluid pecan
#

interesting

#

one thing tho

#

are u just gonna reset it if it hits a stable state

#

like i think the square

#

im not sure if i remember correctly hto

gray apex
#

Probably, I'll have it remember the last 3-4 states and if it repeats, then it'll reset

fluid pecan
#

you could encode it into a string

#

that way you can recognize it

gray apex
#

It's a hard problem, because there's some patterns that repeat every 2 generations, and some that repeat over 120 generations ;-;

#

Though with such a limited grid size (5x5 without wrap around) most might not fit

fluid pecan
fluid pecan
fluid pecan
ionic timber
#

how do I change the shop_rate of consumable or the weight of a booster pack ? (I'm currently using a variable but is there a better way of doing it ?)

gray apex
#

In terms of oscillating patterns (repeats after n generations), the only one that fits is the 1x3 line that rotates. The ones that don't change from generation to generation shouldn't be hard to tackle tho

ionic verge
#

how do i tie localization files to the places the text needs to go to?

#

like for this what do i need to put in the joker?

dim dust
ionic verge
#

i was hoping to use the one thatd allow easy translation

#

like the one where you set up files like en-us.lua and put all the text in there

ionic verge
#

well yeah

#

thats what the above is

#

but its currently not attatching the text to the joker in game

red flower
#

then the key is probably wrong

ionic verge
#

its not

red flower
#

is it in descriptions.Joker?

ionic verge
#

its in en-us.lua

red flower
#

no, I mean is the table formatted like my screenshot

ionic verge
#

in the way i thought i was supposed to do this from the documentation and johnsmods word of god

red flower
#

does the joker show up blank?

ionic verge
#

yes

red flower
#

oh i think it shoudl'nt be in the modules folder

ionic verge
#

ooooooh

#

that makes sense

#

yep it works now

wicked spire
#

what if i made a mod that functions like the card game Mao 😈

unkempt thicket
#

this seems to trigger twice on enhancements, but once on seals. Why doesn't it work properly on the enhancement? (I'm referring to the context that's the same)

wintry solar
#

Add and context.main_eval

#

I think there’s some jank seal stuff left around that might need looking at

unkempt thicket
wintry solar
#

Oh wait that’s just for jokers nvm

#

Have you got something causing repetitions?

#

Oh it might be because it’s just in config maybe?

unkempt thicket
#

This is what I've got.

wintry solar
#

Try adding an extra table inside your config

unkempt thicket
#

Still triggering twice

wintry solar
#

🤔

#

Can you throw a print(inspect(context)) just before the return for me?

unkempt thicket
wintry solar
#

Do context.playing_card_end_of_round instead of the normal one

fluid pecan
unkempt thicket
ionic verge
#

gradients

#

aseprite

#

(idunno its been like a month or two now since i made it)

fluid pecan
wicked spire
#

How do I check if the played hand contains the most played poker hand? I've seen next(context.poker_hands["Hand Name"] but can't figure out the rest

obtuse silo
#

great.
the values show up as "nil" but work as intended
and each 10 plays the "reset" animation too

wooden nexus
wintry solar
obtuse silo
#

so
context.end_of_round and context.main_eval?

wintry solar
#

yes

jovial harness
#

Trying to figure out what I should change the context to for the first half of this code to total up each card properly. My brain leans into "for loop running as a context.before going through a whole hand", but I'm not sure if that's the best way to count each card in a played hand (including unscoring) once

#

... actually why have I not looked at splash's code yet

hushed field
#

does there happen to be a context like context.first_hand_drawn that also has access to the actual drawn hand?

wintry solar
#

oh I havent updated the wiki

#

check context.hand_drawn

#

its a table of the drawn cards

hushed field
#

oh, sick, haha, that's exactly what I need!

gray apex
wooden nexus
#
key = "1",
card_key = "1",
pos = {x = 14},
lc_atlas = "SCB_LC_Faces",
hc_atlas = "SCB_HC_Faces",
loc_txt = {name = "1",},
nominal = 1,
shorthand = key,
face = false,
next = {"2"},
strength_effect = {fixed = 1},
in_pool = function(self, args)
    if args.suit == 'SBC_Bamboo' then
        return true
    else
        return false
    end 
end,
}```
weak brook
#

really dont get why this lovely refuses to detect this pattern here

[patches.pattern]
target = 'functions/common_events.lua'
pattern = "elseif _c.name == \"The Wheel of Fortune\" then loc_vars = {G.GAME.probabilities.normal, cfg.extra}"```
#

i mean its right there

gaunt thistle
#

the pattern must match with the entirety of the line

weak brook
#

oh. didnt realize it worked like that

gaunt thistle
#

your pattern is unfortunately only matching the first bit, which isn't a valid match

#

yeah it's a limitation of the pattern patch's syntax

unkempt thicket
#

This seems to be removing one from each instance of the enhancement in the deck, instead of just one from the enhancement triggered.

wintry solar
#

use card instead of self

chrome prawn
#

this is the 3rd iteration of my code but my custom poker hand still isn't scoring the queen even though the game is detecting as selected

spring lantern
#

i think she's ready

chrome prawn
limpid halo
#

varying levels of seriousness are happening

hushed field
cloud plaza
#

Yall think these read well as leaves?

limpid halo
#

those are sparts

#

i didn't see it until i read your text tbh

cloud plaza
#

I think you are mistaken

limpid halo
#

oh, it appears i am

cloud plaza
#

But yea if someone told you those were leaves would you recognize them as leaves

jovial harness
#

yep!

limpid halo
#

then yes

cloud plaza
#

Sweet

#

Onto the next suit

violet void
#

Is card.edition.type the correct way to get the name of the edition applied to a card

wintry solar
#

it'll give you the key without the e_ prefix iirc

wooden nexus
#

SMODS.Rank {
key = "1",
card_key = "1",
pos = {x = 14},
lc_atlas = "SCB_LC_Faces",
hc_atlas = "SCB_HC_Faces",
loc_txt = {name = "1",},
nominal = 1,
shorthand = key,
face = false,
next = {"2"},
strength_effect = {fixed = 1},
in_pool = function(self, args)
if args.suit == 'SCB_Bamboo' or args.suit == 'SCB_Dot' or args.suit == 'SCB_Character' then
return true
else
return false
end
end,
}

SMODS.Back {
name = "SCB_Mahjong",
key = "SCB_Mahjong",
config = {},
order = 16,
pos = {x = 0, y = 0},
loc_txt = {
name = "Mahjong",
text = {
"Play with {C:attention}Mahjong{}"
}
},
apply = function(self)

local extra_cards = {}

        
extra_cards[#extra_cards+1] = {s = suits_mah[i], r = "SCB_1"}

for i = 1, 3 do
    for i = 1, #suits_mah do
        for j = 1, #Rank_Mah_N do
            extra_cards[#extra_cards+1] = {s = suits_mah[i], r = Rank_Mah_N[j]}        
        end
    end
end

G.GAME.starting_params.extra_cards = extra_cards
end

}

#

Oops

#

Still unclear on how to make this work

dim dust
#

Any idea why this code do not work ?

SMODS.Joker{
    key = 'j_ok',
    discovered = true,
    unlocked = true
} ``` ```lua
return {
    descriptions = {
        Joker = {
            j_ok = {
                loc_txt = {
                    name = 'AJOKER',
                    text = {
                        '.',
                        '.'
                    }
                },
            }
        }
    }
}```
It's a really simple code, i created a "localization" folder and a en-us.lua file for the strings, but for a reason, it does not work
dreamy thunder
#

its missing your mod's prefix

dim dust
#

oh

wintry solar
hushed field
cloud plaza
#

Wow I completely freehanded this and I'm actually kinda proud of it

vivid solstice
cloud plaza
#

Yup!

#

Its actually entirely a coincidence that leaves are a thing in this deck im making, they replace hearts in this instead of spades which they are historically

wooden nexus
#

Okay i genuinely have no idea why this is not working

cloud plaza
#

This deck is based off of the story me and my friends are writing and one of the factions happens to be heavily plant themed

wooden nexus
#

Ah forget it, I'm gonna update my sprite sheets to be combined

#

see if that's the problem

unkempt thicket
#

Is there a way to trigger a card after it's been trigger. (Ex: first card triggering again after third card.)

wooden nexus
#

I need to figure out how to make the chips for these 1s to 9 chips instead of 1 chip to match Aotenjo

faint yacht
wooden nexus
#

any way to remove the prefix?

#

I may just have to manually do it

frosty dock
#

you can set a shorthand, but I've wanted to rework this system

#

(it's currently not localizable)

wooden nexus
#

or is this something I should check my tag_card stuff

frosty dock
#

it's probably easiest to modify the entry in P_CARDS you want to change after injection

#

smods doesn't really offer a good way for unique playing cards as of yet

wooden nexus
#

I can tell

wooden nexus
#

but hey

#

so far i have 108/144 i believe

cloud plaza
#

hmm, do I break the color rules to look cooler or work with negative space

maiden river
#

is there a way to make a joker trigger on certain events happening?
I want to make a joker that reacts to an event happening with another card

#

kind of like how lucky cat works

wooden nexus
#

Sorry not 144, 136

#

Forgot I'm not doing Seasons or Flowers, which is how Aotenjo's default has it

wintry solar
#

splash context is neat

frosty dock
unkempt thicket
dim dust
frosty dock
wintry solar
#

are there any other contexts you think need to be added?

unkempt thicket
#

I ask because of this.

maiden phoenix
#

it's scoring_hand

frosty dock
maiden river
hallow slate
#

This is what happens why I try inserting this:

    key = "music_madcap",
    path = "music_madcap.ogg",
    sync = {
        ['music1'] = true,
        ['music2'] = true,
        ['music3'] = true,
        ['music4'] = true,
        ['music5'] = true,
    },
    select_music_track = function(self)
        return G.GAME and G.GAME.modifiers.madcap_stake
    end
})```
unkempt thicket
maiden phoenix
#

Me when I steal Aure's thanks balatrojoker

frosty dock
hallow slate
#

Ok my problem is probs bc I did audio instead of sound

maiden phoenix
#

Kinda feel bad cuz apparently you said it already before

unkempt thicket
#

I thank all involved, it took me way too long to get that working.

frosty dock
#

bleh

maiden phoenix
#

Thank you Aure for no reasons

#

Gottem

sturdy compass
#

I'm trying to create a new card type and it is going disastrously lmao

#

The fact that it isn't a consumable type does not help 😭

wintry solar
#

why isn't it a consumable type?

sturdy compass
#

Because it's not a card you use. It almost acts like a Joker in a way

wooden nexus
sturdy compass
#

(but not really)

wintry solar
#

you can do that with consumable types

maiden phoenix
#

Yea new-calc supports calculate on consumables

sturdy compass
#

Then how would I prevent people from "using" them

frosty dock
#

can_use

maiden phoenix
#

Hook or lovely patch said button to not show up if the card set is your consumable's

wintry solar
#

if can_use returns false there's no button

sturdy compass
#

Oh huh

maiden phoenix
maiden phoenix
wintry solar
#

oh maybe that's just in shop

sturdy compass
#

oh

frosty dock
#

hm yeah that's just in shop actually

sturdy compass
#

damn

frosty dock
#

maybe we should add a use_button flag

wintry solar
#

yeah maybe

maiden phoenix
sturdy compass
wintry solar
#

I was thinking as well should consumable types have a default area to go to?

maiden phoenix
#

(for now until they add said use_button flag)

wooden nexus
#

So what, is there a section of code i can do that's like "if card.suit = X, Y, Z then
nomial = 9" or something like that

#

But isn't nomial = 9 gonna move the rank to after 8 instead of before 2?

maiden phoenix
cloud plaza
cloud plaza
#

Not finished yet but I'm wicked proud of the pixel art I did

ionic timber
#

is there a built-in way to change the shop_rate of consumable or the weight of a booster pack ? (like some vouchers does)

wintry solar
#

this is now added

#

added in 1415a

minor magnet
#

is there a way to check if a certain mod is installed for an if statement?

maiden phoenix
#

Or if the mod uses a global you can check if it exists

#

(like Cryptid or Ortalab iirc)

minor magnet
maiden river
sturdy compass
#

What does the key structure for a card with a custom ConsumableType look like? would it just be c_[prefix]_[key]?

maiden phoenix
#

yes

frosty dock
#

if next(SMODS.find_mod("id")) then

maiden phoenix
#

Oh, that's neat

sturdy compass
frosty dock
maiden phoenix
#

I don't know if empty colors count as a valid required parameter

sturdy compass
#

I'm aware, I said ignoring that lol

maiden phoenix
#

oops 98%

#

Does your consumable type can have dupes or do you want a default?

frosty dock
#

I mean HEX"" is probably just black?

sturdy compass
maiden phoenix
#

You know the default option if all options are taken/poll is empty

#

Like strength for tarot or Joker for jokers

unkempt thicket
#

How do you make a card suitless, without an enhancement?

sturdy compass
#

yes I do want a default, hence why I set it

maiden phoenix
#

Oh wow

sturdy compass
maiden phoenix
#

I read it comparing to my code and I set the default at the bottom 😅

sturdy compass
#

Can't believe I'm hitting you with the 98% lmfao

maiden phoenix
#

I already hit myself before with it

#

Twice in a row so close together today hurts

sturdy compass
#

😭

maiden phoenix
sturdy compass
#

But yeah I assume this skeleton for the type is good then?

maiden phoenix
#

Dunno if cards' useful but overall looks good to me

sturdy compass
#

How exactly does cards work then? It's gonna be more than just that one card in the type, I just wanted to make sure I was getting it all set correctly

#

From how I interpreted the doc, that's what sets the specified cards to the type

maiden phoenix
#

You can do that when you create the card directly with set = "consumable_type_key"

sturdy compass
#

Ah I see ok

#

So this works in that case?

maiden phoenix
#

Seems like it should

plush cove
sturdy compass
#

lmfaooooo

maiden phoenix
#

That description about to look funky

wintry solar
#

omg zodiacs!!!!

sturdy compass
sturdy compass
jovial harness
#

I'm trying to remove stone cards from a calculation in a joker, but I can't figure out exactly to do it. Can I get somehelp with this?

maiden phoenix
#

try v.ability.name ~= "Stone Card" instead

normal crest
#

use not SMODS.has_no_rank(v)

jovial harness
maiden phoenix
jovial harness
#

I tried that one first actually - caused a nil value error

#

Lemme go put it back in to get the crashlog

#

Stone Card possibly works better in this context since for some reason they were causing the calculation to go way off the rails

dim dust
#

Is there a prefix for lua SMODS.DeckSkin ?

normal crest
normal crest
jovial harness
#

That'd do it lmao

dim dust
#

I'd like to change the name

maiden phoenix
#

Never made a SMODS.DeckSkin, but you could look at how other mods did it

dim dust
#

I'll prob do that

jovial harness
#

yep it was old SMODs, PEBKAC but it works perfectly now!

wooden nexus
scarlet spire
#

okay I can't make sense of any of this code, unless someone with deep knowledge of smods and balatro's scoring code wants to guide me through this, I'm done trying to figure out how to implement an unscoring context

plush cove
#

idk if this helps but this is how I handle unscoring cards for one of my jokers

(it levels up if a hand contains any number of unscoring cards, and resets if all cards score)

scarlet spire
#

yeah the issue for me is that unscoring cards don't calculate, which requires a patch

wintry solar
#

what are you trying to do?

scarlet spire
#

unscoring context used by cryptid's green seals

#

having a card calculate if it's played but unscoring

wintry solar
#

oh right yeah I wanted to build that into smods at some point

scarlet spire
#

ooh, that'd be really nice to have built in

lethal mural
#

how does gradient(self, dt) on rarity work?

#

i havent seen any other mod use it that i know of

edgy reef
#

You basically modify the G.C of the rarity color inside that function (much like how the DARK_EDITION color does).

#

The mods with rarities that have gradients just didn’t port em (e.x. for Cryptid I was just too lazy).

grim remnant
#

i'm trying to make a joker that, among other things i'm yet to implement, is meant to just give. 1 chip and 1 mult. but for some reason it's not showing up right in-game??? what am i doing wrong, exactly?

    config = { extra = { chips = 1 } },```
maiden phoenix
#

First, you can put all your config.extra stuff in one singular table. Second did you define a loc_vars to your joker? Also show the code of your localization

grim remnant
maiden phoenix
#

loc_vars is basically what's used to replace the #x# in the localization, it looks something like this for your example

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

Also your "Chips" line should have #2# instead of #1# to refer to the second value in the returned loc_vars table

maiden phoenix
maiden river
wintry solar
maiden river
#

ah alright

#

very handy

grim remnant
maiden phoenix
#
    config = { extra = { mult = 1, chips = 1 } },
#

Simple as that

compact valve
#

so I've made joker texture replacements by hijacking another texture mod, all I need to know now is how I make it into a separate mod

grim remnant
#

it's got 1 mult, but not 1 chips yet...

maiden phoenix
#

Show your loc_vars and loc_txt?

grim remnant
#
    -- How the code refers to the joker.
    key = 'paulJoker',
    -- loc_text is the actual name and description that show in-game for the card.
    loc_txt = {
        name = 'Paul',
        text = {
            "{C:mult}+#1# {} Mult",
            "{C:chips}+#2# {} Chips",
            "Paul."
        }
    },
    --[[
        Config sets all the variables for your card, you want to put all numbers here.
        This is really useful for scaling numbers, but should be done with static numbers -
        If you want to change the static value, you'd only change this number, instead
        of going through all your code to change each instance individually.
        ]]
    config = { extra = { mult = 1, chips = 1 } },```
relevant lines here
plush cove
#

please tell me it says SMODS in your code

#

and you just mistyped it in the chat message

maiden phoenix
#

Where's your loc_vars?

frosty dock
grim remnant
#

it says SMODS. i mis-copied ;P

grim remnant
maiden phoenix
#

Yea you forgot to put the chips one in too

grim remnant
#

also, does anyone know if there's like. a keyboard shortcut to quickly restart the game without having to enable/disable another mod? (and to a lesser extent a mod that like, lets you summon a joker in-game so you can test it easily)

#

okay, THAT much worked

maiden phoenix
#

Weird extra space but nice

plush cove
scarlet spire
#

honestly I just alt+f4 and then launch via steam

#

holding M restarts (I think only if you have debug mode enabled on the game itself?)

grim remnant
#

Moment

lethal mural
#

how do i make it so jokers dont spawn in the shop in a normal (non challenge) deck

scarlet spire
#

though it ends up spamming the next window that gets focused with the letter m, which is a bit annoying if you have your code open in the background

tired marsh
#

This code is causing my joker to instantly despawn, also its taking out a way larger chunk of chips, mult, and xmult than it should. Any advice?

#

I stole the func code from the popcorn joker

grim remnant
#

okay, weird. it DISPLAYS the +1 chips but doesn't give them in scoring.

maiden phoenix
tired marsh
#

kk

plush cove
tired marsh
#

Its up top earlier, dwao

#

It works for sure

plush cove
#

show me it so I can check

maiden phoenix
#

Oh yea if it's defined in the calculate function that'll cause issues

tired marsh
#

The calculate function

#

Its defined outside of it

#

Sorry, initialized

young dew
#

the modded balatro wiki is super slow for me

#

i think it's because of the new background

#

and i don't know of to un-slow the wiki 😔

maiden phoenix
tired marsh
young dew
maiden phoenix
#

oh

tired marsh
#

Which probably means it doesn't go into it anymroe

maiden phoenix
#

Odd, can you debug inside the context.eor and me see if it actually doesn't go inside?

past forge
#

holding m restarts????

#

wow it does

maiden phoenix
#

Oh yea also Oburg what's your SMODS version?

minor magnet
#

if someone makes a good teto balatro song im gonna make it so she plays it when you get her

#

as of right now she plays fukkireta

#

also she only appears if you have vocalatro or the vocaloid card set installed

plush cove
#

Quick question!

I'm split between doing two methods of probability guaranteeing, and I wanted to know if there were any reason to do one over the other?

  1. Lovely patch into the Pseudorandom function, returns 0 if probabilities are supposed to be rigged
  2. Set the game's probability normal to an impossibly high number (like 1e9)
wintry solar
#

number 2

minor magnet
#

i have a joker that guarantees probabilities! i did it just by setting the probability number to 7.777 since base game doesn't have any probabilities higher than 1 in 1000

wintry solar
#

number 1 will mess with loads of stuff

plush cove
#

the bananas are no longer safe >:3

plush cove
#

how's it function in-game? my Joker works by: if you sell it, it rigs all probabilities until the end of the round

normal crest
#

we really need a better way to manipulate probabilities

plush cove
#

probably (no pun intended)

unkempt thicket
#

like denominators

dreamy thunder
#

i mean naneinf is possible with chances

#

but you cant revert

#

goes -naneinf when you try

dreamy thunder
#

i think you should specify it being 7777

past forge
#

Im just struggling to make the second effect, i dont even want to think about the first one

minor magnet
#

if I see any mod have something that requires higher probabilities i will raise it to 77.777

minor magnet
#

and set them to 1 on context.after

dreamy thunder
#

yh if scoring hand includes a blessed card increase it

random sleet
#

cryptid has a 1 in 1e8 or smthing chance

past forge
dreamy thunder
#

afterwards decrease

minor magnet
past forge
dreamy thunder
#

i think you should make it as high as possible without hitting naneinf

minor magnet
#

oh yeah right luckies pay out before hand is scored

past forge
#

i dont even know how to start with tha payouts

minor magnet
#

i think you should take ownership of m_lucky and m_glass and add a check for the joker in the code for their effects

random sleet
#

luckies pay out in context.main_scoring which is before context.individual

plush cove
#

my main concern with setting the probability normal to a number that's too high is that if you sell the Weighted Dice, and then somehow acquire several Oops! All 6s then the game might overflow because it doubles all the values

past forge
#

because if i manage to change the rate the mult would also trigger

dreamy thunder
past forge
#

probabilities are a thing outside of the hands of noobs like me

dreamy thunder
#

thats a problem

past forge
random sleet
#

probabilities arent meant to be used basically

dreamy thunder
plush cove
random sleet
#

like deadass the design of them is so fragile

minor magnet
minor magnet
#

wait lemme get the code for luckies

wintry solar
#

there should be a probabilities function ideally

random sleet
#

honestly it only works correctly if oops is the only probability joker

wintry solar
#

and some sort of stack of modifications to the normal value

plush cove
#

wait actually I had an idea for how I can fix it with Weighted Dice

#

I can combine both of my solutions

so if you sell it, it activates a G.GAME.rig_all_probs variable

and then when the hand is calculated, if that variable is set to true, THEN it sets the probability to the impossbily high number

and after it's all said and done, it reverts it again

#

and then that continues until rig_all_probs becomes false at the end of the round

minor magnet
#

function Card:get_chip_mult() if self.debuff then return 0 end if self.ability.set == 'Joker' then return 0 end if self.ability.effect == "Lucky Card" then if pseudorandom('lucky_mult') < G.GAME.probabilities.normal/5 or SMODS.find_card("j_prefix_4leafclover") then self.lucky_trigger = true return self.ability.mult else return 0 end else return self.ability.mult end end

past forge
minor magnet
#

just change the joker id

minor magnet
#

put it outside joker code

past forge
#

or how?

wintry solar
#

you should patch that

past forge
#

like a hook

minor magnet
past forge
#

i dont know how patches work, but thanks, il try it rn

minor magnet
past forge
#

if it works, now i just need to figure out the glass part

#

it kinda works

#

but is the mult triggering always and not the money

zealous glen
past forge
#

I found this:

    if self.ability.p_dollars > 0 then
        if self.ability.effect == "Lucky Card" then 
            if pseudorandom('lucky_money') < G.GAME.probabilities.normal/15 then
                self.lucky_trigger = true
                ret = ret +  self.ability.p_dollars
            end
        else 
            ret = ret + self.ability.p_dollars
        end
    end
minor magnet
past forge
random sleet
#

more like balatrostuck in development hell

past forge
minor magnet
plush cove
past forge
plush cove
#

And it doesn't seem to conflict with Oops

minor magnet
#

i don't think it needs to be

plush cove
past forge
#

okay it works, now its just that ALL lucky cards payout

#

not just the four

#

should i add that to the patch or in the joker code?

minor magnet
#

or self.base.id == 4 im not 100% sure which one works if you patch it in

past forge
#

okay ill try

scarlet spire
#

is it possible to have the options argument of SMODS.poll_seal be an exclusive list instead of an inclusive list? so I can have it be all seals except for X, instead of manually specifying every seal

past forge
#

god bless you

wintry solar
plush cove
past forge
#

now ill check if i can make a patch for the glass part

random sleet
plush cove
random sleet
#

ok im sorry

plush cove
#

dw about it, probability things are confusing lmao

wintry solar
#

what?

random sleet
#

im sorry

plush cove
wintry solar
#

how does that relate to what autumn said?

plush cove
#

idk

past forge
#

so i dont think the glass works as the lucky card and it can be patch that easily since its inside a bigger function

#

that, or i dont know how patches work

#

is there any guide on lovely injecting, hooks and patches?

minor magnet
#

question unrelated to mod making but which i still believe fits the channel, is there a way not to have to manually remove my smods folder and add my smods old_calc folder everytime i want to play cryptid?

dreamy thunder
#

what about refactor branch of cryptid?

minor magnet
hushed field
past forge
maiden river
wintry solar
past forge
#

lovely? say that again?

plush cove
#

his ass is NOT SCORED 💀 💀 💀 💀

hearty sedge
gaunt thistle
past forge
#

there is 1 in a 4 chance that probabilities are going to kill me today

plush cove
unkempt thicket
#

Speaking of unscored cards and lovely patches, this doesn't work with better calc what would it be now?

past forge
minor magnet
past forge
#

wait what

minor magnet
dreamy thunder
minor magnet
stray warren
plush cove
dreamy thunder
minor magnet
past forge
#

i have like 6 folders and when i want different modpacks i move everything manually

stray warren
#

I mean, separate profiles would be two different folders with basically the same mods, so I guess I don't know what you really want

past forge
#

i just want to bump my head into a concrete wall actually

#

i hate probabilities :)

#

now the glass 4s are always breaking lmao

wintry solar
plush cove
scarlet spire
lethal mural
#

hey what is the value for the ante you complete the game at

unkempt thicket
#

8

lethal mural
#

no i mean

#

like if i wanted to change it in a deck what value is it

obtuse silo
#

small issue with this code
it functions as intended, but when looking at it the variables only display as nil

wintry solar
#

loc_vars should return {vars = {values, here}}

lethal mural
obtuse silo
lethal mural
#

hey so why does this just generate the same numbers every time

#

is there something im missing

#

it generates the same numbers every time unless i restart the entire game idk how to make it generate fresh ones each time

#

i wanted to make a random deck that randomizes all the values

#

i tried using math.randomseed and that didnt do anything either

scarlet spire
# scarlet spire learning the event manager is going wonderfully

I'm actually not quite sure what's going on here, I have an event created under the calculate function that loops through all the cards in hand (besides the one with the beige seal) and applies a random seal. but it doesn't seem like its escaping that for

#

I'm trying to get this to happen after all the cards have visually finished scoring

#

and it works, it just doesn't finish

past forge
#
function Game:init_item_prototypes()
    self.P_CENTERS = {
m_glass =   {max = 500, order = 5, name = "Glass Card", set = "Enhanced", pos = {x=5,y=1}, effect = "Glass Card", label = "Glass Card", config = {Xmult = 2, if (SMODS.find_card("j_toyr_four_leaf_clover") and self.base.id == 4) then extra = 4}}
    }
#

Is this a valid patch?

#

i dont know how to put a condition inside a table

normal crest
lethal mural
#

oh

#

not sure how i would be able to randomize it each run then

maiden river
normal crest
#

If you want to set a random value for each instance of the joker do it in set_ability

scarlet spire
#

ah, thanks

lethal mural
#

its

#

not a joker

#

its a deck

#

i wanted to make a random deck