#💻・modding-dev

1 messages · Page 262 of 1

rugged pier
#

oooo okay i was looking at wrong tab, thank you

open aspen
#

ig that might be it

sonic cedar
#

something involving adding to the game’s own files (i know like nothing don’t ask me 😭)

manic rune
#

:3

#

i see this every day

gentle rain
#

BLEURGH!!! why the piss

#

the stuff abt discarding is at the end

shell timber
#

chat how does this look

sonic cedar
gentle rain
#

i know the issues

glad crane
#

Shader uniform 'shader_here' does not exist Can anyone help me understand this shader error? I copied the shader example, changed the rbg values around to carry an average that I want, and it gives that error

#
    tex.r = average;
    tex.g = average;
    tex.b = average;```
For reference, this is all I changed, added the average number and changed the tex r, g, and b to the average
midnight coyote
#

i have made a severe lapse in my judgement when making this

brazen tusk
#

is that an exposed nerve ending

manic rune
#

i heard you like em young

brazen tusk
#

this is currently giving the default sell value of the card not the increased one,
is there a way i can get it to give double the current sell value when selling?

midnight coyote
#

hey is there a way to force a joker you modded in to show up? to test it's effects

shell timber
#

you can use DebugPlus

midnight coyote
gilded narwhal
#

pls

#

Unless legendaries appear last by default

brazen tusk
#

for me its just the order i have them in my list

gilded narwhal
#

It's not like that for me

brazen tusk
# gentle rain

could you send a screenshot of the discard part, easier to see on mobile

gilded narwhal
#

They're all in their own seperate files so that prolly affects it

sonic cedar
#

what’s the check for if cards have been played before? like say i wanted to check if a certain few cards were played, and i wanted to do it under a context.after

rugged pier
#
calculate = function(self, card, context)
        if context.joker_main and card.ability.extra.chip > 0 then
            return {
                chips = card.ability.extra.chip
            }
        end

        if context.discard then
            local face_cards = 0

            for k, v in ipairs(context.full_hand) do
                if v:is_face() then 
                    face_cards = face_cards + 1 
                end
            end

            if face_cards >= card.ability.extra.faces and not context.blueprint then
                card.ability.extra.chip = card.ability.extra.chip + card.ability.extra.chip_mod
                return {
                    message = 'Upgraded!',
                    color = G.C.CHIPS,
                    card = card
                }
            end
        end
    end

Why does this upgrade the joker 5 times instead of once?

gentle rain
brazen tusk
gilded narwhal
#

ah

brazen tusk
gilded narwhal
#

I just have it like this

#

and its not appearing in the order of the load table either

brazen tusk
#

i was using that before and i didnt notice any consistency with the order they loaded, i'd add a new joker and they would all get shuffled

sonic cedar
brazen tusk
#

im not sure how you'd get it for any point during a blind though

sonic cedar
#

yeah that’s the part i n—come again

manic rune
#

then check that everytime in context.after

#

:3

#

this is a blind effect, right?

sonic cedar
#

this is a joker

manic rune
#

oh

#

save played cards in a var of that joker

#

card.ability.extra.played_cards or something

#

then in context.after, do smt like

local played2, playedK = false, false
for _,v in ipairs(card.ability.extra.played_cards) do
  if v:get_id() == 2 then
    played2 = true
  elseif v:get_id() == 13 then
    playedK = true
  end
  if played2 and playedK then break end
end

--if played2 and playedK == true then blah blah
midnight coyote
#

oh dear god

#

i made the jonker set mult and chips to zero 😭

gentle rain
sonic cedar
manic rune
#

card.ability.extra.played_cards = {}

manic rune
#

then whenever a card is played:
table.insert(card.ability.extra.played_cards, context.other_card)

gentle rain
manic rune
#

yeah

sonic cedar
#

let me workshop something rq

manic rune
#

you can put tables in there

gentle rain
brazen tusk
gentle rain
#

i dont understand why it works here, highlighted, but not there

gentle rain
#

probably have made some updates, heres this

brazen tusk
#

ah ok cool

umbral zodiac
#

does anyone know how i could make this dynatext object (inside of a uibox) square the chips instead of just showing [chipsvalue^2]

config = {
                            object = DynaText({
                                string = { { ref_table = G.GAME.blind, ref_value = "chips", prefix = "Overscoring enabled at [", suffix = "^2] chips." } },
                                colours = { G.C.UI.TEXT_LIGHT },
                                shadow = true,
                                float = true,
                                scale = 0.4,
                                y_offset = -4,
                            }),
                            id = "ante_overscoreText",
                        },

im not sure how i could actually get the value so i could do math with it

gentle rain
sonic cedar
manic rune
#

you dont need that

#

just run a for loop through context.scoring_hand

#

and it will return each scoring card

brazen tusk
paper zealot
gentle rain
umbral zodiac
gentle rain
manic rune
sonic cedar
gentle rain
manic rune
#
if context.before and context.cardarea == G.jokers then
   for i,v in ipairs(context.scoring_hand) do
   ...
   end
end
#

thus is what i meant

sonic cedar
sonic cedar
umbral zodiac
paper zealot
vocal cedar
#

chat what am i doing wrong

isnt there a way to specefically call like "max_highlighted" or something so i can avoid the can use if statement?

#

its crashing on the len(G.hand.highlighted) < card.ability.hold then

manic rune
#

(#G.hand.highlighted or 0)

#

that would probably work

errant fulcrum
#

Can someone tell me why the enhancement takes effect after flipping back over? I have the abilty set inbetween the flips

G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function()
            play_sound('tarot1')
            card:juice_up(0.3, 0.5)
            return true end }))
        for i=1, #G.hand.highlighted do
            local percent = 1.15 - (i-0.999)/(#G.hand.highlighted-0.998)*0.3
            G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.15,func = function() G.hand.highlighted[i]:flip();play_sound('card1', percent);G.hand.highlighted[i]:juice_up(0.3, 0.3);return true end }))
        end
        delay(0.2)
        local rightmost = G.hand.highlighted[1]
        local leftmost = G.hand.highlighted[1]
            for i=1, #G.hand.highlighted do if G.hand.highlighted[i].T.x > rightmost.T.x then rightmost = G.hand.highlighted[i] end end
            for i=1, #G.hand.highlighted do if G.hand.highlighted[i].T.x < leftmost.T.x then leftmost = G.hand.highlighted[i] end end
            for i=1, #G.hand.highlighted do
                G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.1,func = function()
                    if G.hand.highlighted[i] ~= rightmost then
                        rightmost:set_ability(G.P_CENTERS[leftmost.config.center.key],nil,true)
                    end
                    return true end }))
            end
        for i=1, #G.hand.highlighted do
            local percent = 0.85 + (i-0.999)/(#G.hand.highlighted-0.998)*0.3
            G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.15,func = function() G.hand.highlighted[i]:flip();play_sound('tarot2', percent, 0.6);G.hand.highlighted[i]:juice_up(0.3, 0.3);return true end }))
        end
        G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.2,func = function() G.hand:unhighlight_all(); return true end }))
        delay(0.5)
brazen tusk
#

put j in

#

like this

vocal cedar
#

fun coding idea

gentle rain
vocal cedar
#

ebvery time i try to reference a nil value

#

i take a shot

vocal cedar
#

that

brazen tusk
#

LMAO

gentle rain
#

we have fun here

brazen tusk
#

theres a typo

gentle rain
#

considering i copy-pasted from the working one i do not think theres a typo

sonic cedar
gentle rain
#

would it be easier if i annotated it gel\

brazen tusk
sonic cedar
#

oh it’s literal

normal crest
#

the end is just from the if

sonic cedar
#

i mean i had a GUESS i didn’t expect it to be exactly that though

chrome widget
normal crest
sonic cedar
rugged pier
brazen tusk
#

context.pre_discard iirc

#

oh wait

#

read that wrong

#

catastrophic blunder

rugged pier
#

i am looping through every card discarded to increment a local variable that counts each face card so i think i do need context.discard?
but i need to only upgrade the joker once

paper zealot
shell timber
#

ichor seems useful

sonic cedar
brazen tusk
rugged pier
brazen tusk
#

yeah

manic rune
sonic cedar
#

ill do it again so you can see the error

rugged pier
# brazen tusk yeah

the idea is that joker adds +variable amount of chips to every hand and gets upgraded by 20 chips everytime 3 or more face cards are discarded at once

rugged pier
normal crest
#

pre_discard looks like it's called once before discarding

#

with the hand to be discarded in context.full_hand

chrome widget
normal crest
#

so try it out

manic rune
#

yeah do

#

so

rugged pier
manic rune
#

whats "card" here?

chrome widget
#

Otherwise the Perishable/Foil combo is definitely the weakest, and we've considered swapping to Eternal/Foil and Perishable/Holographic

manic rune
#

if "card" refers to the playing card, then card.ability.extra... no longer refers to the joker config

sonic cedar
#

ohhhhh

rugged pier
brazen tusk
#

w!

chrome widget
#

Personally I think Foil is better mid-game than Holographic is, which is why I associated it with Perishable (which is slightly more of a downgrade than Eternal)

sonic cedar
gentle rain
brazen tusk
#

ill take a gander

manic rune
#

refer to the playing card as something else

#

like, "v" or smt

#

whats the entire code?

rustic pilot
#

is there any documentation on balatro modding or do i just have to skim source code to find out how to do what i want?

manic rune
sonic cedar
# manic rune whats the entire code?
if context.before and context.cardarea == G.jokers then
            for _, card in ipairs(G.playing_cards) do
                if card:get_id() == 2 or card:get_id() == 3 or card:get_id() == 4 or card:get_id() == 5 then
                    table.insert(card.ability.extra.played_cards, card)
                end
            end
        end
rustic pilot
#

thankyou!

manic rune
#

use for _,v instead

#

or just anything else that isnt card

#

.

#

wait

manic rune
paper zealot
chrome widget
#

Yeah it overwrites Eternal since Perishable and Eternal technically can't (or aren't supposed to) coexist

sonic cedar
chrome widget
#

I wish there was a better way to ensure support for modded stickers, but without any property clarifying the positioning/space of a sticker other than the atlas, for now it just supports vanilla stickers

sonic cedar
manic rune
#

the joker is card, not kard

#

💔

chrome widget
#

WAIT I SAID SEALS ON THE DESCRIPTIONS INSTEAD OF STICKERS AAAAAAAAAAA

#

fixing

sonic cedar
errant fulcrum
brazen tusk
sonic cedar
#

moment of truth 2

sonic cedar
#

again 😭

brazen tusk
gentle rain
gentle rain
manic rune
gentle rain
# gentle rain mhm

what i AM able to do is putting table.concat (table.remove(card.ability.extra.ranks [...] rather than card.ability.extra.combination = table.concat(combination without any error EXCEPT that it displays 14 instead of ace

#

i tried using some math functions to make it return 1 instead of ace but math functions dont work on tables like that of course

brazen tusk
#

i'd honestly just exclude ace for that reason which, goes against the theme a little but it isnt quite a 1 anyway

sonic cedar
brazen tusk
#

oh

#

is this actually resetting it? bc its ' ' in the config

brazen tusk
gentle rain
brazen tusk
#

its in a few places as well

#

well, one other place

gentle rain
brazen tusk
#

oohhh

gentle rain
#

yeah ok i give up lmfao im just excluding aces n calling it a day

brazen tusk
#

one more potentially stupid question

gentle rain
#

yeah?

brazen tusk
#

is it removing the value from the list or is it removing the list bc, if theres no list then that would explain it giving a nil value

#

but ik youve done that in other places so

#

probably not that

gentle rain
brazen tusk
#

ohhh its the name then pos i see

#

instead of resetting it then adding the remaining could you remove removed?
maybe not if they dont exist but worth suggesting

gentle rain
#

that wouldnt work i dont think because extra.combination is a value not a table

#

i could rework it to have the combination read out a table instead of turning a table into a variable but

#

its midnight

#

and i got a functional joker

#

less that its late and more that ive been at this for like 8 hours straight now

brazen tusk
#

fair enough lol gn!

gentle rain
#

gn and tysm for the help

brazen tusk
#

np, im not all that knowledgeable but bouncing ideas can help

gentle rain
#

it is very very useful

#

:]

errant fulcrum
#

I'm trying to make a reverse strength that decreases card ranks but I don't know how to get it to wrap around for 2s

midnight coyote
#

margret thatcher joker

modern kindle
#

Ding dong

modern kindle
#

Beeppiiisss

manic rune
#

hi dilly :3

modern kindle
#

How goes life

tall wharf
manic rune
#

it is very fine, thank you kind sir

#

hbu?

tall wharf
#

I'm so cooked

manic rune
#

aiko stop cooking

#

you are cooking urself 😭

tall wharf
#

I'm getting cooked

modern kindle
# manic rune hbu?

I did so little development wise today so I feel a little guilty about that but otherwise I'm living life well

tall wharf
#

i just asked someone if they played maimai i think I'm actually cooked

modern kindle
#

I did my talisman compat the last couple of days so I've just been vibing

manic rune
modern kindle
#

I've still gotta make some stuff work with and without talisman though
But that's a problem for tomorrow me

tall wharf
#

what the fuck

manic rune
tall wharf
#

i couldn't even 100%

manic rune
#

i know that song but i don't know the english name for ot

#

💔

modern kindle
#

I have no idea what that us

#

Is

manic rune
#

im into a lot of music types :3

brazen tusk
modern kindle
#

Oic

#

I'm very bad at rhythm games

modern kindle
#

I can clear just about every guitar hero song ever on medium though 😎

tall wharf
#

I'll keep posting this shit until i actually added

#

math deck

manic rune
#

guitar hero looks cool, theres an arcade ripoff of that in my supermarket

#

but i have never seen it being turned on before

#

;(

modern kindle
#

I actually bought guitar hero 3 for my wii

#

I need to get world tour soon

midnight coyote
#

i do play maimai!!!

narrow iron
#

where can i find the different value that "context" can be?

tall wharf
midnight coyote
#

i’m really good at it

manic rune
narrow iron
#

thank you

rustic pilot
#

after scoring i want to randomly pick one pair to destroy while the other is copied to the deck, but im not sure how

rn all it does is copy every card in the two pair immediately after scoring

tall wharf
midnight coyote
#

mostly

tall wharf
#

I'm cooked i can't

brazen tusk
#

how is this kind of small text added?

manic rune
#

{s:0.5}text{}

brazen tusk
#

ty!

manic rune
#

you can add multiple uhh thingies, like

{s:0.5,C:inactive}this text is gray and small{}

tall wharf
#

I'm cooked

forest ivy
#

🤔

narrow iron
#

any idea why this tag isnt triggering? it should trigger before scoring happens after playing a hand

    if context.before then
      tag:yep("+", G.C.Mult, function(self)
      return {
      mult = card.ability.extra.mult
      }
    end )
    tag.trigger = true
    end 
end```
daring fern
#

How could one make a joker not shake when giving xmult for a card?

chrome widget
#

Hmm I'm wondering how best to order this

#

Off the top of their heads, does anyone know when gold seals give money for playing cards? Is it before they score their chips or after?

#

I'm not at my computer and just finding footage of gold seals is Not Easy apparently

daring fern
#

After the card scores its chips.

chrome widget
#

Ugh, damn

#

I have a joker that makes it so Blue and Purple seals trigger on scoring, but the way it's set up now results in them activating before the card's chip score, which bugs me

shell tangle
chrome widget
#

context.individual and context.cardarea == G.play

narrow iron
#

context.main_scoring and context.cardarea == G.play is what you should use there i think

shell tangle
#

No, use other_card, let me double check which context I'm thinking of,

chrome widget
#

Ideally, I'd want this effect to run after every other regular chip/mult/money effect scoring (since there's no precedent for it in vanilla)

shell tangle
#

But it's the same thing as the +3 mult suit jokers, that'd work, right?

shell tangle
chrome widget
#

But that would be after the entire effect table for the entire hand, not just after per card scoring

shell tangle
#

I think it'd be best to just have it as the jokers, that should be the right context, can you show the full bit of code?

chrome widget
shell tangle
narrow iron
#

thank you

shell tangle
# narrow iron any idea why this tag isnt triggering? it should trigger before scoring happens ...

It seems to be because tags use a different context system, you can see the types of tags in P_TAGS under Game:init_item_prototype in game.lua, it uses :apply_to_run to call tags, but shares that with decks, so you can search it, but you'll have to double check to see if it's being called on a tag or a back - other than that, you can search up the types present in P_TAGS and see where those are and if any of those work; else, write a lovely patch for a new tag:apply_to_run context.

spice scroll
#

anyone happen to know why this isnt working? its supposed to turn a card held in hand into a steel card after you win with a fire score

narrow iron
#

ig thats what im doing tho

rose dragon
#

how can i check if someone elses mod is installed without setting it as a dependency?

shell tangle
spice scroll
#

will try that out

shell tangle
spice scroll
#

one of my fav arts for this mod too

rose dragon
spice scroll
#

is it that i cant just say "rand_card" to check if it exists?

shell tangle
#

If it's the second debug message, print out sendDebugMessage(hand_chips) and repeat that for the other variables you're checking for to see which one has an issue.

#

You'll probably need to throw rand_card into a tostring() as it's a table, or you could use inspect or inspectDepth to see it list every contained value.

spice scroll
#

im p confident that part should work but ill double check

#

where should it be a string?

shell tangle
#

It'd be sendDebugMessage(tostring(rand_card)).

spice scroll
#

gotcha

vast fractal
#

can I info_queue a boss blind like
info_queue[#info_queue+1] = G.P_CENTERS.bl_watsau_final_distorted_fate

or do i need to make a tooltip?

spice scroll
#

oh ok yeah that's nil

#

so why is it nil

#

hm

shell tangle
spice scroll
#

still nil

#

could it be because im declaring the rand_card outside of that block?

#

hm

shell tangle
#

Set local rand_card = {}.

spice scroll
#

imma test that hypothesis first rq

shell tangle
#

It's not, if you declare a local, then it's local to the block - and if you have the local inside of the if block, then it can't be used outside of it.

spice scroll
#

yeah its resetting when it shifts code blocks

#

because i set the local first thing in the calculate block

#

so i think the calculate block runs again and resets it

shell tangle
#

Ah, right, very obvious, it's getting set to blank every single time calculate is called. Store it in your joker's config so it doesn't get overwritten.

spice scroll
#

already on it

#

thanks for the help though

#

(assuming it doesnt immediately crash right after i do this)

shell tangle
narrow iron
#

so im injecting code with lovely, it should go right after if context.before then in card.lua. right now im just injecting print('runs') to test if its working properly but it isnt printing anything

shell tangle
#

Can you send the lovely file?

narrow iron
#
version = "1.0.0"
dump_lua = true
priority = 0

[[patches]]
[patches.pattern]
target = "card.lua"
pattern = "if context.before then"
position = "after"
payload = '''
    print('runs')
'''
match_indent = true
overwrite = false```
shell tangle
#

That appears to be located in "card:calculate_joker", which is a weird place for it,

narrow iron
#

im not really sure where else would work

shell tangle
#

functions/state_events.lua, there's a nice -- TARGET: effects before scoring starts line for you to set as your pattern, and you can look it in the code - it's the part that actually send the calculate call.

narrow iron
#

i completely forgot to check the files that arent in the main directory 🤦

shell tangle
#

Just in case, the -- TARGET: effects before scoring starts is only in the lovely/dump files, you won't be able to search for it if you're only using the unmodified source code.

#

Oh, also, should probably just be payload = '''print('runs')'''.

narrow iron
#

yea at the time it was right after an if statement so i wasnt sure if it needed to be indented or not

shell tangle
#

The match_indent usually takes care of that setting, but if you had three lines, then it'd be like,

payload = '''if a then
    print('b')
end'''
narrow iron
#

the changes i make should appear in lovely/dump after i run balatro right?

shell tangle
#

Correct, and it'll say in the console if it couldn't find the target line.

narrow iron
#

it works now, thank you so much for the help

daring fern
#

How does one check if a joker is rental?

shell tangle
#

I think it's just stored in card.ability.rental unless SMODS changes something?

dusty fiber
narrow iron
#

i can get a tag to trigger before any cards scoring after playing a hand, but i have no idea how to make it actually change the current mult or chips

marble flint
#

oh right i did a bunch of hot trash

narrow iron
#

ive added a custom context for the tags, and it works, so i added the tag into tag.lua where it checks and runs the tags, which also works. but i have no idea how to make the code in tag.lua change the current scoring values

#
elseif _context.type == 'before' then
  print('runs')
  if self.name == 'Lesser Mult Tag' then
    self:yep('+', G.C.Mult, function()
      return true
    end)
    self.triggered = true
    return {
      mult = self.config.extra.mult
    }
end```
#

this thing with the return doesnt work here

marble flint
#

what i'm doing is not this, but you might be able to SMODS.calculate_effect() it at the appropriate moment

narrow iron
#

omg thats it

#

its always some command that was mentioned once extremely briefly i swear

marble flint
#

my current method is changing the return value of the boss blind's modifications which is not correct and i should change it kjlasdhgkladsfg

#

but it works, so

narrow iron
#
version = "1.0.0"
dump_lua = true
priority = 0

#triggering custom tags
[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = '''
mult, hand_chips = mod_mult(mult), mod_chips(hand_chips)
'''
position = "after"
payload = '''
for i = 1, #G.GAME.tags do
    G.GAME.tags[i]:apply_to_run({type = 'before'})
end
'''
match_indent = true
overwrite = false

#adding customm tags functions

[[patches]]
[patches.pattern]
target = "tag.lua"
pattern = "elseif _context.type == 'immediate' then "
position = "before"
payload = '''
elseif _context.type == 'before' then
    print('runs')
    if self.name == 'Lesser Mult Tag' then
        self:yep('+', G.C.Mult, function()
            return true
        end)
        self.triggered = true
        SMODS.calculate_effect({mult = self.config.extra.mult}, self)
        return true
    end
'''
match_indent = true
overwrite = false```
#

this is what i used if you think it'd help you

#

just replace "Lesser Mult Tag" with your tags name

zealous glen
marble flint
#

i prefer my own approach which lets me just write a calculate function on the smods definition

narrow iron
#

fair

marble flint
#

in my mod it'd just be this:

SMODS.Tag {
    key = "LesserMultTag",
    config = {
        mult = 5
    },
    loc_vars = function(self, info_queue, tag)
        return {
            vars = {self.config.mult}
        }
    end,
    apply = function(self, tag, context)
        if not tag.triggered and context.type == 'Bakery_play_hand_early' then
            return {
                mult = self.config.mult,
                after = function()
                    tag:yep('X', G.C.RED, function()
                        return true
                    end)
                end
            }
        end
    end
}
#

(and my mod can be used as a dependency to do it like this)

lethal ridge
#

What do you guys think

#

If a debuffed card is played, score it anyway and +10 mult

#

If a card is played, debuff it for the rest of the round

manic rune
#

good morning everyone

lethal ridge
#

Hello sir

manic rune
#

like, the moment you sell that joker, all the debuffed cards cant be used

#

i suggest going for the XMult/XChips instead

lethal ridge
#

Thanks for the suggestion

#

Also is there any good resources to read about draw step other than documentation and source code

manic rune
#

mhm

shell tangle
manic rune
lethal ridge
#

I didn't think about that

lethal ridge
#

I hope i can finish my soulpos thing today

manic rune
#

else it has no other purposes if you aren't going for the joker above, and risky if you don't already have it

lethal ridge
#

Thanks for the suggestion

#

I will also add that

manic rune
#

np :3

lethal ridge
#

@manic rune how would I add third layer of soul position

manic rune
#

Victin did that for their joker

#

idk how myself

#

check their mod's code, and see how its done

manic rune
lethal ridge
#

Been reading other people's code but I cant figure nothing

lethal ridge
#

Im checking it right now

#

Ahh lagg

#

It's so laggy

#

My discord just had a insane lag spike

manic rune
#

the joker which is based on the binding of issac, i don't remember its exact name sorry

lethal ridge
#

Okay

narrow iron
#

how can i add custom tags to the info queue on a card?

lethal ridge
#

There's nothing about the drawstep things

#

In the isaac joker thing

manic rune
#

oh, really?

lethal ridge
#

Yea sadly

manic rune
#

it uses multiple soul layers, so i thought it uses drawstep

lethal ridge
manic rune
#

yeah, i dont think it uses soul_pos

#

they manually rendered sprites on it

lethal ridge
#

Wait

#

It said that

#

Last commit was like 8 months ago

manic rune
#

-# huh

lethal ridge
#

The joker's atlas doesn't even contain the sprite too

#

So maybe it's just old code but Idk where the new one is

#

.

#

Ok im going to do this

lethal ridge
coral flume
#

Hello everyone, just started getting into modding balatro and have been told the discord was the best place for this :)

coral flume
manic rune
lethal ridge
#

@manic rune
soul_pos = { x = 0, y = 1 },

set_ability = function(self, card, initial, delay_sprites)
    if self.discovered or card.bypass_discovery_center then
        card.T.w = card.T.w * (custom_width / 71)
        card.children.floating_sprite.T.w = card.children.floating_sprite.T.w * (custom_width / 71)
    end
end,

set_sprites = function(self, card, front)
    if self.discovered or card.bypass_discovery_center then
        card.children.center.scale.x = card.children.center.scale.x
        card.children.floating_sprite.scale.x = card.children.floating_sprite.scale.x --* (custom_width / 71)
    end
end,

load = function(self, card, card_table, other_card)
    if self.discovered or card.bypass_discovery_center then
        card.T.w = card.T.w * (custom_width / 71)
        --card.children.floating_sprite.T.w = card.children.floating_sprite.T.w * (custom_width / 71)
    end
end,
#

I have found victins code

manic rune
#

nice :D

rose dragon
#

returning true on the debuff_hand function in the blind on the newest version of steamodded crashes the game, is there a reason for this?

lethal ridge
#

What is card?

#

The joker card?

manic rune
#

mhm

rose dragon
# rose dragon returning true on the debuff_hand function in the blind on the newest version of...
main.lua:1837: functions/state_events.lua:798: attempt to compare table with number
Stack Traceback
===============
(1) Lua upvalue 'orig' at file 'main.lua:612'
        Local variables:
         msg = string: "main.lua:1837: functions/state_events.lua:798: attempt to compare table with number"
         (*temporary) = Lua function '?' (defined at line 31 of chunk [SMODS _ "src/logging.lua"])
         (*temporary) = string: "Oops! The game crashed\
"
(2) Lua local 'handler' at file 'debugplus/console.lua:576' (from lovely module debugplus.console)
        Local variables:
         msg = string: "main.lua:1837: functions/state_events.lua:798: attempt to compare table with number"
plush cove
#

heya! so I have this code for a Joker that's supposed to give you Xmult if you have a certain amount of unique Jokers

but for some reason it just is not working, and always displays as 0 even when I've accumulated a number of unique Jokers in a run

can someone help with this?

heady siren
#

How would I go about making an enhancement unable to be overridden by jokers or tarot cards without just straight up editing the code of the jokers or tarot cards?

shell timber
#

chat is this good

heady siren
#

I'm using an enhancement to consider a card sleeved, which destroys it at the end of the round, and if you change the enhancement mid-blind it doesn't destroy the card, which is an issue

heady siren
#

And I say that as a huge fan of that specific color

shell timber
#

i hear you but it needs to be that specific colour

heady siren
#

Why does it need to be?

#

Also, how do I add new colors for descriptions and effects? If I can

plush cove
#

idk why # didn't work anymore though

vagrant moth
#

How do I make it so when I get this Joker in the shop or booster packs, it's always Foil?

I currently use the code

  set_ability = function(self, card, initial, delay_sprites)
    card:set_edition({foil = true}, true)
  end```
It only applies in the Collection view, but not the actual game. What should I add or change?
shell timber
#

check how cryptid does its planet jokers

#

Universe etc.

uncut grail
#

does anybody know all the steamodded colors for formatting?

#

didn't find those specified anywhere

forest ivy
# uncut grail does anybody know all the steamodded colors for formatting?

{C:attention} 🟡 Yellow Used for important keywords
{C:money} 🟢 Green Used for dollar amounts ($)
{C:mult} 🔴 Red Used for multipliers (x2, x5)
{C:chips} 🔵 Blue Used for chip values
{C:red} 🔴 Red Generic red text
{C:green} 🟢 Green Generic green text
{C:blue} 🔵 Blue Generic blue text
{C:dark_edition} 🟣 Purple Used for special card editions
{C:spectral} ⚪ White (or glowing effect) Used for spectral-related effects
{C:clovers} 🍀 Green Used for Clover buffs
{C:voucher} 🟠 Orange Used for Voucher-related text
{C:stars} ✨ Gold Used for celestial-related bonuses

#

these should be real but im not sure

#

at least most of them 🔥

uncut grail
#

tysm! is this such a common thing that everybody has this message ready on command LOL

vast fractal
#

Ctrl + F the source code

vast fractal
forest ivy
#

thats why i said im not 100% sure

maiden phoenix
#

Some are wrong 😬

shell timber
#

what's clovers?

#

or stars?

uncut grail
#

what's a star? can you eat it?

forest ivy
#

no idea smh

uncut grail
#

thanks for these, though!

heady siren
#

Can you make your own colors?

uncut grail
plush cove
#

@vagrant moth try this out

heady siren
uncut grail
#

im pretty new to this, so i wouldn't ask myself

#

but probably

#

boop found the message

shell timber
#

you can do G.ARGS.LOC_COLOURS["whatever"] = HEX("123fff") i'm pretty sure

tall wharf
#

i am about to collapse dude

#

i hate tuesday

forest ivy
#

so

{C:red}
{C:mult}
{C:blue}
{C:chips}
{C:green}
{C:money}
{C:gold}
{C:attention}
{C:purple}
{C:white}
{C:inactive}
{C:spades}
{C:hearts}
{C:clubs}
{C:diamonds}
{C:tarot}
{C:planet}
{C:spectral}
{C:edition}
{C:dark_edition}
{C:legendary}
{C:enhanced}
uncut grail
#

does anybody know where the smods source code contains the code that adds the sticker page in collection?

zealous glen
tall wharf
#

like actually

#

no

zealous glen
#

work?

tall wharf
#

2 lab classes in one day

zealous glen
#

ah, study

#

Good luck

#

what kind of lab

tall wharf
#

physics an chemistry

zealous glen
#

I see

tall wharf
#

at least i am done with physics one this week so

zealous glen
#

I think engineering physics lab classes involved measuring a table dozens of times

tall wharf
#

i am not doing engineering

#

this one more or less involves electricity

tall wharf
#

ill work a bit on math deck and collapse on my bed tonight

tall wharf
#

i have to do tritration for chem lab next week

zealous glen
#

I have no idea what that is

#

is that like tetration

heady siren
tall wharf
shell timber
#

uh

tall wharf
#

i was gonna reply earlier but i accidentally quit discord and had to repatch the thing

plush cove
#

yo this new Discord UI sucks 🔥 🔥 🔥 🔥 🔥 🔥

heady siren
#

I just put this in my main lua file, do I need to do anything more to make it work?

primal robin
#

Yay new shit UI update no one ever asked 🔥 🔥 🔥 🔥 🔥 🔥

tall wharf
#

this just gives me claustrophobia

heady siren
tall wharf
#

in any case

tall wharf
#

to put simply

#

you drop shit with exact concentration in another shit of unknown concentration

#

and look at when colour changes

#

then do a bunch of calculation n shit

#

i hate it

red flower
vocal cedar
heady siren
#

Thank god I don't drink

manic rune
tall wharf
#

find it

plush cove
#

THE MIST IS COMING

tall wharf
#

for the sake of it

manic rune
#

:3

#

jesus you follow a lot of threads

#

this is everything im following rn

primal robin
#

I treat this like having billion of tabs in browser water

heady siren
#

Looked up how to create hooks in lua, seems like this worked

native zinc
#

any way to give existing jokers stickers?

plush cove
#

card.ability.perishable = true

#

etc etc

native zinc
#

oh wait hey astrapboy

plush cove
native zinc
#

. ig tc is in its balatro era

#

lmao

plush cove
#

anyways

#

which sticker did you want?

native zinc
#

rental actually

plush cove
#

card.ability.rental = true

native zinc
#

i assume it's just card.ability.rental yeah

coral flume
#

Heya guys, ran into my first issue. during the before step, I want a joker to lose 1 mult for each card played. I've tried a few ways but they all seem pretty not work or crash the game lol

#

I tried making a different check for each handsize context but that didnt work, is there maybe a way to have a var set to the handsize?

manic rune
manic rune
heady siren
coral flume
manic rune
#

dear god

native zinc
#

oh god

#

reads like source /j

coral flume
#

Hey, in my defense I joined an hour ago

manic rune
#

yeah uh

#

i think all of those if statements are unnecessary

heady siren
#

card.ability.extra.sub_mult = #context.full_hand [=

heady siren
manic rune
#
card.ability.extra.sub_mult = #G.play.cards
coral flume
#

You can make contexts into numbers?

manic rune
#

its a table

native zinc
#

yes

coral flume
#

I didnt know that sorry

manic rune
#

# returns how many keys the table has

native zinc
#

length of table is #table

manic rune
#

sorry

heady siren
manic rune
#

oh crap

#

its play

heady siren
#

Play doesn't include all played I don't believe

manic rune
#

it does

heady siren
#

Only scored

manic rune
#

im pretty sure it does, weird

#

lemme check

rose dragon
# manic rune how does the code look like rn -# do note that i barely worked with blinds, so ...

works perfectly fine and the preview does too until you press Play Hand, and only crashes if it returns true
-# fyi im adding exclusive content to my mod for compatible content mods which is why im using some of aikos stuff since that's the current mod im working on

local w = ""
for _,c in pairs(hand) do
  w=w..string.lower(c.ability.aikoyori_letters_stickers)
end
for _,uw in pairs(KMOD.played_words) do
  if uw==w then
    return true
  end
end
return false
coral flume
frosty dock
heady siren
#

Okay so it'd be context.full_hand, good to know

manic rune
#

power is currently out :3

coral flume
#

Thank you all so much, it works

manic rune
#

i dont think you need a table

#

-# wait, forgot ur using debuff_hand, let me check

manic rune
#

i dont have any knowledge regarding what those are, but one of them is a table while the other is a number

#

as long as you fix that, it should work

rose dragon
manic rune
#

can you try printing "w" and "uw" separately

#

im pretty sure uw is still a table (and a card too)

rose dragon
# manic rune im pretty sure uw is still a table (and a card too)

calc hook code btw

local calc_hook = SMODS.calculate_context

    function SMODS.calculate_context(context, return_table)
        local x = calc_hook(context, return_table)

        if G.GAME.letters_enabled and G.GAME.aiko_current_word then
            local word = G.GAME.aiko_current_word
            
            if not word then return {} end
            word = string.lower(word)
            local lowerword = string.lower(word)
            word = string.gsub(" " .. word, "%W%l", string.upper):sub(2)

            if context.before then
                table.insert(KMOD.played_words, string.lower(word))
            end
        end
        
        return x
    end
manic rune
#

im assuming the first one is "w" while the second one is "uw"?

manic rune
#

...hm

#

ah, but also, remember to use ipairs for the (hand) for loop

#

just for safety, i still have memories about for pairs loop going through the keys randomly in luau, i heard its not the same in lua butttt better be safe than sorry :3

rose dragon
manic rune
#

yeah its not supposed to fix the crash itself

#

just to make sure "w" is added properly

humble girder
#

aaaaaa

manic rune
#

hi baliame

rose dragon
humble girder
#

a aaa

rose dragon
humble girder
#

aa aaa

manic rune
# rose dragon ?

like, if the keys r chosen randomly

if you play A C E, "w" can return E A C

rose dragon
manic rune
#

like i said - thats just to make sure when the crash is fixed, it will work properly

#

im confused though, why is it that "w" is seen as a number

rose dragon
#

here's the code that the error mentions btw, i don't get how this would still brick the game though

manic rune
manic rune
#

take it with a grain of salt though, im not that good with hooks but it does look like so

rose dragon
manic rune
#

and uhhh, whats with
word = string.gsub(""..word,... smt smt?

rose dragon
#

from the maxwells notebook joker

manic rune
#

:3 god im bad at working with mod-exclusive stuff

#

can you replace uw == w with true rq, i want to make sure its the comparison thats breaking

rose dragon
#

nah that's not the problem it crashes even if it is always true

manic rune
#

:3 damn

#

probably not the blind's code itself then

#

i should probably ask aikoyori themselves for this

rose dragon
#

meh still stops you from playing the hand anyways so it works in my book 👍

manic rune
#

they should know their mod better than anyone else

#

@tall wharf

#

arise :3

manic rune
tall wharf
#

I'm fucking crying

rose dragon
tall wharf
rose dragon
tall wharf
#

i think there's a G.GAME.current_word

rose dragon
tall wharf
#

I'm exhausted today

rose dragon
#

i saw it in the maxwells notebook code

tall wharf
#

yeah

rose dragon
#

still crashes the game which is why i changed it but i was too lazy to change it back

tall wharf
#

i spent half an hour troubleshooting

#

a nested mod folder problem

#

have you updated the release

rose dragon
tall wharf
#

mine

uncut grail
#

am i applying the rainbow text effect right?

#

for some reason gives me an error

rose dragon
manic rune
tall wharf
manic rune
#

{C:dark_edition} will make ur text change color like Negative

tall wharf
#

i am especially not okay today

manic rune
#

not V:1

#

i hope u get well soon aiko :(

uncut grail
#

oh okay, thanks!

manic rune
#

transferring my energy to u through bluetooth 🖐️

uncut grail
manic rune
#

getting well resumes tomorrow

tall wharf
#

I'm so fucking done I want to just somersault my way back to my room

manic rune
#

-# ur computer is not in ur room?

tall wharf
#

I'm outside, bepis

rose dragon
# tall wharf no

now this shit does nothing
did you change the current_word/aikoyori_letters_stickers api?

tall wharf
#

yes

manic rune
#

ohhhhh

tall wharf
#

i changed it

manic rune
#

i thought u r on ur computer rn, sorry

rose dragon
tall wharf
#

lab classes

#

i already mentioned that

rose dragon
tall wharf
#

i changed a bunch of variables

#

I'll give better api later

rose dragon
tall wharf
#

api

#

it's not stable yet

#

I'll work on it

frosty dock
tall wharf
#

hello aure

#

how are you doing

frosty dock
#

doing good, ty. how about you?

rose dragon
# tall wharf I'll work on it

alr
ima hit the sack and try to fix my shitty code in the morning
i wouldn't be surprised if it was just smods and not aikos frolicsomeness
-# crazy thesaurus pull

tall wharf
#

Very tired

frosty dock
#

idk what part of the smods api you think is shitty 💀

rose dragon
frosty dock
#

wha-

manic rune
#

sushang :3

wintry arch
#

sus hang !!!

uncut grail
#

how can i check if i have more than one consumable?

manic rune
#

if #G.consumeables.cards > 1 then

uncut grail
#

i'm either using the steamodded wiki wrong or it's super hard to find stuff there

#

LOL

manic rune
#

this is balatro source code stuff

#

:3

uncut grail
#

so what is #G, anyway?

manic rune
#

you know what # does already, right?

uncut grail
#

mmmmmaybe

manic rune
#

G.consumeables refers to the consumeables area
G.consumeables.cards refers to the table containing the actual consumables

manic rune
uncut grail
#

no yeah i get it, just like, is G the base balatro values object?

manic rune
#

ye, kind of

uncut grail
manic rune
#

yup

uncut grail
manic rune
manic rune
uncut grail
#

thank you, i'll check these out

manic rune
#

np :D

uncut grail
#

i don't trust my instincts when im working in lua...

#

oh yeah wait thats not how random works

frosty dock
#

that's also not how lua works

#

this menace of a language is 1-indexed

uncut grail
uncut grail
tall wharf
#

btw

#

use pseudorandom_element

uncut grail
#

as in? sorry im kind of new to this

tall wharf
#

it's a balatro specific function that determine stuff based on seed

uncut grail
#

ohh

tall wharf
#

I'm so tired

uncut grail
#

by the way, is there some better way to debug this type of stuff?

#

as in, right now im just opening the game and trying to find this card in a spectral pack

frosty dock
uncut grail
#

WTF the balatro modders are so cool

manic rune
#

if only i was cool :3

tall wharf
#

then there's me about to collapse in taco bell

lethal ridge
#

So every other language uses 0

uncut grail
#

average balatro modder

tall wharf
#

lua is the only language i know that indices start at 1

lethal ridge
#

I actually coded roblox games for a couple of years

#

Lua is the only thing I know and love

uncut grail
#

no yeah im pretty sure that uses lua as well

lethal ridge
hushed field
#

Some others do too, but languages that index at 1 are generally geared towards non-programmers

uncut grail
#

but you will have a hard time trying to understand it

lethal ridge
#

At school

uncut grail
#

like... i can't really rely on my coding instincts when coding in lua due to its nature being different at its core

uncut grail
lethal ridge
#

So I'm still getting used to python different sytaxes

uncut grail
#

i guess its nice that you know both lua and non-lua structure

#

thats like the best thing ever

lethal ridge
#

Not quite

marble flint
#

lua is nice because i can easily write highly illegal code, i.e. it makes the kind of metaprogramming i like easy, and in fact encourages it

zealous glen
hushed field
zealous glen
#

I was gonna say R is used by statisticians, but you’re right

#

I learned a bit of R

marble flint
hushed field
tall wharf
#

chat

forest ivy
#

ye

tall wharf
#

I'm trying to come up with a good system to convert a letter deck into letter+number deck

#

no adding cards

#

no removing them either

hushed field
#

I only learned about metatables last week and I really wanna learn how to use them now, because they sound like they can make for some pretty interesting things

tall wharf
hushed field
tall wharf
#

so it will be mix of letter and number

lethal ridge
marble flint
zealous glen
hushed field
#

are letters and numbers implemented the same way? They're both stickers on cards, right?

tall wharf
marble flint
zealous glen
tall wharf
zealous glen
#

So maybe like

lethal ridge
lethal ridge
#

I have many hundreds of hours on lua

zealous glen
lethal ridge
#

💀

zealous glen
hushed field
tall wharf
#

actually do you understand what i mean by converting into number+letter deck

zealous glen
#

No

tall wharf
#

so

hushed field
#

the fact that you're asking makes me think I don't 😛

tall wharf
#

you will be able to buy vouchers that enable math in letter deck runs

#

the question is

#

how do I change existing deck to be as fair to the player as possible while adding at least one of the numbers and symbols

zealous glen
#

Oh the Voucher changes the deck?

tall wharf
#

you can't play numbers otherwise

#

i think changing part of the deck makes some sense

zealous glen
#

I don’t know if that’s workable

#

Maybe give players the consumables that do it

tall wharf
#

i guess I'll just have to add 20 cards to the deck 😔

zealous glen
#

Why a Voucher though

tall wharf
#

how else would you allow the player to play numbers in other decks

maiden phoenix
tall wharf
uncut grail
#

still pretty sure this is wrong..

glad osprey
glad osprey
daring fern
forest ivy
maiden phoenix
maiden phoenix
#

? Yea right click it to get the link

forest ivy
#

waittt

#

holy cow ur fucking smart

#

ty

#

will surely help me a lot

daring fern
lethal ridge
#

im going to try to read cryptid mod soruce code again

hushed field
uncut grail
#

hey, so i'm trying to print out a big table yet it just makes it small and says +x more values

#

is there a way i can avoid that?

hushed field
#

the debugger has a specific function for that, i think

hushed field
#

lm check

uncut grail
#

nice but where did it print it out...

maiden phoenix
#

In the lovely console

uncut grail
#

don't see it there

#

am i doing this right?

manic rune
#

-# whats inspectDepth

uncut grail
maiden phoenix
#

Try sendDebugMessage(inspect(G.consumeables.cards))

uncut grail
#

the cooler daniel

frosty dock
#

with DebugPlus you can just call print on a table btw

manic rune
#

:3 just use print instead dawg

uncut grail
#

the problem with using print is just

frosty dock
#

and by "you can" I mean that the output isn't fucking useless

#

and by fucking useless I mean table: 0xdeadbeef

uncut grail
surreal mason
midnight coyote
#

how can i check how many jokers there are in the joker area, similar to what abstract does?

uncut grail
#

hey hey its my time to shine i want to try... is it #G.jokers.cards

#

oh hey i won

midnight coyote
uncut grail
#

im learning

manic rune
#

...thats a new one

hushed field
midnight coyote
#

can i call this anywhere or only in the calculate functioin

#

sorry im new to this

manic rune
tepid crow
# surreal mason

@native zinc ah yeah, the SMODS.calculate_effect, alright. I can't recall, does that actually work with retriggers?

edit: just tested, doesn't seem like it?

midnight coyote
#

alright

zealous glen
tall wharf
zealous glen
manic rune
#

where the hell is this end connected to :3

tall wharf
red flower
zealous glen
#

I thought they granted Mult

tall wharf
#

both

#

the letters don't just pop up on new game of any other decks

midnight coyote
#

now i get to pray that my code works

manic rune
midnight coyote
#

is there a similar way to pull current mult?

red flower
manic rune
#

oh, no

native zinc
#

i'll test it

uncut grail
#

how would i check if something is negative?

manic rune
#

the end for calculateDOT is all the way like 100 lines below that

red flower
#

oh

manic rune
#

but the thing is, its supposed to be there

#

i just dont know why

#

:3

uncut grail
#

is it in .ability?

manic rune
#

or should i be more concerned about the fact this comment can be collapsed and vice versa

#

😭

#

what the fuck is going on in my code

red flower
#

yeah i was going to say that

maiden phoenix
uncut grail
#

thanks!

manic rune
#

no wait, somethings DEFINITELY wrong

#

look at the line numbers

native zinc
#

well wait that's weird

manic rune
#

am i manifesting code out of thin air???

#

😭

native zinc
#

hanging chad is retriggering once

#

hm

tepid crow
native zinc
#

oh you're right

#

that's pretty weird

manic rune
#

-# what the fuck is going on with my file

native zinc
#

hm

manic rune
#

can someone please cast the devil away

#

:3

tepid crow
#

I don't think SMODS.calculate_effect handles retriggers properly (one of those special cases I was talking about haha)

manic rune
#

am i being debuffed

shell tangle
# manic rune

Kind of just seems like indentation stuff, even if it's not, double check your indentation to make it clearer. Or format it automatically if you can.

manic rune
#

is the code fucking gatekeeping me from reading it

tepid crow
frosty dock
manic rune
#

there are 4 lines between the comment and the local var

#

AND I CANT ACCESS IT

frosty dock
#

however retriggers also don't work properly with extra tables

manic rune
#

😭

frosty dock
#

shouldn't be too bad to fix though, but I can't send it through SMODS.trigger_effects as that would show the retrigger messages at a bad timing

tepid crow
#

fixing which part? 🤔

frosty dock
#

repetitions not respecting extra tables

native zinc
#

i see

tepid crow
#

oh yeah I tried myself too

native zinc
#

okay i'll try with other stuff

frosty dock
#

there's a bit of ambiguity on how the returns should be handled in such a case

#
return {
  repetitions = 1,
  extra = {
    repetitions = 1,
    message = 'abc',
  }
}
#

what should this do

tepid crow
# tepid crow oh yeah I tried myself too

I tried changing

            if value.repetitions and key ~= 'retriggers' then
                for h=1, value.repetitions do
                    value.card = value.card or _card
                    value.message = value.message or (not value.remove_default_message and localize('k_again_ex'))
                    reps[#reps+1] = {key = value}
                end
            end

to

            while value.repetitions and key ~= 'retriggers' then
                for h=1, value.repetitions do
                    value.card = value.card or _card
                    value.message = value.message or (not value.remove_default_message and localize('k_again_ex'))
                    reps[#reps+1] = {key = value}
                end
                value = value.extra or {}
            end

which worked math-wise, but duplicated the "again" message

errant fulcrum
#

Whats up with the "14 and 2" in this line of code for Strength? Seems like it just takes the math.min so whats the point?
local rank_suffix = card.base.id == 14 and 2 or math.min(card.base.id+1, 14)

red flower
manic rune
frosty dock
frosty dock
#

but it wraps aces around to 2s instead of just going back to themselves

errant fulcrum
#

Oh wow

tepid crow
errant fulcrum
frosty dock
#

it's a ternary operator in disguise

tepid crow
#

it reads weird the first time you see it haha

tepid crow
#

or is that not what you meant?

frosty dock
#

would you expect the retrigger of the second one to have two messages?

tepid crow
#

I'd expect "again" -> retrigger -> "something else"

frosty dock
#

uh huh, retrigger messages are usually always before a retrigger and don't exist "on their own"

#

so that seems unnatural

#

my point is this

#

if the message from the extra table is displayed along the one retrigger but doesn't if the extra table has retriggers attached to itself, that seems confusing

tepid crow
#

I'm confused

manic rune
#

am i witnessing the conversation between two gods

tepid crow
manic rune
#

💔

frosty dock
#

however that suggest that the extra table is ignored when evaluating the effect table on the first retrigger

tepid crow
#

Ah so you're saying that it starts handling the extra table inconsistently?

frosty dock
#

that's what I'm afraid would need to happen

gaunt thistle
#

hey gods 👋

tepid crow
#

don't make me smite you john lovely

gaunt thistle
#

i can't smite you back but I do have a cattle prod

frosty dock
#

I'm thinking I can just ignore extra tables altogether in triggering effects, which would mean extra tables with no repetitions attached would just do nothing

manic rune
#

can i offer a balatrojoker :3

frosty dock
#

which I guess is consistent if you consider extra tables with no repetitions to have an implicit repetitions = 0

frosty dock
tepid crow
#

so would that mean that

return {
   repetitions = 1,
   extra = {
    mult = 2,
  }
}

only gives 1 repetition and no mult then?

native zinc
#

oh and ```lua
return {
repetitions = 1,
extra = {
repetitions = 1,
message = 'abc',
}
}

#

fair enough

frosty dock
tepid crow
#

oh yeah 100% I agree

#

just asking for clarity

frosty dock
#

if you want the mult alongside the repetition, you can either have it in the first table or use a func

frosty dock
#

same for multiple messages on a repetition

wintry solar
#

Oh are we unscuffing repetition and retrigger logic a bit

tepid crow
#

considering to

frosty dock
#
return {
  repetitions = 1,
  message = '1',
  extra = {
    message = '2',
    extra = {
      repetitions = 1,
      message = '3'
    }
  }
}
#

I would see this as one repetition with "1" and one with "3", with the "2" in the middle being ignored due to having zero repetitions

tepid crow
#

Yeah that seems reasonable

frosty dock
#

that seems relatively pain-free to implement

tepid crow
#

though it would probably be nice for steamodded to give a warning or similar saying "hey your extra table is empty"?

#

or... "considered" empty

native zinc
#

alternatively just doc it

frosty dock
#

I guess that can be a warning as it'd rarely be intentional

tepid crow
#

could also document it yeah if any current mods are triggering that warning excessively

#

though I probably personally prefer a warning if possible