#💻・modding-dev

1 messages · Page 133 of 1

zealous glen
#

Because there's a utility function to see if the card has a rank

#

Hence I'd suggest using that

#

SMODS.has_no_rank

valid trench
#

now the value isn't changing at all???

plucky wolf
#

I'm not certain but I believe it causes (or at least is related to) the effect that plays when cards get destroyed, where it like burns up from the edges almost

random sleet
#

juice_up is the wiggle things do when they do something

plucky wolf
#

ah gotcha

zealous glen
#

This is how I was tracking unique ranks, although I perhaps should've used get_id

hardy viper
#

has_no_rank is probably better

zealous glen
#

wait I forgot the top

hardy viper
#

its less backwards compatible but thats fine

wintry brook
#

I thought juice_up would be the function to put the card down (like after you enhance it) but that didnt work

zealous glen
zealous glen
#

you want to deselect it

#

IIRC

valid trench
#

this is actually just kinda bizarre, it's just not changing from 14 now

#

which is weird because there isn't even 14 ranks in a deck????

sick sparrow
#

now the card renders incorrectly

valid trench
#

1-10 J Q K

#

Ace is 1

zealous glen
#

I think Aces are 14

hardy viper
#

ace is 14 yea

valid trench
#

well

sick sparrow
zealous glen
#

And # returns the largest integer index

valid trench
#

it does

#

I see

zealous glen
#

You still need to count manually

hardy viper
#

unless im very mistaken # does not return the largest integer index

zealous glen
wintry brook
# zealous glen

ty i was looking at cryptid source code and they didnt do that (a code card that changes all cards in hand whoops!)

valid trench
#

yeah for me it's always returning 14 which it shouldn't be if it's checking array length

#

because even if Ace = 14 there's still only 13 ranks

valid trench
#

because Ace is both 1 and 14 (well 11 in the actual rules but still)

hardy viper
valid trench
#

alright that shouldn't be too bad of a fix

zealous glen
#

Lua when indexing tables: YorickUncanny

sick sparrow
#

some dirty egg inside my code

#

causing mista four to not render correctly

#

might be hyperstoneia?

hardy viper
#

trying to find the default len implementation in luajit is hell

#

yk what ill just trust that its the same as 5.1

sick sparrow
#

manually adding front might cause problems

#

like

G.P_CARDS["Mista"] = tabledeepcopy(G.P_CARDS["S_4"])
G.P_CARDS["Mista"]["suit"] = "Mista"
G.P_CARDS["Mista"]["pos"] = {["x"] = 2, ["y"] = 0}
G.P_CARDS["Mista"]["atlas"] = "gerioc1_gerio_p1_geriolish_1"
G.P_CARDS["Mista"]["name"] = "Mista Four"
G.P_CARDS["Mista"]["value"] = "4"
zealous glen
valid trench
#

is using context.using_consumeable trigger after or before the consumeables effects

hardy viper
#

wish it was but alas

#

luajit is old

tall wharf
#

balatro is using love2d right

zealous glen
#

Y'know I forgot that Balatro uses an outdated version

valid trench
#

ya

hardy viper
zealous glen
#

without //

valid trench
#

actually is it context.consumeable or context.using_consumable

hardy viper
#

?

zealous glen
#

But Balatro doesn't

#

best we can do is x/y - (x%y)/y

#

and define it as fslashfslash

valid trench
#

because neither seemed to update correctly lol

hardy viper
#

ah wait

#

forgot the error lol

valid trench
#

strange, it's not updating when I use hanged man

#

it's a minor issue but I wonder why

zealous glen
#

probably detecting hanged man wrong

sick sparrow
zealous glen
#

steamodded has a draw method

#

for Centers

autumn geode
#

hey im new to balatro specific modding ive read through steamodded wiki and cant find what im looking for just wondered if anyone already knew, basically im adding a joker that has a chance to be debuffed each hand played obviously when you debuff a joker its not going to be calculated the next hand is there any way i can remove the debuff between hands?

zealous glen
#

is debuffing important or do you just want to deactivate it

frosty widget
#

Anyone else run into an issue with mod config updates not being pulled after changes from a prior config?

So essentially say I have mod config.lua like so

return { cool_music = true }

And in the mod config menu I change it to off making the saved config table translate to something like { cool_music = false }
Now I added some new thing I want in the config, and now the config.lua looks like so

return { cool_music = true, cool_colours = true }

However when I launch the game after the new var is added, my SMODS.current_mod.config still spits out { cool_music = false } which is fine except the new cool_colours var is not in the config now.

Never Mind I figured out my issue, it had to do with nesting lol, covered it in more detail in this PR: https://github.com/Steamodded/smods/pull/407

hardy viper
merry raven
#

Is there a way to disable all scoring in a blind with a flag? There are some mechanics you have to go through before you can unlock scoring again\

autumn geode
dull saddle
merry raven
#

Ohhh right I forgot that blind existed

valid trench
zealous glen
valid trench
#

unless you mean like just completely skipping scoring which might be possible

zealous glen
#

but execute the part that reactivates

valid trench
#

probably make it so it does that boss blind thing were it says hand can't score then throws it away

#

idk what that'd be called but ya knwo

autumn geode
weak brook
#

trying to make a boss blind where high card wont score but i keep getting this error

#

i wrote it just like how the smods wiki says i should

#

not sure whats wrong here

zealous glen
#

does it work for other hands

weak brook
#

lemme see

#

no

#

put in 'Flush' got the same error

#

changed to this, this works. just confused why the other thing that the smods wiki says to do doesnt

dull saddle
#

maybe get rid of the brackets in the first vers?

valid trench
#

how can I make something in set_ability not trigger while looking at it on the title screen

dull saddle
#

like hand = { 'High Card' = true } ?

tepid crow
weak brook
#

its got the brackets

valid trench
dull saddle
zealous glen
# valid trench ty

depending on your issue you might not want it to run in the Collection while you're in-game

#

also I'm not sure how that solution interacts with other game states

valid trench
#

actually just checking for if there are playing cards in the deck would probably work

zealous glen
#

I think the easiest would be like

#

if G.GAME

#

maybe it needs something else inside G.GAME?

valid trench
#

I think if G.playing_cards ~= nil then works

#

atleast it seems like it doe

zealous glen
#

I guess both G.GAME and G.playing_cards are similar

valid trench
#

the only other situation would be if you had no playing cards in your deck which is like technically possible

zealous glen
#

maybe just test if it works when reloading

valid trench
#

but it just would be the default value which is what it should be

#

it seems to

#

nice

wooden nexus
#

Question: With all the base game hand types, how would you rank it from easiest to hardest?

High-Card
Pair
2 Pair
3OAK
Straight
Flush
4OAK
Straight Flush
Full House
5OAK
Flush House
Flush Five

vagrant cedar
#

Just like the game does

hardy viper
sand oasis
#

maybe odds of getting it + effort to get it

winter thorn
#

probably easiest to play yeah

sand oasis
#

that looks pretty solid

hardy viper
#

High-Card
Pair
2 Pair
3OAK
Flush
Straight
Full House
4OAK
Straight Flush
5OAK
Flush House
Flush Five

imo

#

maaaybe strush over 4oak but probably not

#

just for fun this is the slop that AI decided to spit out

#

straights are easier than two pairs fr egg

keen sleet
#

where are card enhancements defined? I'm trying to see how gold and steel cards are calculated

ancient ore
#

Is there a way to keep jokers as individual luas while still having them appear as the same mod

#

HELP ME PLEASE GOD PLEASE HELP

elder vapor
#

make/copy code to load files from a directory

hardy viper
jagged sun
#

is anyone else having trouble using set_ability()ing a card in an event?

#
G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.15,func = function()
  while faces[i].ability.effect ~= "Bonus Card" do
    print(faces[i].ability.effect)
    faces[i]:set_ability(G.P_CENTERS.m_bonus, nil, true)
    print(faces[i].ability.effect)
  end
  faces[i]:flip();  
  play_sound('tarot2', percent, 0.6);
  faces[i]:juice_up(0.3, 0.3);
return true end }))
#

i have an array of face cards and within this, the code says each card is now a bonus card

#

but within the game nothing happens, they don't score as bonus cards

#

outside of an event everything works 100% as expected but without any regard for event scheduling

#

so idk what the issue is, is this an issue with the api itself?

#

it had been a while since i pulled from the smods repo so i did that and nothing changed

sick sparrow
#

idk

candid epoch
#

whats the code used for purple seal? i wanna make green seal for my consumables

sick sparrow
candid epoch
#

fuck cryptid, i never use it

candid epoch
sudden pike
#

hello,
i'm trying to make a joker that triggers at least when a debuffed card is played but i feel like i might need to make a fancy work around. i'm just trying to make a way to return the mult mod for now. Is there an easy change to this bargaining code so i make it kinda work?

calculate = function (self, card, context)
        if context.cardarea == G.play and context.individual
        then
            if context.other_card:is_debuffed() then
            return{
                mult_mod = card.ability.extra.mult,
                message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } },
                card = card
            }
        end
        end
    end```
tall wharf
#

nice one

sudden pike
#

reading the smod wiki, it says debuffed cards = do nothing. feels like its skipping the if trigger entirely here.

sick sparrow
#

how to retrieve run's seed?

wintry solar
sick sparrow
#

G.GAME.pseudorandom.seed?

wintry brook
#

is there a wiki page for particles?

sudden pike
#

i could be sneaky and just see if the chips didn't change between the score initialization stage and the Scoring cards phase...
might test something like that too.

keen sleet
wintry brook
#

it took me a while to find g.hand but this works like a steel card

sick sparrow
#

how to use other mod's atlas?

keen sleet
wintry brook
#

if you still want to know where steel cards implementation is, its in common_events.lua

sick sparrow
faint yacht
faint yacht
#

¯_(ツ)_/¯

wintry solar
#

No

#

What would a front be?

sick sparrow
#

after adding header.json, it crashes quite often

#

even loading atlas

carmine burrow
#

was thinking of ideas for custom jokers and accidentally just made another "perky joker"

#

something like
'Add Negative to a random consumable card at end of shop
-1 consumable slot"

#

somewhat interesting imo as you can ensure tarot cards don't show up by just keeping them in your consumable area

#

probably somewhat exploitable obviously

#

if you get the +1 consumable slot voucher you could probably do the emperor/fool/judgement trick ...

#

(need a showman momentarily but still)

merry raven
#

Looking through SMODS.Sticker's documentation, I'm calling SMODS.Stickers.fm_voltaic_overflow:apply(_card, true) to apply my custom sticker to a playing card, do I use this same line again to remove it?

cedar stream
edgy reef
#

Yes, if the value is nil then it would remove the sticker.

cedar stream
#

for jokers at least

merry raven
#

SMODS.Stickers.fm_voltaic_overflow:apply(_card, true, nil)?

edgy reef
#

That’s 4 args not 3

#

Also you can omit the val arg form the call, lua will treat it as if it’s nil

merry raven
#

4 args? What's the fourth one? apply(_card, true) is what worked for me to apply and it already doesn't have a val arg

edgy reef
#

Using the colon is adding SMODS.Stickers.fm_voltaic_overflow as self.

#

card and true are occupying 2nd and 3rd leaving the explicit nil as 4th

edgy reef
wintry brook
#

how would i get the entire played hand without context? i thought this would work but its not quite it

merry raven
#

So it's just SMODS.Stickers.fm_voltaic_overflow:apply(_card) to remove it?

edgy reef
#

Should be yea

storm kraken
#
SMODS.Joker { --Third sun
  key = 'third_sun',
  atlas = "adofai-jokers-1",
  pos = { x = 2 , y = 0},
  config = { extra = { chips = 0, chips_gain = 5, mult = 0, mult_gain = 3, other_ice = 0, other_fire = 0 } },
  loc_vars = function(self, info_queue, card)
    return { vars = {
        card.ability.extra.chips ,
        card.ability.extra.chips_gain,
        card.ability.extra.mult,
        card.ability.extra.mult_gain,
        card.ability.extra.other_ice,
        card.ability.extra.other_fire
      } }
    end,
    calculate = function(self, card, context)
        if context.joker_main then
        for k, v in pairs(G.playing_cards) do
          if v.config.center == G.P_CENTERS.m_sbc_ice then 
            card.ability.extra.other_ice = card.ability.extra.other_ice + 1
            card.ability.extra.chips = card.ability.extra.chips_gain * card.ability.extra.other_ice
        end
        end
          for k, v in pairs(G.playing_cards) do
          if v.config.center == G.P_CENTERS.m_sbc_fire then 
            card.ability.extra.other_fire = card.ability.extra.other_fire + 1
            card.ability.extra.mult = card.ability.extra.mult_gain * card.ability.extra.other_fire
         end
         end
            return {
            mult_mod = card.ability.extra.mult,
            chips = card.ability.extra.chips
            }
        end
    end
}

tryna make a joker that gets upgraded for every fire and ice enhancment in deck, but the joker keeps upgrading every hand played when you have the same amount of fire and ice ehancments as last hand

#

i think its something with not making the game stop calculation but idfk how to fix it edegabudgetcuts

violet void
#

tryna make a joker that gets upgraded for every fire and ice enhancment in deck,
So when you obtain them?

violet void
# storm kraken yeah ig

You need an update function on the joker, like this

```update = function(self, card, dt)
    if not G.SETTINGS.paused and G.jokers then
        card.ability.fire_tally = 0
        card.ability.ice_tally = 0
        for k, v in pairs(G.playing_cards) do
            if v.ability.prefix_ice then card.ability.ice_tally = card.ability.ice_tally + 1 end
            if v.ability.prefix_fire then card.ability.fire_tally = card.ability.fire_tally + 1 end
        end
    end
end,```

Then, in your joker loc_vars

     return {vars = {
         center.ability.fire_tally,
         center.ability.ice_tally,
     }}
 end,```

In the calc function, you simply return either fire_tally or ice_tally as chips, mult, xmult or whatever
tall wharf
#

chat

#

how do u properly do info queue

#

i still haven't figured it out

violet void
wintry brook
#

is that for a tool tip?

#

or whatever you call those information tag things

violet void
wintry brook
#

mine does not work, even though i set it up similarly

violet void
#

sending your code may help

wintry brook
violet void
#

yeah, the set has to be 'Other'

#

learned the hard way

wintry brook
#

balatro quirk moment, tyy

crisp coral
misty cape
#

how would i go about adding these changes to my own lua file without having to use Trance? (not the splash, just the suits) even just the SO_2 tbh cuz i use hc cards

tall wharf
misty cape
#

it's not the biggest deal if i can't do this without Trance, just wondered if I could just add this in to my own without needing another mod

storm kraken
#

wtf does this error mean???

#

non of the mods im working on go until line 1105

#

is this the game itself 😭

misty cape
wintry brook
#

its most likely your mod having an issue that causes the game to crash somewhere else

storm kraken
#

this doesnt have anything to do with anything im doing??

misty cape
#

check 1780

storm kraken
#

time for random bullshit go !

wintry brook
#

i recommend commenting out the newest parts of your code to narrow down what code is causing the crash

storm kraken
#

ah i see

#

soemthing to do with evaluating play

#

seems relevant enough to be my mod

#

bug fixing go !

#

wtf literally everything in the joker i added causes a crash

#

this is fun

brisk rose
#

If it ain't breakin you ain't codin

storm kraken
#

hmm
do i just send all the code here again for help

brisk rose
#

Wouldn't hurt probably

storm kraken
#
SMODS.Joker { --Third sun
  key = 'third_sun',
  atlas = "adofai-jokers-1",
  pos = { x = 2 , y = 0},
  config = { extra = { chips = 0, chips_gain = 5, mult = 0, mult_gain = 3, other_ice = 0, other_fire = 0 } },
  update = function(self, card, dt)
        if not G.SETTINGS.paused and G.jokers then
            card.ability.extra.other_ice = 0
            card.ability.extra.other_fire = 0
            for k, v in pairs(G.playing_cards) do
                if v.config.center == G.P_CENTERS.m_sbc_ice then card.ability.extra.other_ice = card.ability.extra.other_ice + 1
                 card.ability.extra.chips = card.ability.extra.chips_gain * card.ability.extra.other_ice end
                if v.config.center == G.P_CENTERS.m_sbc_fire then card.ability.extra.other_fire = card.ability.extra.other_fire + 1
                 card.ability.extra.mult = card.ability.extra.mult_gain * card.ability.extra.other_fire end
            end
        end
    end,
    
    loc_vars = function(self, info_queue, center)
        return {vars = {
            center.ability.extra.chips,
            center.ability.extra.chips_gain,
            center.ability.extra.mult,
            center.ability.extra.mult_gain
        }}
    end,

    calculate = function(self, card, context)
            return {
            mult_mod = card.ability.extra.mult,
            chips = card.ability.extra.chips
            }
        end
}

(hopefully this is the last time edegabudgetcuts )

wintry brook
#

it needs loc_txt

storm kraken
#

a

#

wait no it doesnt?

wintry brook
#

when does the game crash?

storm kraken
#

actually not that

#

when the hand starts to be scored

#

like when the card would usually give chips to the chips thats when it crashes

wintry brook
#

you need to check for context.after in the calculate function

runic pecan
#

Would this be too complicated to read for a joker?

wintry brook
#

i think its too convoluted, but also the first line could be rewritten as 'Copy the far left card's suit to every other played card'

#

unless you mean you can actually pick the suit

crisp coral
#

i assume it's a reference tho

runic pecan
#

Was also planning on not showing square braket part,
make them hidden mechanics.

crisp coral
#

then it'd be confusing

wicked leaf
wintry brook
wintry brook
#

i drew it in 1 minute as a place holder lol

violet void
runic pecan
violet void
runic pecan
violet void
#

so the effect is applied in context.after I see

runic pecan
#

It's meant to make a Flush build that painfully-ly slowly goes toward Flush Five.

violet void
#

welp...

wicked leaf
#

Trying to figure out how to make a joker destroy a specific joker on pickup

violet void
wicked leaf
#

thanks, will try this out

#

its for 2 jokers that destroy eachother

violet void
#

you'd need to make a add_to_deckfor both

violet void
#

or only the old/new one

wicked leaf
#

no, just the older one

violet void
#

ok then thats correct

wintry brook
#

anyone know where stuff like g.hand and g.play are defined? i cant find anything in game.lua or globals.lua

frosty dock
#

this is mostly uninteresting though

#

properties of card areas are defined in cardarea.lua

wintry brook
#

aah thats good to know. im just trying to figure out which one to use for all cards played, scored or not

violet void
#

G.play.cards

wintry brook
#

might be bugged then because that one only counts all cards up to an always scoring card is played (stone cards)

wicked leaf
#

cooking

wintry brook
#

its an ehanced card that checks for burnt cards in the played hand, but if it always stops checking once it gets to an always scoring card

violet void
#

you should include whe whole calculate function

wintry brook
#
        if G.STATE == G.STATES.DRAW_TO_HAND then if self.burnt then sendTraceMessage("Reset!") end self.burnt = false end

        if self.burnt then return end

        if  G.STATE == G.STATES.HAND_PLAYED then
            sendTraceMessage(#G.play.cards)

            for k, v in pairs(G.play.cards) do
                if v == card then
                    self.burnt = true
                    break
                end
            end
            if self.burnt then
                for k, v in pairs(G.play.cards) do
                    if v.ability.name ~= "m_imaginary_dragonCard" then

                    local percent = 1.15 - (k - 0.999) / (#G.hand.cards - 0.998) * 0.3
                    G.E_MANAGER:add_event(Event({
                        trigger = "after",
                        delay = 0.15,
                        func = function()    
                            v:flip()
                            play_sound("card1", percent)
                            v:juice_up(0.3, 0.3)
                            return true
                        end,
                    }))
                    local percent = 0.85 + (k - 0.999) / (#G.hand.cards - 0.998) * 0.3
                    G.E_MANAGER:add_event(Event({
                        trigger = "after",
                        delay = 0.15,
                        func = function()
                            v:flip()
                            v:set_ability(G.P_CENTERS["m_imaginary_burntCard"]) 
                            play_sound("tarot2", percent)
                            v:juice_up(0.3, 0.3)
                            return true
                        end,
                    }))

                    end
                end
            end
        end
    end,```
#

its an update function because enhanced cards dont calculate until they are scored

#

and i needed it to happen before the hand was played

frosty dock
#

pairs is not always in order

violet void
#

I dont think I understand, why wouldnt this work in the calculate function in

if G.play.cards and context.cardarea = G.play then

tall wharf
frosty dock
#

try ipairs instead of pairs

wintry brook
#

i have, I used sendTraceMessage to see how long the array was and it wasnt 5 despite 5 cards being played

wintry brook
frosty dock
#

why is this is an update function though?

wintry brook
#

what else can it be

frosty dock
#

update runs every frame, and I think played cards don't get added to G.play on the same frame

#

context.before in a calculate function should do

wintry brook
#

they dont which is why i was checking G.state

#

context.before wasnt working earlier but i could try again

violet void
#

otherwise you can create a new context that runs at the beginning of evaluate_play

wintry brook
violet void
#

I did it like this (I have a few jokers that make changes before cards score)

[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = "G.GAME.hands[text].played = G.GAME.hands[text].played + 1"
position = "before"
payload = '''
for i=1, #G.jokers.cards do
    if cs_utils.contains(beforeall_context, G.jokers.cards[i].ability.name) then
        --calculate the joker before hand evaulation
        local effects, scoring_hand = eval_card(G.jokers.cards[i], {cardarea = G.jokers, cs_beforeall = true, scoring_hand = scoring_hand})
        if effects.jokers then
            card_eval_status_text(G.jokers.cards[i], 'jokers', nil, 1.1, nil, effects.jokers)
        end
    end
end
'''
match_indent = true```

-# I hardcoded which jokers can enter in order to avoid other Jokers breaking
violet void
wintry brook
#

i made it lol

violet void
#

anyways you can try a new context if all else fails

violet void
wintry brook
#

thx, i think it'll be a lot cooler when the art is done & the dragon sound when the explosion happens

wintry brook
violet void
#

it should be print("before")

-# or thats what I use at least

wintry brook
#

the earliest i can get a console message is when the card gets scored w/ chips, so im not sure a new context will help

#

i use the logger for debugging

violet void
#

if you use debugplus, print works

frosty dock
wintry brook
#

im on old calc

frosty dock
#

it'll work on new calc

wintry brook
#

should i update then? i heard some stuff breaks

violet void
#

im using it, its fine for now

frosty dock
#

if you have other enhancements/editions you probably need to change them

violet void
#

just make sure youre using context.joker_main for jokers that give mult, chips, xmult

wintry brook
#

only thing that broke from updating was this, in an enhanced card, what do i need to change

#

it says effect is nil

#

nevermind needed context.individual check it seems

wintry brook
frosty dock
wintry brook
#

do we not use effect at all anymore

frosty dock
#

yes

storm kraken
#

atleast im one step closer ig

#

seems like context.joker_main is the one i needed

wintry solar
#

I wonder which part is overflowing when you have calculate code not in a context 🤔

sudden pike
# sudden pike hello, i'm trying to make a joker that triggers *at least* when a debuffed card ...

I got a "if all cards in played poker hand are debuffed" function working. Here's a solution if someone comes looking for a similar thing later. can be touched up in the good lua department but it works.

    calculate = function(self, card, context)
        if context.before
        then
            card.ability.extra.hand = context.scoring_hand
            card.ability.extra.all_debuffed = true
            for _, v in ipairs(context.scoring_hand) do
                if not v.debuff then
                    card.ability.extra.all_debuffed = false
                end
            end
            if card.ability.extra.all_debuffed then
                for _, v in ipairs(context.scoring_hand) do
                    v.debuff = false
                end
                return{
                    mod_mult = card.ability.extra.mult,
                    message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult}}
                }
            end
        end
    end
violet void
#

is the joker's calculate function ignored if its debuffed? like would I need a lovely patch if I want one joker to be able to debuffs itself

#

I guess I could intercept it through remove_from_deck with from_debuff but I want it to undebuffs during its turn

weary jungle
#

how do i put a random seal and edition on a card?

vital stag
#

Hey everyone sorry if this question might seem a bit redundant but I'm trying to make a card skin mod (to replace face cards with little hand drawn cards of mine) and I can't seem to figure it out. So far I've got the assets set up and the lua file and everything but whenever I load up the skin in game the face cards just appear blank... any ideas?

#

Hopefully this is the right channel for this

wooden badge
vital stag
wooden badge
#

I imagine it is similar for the edition

weary jungle
wooden badge
#

yeah you'll need SMODS. at the beginning since it is a modded function by steamodded

#

check the documentation it only requires two vars

#

here's how i used it

#

dont worry about the print bit I just wanted to see the number in the console

weary jungle
wooden badge
#

oh i meant to change that

#

you can have the pseudoseed as whatever you like it just processes a string and spits out a number between 0 and 1

#

obvs the G.hand.highlighted[i] bit is specifically the card im referencing in my chain, youl have to change it to what yours is

weary jungle
#

i got that, maybe check the screenshots before you send them 😭

wooden badge
#

wow so embaraasing

#

not really idc

#

it's a meme I stuck in cus my friend and I brought it up

merry raven
#

I'm making a custom SMODS sticker, what context check should I use to see if any hands are played without the card with the sticker on it

cedar stream
#

in the code

#

if context.other_card.ability.rental then

similar to this

plucky wolf
#

I'm trying to make a deck that gives you extra cards to start out with, but I can't for the life of me find an example of how to do so! I'd like to ask for some help.

Here's what I've got now - I suspect this should work, but I'm unsure what to put for the "area" option, and (if I want one extra card for every rank) what I should make the Key to force a specific card

tepid crow
#

that's not how SMODS.add_card works?

#

should be more like SMODS.add_card{set="Base", <etc>}

plucky wolf
#

so more like, card = SMODS.add_card{set="Base", area="(something)", key="(something)"} ?

weary jungle
#

its probably like card = SMODS.add_card({set="Base", area="(something)", key="(something)"}) i think

sand oasis
#

I got a problem with trying to get a new global variable to work across multiple jokers. I have it initialized at 0 with init_game_object and it'll function in the first joker, but it doesn't seem to function in the second joker.

I use it to hold money that the first Joker steals from the player wallet and follow that up by using ease_dollars to subtract the player's wallet from itself, and this all works and successfully changes the value.

ease_dollars(-G.GAME.dollars, true)```
I want the second Joker to return the value in G.GAME.thiefwallet to the player wallet and set its value to zero, but this doesn't work.
```ease_dollars(G.GAME.thiefwallet, true)
G.GAME.thiefwallet = 0```
Both of these jokers operate at context.end_of_round, but the thing is that doesn't matter, since even if the second Joker tries doing this during context.joker_main, it still doesn't work.  I'd love if someone can check this out - I'm gonna make this a thread where I'll dump my code for everything.
violet void
#

what did poor perishable_compat do

sand oasis
#

i think it'd be really really funny for the joker to disappear with all your money

weary jungle
#

how do i get a random edition?

candid epoch
#

another day, another stealing codeing session

weary jungle
#

im so close.. just like 7 more runes to go

storm kraken
#

guys do you vibe with

weary jungle
#

it should remove all your discards like the water

#

or just set the boss blind to the water

violet void
sand oasis
#

anyone know how to add debugging comments and how i'd access them?

violet void
sand oasis
#

Ahhhh I could have sworn I did that

#

I'll give it another spin

#

it'll be in the console, right?

#

do i need to have it open?

hardy viper
violet void
#

I mean it appears on the screen

#

or does it appear either way?

hardy viper
#

well yeah

#

it appears in the console

sturdy compass
#

Gonna give this another bump. To explain the intended functionality a bit better, I’m trying to track the number or retriggers prior to the second joker hitting joker_main and use that to calculate Xmult, but currently it's tracking any Joker trigger

violet void
fading fox
#

yo does anyone know were the example mods for steammodded went? They were very helpful

violet void
hardy viper
#

i prefer the raw lovely console

#
  • cant look at dbp console after a crash
candid epoch
wind kindle
#

from a design perspective , what r people’s thoughts on giving a single joker multiple effects to push it towards viability , even though it isn’t something that’s done in the base game ?

sturdy compass
#

Personally I'm not a big fan of that. Makes it too easy of a choice compared to other jokers that "Won't do as much"

wind kindle
#

mhm that makes sense

#

also hi astra

sturdy compass
#

howdy

#

lmao

wind kindle
#

lmao

candid epoch
#

-# more description line than 3 looks odd

wind kindle
#

thank u

sturdy compass
#

-# I don't think I've shown the Poet here yet

wind kindle
#

i was mainly thinking about it in terms of tacking something like +chips or +mult onto a utility joker

#

it’s something i think i’ve seen some people do

violet void
#

if its a legendary its justified right?

wind kindle
#

or a joker that is an enabler to its own payoff , which u would never normally see

sturdy compass
#

Passive scoring as a secondary effect I'm quite against because it removes the tradeoff of holding on to a utility joker

wind kindle
#

mhm

wind kindle
#

i don’t have any actual thoughts on it cuz i haven’t done any modding but it’s a good example

candid epoch
violet void
#

I need to split it into two jokers? ;-;

wind kindle
#

u don’t need to do anything

#

it’s ur own mod lol

sturdy compass
#

This is true

wind kindle
#

this is why i wanted to have this discussion though

sturdy compass
#

But in terms of balance that thing is nuts

violet void
wind kindle
#

it’s difficult to judge cuz it’s legendary

sturdy compass
wind kindle
sturdy compass
#

The interactions with it are good, but it's just so much for one joker

wind kindle
#

but once again it’s legendary so i don’t know

#

u could put the effects on non-legendaries or something

sturdy compass
#

It really does depend on how unbalanced you're willing to go lol

violet void
#

I want it to be balanced

#

So I guess this one is would need a split too

wind kindle
#

here’s a good example of what i’m talking about from the paperback mod

#

i don’t know how to feel about things like this

#

i’m not criticizing it whatsoever of course i’m just curious what others think

sturdy compass
wind kindle
#

fair enough

sturdy compass
candid epoch
wind kindle
#

LOL

sturdy compass
candid epoch
#

like, i mostly play flush five, but the moment a fake card appears looking like mine
i will have existencial crisis

violet void
#

they get an enhancement when you trigger them once

heady summit
#

any1 know how to fix this?

violet void
#

just visual tho, if you change enhancement they are still fake

wind kindle
#

so i guess the ultimate question i’m trying to answer is what should one do if they’re trying to make a really cute utility joker or something that u would rarely want to give a joker slot to in comparison to actual scoring

#

just design good cards , i guess ? LOL

candid epoch
#

just paste the log

sturdy compass
wind kindle
#

unsatisfying conclusion

#

but i will accept it

heady summit
wind kindle
#

astra where can i see the mod ur working on

#

or is it not public yet

sturdy compass
#

It's not out yet lol

wind kindle
#

understood

sturdy compass
#

I'm taking my time with it

wind kindle
#

glhf

night pagoda
heady summit
#

so i should update smod?

night pagoda
#

yup

heady summit
#

can any1 send em an updated one

sturdy compass
candid epoch
#

i still have no idea what i am doing in my mod lmao

night pagoda
sturdy compass
#

Yeah lmaooooo

violet void
#

im making mine inspired by a game on roblox egg

sturdy compass
#

Mine is very much vanilla+

candid epoch
stray warren
candid epoch
#

can i just do consumables that do nothing so i can see how they look like in game?

violet void
#

yes

crisp coral
#

yea

violet void
#

I do it with jokers all the time

candid epoch
#

got template for that?
so i dont mess up

wind kindle
heady summit
candid epoch
heady summit
heady summit
violet void
night pagoda
# heady summit

oh it's cryptid, iirc cryptid should include a certain steamodded version in order to work correctly?

heady summit
#

ohh

#

damn

sturdy compass
#

I cannot blame math for doing that ngl lmao

night pagoda
#

I have no idea honestly, I might be wrong

candid epoch
#

i will need the consumable empty template so it wont crash under any chance

heady summit
#

i was playing the run untill i got something and after e250 crashes

night pagoda
#

I just don't think it's up to the better calc yet

candid epoch
#

also guys, how do you sort your code?

thorny adder
#

Yeah I do that

#

Yeah...

violet void
#

wdym sort my code

elder vapor
candid epoch
#

i see alot of people sort code
also i dont mean files, i mean code

thorny adder
#

Well one joker = one paragraph

#

Idk

night pagoda
#

I have all my code in a single file, I find it more easy to access things that way - the file bar is already bloated with base game stuff

candid epoch
#

also, do i need to make a custom set for my potion cards?

#

or it comes automaticly

night pagoda
#

SMODS.ConsumableType exists, yeah

#

so you need to register it

candid epoch
#

oke, i need walkthrough about that one cuz nothing like this is in examples

night pagoda
#

oh huh, I swear there was an entry on the wiki about that, doesn't seem to exist now

candid epoch
#

i just want to make my own potions man ,w,

nocturne garnet
night pagoda
#

yeah it did exist for sure

candid epoch
#

if it doesnt anymore, what do i do?

candid epoch
#

oke, i think i found it in diffrent mod

#
    key = "Potion",
    primary_colour = HEX("9933FF"),
    secondary_colour = HEX("9933FF"),
    collection_rows = {4,5},
    shop_rate = 0,
    loc_txt = {},
    default = "c_emperor",
}```
something like dis?
#

though i dunno what default means

#

...great...

violet void
elder vapor
#
Oops! The game crashed:
main.lua:1780: [SMODS _ "src/utils.lua"]:1140: bad argument #1 to 'next' (table expected, got nil)

Additional Context:
Balatro Version: 1.0.1n-FULL
Modded Version: 1.0.0~ALPHA-1308a-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.6.0
Steamodded Mods:
    1: Talisman by MathIsFun_, Mathguy24, jenwalter666, cg-223 [ID: Talisman, Version: 2.0.2, Uses Lovely]
        Break Infinity: omeganum
    2: Gemstones by Halo / OfficialHalo [ID: Gemstone, Priority: -50, Version: 0.8.0-pre3, Uses Lovely]
    3: DebugPlus by WilsontheWolf [ID: DebugPlus, Uses Lovely]
Lovely Mods:

Stack Traceback
===============
(3) global C function 'error'
(4) Lua upvalue 'gfep' at file 'main.lua:1780'
Local variables:
 success = boolean: false
 err = string: "[SMODS _ \"src/utils.lua\"]:1140: bad argument #1 to 'next' (table expected, got nil)"
(5) Lua field 'evaluate_play' at file 'main.lua:1897'
Local variables:
 e = nil
(6) Lua field 'func' at file 'functions/state_events.lua:544'
(7) Lua method 'handle' at file 'engine/event.lua:99'
Local variables:
 self = table: 0x07263700  {start_timer:true, timer:TOTAL, blockable:true, trigger:immediate, func:function: 0x06d35ff0 (more...)}
 _results = table: 0x066e08e0  {blocking:true, pause_skip:false, time_done:false, completed:false}
(8) Lua method 'update' at file 'engine/event.lua:182'
Local variables:
 self = table: 0x069f53c8  {queue_last_processed:8.1166666666666, queues:table: 0x069f53f0, queue_dt:0.016666666666667 (more...)}
 dt = number: 0.016781
 forced = nil
 (for generator) = C function: next
 (for state) = table: 0x069f53f0  {unlock:table: 0x069f54e0, other:table: 0x069f5580, tutorial:table: 0x069f5530 (more...)}
 (for control) = number: nan
 k = string: "base"
 v = table: 0x069f5508  {1:table: 0x06bab918, 2:table: 0x07263700, 3:table: 0x07263440, 4:table: 0x07148058 (more...)}
 blocked = boolean: false
 i = number: 2
 results = table: 0x066e08e0  {blocking:true, pause_skip:false, time_done:false, completed:false}
(9) Lua upvalue 'gameUpdateRef' at file 'game.lua:2629'
Local variables:
 self = table: 0x066e7308  {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x06d1c5d0 (more...)}
 dt = number: 0.016781
 http_resp = nil
(10) Lua upvalue 'upd' at Steamodded file 'src/ui.lua:81' 
Local variables:
 self = table: 0x066e7308  {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x06d1c5d0 (more...)}
 dt = number: 0.016781
(11) Lua method 'update' at file 'main.lua:1760'
Local variables:
 self = table: 0x066e7308  {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x06d1c5d0 (more...)}
 dt = number: 0.016781
(12) Lua upvalue 'oldupd' at file 'main.lua:996'
Local variables:
 dt = number: 0.016781
(13) Lua field 'update' at file 'main.lua:1787'
Local variables:
 dt = number: 0.016781
(14) Lua function '?' at file 'main.lua:935' (best guess)
(15) global C function 'xpcall'
(16) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
 func = Lua function '?' (defined at line 906 of chunk main.lua)
 inerror = boolean: true
 deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
 earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
#

fr gonna crash out

#

something with this

candid epoch
frosty dock
violet void
#

understandable, thanks 👍🏽

fading fox
#

anyone know how to check if specific cards in played hand are of a specific enhancement

elder vapor
#

am i being stupid rn because i just copied code from what cryptid did for rigged

candid epoch
elder vapor
#

missing loc txt

candid epoch
#

MixedPotions also have it empty and for em it works

weary jungle
#

maybe they have an en_us?

elder vapor
#

they had localization file

fading fox
elder vapor
#

its like card.center.config or smth

#

brb

winged vessel
#

Hey guys, i used to play this a bit, and I had mods installed back then but nothing is working anymore other than the base game, is there something I need to change or update to get mods working again?

elder vapor
candid epoch
#

anyway, so how i fix my "error" if i dont wan localization file?

elder vapor
winged vessel
candid epoch
winged vessel
#

Sorry i didnt know

candid epoch
#

its oke

zealous glen
#

Has anyone tried to mess with the particle generator?

candid epoch
elder vapor
#

¯_(ツ)_/¯

#

i honestly have no clue

zealous glen
#

So you should be able to texture them

candid epoch
#

yippie!

#

oke, now i really need the empty consumables to put em here

fading fox
elder vapor
#

if card.ability.effect == "Stone Card" or smth

candid epoch
#

halo, got empty consumable template i can use? so i can see how they look in game

wintry solar
#

Don’t check string names pls

violet void
#

is there a standard way to make a page like this

sturdy compass
#

Yeah lmao

weary jungle
violet void
#

what does caesar do

sturdy compass
violet void
#

does it count voucher too?

sturdy compass
#

Yep

#

And Boosters

violet void
#

vagabond synergy 🔥

candid epoch
#

also i think i fucked something up

sturdy compass
weary jungle
candid epoch
hollow patrol
#

hi, is there a specific file where the code for jokers is stored in the game's source code? i've looked everywhere and could not find it

violet void
candid epoch
#

dont seem to have it

violet void
#

you need it

sturdy compass
hollow patrol
#

oh ok. thanks !

candid epoch
#

well, what exacly do i write in it?

violet void
weary jungle
candid epoch
#

i think i need to swap em lmao

weary jungle
#

speak of the deviool

violet void
#

I've nerfed the legendary

candid epoch
#

and how i color the PotionUP nametag thingy?

violet void
candid epoch
violet void
#

yes i want suggestions

hollow patrol
rough furnace
violet void
#

afaik

hollow patrol
hardy viper
candid epoch
#

json? the fuck

violet void
weary jungle
rough furnace
candid epoch
#

i only have lua file, no json

weary jungle
#

at the tippy top of the lua you should have something like this:

candid epoch
#

ahhhh

violet void
# candid epoch i only have lua file, no json
    "id": "CrazyStairs",
    "name": "Crazy Stairs",
    "display_name": "Crazy Stairs",
    "author": ["Me"],
    "description": "",
    "prefix": "cs",
    "main_file": "CrazyStairs.lua",
    "priority": -2,
    "badge_colour": "FFFBBB75",
    "badge_text_colour": "",
    "version": "0.1",
    "dependencies": ["Steamodded (>=1.0.0~ALPHA-1310*)"],
    "dump_loc": false
}```

and name it "main file name" + ".json"
hardy viper
#

ya those headers are deprecated

#

use json format for new mods

weary jungle
#

i should make a json

candid epoch
#

so frustrateing

rough furnace
#

Iirc someone made a template

candid epoch
#

so what i do with this old thing?

weary jungle
#

do i remove the header? edit: yes

weary jungle
#

how do i get all of the jokers and cards in hand

maiden river
#

closure on this: so it turns out this only happens when you load a save state in DebugPlus and add another card

candid epoch
#

what will happen if i remove it?
(cuz i am 2 versions behind)

nocturne estuary
#

how could I prevent context.remove_playing_card from being triggered when a hand is played?
In other words, is there a better way to run code only when a card is destroyed?

calculate=function(self,card,context)
        if context.joker_main and card.ability.extra.mult > 0 then
            print('this way')
            return {
                card = card,
                message = '+' .. card.ability.extra.mult,
                mult_mod = card.ability.extra.mult,
                colour = G.C.MULT,
            }
        end
        local multAdd = 0
        if context.remove_playing_card then
            print('that way')
            for i= 1, #G.hand.highlighted do
                multAdd = multAdd + G.hand.highlighted[i].base.nominal
            end
            card.ability.extra.mult = card.ability.extra.mult + multAdd
            card_eval_status_text(card, 'mult', card.ability.extra.mult, nil, nil, {message = '+' .. card.ability.extra.mult})
        end
    end
wintry solar
#

What are you trying to do?

elder vapor
wintry solar
elder vapor
#

oh i've just been returining the ret 😭

weary jungle
#

how do i flip a card, and how do i check if a card is flipped?

#

i know its :flip, is there any arguments?

nocturne estuary
elder vapor
#

awesome it works now

sudden dew
#

Then check card.facing=='back'

wintry solar
nocturne estuary
sudden dew
wintry solar
#

It should only trigger when cards are destroyed

sudden dew
#

Yeah, but I had the same issue as well. Was getting trigged when playing hands

#

Might be a bug idk

nocturne estuary
violet void
weary jungle
#

i dont think im doing things right

sudden dew
nocturne estuary
# sudden dew Can you paste the code here?
calculate=function(self,card,context)
        if context.joker_main and card.ability.extra.mult > 0 then
            print('this way')
            return {
                card = card,
                message = '+' .. card.ability.extra.mult,
                mult_mod = card.ability.extra.mult,
                colour = G.C.MULT,
            }
        end
        local multAdd = 0
        if context.remove_playing_card and context.removed and #context.removed > 0 then
            print('that way')
            for i= 1, #G.hand.highlighted do
                multAdd = multAdd + G.hand.highlighted[i].base.nominal
            end
            card.ability.extra.mult = card.ability.extra.mult + multAdd
            card_eval_status_text(card, 'mult', card.ability.extra.mult, nil, nil, {message = '+' .. card.ability.extra.mult})
        end
    end
candid epoch
sudden dew
nocturne estuary
#

alright

weary jungle
#

what why is the bottom red

#

my brain has desintigrated

solid veldt
#

So hey. When you take ownership of a seal/enhancement/edition or whatever using steamodded... are you expected to also like, take ownership of everything that also makes reference to it such that an info box pops up? Because if you don't, and the seal/enhancement/edition uses a different set of loc_vars than vanilla, then the game will just crash!

#

When trying to render the info box that is.

#

I encountered this when modding blue seal. Hovering over blue seal gives no issue. Hovering over trance crashes the game, because then vanilla code kicks in and gives my localization function for blue seal the wrong loc_vars.

vagrant cedar
#

Hear me out

solid veldt
#

I have a hard time believing I'm the first to encounter this. This problem would exist for any seal/enhancement/edition override of vanilla's.

#

So maybe I'm just missing something(???)

weary jungle
# vagrant cedar

this is crazier than the time i got the plant on a baron run! (insert losee screen)

maiden river
#

is there a list somewhere of all of the text color options?

vagrant cedar
maiden river
#

thanks

frosty dock
#

So this is way more niche than you're making it, but still unexpected behavior

solid veldt
#

I guess overriding vanilla seals isn't something many people do, then.

frosty dock
#

I'll figure something out to make it possible to simply pass the prototype for seals too. I was working on something similar for jokers and tags the other day, tbh I just forgot seals also have issues in that regard

solid veldt
#

I did see that for e.g. editions, it adds G.P_CENTERS.e_holo instead of a hardcoded table like {key='blue_seal, set='Other'}. But I didn't investigate that since I didn't get how that would've made a difference (since I didn't see a function call involved)

#

And loc_vars must be determined by a function call

frosty dock
#

each table added to info_queue gets passed through its own iteration of generate_card_ui. If the center is used, it has your loc_vars function defined on it, while a hardcoded table doesn't

solid veldt
#

Ah, now I get it.

weary jungle
#

5 more to go!!!!!!!

#

(i went backwards)

solid veldt
#

... but... hmm. I think I can see the code you're talking about, but the relevant conditional you have for it is first_pass and not (_c.set == 'Edition') and badges. Wouldn't that mean enhancements would suffer the same problem?

#

no wait, hold on, i'm bad

dreamy thunder
#

how do i make a joker with the functionality of the steel joker? i need to check for specific enhancements in deck

wintry solar
#

Check for them in your locvars and calculate functions

dreamy thunder
#

i dont really know how though

sturdy compass
tepid crow
#

retrigger_joker_check seems like the wrong context to use?

#

(disclaimer that I haven't really worked much with joker retriggers)

#

does it work correctly for other jokers?

sturdy compass
#

What do you mean by “works correctly?”

#

Because right now it tracks all joker triggers, not just retriggers like it should

tepid crow
#

yeah that sounds like it doesn't work correctly 🤣

sturdy compass
#

Yeaaaaaah

tepid crow
#

try context.retrigger_joker and not context.retrigger_joker_check instead?

sturdy compass
#

Alright I’ll give that a whirl when I get the chance

frosty dock
#

i'll stash this and get back to it later

fading fox
fading fox
weary jungle
#

Im doing a bunch of rune consumables rn

#

I have 20 done currently

fading fox
#

ooo thats about how many I have done

weary jungle
#

You definitely have different

#

Mine are more get something but something, not very random

fading fox
#

ah yeah I went with the randomness theme to reference how tricky runes are in the myths

summer willow
#

Hello, need some help here Heart_For_Aure I don't understand, I'm trying to create a Joker who can destroy himself like Gros Michel but the game keep crashing because of line 38 when I look into the Joker description ("main.lua"]:38: attempt to index global 'card' (a nil value)

tepid crow
dreamy thunder
#

how to check if a card stays in hand?

fading fox
tepid crow
fading fox
#

1.0.0 alpha 1313a

zealous glen
fading fox
tepid crow
#

cheers

zealous glen
#

You didn’t define card

sturdy compass
summer willow
tepid crow
fading fox
#

ok weird

#

idk ive never tried to detect cards with enhancements before

tepid crow
#

why are you checking card and not context.other_card for an enhancement

#

card is the joker

fading fox
#

ohhhh

tepid crow
#

also I needed to change == "stone" to == "Stone Card" etc

fading fox
tepid crow
#

and I think it's better to use SMODS.has_enhancement(context.other_card, "m_stone") or <etc for gold, steel>

#

yeah I think that'll work

fading fox
#

how would I do your suggestion?

tepid crow
#

if context.other_card.ability.effect == "Steel Card" or context.other_card.ability.effect == "Stone Card" or context.other_card.ability.effect == "Glass Card" then
into
if SMODS.has_enhancement(context.other_card, "m_steel") or <etc for stone, gold> then

fading fox
#

sweet

tepid crow
#

also the description of the joker says steel/stone/gold, but the code checks for glass 🤔

tepid crow
fading fox
#

whoops

sturdy compass
tepid crow
sturdy compass
#

I can send the whole calculate block if you'd like

#

if it helps that is

tepid crow
#

I already have something I'm working with but thanks

sturdy compass
#

aight

wintry solar
tepid crow
#

no

sturdy compass
#

Lars is helping me work it out rn

wintry solar
#

You probably want if context.post_trigger and context.other_card == G.jokers.cards[1] then I think

#

It might be other joker

#

I don’t remember off the top of my head

tepid crow
#

post_trigger was one I was also looking at but assumed it would trigger even on non-repetitions

sturdy compass
#

That's what I was thinking as well and hence have not tried it

#

Also that second half would just detect the first joker in hand??

wooden nexus
tepid crow
#

... yes

frosty dock
wintry solar
#

Did I misread what it’s supposed to do? I thought it was the number of triggers of the first joker you wanted?

sturdy compass
#

It's supposed to be tracking the number of all retriggers

tepid crow
#

Gains x0.5 mult when a joker or playing card is retriggered
iirc

sturdy compass
#

Correct

frosty dock
#

context.other_context.retrigger_joker?

wintry solar
#

Yeah post trigger is still the correct thing to use

sturdy compass
frosty dock
#

show code then?

tepid crow
# sturdy compass Correct

(I read through the chat when you first asked your question and I'm not sure how so many people misunderstood lol)

sturdy compass
#

Here's the isolated bit that's supposed to be tracking the retriggers

frosty dock
#

yeah you're not using post_trigger

wintry solar
#

You want post trigger and the snippet aure posted

fading fox
#

ughh im still getting the same crash

frosty dock
#

I'm saying something along the lines of

if context.post_trigger and context.other_context.retrigger_joker then
wintry solar
#

That should give you successful retriggers

sturdy compass
#

alrighty

fading fox
#

main.lua:1793: [SMODS _ "src/utils.lua"]:1147: bad argument #1 to 'next' (table expected, got nil)
I cant figure out what table I might be passing an argument to

sturdy compass
#

This is the first I've seen other_context though, what exactly does that give?

frosty dock
#

that gives the context the retriggered joker was triggered on

sturdy compass
#

Ah I see

#

Hmmm still doesn't seem to do it

tepid crow
sturdy compass
#

I'm using Hack as a baseline for retriggering

tepid crow
#

hack doesn't retrigger jokers?

sturdy compass
#

But it retriggers cards

zealous glen
#

Joker retriggers are fully modded

sturdy compass
#

And that falls within all retriggers

#

lmao

tepid crow
#

context.other_context.retrigger_joker specifically checks for joker retriggers lol

sturdy compass
#

Ah

#

well then

zealous glen
#

This worked to copy Jokers in the previous calc

wintry solar
#

The other bit is a bit more of a complicated check, give me a minute

tepid crow
#

shouldn't it just be repetition_only? 🤔
nope

tepid crow
fading fox
#

this is what im trying now

zealous glen
#

unless

#

what's the full file path

#

for the error

fading fox
#

wait fuck ignore that

tepid crow
#

I like half the chat being in there

fading fox
#

shhhhh

sturdy compass
#

lmao

fading fox
fading fox
tepid crow
#

oh

#

you're running cryptid

#

don't run cryptid with the latest steamodded

sturdy compass
#

Cuplrit Cryptid

wintry solar
# sturdy compass lmao

I think what you need to do is hook SMODS.calculate_repetitions and check for the presence of your joker, and increment a value in it internally to then use in your context.joker_main check

tepid crow
#

oh ew

#

that's the best?

sturdy compass
#

I was hoping that wouldn't be the case

#

Oh well

wintry solar
#

yeah individual card retriggers don't get thrown to jokers becuse they can come from the actual card itself

sturdy compass
#

wack

#

also wouldn't it be SMODS.calculate_retriggers?

wintry solar
#

the repetitions given to them from jokers do get passed, but not from seals etc.

#

no, it's repetitions you need here

#

retriggers is for jokers

#

repetitions is for cards

sturdy compass
#

I cannot believe there's different terminology for that Facepalm

wintry solar
#

🤷‍♂️ I didn't name them

sturdy compass
#

I'm not blaming you lol

#

So I take it I'd have to take ownership of the function then? If that is the case I have yet to do anything with taking ownership lol

tepid crow
#

can't take ownership of a function, would need to hook or lovely patch

wintry solar
#

its not a difficult hook, I can write it for you if you need

tepid crow
#

but I'm not sure that's any cleaner

sturdy compass
#

Yeah hooks are still something I'm still having a tough time wrapping my head around for the most part

tepid crow
#

hooks are pretty simple

sturdy compass
#

Also sidenote, would this hook take red seals into account too? Asking in case I can get rid of that check

wintry solar
#

yes this hook would take everything in

sturdy compass
#

awesome

wintry solar
#

wait no

tepid crow
#

hooking (don't mind the + between strings)

wintry solar
#

that would count times jokers trigger on the cards

tepid crow
#

I'm unsure what the difference is?

#

unless there's a scenario where a playing card retriggers but doesn't trigger the jokers with that card as context

vale lake
wintry solar
#

that context counts effects like the basic suit jokers

frosty dock
wintry solar
#
local rep_calc = SMODS.calculate_repetitions
function SMODS.calculate_repetitions(card, context, reps)
    local rep_return = rep_calc(card, context, reps)
    local jokers = SMODS.find_card('key here')
    if next(jokers) then
        for _, joker in ipairs(jokers) do
            joker.ability.extra.card_repetitions = joker.ability.extra.card_repetitions + #rep_return - 1
        end
    end
    return rep_return
end
#

I think this counts them correctly

sturdy compass
#

I'll give it a go

tepid crow
frosty dock
#

indeed

#

lua is just... special

wintry solar
#

you'll also need to reset the count in context.before

sturdy compass
tepid crow
tepid crow
vale lake
wintry solar
zealous glen
wintry solar
#

OH wait I see what you mean

tepid crow
vale lake
zealous glen
#

xy

#

is multiplication

#

is concatenation

wintry solar
#

that might actually be cleaner, hmmmm

tepid crow
#

I think your hook is fine actually

wintry solar
#

the hook should work

sturdy compass
zealous glen
#

what's the effect

wintry solar
#

it'd be something like if context.cardarea == G.play and context.individual and not context.retrigger_joker then right?

tepid crow
#

yeah that'll also work, though I think you only really need the context.cardarea == G.play and context.individual

wintry solar
#

I think retriggers would mess up the count if you didnt exclude them

#

though I'm not sure

tepid crow
#

it would be for playing cards, so I don't think retrigger_joker is relevant?

#

I mean you'd have to start keeping track of individual cards so the hook is cleaner anyway

wintry solar
#

but you're counting the times the context comes into the joker to track the times the card triggers

tepid crow
#

oh the joker that's counting getting retriggered?

wintry solar
#

yeah

tepid crow
#

oh my bad didn't realize that's what you meant

faint yacht
#

On note of repetitions... I think updating Steamodded potentially broke something in this bit 'cause I crash whenever I have a "in hand" ability card like Steel.

if context.cardarea == G.hand and context.repetition then
  return {
    message = localize('k_again_ex'),
    repetitions = repeats,
    sound = not silent and togabalatro.config.SFXWhenTriggered and "toga_officehammer"
  }
end
wintry solar
#

if context.cardarea == G.hand and context.main_scoring then

#

oh wait repetitions

tepid crow
#

see this is why the hook idea was cleaner

frosty dock
#

huh, a table index is nil

wintry solar
#

yeah the hook works nicely

#

what a helpful error message

frosty dock
#

looks to be coming out of talisman

#

it expects there to be a card when there's repetitions

#

i don't think we do? not sure though

frosty dock
faint yacht
#

Adding card = context.other_card no longer crashes it, but sure, I'll try.

wintry solar
#

better calc doesn't expect cards in any returns

sturdy compass
#

So I'm realizing I need to do another hook into an SMODS function, but I want to replace part of it instead of just tacking functionality on. For this case I wanna specify the number of cards pulled in random_destroy, so I'd have to add a loop where this now is. How would I do that?

faint yacht
#

Guess it's the Talisman-specific thing, then.

#

'cause w/o it and the card =, it works as intended.

frosty dock
#

aight

#

forwarded it to the talisman thread

faint yacht
#

I'll leave it as card = card until I notice the fix.

dull saddle
#

i keep getting my amount of xmult come up as nil when i test my joker in game, what am i doing wrong with the card.ability? ``` SMODS.Joker {
key = 'vaingloriousjoker',
loc_txt = {
name = 'Vainglorious Joker',
text = {
"{X:red,C:white}1.5{} Mult for each",
"{C:diamonds}Diamond{} suit held in hand",
}
},
config = { extra = {
X_mult = 1.5,
suit = 'Diamonds',
}
},

loc_vars = function(self, info_queue, card)
  return { vars = { card.ability.extra.x_mult } }
end,
rarity = 3,
atlas = 'SinfulJokers',
pos = { x = 0, y = 0 },
cost = 8,
unlocked = true,
discovered = true,
blueprint_compat = false,
eternal_compat = true,
perishable_compat = false,
calculate = function(self, card, context)
  if context.individual and
  context.cardarea == G.hand and
  context.other_card:is_suit("Diamonds") then
    return {
      mult_mod = card.ability.extra.x_mult,
      message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.x_mult } }
    }
  end
end

}

frosty dock
dull saddle
#

wre

#

are those two differnt things

#

THROWS HANDS UP UGH

frosty dock
#

...

wintry solar
#

you're also using mult_mod

dull saddle
#

thank you

wintry solar
#

what smods version are you on?

dull saddle
wintry solar
#

your return just needs to be xmult = card.ability.extra.X_mult then

#

though you should also update smods

dull saddle
#

i downloaded this two days ago

wintry solar
#

4 days ago

frosty dock
#

thoughts on balance?

dull saddle
#

my only concern is if .25 will divide since its a decimal, punishing instead of boosting

frosty dock
#

nah, it's gain X0.25, so it'll be X1.75 after first trigger

wintry solar
#

popping those commits like nothing

frosty dock
frosty dock
#

it kind of limits itself since you run out of stars and moons to play spectrums with if you don't find a way to convert them back

#

it can still give a lot of mult quickly

zealous glen
dull saddle
#

i think it might depend on how you are building your deck in a playthrough, sounds like a fun challenge!

frosty dock
dull saddle
zealous glen
#

I didn't ask what it was

#

I asked how easy it was to get it

dull saddle
#

sorry geez

zealous glen
#

I was just clarifying :<

frosty dock
#

it's not a bunco spectrum, it's fairly easy to get but doesn't score a lot

zealous glen
#

So I imagine your deck starts with 6 suits

frosty dock
#

this would mainly synergize with composite hands such as straight spectrums

frosty dock
zealous glen
#

How does the math work out for spectrums compared to flushes

#

or straights

#

Spectrum Flush 🤔

#

Straight Spectrum Flush Pair 🤔

frosty dock
#

i have them at 20X3

cyan dune
#

Pretty sure the math for 5 different suits is much nicer than five of the same suit

frosty dock
#

though flushes are rarer in decks with more suits, so they should also get a boost

cyan dune
#

I'd kinda like putting it where Bunco Spectrums are, just starting at Level 2

zealous glen
frosty dock
#

I've thought about either that or reducing the gain

violet void
zealous glen
#

I think both would be good

frosty dock
#

but starting with 1.5X might make it too free early-game

#

is X0.2 gain still too much?

zealous glen
#

I was thinking 0.1

wintry solar
#

I think starting at X1 and have gain X0.2 sounds pretty good

frosty dock
#

thonk what could i do for a unique sleeve effect

wintry solar
#

X100 mult ezpz

frosty dock
#

spectrums can be made with 4 cards?

sturdy compass
#

Why so serious?

violet void
dull saddle
#

i think any other suit

frosty dock
#

no, it doesn't change stars into moons or vice versa
-# should it?

dull saddle
violet void
#

should probably be specified

zealous glen
#

Maybe change Stars into The Star and Moons into The Moon

frosty dock
#

no

zealous glen
#

What Tarot changers are there for them

frosty dock
#

The Star? and The Moon?

zealous glen
#

The Diamond and the Club?

frosty dock
#

i could have made them that

sturdy compass
#

It'd be funny

violet void
frosty dock
#

i'll consider if given art

viscid bough
#

i was looking at one of the example mods trying to figure out how to make a custom deck, and i noticed this line of code:

"full of {C:attention,T:e_polychrome}Poly{}{C:red,T:m_glass}glass{} cards"

What exactly does T do? ive only figured out C, X, S, and V so far

sturdy compass
frosty dock
violet void
sturdy compass
#

That does sound like a neat deck

frosty dock
wintry solar
#

could it retrigger spectrums perhaps?

violet void
#

I guess it picks the highest in position

frosty dock
#

picks flushes because they're higher on the list

#

wild flushes are still considered to contain a spectrum though

sturdy compass
random sleet
#

smodsman will six suits support spectrum franework

frosty dock
#

there's already bunco support being added

random sleet
#

im pretty sure thats literally just because you add spectrums

wintry solar
#

hmmm, the seal loc changes have broken my curse tooltips

frosty dock
#

i love me some breaking changes disguised as innocent fixes

tepid crow
random sleet
#

thac is going to be supporting spectrum framework going forward 's why i ask; i like six suits also tho and wanna have support for it where applicable :333

frosty dock
#

aight i'll add support for it

random sleet
#

:3 nice

sturdy compass
#

Oh thank goodness I don't see any failed patches after update Prayge

wintry solar
#

I think it's just a lovely patch missing now

#

yeah got it back

sturdy compass
#

Last time I updated my joker that returned suits and ranks back to stone cards broke completely elephantskull

#

That was quite a bug fixing adventure

cloud ore
wooden nexus
#

💀