#💻・modding-dev

1 messages · Page 191 of 1

manic rune
#

11 is faster to type than literal 'Jack'

frosty dock
#

base.value doesn't account for things like stones anyway

#

so get_id is more correct

minor furnace
#

doesn't get_id() just return card.base.id?

limpid halo
#

I check for numbered cards by just doing not card:is_face() and card:get_id() ~= 14

#

lololol

strong jacinth
#

Where do I get the card?

manic rune
#

or just card:get_id() < 11

#

which is pretty much the same thing, i think

humble girder
#

sort of

limpid halo
manic rune
#

nah but we dont question if it works

#

❤️

minor furnace
#

ah with the exception of stone and whatever the vampire interaction is

limpid halo
#

I think my idea was to have it so it supports modded numbers or smth but idk

humble girder
limpid halo
manic rune
#

is A a numbered card?

wintry solar
#

I’d say ace is a numbered card yeah

manic rune
#

...

#

thats new

runic pecan
manic rune
#

😭

limpid halo
#

Oh.

humble girder
limpid halo
#

Oh no

manic rune
minor furnace
#

I'm gonna come back to this, because I would love to be able to figure out how to keep it at one enhancement, that just changes its base sprite depending on the suit

manic rune
#

that actually makes a lot of sense, honestly

limpid halo
#

welp time to fix that 😭

manic rune
#

A doesnt have a face, so obviously its not a face card

humble girder
#

dang, now i have to rename "numbered" cards is baliatro, great

frosty dock
minor furnace
frosty dock
#

as evidenced by the deck view

humble girder
#

i mean technically aces being numbered implies that cards are actually in at least base 11, not base 10

humble girder
# strong jacinth Does this count as context

card here is the joker being scored, and in context.joker_main there is no other card
are you possibly looking for context.individual in which case context.other_card is the card being scored?

runic pecan
manic rune
#

ngl im lowkey lazy as hell

#

i already added 11 jokers, and i have to rewrite most of its code

#

because of this 😭

limpid halo
#

Oh god

humble girder
#

so i'm looking at the SMODS api and i actually have no idea from the docs how the base id is spawned for custom ranks

limpid halo
#

Nice button though

manic rune
#

(description pages, basically)

limpid halo
#

I tried for a little bit to add a button and had a hard time

manic rune
humble girder
#

i have a feeling card:get_id() might conflict across mods or be dependent on load order

wintry solar
#

Can the joker itself be the button instead?

frosty dock
manic rune
#

in fact, 95% of my code is inspired if not straight up adapted from his code 😭

manic rune
#

thats

frosty dock
#

you can use card:get_id() == SMODS.Ranks['key'].id

humble girder
#

there you go @manic rune, get_id() is vastly inferior to checking the value lol

manic rune
#

a good idea actually, but as someone who clicks on jokers for fun i think it can be annoying

#

though i would definitely add that as an option in the configs

#

thanks wizard :D

limpid halo
#

Every time you have to re-order the description changes page…

#

Or using any consumable on the homer

#

Joker

runic pecan
manic rune
#

mhm, theres that too, so i think while having the extra button means having to go through an extra step, its probably best this way

wintry solar
#

Or a keybind thet changes the page whilst it’s being hovered

#

I don’t think the back and forth is a good user experience

manic rune
#

oh thats good

limpid halo
#

Keybind + button = perfection

strong jacinth
manic rune
runic pecan
manic rune
#

at most 5 pages if i have to predict for my future updates

limpid halo
#

That’s so much 😭 why do you need that much text?

manic rune
#

it will certainly look better after this change though lol

limpid halo
#

O-oh

strong jacinth
limpid halo
#

I feel like you could also split this up into some info boxes

manic rune
#

it would flood the screen horizontally then 😭

#

adding the page stuff is definitely the best approach, as it allows me to add more mechanics to a joker without having to worry about it covering the entire screen

runic pecan
limpid halo
#

Yeah fair

manic rune
#

this, for example

#

this will definitely be the first joker to cover the screen if i were to go with the same approach 😭

tall wharf
manic rune
#

so it shouldnt be too bad now

manic rune
tall wharf
#

pagination for description is crazy

manic rune
#

i think Q and E should be fine for the keybinds?

#

i hope no mods conflict with that, somehow

#

or maybe i can just add custom keybinds

#

that should solve the problem

#

time to see how to detect keys

crisp coral
#

DebugPlus definitely uses either or both of those keybinds

limpid halo
#

I wonder how hard would it be to detect the description is being shown/rendered

manic rune
#

oh yeah, i forgot

crisp coral
#

one day we will have a keybinds menu and it will look exactly the same as a minecraft modpack

crisp coral
#

or just detect when the create uibox func is called

tall wharf
#

don't forget the until recently unrebindable narrator hotkey

crisp coral
#

. which version did they

limpid halo
#

Narrator - narrator on

manic rune
tall wharf
crisp coral
#

add rebinds to narrator

limpid halo
#

Mfs be making the LinkedIn hotkey look like child’s play

tall wharf
#

narrator - narrates all

runic pecan
# strong jacinth When card scores

Then I'd suggest you to useif context.individual and context.cardarea == G.play then local xmult = nil if context.other_card:get_id() == 14 then xmult = 11 elseif (context.other_card:get_id() <= 13) and (context.other_card:get_id() >= 10) then xmult = 10 elseif (context.other_card:get_id() <= 9) and (context.other_card:get_id() >= 2) then xmult = context.other_card:get_id() end if xmult then return {Xmult_mod = xmult} end endinstead.

tall wharf
#

narrator - narrates chat

manic rune
#

Typing Sound >

tall wharf
#

narrator - narrates system

#

please add sparkle to the star rail mod

manic rune
#

< Someone being shot and carried to a van so that they will be disposed of in a river

manic rune
#

but for now, i will add all characters from v1.0 first

minor furnace
#

How would I grab a specific atlas by name for this line?
card.children.front.atlas = _atlas

runic pecan
strong jacinth
manic rune
#

the context isnt supposed to be in the return

#

place all of it outside

#

(once again, absolutely diabolical circling)

strong jacinth
#

So like this?

manic rune
#

nah fr 😭

manic rune
#

you can remove the context.joker_main part

#

since theres no use for that rn

runic pecan
manic rune
#

no, i know exactly what you are talking about

#

oh also

#

wouldnt it better if you use x_mult instead?

#

since i think if you use Xmult_mod, there wont be a message

#

or maybe there is, idk

runic pecan
manic rune
#

oh i see

strong jacinth
#

Heh, this joker is very op

manic rune
#

it really is

strong jacinth
#

14 000 000 from a J to 8

prisma loom
#

So I create a table of Suits then I check scoring hand for any unique suits and add them to the table. Ig "local suits" is a number since we add +1 to it? So I just multiplied the scaling of the joker by the the number of suits in the table (I totally butchered it)

strong jacinth
#

Can this appear in shop?

#

And is there a SMODS autocomplete extension for vs code

runic pecan
humble girder
#

and you're returning in your for loop

prisma loom
#

suits[suit]

#

it is a number then

limpid halo
humble girder
#

i'm becoming increasingly confused

#

what exactly are we trying to do

#

give me the description of your joker

prisma loom
humble girder
#

oh

prisma loom
#

sorry if I wasnt clear

manic rune
#

damn, this is convenient, KeyboardController has the exact thing i need rn lol

minor furnace
#

So, I know it reaches this line, but why does this not change the sprite for the card?

            print("club!")
            card.children.front:set_sprite_pos({x = 4, y = 5})```
manic rune
#

not children.front

minor furnace
#

ah

#

thanks, I'll try that

manic rune
#

i know that since i worked on a mod just for changing sprite automatically lol

strong jacinth
#

CanI see my Joker in the shop?

minor gyro
#

guys

I didn't update for a month cuz i was on a vacation
I was on 1326a
Now is in 1421b
Did calc change?

manic rune
#

i dont think so, unless 1326a counts as old_calc

minor gyro
#

wasn't old calc

#

at least in my time

manic rune
#

theres also xchips now

#

❤️

minor furnace
humble girder
#
if context.before and not context.blueprint then
    local suits = {}
    for suit, _ in pairs(SMODS.Suits) do
        if context.scoring_hand[i]:has_suit(suit) then suits[suit] = true end
    end
    for suit, _ in pairs(suits) do
        card.ability.extra.x_mult = card.ability.extra.x_mult + card.ability.extra.scaling
    end
    return {
        message = localize('k_upgrade_ex')
    }
elseif context.joker_main then
    return {
        xmult = card.ability.extra.x_mult
    }
end
#

the two for loops can be merged

#

one sec

manic rune
#

brother is the suits guy 💔

#

baliame suits

runic pecan
humble girder
#
if context.before and not context.blueprint then
    local suits = {}
    for i, other_card in ipairs(context.scoring_hand) do
        for suit, _ in pairs(SMODS.Suits) do
            if other_card:has_suit(suit) and not suits[suit] then 
                suits[suit] = true
                card.ability.extra.x_mult = card.ability.extra.x_mult + card.ability.extra.scaling
            end
        end
    end
    return {
        message = localize('k_upgrade_ex')
    }
elseif context.joker_main then
    return {
        xmult = card.ability.extra.x_mult
    }
end
#

wait

#

i missed something

#

lmao

runic pecan
# prisma loom yes

Then wouldn't you need a list of booleans instead of a list of numbers?

prisma loom
humble girder
#

fixed

runic pecan
strong jacinth
#

2 questions. Can i change the sell value and how do i change the rairity

prisma loom
humble girder
prisma loom
#

I'm sorry😭

minor furnace
#

I think I'm just having a hard time wrapping my head around the data structures, because I still do not fully comprehend what a 'center' actually is

humble girder
#

centers are prototypes for different things kinda

runic pecan
strong jacinth
#

How do i create cards to hand?

#

(With a Tarot card, and how do i create one?)

runic pecan
humble girder
#

sec

#

it's is_suit, not has_suit

#

my bad

prisma loom
#

local othercard?

#

oh

humble girder
runic pecan
humble girder
#

or use the SMODS convenience function which I never looked up exists

manic rune
#

this is a function already in the game, right?

humble girder
#

create_playing_card is the function you're looking for but it's a vanilla thing so it won't hold your hand

strong jacinth
runic pecan
minor furnace
#

so why does this kind of assignment work for my custom sticker, but not for this enhancement?
card.ability[self.key].extra.suit = "Spades"

manic rune
#

this looks cursed

minor furnace
#

egg

strong jacinth
#

How does gui work?

#

If there are any easy mods

paper zealot
# manic rune this is a function already in the game, right?

It's a function of UIBox in ui.lua:

function UIBox:get_UIE_by_ID(id, node)
    if not node then node = self.UIRoot end
    if node.config and node.config.id == id then return node end
    for k, v in pairs(node.children) do
        local res = self:get_UIE_by_ID(id, v)
        if res then
            return res
        elseif v.config.object and v.config.object.get_UIE_by_ID then
            res = v.config.object:get_UIE_by_ID(id, nil)
            if res then
                return res
            end
        end
    end
    return nil
end
minor furnace
#

I do not touch the ui with a 50 foot pole

manic rune
#

...hm

runic pecan
manic rune
#

somethings wrong

#

why is that when i press "e" specifically, this pops up?

#

i basically adapted the code from KeyboardController so that might be it

#

but i cant exactly figure out why it pops out

runic pecan
#

Maybe something else was bound with E?

strong jacinth
#

Last question.

manic rune
#

...i have no clue myself

#
BalatroSR.config_tab = function()
    local loc_options = {}
    for i, v in ipairs(hsr_keybind_options) do loc_options[i] = localize(v, 'hsr_keybinds') end
    BalatroSR.current_keybind = BalatroSR.current_keybind or 'hsr_turn_page_left'
    BalatroSR.current_keybind_val = BalatroSR.config.keybinds[BalatroSR.current_keybind] or ''
    return {n = G.UIT.ROOT, config = {r = 0.1, minw = 5, align = "cm", padding = 0.2, colour = G.C.BLACK}, nodes = {
        create_toggle({label = localize('hsr_keybinds_enable'), ref_table = BalatroSR.config, ref_value = 'enable', callback = function() BalatroSR:save_config() end }),
        {n = G.UIT.R, config = { align = "cm", padding = 0.01 }, nodes = {
            create_text_input({
                w = 4, max_length = 9, prompt_text = BalatroSR.config.keybinds[BalatroSR.current_keybind],
                extended_corpus = true, ref_table = BalatroSR, ref_value = 'current_keybind_val', keyboard_offset = 1,
                callback = function(e)
                    BalatroSR.config.keybinds[BalatroSR.current_keybind] = BalatroSR.current_keybind_val
                    BalatroSR:save_config()
                end
            }),
        }},
        create_option_cycle({
            label = localize('hsr_current_keybind'),
            scale = 0.8,
            w = 4,
            options = loc_options,
            opt_callback = 'hsr_select_keybind',
            current_option = BalatroSR.current_keybind_idx or 1,
        }),
    }}
end
#
function G.FUNCS.hsr_select_keybind(e)
    local hook = G.OVERLAY_MENU:get_UIE_by_ID('text_input').children[1].children[1]
    hook.config.ref_table.callback()
    BalatroSR.current_keybind = hsr_keybind_options[e.to_key]
    BalatroSR.current_keybind_idx = e.to_key
    hook.config.ref_value =  BalatroSR.current_keybind
    G.CONTROLLER.text_input_hook = hook
    G.CONTROLLER.text_input_id = 'text_input'
    for i = 1, 9 do
      G.FUNCS.text_input_key({key = 'right'})
    end
    for i = 1, 9 do
        G.FUNCS.text_input_key({key = 'backspace'})
    end
    local text = BalatroSR.config.keybinds[BalatroSR.current_keybind]
    for i = 1, #text do
      local c = text:sub(i,i)
      G.FUNCS.text_input_key({key = c})
    end
    G.FUNCS.text_input_key({key = 'return'})
    --KBC.current_keybind_val = KBC.config.keybinds[KBC.current_keybind]
    BalatroSR:save_config()
end
#

those r the code

strong jacinth
#

How do I modify the discard times valure

prisma loom
runic pecan
manic rune
#

oh wait i fixed it somehow

#

seems like a valid keybind

minor furnace
#

apparently, the set_sprites() function in your SMODS.Enhancement{} is not called when you use a suit-changing tarot card on an enhanced card

manic rune
#

time to see how to detect keys pressed

#

shouldnt be too hard

#

i have to somehow find the part where it restarts when you hold R, where could it possibly be

#

that should give me a clue on how to implement this

limpid halo
manic rune
#

bruh

#

that exists?? 😭

#

yeah im dumb for not checking that first, thanks

dreamy thunder
#

ok so how would i add a use button for a joker with custom text? i know its done via patches but no idea on how to do it

manic rune
dreamy thunder
#

oh really?

runic pecan
# strong jacinth How do I modify the discard times valure

If you want to modify it like Merry Andy, put G.GAME.round_resets.discards = G.GAME.round_resets.discards + card.ability.extra.discard_mod in add_to_deck, and put G.GAME.round_resets.discards = G.GAME.round_resets.discards - card.ability.extra.discard_mod in remove_from_deck.
And add ease_discard(card.ability.extra.discard_mod) and ease_discard(-card.ability.extra.discard_mod) under each of them.

manic rune
#

mhm, i did that without one

limpid halo
manic rune
#

i was carried by N' heavily, but i will try

manic rune
#

.

#

wait, wrong explanation

#

I MEAN

#

you can instead use hooks

minor furnace
#

it gets worse, because when you go to view the deck it doesn't even recognize the correct sprite to begin with

manic rune
#

this part is basically overriding how balatro adds buttons like "SELL" to cards, i think

minor furnace
limpid halo
manic rune
#

i very much adapted joyousspring's code to make this (its a mod)

#

so i highly suggest checking that out

dreamy thunder
#

thank you

#

there goes a few hours of mine ig

manic rune
#

lel its fine

manic rune
#

i was very lucky to be guided early on ngl

#

else it would have certainly taken me days, if not weeks

runic pecan
#

I think I might still need some rewording...

manic rune
#

i think it should be Mult instead of mult

runic pecan
minor furnace
#

it's dirty but it works

manic rune
#

since, uh, this (its 1, not one)

#

and theres no "." at the end of the description either

dreamy thunder
runic pecan
manic rune
paper zealot
manic rune
#

for my case, its "SELL" and "SWITCH DESC"

dreamy thunder
#

oh i see

dreamy thunder
manic rune
minor gyro
#

how can I retrigger jokers?

manic rune
#

the "else" part is basically ignoring all of those stuff if its jokers you dont want to add buttons to

minor furnace
manic rune
dreamy thunder
#

hm

manic rune
#

then you can do stuff like this

#

(just uh, dont mind the other context except for context.retrigger_joker_check)

paper zealot
fresh swallow
manic rune
#

thats really cool!

fresh swallow
#

Planning on making balatro the electronic board game

paper zealot
manic rune
#

we are adding this as a new update to the real life balatro 🗣️

fresh swallow
#

Expect a YouTube video to pop up in around 1-2 months once I finish the full prototype

manic rune
#

looking forward to what you will be doing from now on lol

#

thats really nice

fresh swallow
#

I have a lot to do with working out the scoring system but after that I should be fine.

minor furnace
fresh swallow
manic rune
paper zealot
minor gyro
#

ion remember this existing

manic rune
#

there r even stuffs like quantum enhancements

fresh swallow
manic rune
#

which allows you to add multiple enhancements to playing cards

minor gyro
manic rune
#

lowkey want to make it so that you need to somehow hold B,A,L,T,R then finally press O for an easter egg

runic pecan
fresh swallow
paper zealot
manic rune
#

imagine being able to mod real life balatro tho 😭

runic pecan
#

@fresh swallow How would you handle tarot, planet, and spectral cards?

manic rune
#

im guessing there will probably be a zone where if you put a consumable card there, it will be detected and used

#

no clue how that would work with consumables that select highlighted cards and do stuff tbh

paper zealot
#

Strength and Death might prove problematic

manic rune
fresh swallow
manic rune
#

just replace a card with another card lol

dreamy thunder
#

looks like i lost the buttons entirely :b

fresh swallow
fresh swallow
#

Visually you just use a dry erase marker on a layer under the sleeve

manic rune
#

its probably something to do with the create buttons function

manic rune
dreamy thunder
#

time for some experiments

fresh swallow
manic rune
#

oh, thats neat

#

ig for naninf strat you would need to buy 6 decks lol

#

...im actually surprised by how straightforward this is

#

but uh, wait

#

can key_pressed be changed?

paper zealot
manic rune
#

i mean, if the stuff already loaded in then will it read the new keybind if it were to be changed

manic rune
#

but i really hope it will, else im gonna need to do some work here

paper zealot
fresh swallow
manic rune
#

(stacking consumables)

fresh swallow
manic rune
#

i see

fresh swallow
#

1# reads played cards, 2# reads jokers and 3# reads cards drawn off the deck

#

A 4th one would just be overkill

#

The game will only have 4 buttons needed to play it. Everything else is done by playing “Function cards”

#

Function cards are used to reroll shops/buy packs/skip blinds

manic rune
#

id honestly love to buy this one day, but since im in vietnam i doubt the shipping fee will be cheap 😭

#

best of luck to you tho ❤️

dreamy thunder
#

i still dont understand why its not creating the buttons

runic pecan
#

Sorry to interrupt, but which function handles speech bubbles?

paper zealot
manic rune
#

is this how i do it?

fresh swallow
dreamy thunder
#

nvm im dumb as hell

#

got it

#

to work

manic rune
#

i mean, it certainly works, but if i change the keybind in the settings then it will still be the keybind when you initially opened the game

#

probably have to manually change this then

fresh swallow
#

Here is the display for money, ante hands and discards

manic rune
#

looks like my cable management

fresh swallow
#

Hands and discards are tracked by leds

#

The 3x seven segment bank is for money and the 2x is for ante

fresh swallow
#

Cable management is an issue when every part needs 7 wires

paper zealot
minor gyro
#

I need to create a new file if i want to create a new rarity?

runic pecan
manic rune
#

...or can i just make it so that you need to restart for the keybinds to reload themselves

#

hmm

red flower
#

cartomancer and handy have configurable keybinds i think

#

you can check the code for those

manic rune
#

oh sweet

minor gyro
#

any mods that adds new raritys so i can take a look?

manic rune
#

thank

runic pecan
manic rune
#

yeah uhh

#

cartomancer doesnt even use SMODS.Keybind, it seems

dreamy thunder
#

alright the button is there. How do i get it to actually do something?

manic rune
dreamy thunder
#

rn im gettin a crash on press

manic rune
#

which you will be adding a G.FUNCS with that exact name, i think

fresh swallow
dreamy thunder
#

k thanks

#

tme for some more experiments

fresh swallow
#

That whole assembly display is like .50$ of parts

minor gyro
#

am I dumb or it should be here?

paper zealot
fathom thunder
red flower
manic rune
#

hmmmmmmmmmmmmm

fresh swallow
manic rune
#

Cartomancer does seem to support changing keybinds

fresh swallow
#

I am trying to make it cheap. 30ish-40 dollars to produce it

#

Retail estimate is somewhere close to 100$

#

There is a reason I am building it off of a super cheap chipset

#

Esp32-S3

#

2 dollars for the processor will be really good for keeping costs down. Just optimizing my code has been hell

minor furnace
#

the worst part is, this is correct

minor gyro
#

what's a good weight for a rare-er version of legendary? like mythical or sum

#

.001 is good?

manic rune
#

is that for the joker to spawn in the shop?

minor gyro
#

yh

#

I'll put .0005, so 1 in 2k

paper zealot
minor gyro
#

cuz it'll retrigger all jokers lmao

manic rune
#

oh lol

#

thats probably reasonable enough, honestly

fresh swallow
#

Would you like to wait 2 mins to discard and draw?

manic rune
#

cryptid experience

nocturne garnet
#

does it actually like work for jokers or nah

minor furnace
nocturne garnet
#

ah

minor furnace
#

I spent so long getting the sprites to load correctly and writing the function to actually handle them

fresh swallow
#

The nfc stickers are actually the most expensive part of the game. You need around 320 of them. At .05$-.08$ a piece it really boosts the price by 20 bucks

#

And I am going with some of the tiny bit more pricy once to allow for more read and writes

minor furnace
#

but in theory making them compatible with rank-based jokers should be relatively straightforward, just tedious

fresh swallow
#

2 playing card decks, 149 jokers, 80 sum arcana/spectral/planet/function cards.

#

Showman does not exist unless I sell more jokers

minor furnace
manic rune
#

how do i check if we r currently in a run?

#

i want to make it so that it will check highlighted cards when the key is pressed, but will it crash if you are not in a run

paper zealot
fresh swallow
#

I would have to sell showman and blank cards that you use a function card to turn into the designated copy

paper zealot
#

Would love to see more of the development as it comes together, i love intricate electronics projects like this. Would you make a thread or a discord server for it?

manic rune
#

ok maybe this works

#

oh wow it does

minor furnace
#

all right, time to patch all the rank-based jokers now

manic rune
#

can i somehow do this to unhighlight a joker then highlight it immediately afterwards lol

hushed briar
#
    SMODS.ObjectType {
      key = 'Food',
      default = 'j_egg',
      cards = {},
      inject = function(self)
        SMODS.ObjectType.inject(self)
        -- Insert base game food jokers
        self:inject_card(G.P_CENTERS.j_gros_michel)
        self:inject_card(G.P_CENTERS.j_egg)
        self:inject_card(G.P_CENTERS.j_ice_cream)
        self:inject_card(G.P_CENTERS.j_cavendish)
        self:inject_card(G.P_CENTERS.j_turtle_bean)
        self:inject_card(G.P_CENTERS.j_diet_cola)
        self:inject_card(G.P_CENTERS.j_popcorn)
        self:inject_card(G.P_CENTERS.j_ramen)
        self:inject_card(G.P_CENTERS.j_selzer)
      end
    }
end```
```if not SMODS.ObjectTypes.Food then
    SMODS.ObjectType {
      key = 'Food',
      default = 'j_egg',
      cards = {
          ["j_gros_michel"] = true,
          ["j_egg"] = true,
          ["j_ice_cream"] = true,
          ["j_cavendish"] = true,
          ["j_turtle_bean"] = true,
          ["j_diet_cola"] = true,
          ["j_popcorn"] = true,
          ["j_ramen"] = true,
          ["j_selzer"] = true,
      },
    }
end```
does anyone know why neither of these methods are actually adding these jokers to the pool
minor furnace
# minor furnace all right, time to patch *all* the rank-based jokers now

This list is a lot longer than I wanted it to be

Raised Fist
Fibonacci
Scary Face
Hack (works with Wee Joker)
Pareidolia
Even Steven
Odd Todd
Scholar
Business Card
Ride the Bus
Sixth Sense
Faceless Joker
Superposition
Baron
Cloud 9
Midas Mask
Photograph
Reserved Parking
Mail-In Rebate
Walkie Talkie
Smiley Face
Sock and Buskin? (Works with Wee and Triboulet)
Wee Joker
The Idol
Hit the Road
Shoot the Moon
Canio
Triboulet```
manic rune
#

💀 good luck

minor furnace
#

thank you 🫡

spring lantern
#

how can i check if a specific joker belongs to a specific mod?

manic rune
#

i have to somehow force the joker to reload its generate_ui

minor furnace
#

there's probably a better way though

manic rune
#

so that if i were to hover my mouse onto the joker and press the keybinds to scroll between pages

#

the new description will be loaded in

minor magnet
#

what ability could i give this joker?

#

i was thinking something to do with stone cards

red flower
manic rune
#

maybe make it so stone cards now have a certain rate to destroy themselves upon played, and if they were, give bonus chips to the joker? like, +100 chips or something

manic rune
minor magnet
#

maybe "Scored Stone cards have a 1 in 4 chance to be destroyed, this Joker gains X0,5 Mult for each card destroyed this way"

manic rune
#

i was thinking it would be leaning a bit more towards chips, since stone cards give a lot of the

minor furnace
#

I think I'm going to define an is_rank() function that takes an array of accepted values, and then replace literally every rank-based conditional for the jokers with that

manic rune
#

maybe X(n) Chips instead?

minor magnet
manic rune
#

wait why is there a double maybe

runic pecan
minor magnet
manic rune
#

oof

#

yeah i suppose x mult is fine too

#

it helps stone cards build to at least have another source of mult gain lol

minor magnet
#

it's basically the same thing anyway

minor magnet
#

i also thought of a Punk Rock joker, "Stone Cards also act like Steel Cards, Steel Cards also act like Stone Cards"

manic rune
#

oh thats cool

minor magnet
#

still gotta draw that one tho

#

this description is way too long

#

how do i shorten it

#

wait ok i have an idea

spring lantern
#

"1 in 4 chance to destroy scored stone cards" might be a bit shorter

red flower
minor furnace
#

This feels so much cleaner now
if self.ability.name == 'Fibonacci' and is_rank(context.other_card, {2, 3, 5, 8, 14}) then

vs

                context.other_card:get_id() == 2 or 
                context.other_card:get_id() == 3 or 
                context.other_card:get_id() == 5 or 
                context.other_card:get_id() == 8 or 
                context.other_card:get_id() == 14) then
manic rune
#

...this is why i hate gyazo

#

❤️ hopping on obs for this one

minor furnace
manic rune
#

it works now

weak gate
#

Is there a way to inspect what exactly is inside the shader name's variable? E.g.
what's inside extern PRECISION vec2 ionized;?
cc @wintry solar

grim remnant
#

stupid question, how do we do that thing where you can split your .lua into multiple files and load them all individually, like what cryptid does for its /Items folder? (forget EXACTLY what that was called but we're still in the "waking up" phase of our day ^^;)

spring lantern
#

it's thankfully pretty easy to do, just add this to your main script

#

the string is the file path to the script you want to load

red flower
weak gate
#

Oh, so I can paste into the debugplus console, that helps a lot

manic rune
minor furnace
minor magnet
#

how do you stop cards that don't exist anymore from appearing in your deck after destroying them in context.individual?

worthy anchor
#

hey dumb question but: boosterpacks all have a weight of .96. if i want a booster pack to show up less (or more) do i want that number bigger or smaller? which way does which lol

manic rune
#

bigger

#

oh, i mean

#

bigger = more common

minor magnet
#

smaller means shows up less

manic rune
#

less = rarer

minor magnet
#

ye

manic rune
#

my brain is lowkey shutting down half-way because of how much time i spent on one single feature 😭

minor gyro
#

huh that's funny

SMODS.Rarity {
  key = "cursed",
  badge_colour = HEX("474931"),
  default_weight = 0.0005,
  pools = { ["Joker"] = true },
  get_weight = function(self, weight, object_type)
    return 0.0005
  end
}
manic rune
#

hmmmmmm

#

why is this the case?

wintry solar
manic rune
#

the code is correct, right?

weak gate
manic rune
#

r probably means rotation

#

while x and y are positions?

wintry solar
#

ionised.x/r is the first item in that table, .y/g is the second

manic rune
# manic rune

nevermind, i called loc_vars instead of loc_vars.vars

wintry solar
#

It’s just how you refer to the parts of the vector in the shader language

manic rune
#

💔

wintry solar
#

So the first value is to do with the rotation and tilt of the card, and the second is just a timer

weak gate
#

No one's fault but it seems that some of shader stuff is unnecessarily cryptic

spring lantern
#

okay so i'm trying to get the id of the mod that jokers added to deck are from, but i think i'm doing something idiotic instead

#

when a modded joker is added to deck it says no mod found

#

so that's not how you access the mod that a card is part of

#

problem is how

minor gyro
red flower
#

is it the joker card?

spring lantern
#

i think

red flower
#

try context.l6_joker_added.config.center.mod.id

spring lantern
#

tysm!! it works

manic rune
spring lantern
#

i'm not very good at navigating the structure of a card and where to find values yet lul

red flower
#

i just printed the card

spring lantern
normal crest
spring lantern
#

does SMODS.create_card not apply stickers on jokers by default? if so how should i do it manually?

#

i'm testing some booster packs and unless i'm getting crazy rng no stickers are being applied

#

also whoops

#

is there a way to force a perishable sticker onto a non-compatible joker

#

cos like no fucking way im gonna let this be how this joker works thats way too broken 😭

neat plover
#

how would i check if a certain card is discarded in the first dicard of round

red flower
#

G.GAME.current_round.discards_used let's you know the discards used

manic rune
#

@red flower sorry for pinging, but how do i reduce this gap?

neat plover
#

thats useful

red flower
#

probably in the column node

neat plover
tall wharf
#

hsr compat would be funny

manic rune
#

this one?

red flower
#

probably?

manic rune
#

its 0.01, so im pretty sure thats pretty low already

#

(Node2 is that small text)

manic rune
neat plover
manic rune
red flower
manic rune
#

oh sweet it works, thank

neat plover
manic rune
#

its a table, you can use a for loop to go through it

#

and see if the card you are looking for is there

red flower
#

the card is context.other_card, you don't need a loop

manic rune
#

oh

#

im reading the stuff inside {} so im assuming from there 😭

neat plover
#

oh

#

the lua syntax still doesnt get into my brain

#

but i understood

red flower
#

the way to read it is
condtion to check to see if you're inside that context if context.discard then

This is true for that context:

context = {
    cardarea = G.jokers, -- G.hand, (G.deck and G.discard optionally enabled)
    full_hand = G.hand.highlighted,
    discard = true
    other_card = G.hand.highlighted[i]
}
manic rune
#

only the small text has MASSIVE gaps somehow

#

thats odd

normal crest
#

Whatstthe entire text config

tall wharf
#

i will add hsr mod compat for some reason

manic rune
manic rune
minor furnace
#

my abomination of a card is now compatible with every single one of these jokers

normal crest
minor furnace
#

I think this feature is done now, at least to the degree I want it to be

manic rune
#

like this one, which works like literal lego since you can tell it what it should buff, and it will do just that without any other changes

runic pecan
#

Is it possible to manipulate loc text colours using something like {C:#1#}?

manic rune
#

oh, i think someone actually did that here

manic rune
minor furnace
red flower
normal crest
#

And in loc vars return a colours array inside vars

manic rune
normal crest
#

minh is set there

#

That's why

manic rune
#

oh damn.

#

yeah i figured it out now, thankz

wintry solar
#

You could attach them as the extra text for the elements above them

wintry solar
#

That would probably look cleaner

valid leaf
#

can someone help me with deckskins?

normal crest
#

Look at how the set perishable function works in card.lua

normal crest
spring lantern
normal crest
#

Yeah just manually do what set perishable does

manic rune
valid leaf
spring lantern
minor furnace
normal crest
#

vars = { colours = { ... } }

minor furnace
#

thanks 🙏

neat plover
#

is "G.GAME.current_round.discards_left" a thing?

wintry solar
normal crest
neat plover
#

cool!

wintry solar
#

You can toggle if it does or not

spring lantern
#

oh shit

normal crest
#

oh that's convenient

wintry solar
#

I love undocumented functions 🥳

paper zealot
#

All functions are documented if you just simply read the entire codebase of Lua, Love2D, Balatro, Lovely and Steamodded

proven marsh
#

hi all
I have a question about the sound files
So I am trying to edit the abientFire sounds
I changed the first one to a short song. But it still plays the other fire sounds. Any idea how they work/play? In order? Randomly? or based on ur score?

minor furnace
spring lantern
#

is there some kinda poll function for stickers?

#

cause my custom joker booster packs aint generating no stickers on gold stake

normal crest
minor furnace
normal crest
#

Uhh I'm not sure what the problem could be

#

But #2# should be #1#

red flower
normal crest
#

it should, is it insjde

#

i can't read

tepid crow
#

it is inside

minor furnace
#

I thought it was outside

tepid crow
#

brackets are hard

minor furnace
#

I think it is outside? I might literally be blind though

normal crest
#

it looks outside to me tbh

minor furnace
#

of the brackets to the right of it, one bracket is to close the return, the other one closes vars

tepid crow
#

????

red flower
#

yeah i read it wrong

minor furnace
#

I mean I could always forego the color and just change the text, but it would be nice to make it look pretty

fathom thunder
#

im gonna try this again except im just posting the entire lua file cuz idk what i could possibly be doing wrong

im trying to make a blueprint-like card that copies the ability of one of the jokers in your deck randomly at the start of a blind, works fine for cards that have a calculate_joker function but for a card like say wrathful joker it doesn't do anything, and idk what to refer to if not calculate_joker ive went through the entire balatro source code looking for anything brainstorm/blueprint related to see if i was missing something and im missing literally nothing, tried with the blueprint code straight from balatro, tried with the old blueprint code from cryptid, it's not doing anything for jokers without a calculate_joker function

neat plover
#

im love this so much

#

also first joker that took me less than a hour to make!!!

minor furnace
#

putting the formatting issue to the side for now, time to work on the Jokers for my custom enhancements

chrome widget
#

With SMODS, do jokers not receive their update function calls while in the collection?

red flower
#

just tried it, they do

foggy carbon
#

yeah, I have a joker who changes its sprite when you have a banana, and the joker does change in the collection

lucid owl
#

how are jokers with animations done? can you do that vanilla or should i try and use a separate mod/library?

minor furnace
#

I know it's in the default structure in game.lua, but does smods support enhancement_gate for custom jokers?

wintry solar
#

Yes

tepid crow
#

they do afaik

minor furnace
#

perfect

neat plover
chrome widget
#

Huh, I'm not sure why I've consistently had problems with this, then

#

I'll have to debug, weh

#

It might just be that the default rendering code for card children doesn't run in the collection

#

Okay yeah, it receives updates, but dt is considered to be 0 because the game is paused and dt is gamespeed dependent

red flower
#

does G.real_dt work?

chrome widget
#

let me try

#

Yes it does! Thank you, that's what I was missing

red flower
#

yw I remembered that a some places in my code use dt or G.real_dt or 0

orchid thunder
#

what contexts do i use for a joker like hiker?

chrome widget
#

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

#

I just implemented a joker just like that!

orchid thunder
#

i dont need anyting else?

chrome widget
#

I don't believe so, no

#

unless you mean referencing the playing card being scored itself, which is context.other_card

candid willow
#

can someone show me an example of using take_ownership in a joker?

strong jacinth
#

How do you check which cards in hand

zealous glen
#

when

candid willow
fathom thunder
foggy carbon
#

IIRC you don't do take_ownership in a joker, but you can do it on a joker

quartz ravine
#

Hi guys, I've been working on a mod for a while and have some placeholder art (Warning! I made the art with AI). I'm interested to see if anyone would like to do some art for these joker / tarot cards I've added. If I'm in the wrong place, my apologies 🙂

foggy carbon
quartz ravine
minor gyro
#

dummy dum here
I forgot how to localize the return
like, I want to make the "repetitions = 1"
Then it returns "Again!" bellow the card
I thought card = card would work

wintry solar
#

smods will handle auto messaging for you

fathom thunder
quartz ravine
#

You know, I looked at the code for blueprint and I am not sure how blueprint itself only attaches to cards with blueprint_compat, I thought it might be simple to pick a different card if one isn't compatible

#

So, @fathom thunder , looks like it isn't as easy as I thought, my bad

normal crest
#

blueprint_compat is merely a visual indicator

minor furnace
#

how funny would it be if flushes and straights could be played with one less card for every copy of four fingers you have

normal crest
#

Each card defines their blueprint behaviour by checking not context.blueprint

minor furnace
#

I need to stop having ideas like this

fathom thunder
normal crest
#

every card has a calculate joker function

fathom thunder
#

yea thats the thing i thought it wouldnt work because some didnt have one when i checked the code but it does and it should work yet it doesnt

normal crest
#

Also when using debugplus to eval you can skip the print

fathom thunder
#

i see

normal crest
fathom thunder
normal crest
#

I'm on phone

fathom thunder
#

oh i see

#

ok gimme a second

#

the entire thing besides the atlas above it

normal crest
#

you're only copying inside the joker_main context

#

So you're only coyping the joker_main effect of other jokers

fathom thunder
#

ah

normal crest
#

And you seem to have removed the setting context.blueprint and blueprint_card to nil after calling calculate

fathom thunder
#

yea

normal crest
#

If you want blueprint behavior you should literally copy the blueprint code in the base game as is

#

And the only difference would be what joker it decides to copy

fathom thunder
#

it works now tysm

#

i completely overlooked the context lmao

normal crest
#

also I wouldn't recommend saving an entire joker within your card's ability

#

that might cause issues when saving and loading a run

humble girder
#

might = will

fathom thunder
#

yeah i already ran into that so thats a thing im gonna have to fix now

humble girder
#

it either crashes on save or doesn't load properly

lucid owl
#

how do you guys version releases of mods? for a release adding 5 jokers to an existing 5, would that be a v2 type thing or a v1.1?

normal crest
#

look up semantic versioning

red flower
#

I do [major breaking changes or refactoring].[content additions].[bug fixes].[hotfixes]

normal crest
#

that's pretty much it yeah

fathom thunder
strong jacinth
#

What's the joker size again

#

I forgot

fathom thunder
#

or wait maybe i could store the index of the copied joker?

cloud anvil
#

does anyone know how to make it so a texture pack only uses a certain joker(s) instead of the entire sprite sheet?

red flower
#

I would store the index

normal crest
orchid thunder
#

why is this not patching

red flower
scarlet spire
#

I'm making a new card back, how would I remove specific cards from the deck entirely? stuff like abandoned deck seems to be hard coded with a built-in no_faces setting, but I'm not sure how i'd remove specific suits from the deck

normal crest
#

I think you can mark the copying joker with a prefixed flag in its ability

#

like other_joker.ability.modprefix_copied = true

#

and just ensure the flag is removed

#

you might still want to patch into copy_card in that case tho

#

and make sure that flag is never copied

red flower
#

how would you differentiate between different copies of the blueprint joker

#

or do they all copy the same thing? I didn't read what the ability was

normal crest
#

i guess you could go down the path of they all copy the same one

quasi dune
#

is malverk able to replace playing card textures, or do I still have to do that the old way?

normal crest
red flower
#

what about always copying the joker to the right or the leftmost joker

#

that would be really easy

fathom thunder
normal crest
#

yeah that would be easy

#

let's go with that

#

i guess you could assign a unique id to every copy of your joker at birth and then mark the copied joker with that id

red flower
#

If you don't care about the specific joker you can always store the key

grim remnant
#

stupid question but we couldn't find this anywhere in the source, is there a v:is_suit equivalent for specific ranks? we did find context.other_card:get_id() == 2 but that's not quite the same.

(for context, we're trying to make a card that, at the start of calculations, sums up the ranks of all the cards you played in-hand, a-la a blackjack.)

normal crest
#

are you summing up the chip value of the rank

grim remnant
#

not chip value, the actual rank. otherwise, hiker could influence it, and that would be no bueno.

normal crest
#

hiker's chip value is separate from the rank's chip value in the code

#

if you want to get a card's rank's chip value do card.base.nominal i believe

fathom thunder
#

what would i have to hook into to get a joker's updated index after being dragged around

#

oh i think literally just update

red flower
#

Card:release probably

grim remnant
#

out of curiosity, would this even be something worth making a for loop for, or is there a far easier way to sum up the results of card.base.nominal from the scored cards?

normal crest
#

i don't know how you'd make that easier but

#

it's not worth thinking about

#

at least not until it's a finished joker

#

premature optimization and all that

strong jacinth
#

Idk if it counts as modding but is tjere any code difference between balatro on windows vs android

normal crest
#

i know android doesn't have the buy buttons on the cards and stuff

scarlet spire
normal crest
#

and you need to drag them to a certain area

frosty dock
normal crest
#

you can remove the cards you want manually

orchid thunder
#

anyone know how i can add perm xmult

normal crest
#

just make sure to properly remove them so that you don't generate ghost cards

proven marsh
#

sup

#

any1 know how the ambientfire sound works

autumn coral
#

what do y'all use for testing shaders

proven marsh
#

im trying to replace it but i want to know in what order it plays

weak gate
#

what's this pool_opts.allow_duplicates in smods? it doesn't seem to be actually used anywhere other than in this lovely patch in smods

normal crest
#

that is something you can return as the second value on your in_pool function

#

it will dictate if multiple copies of it can exist at the same time

frosty dock
#

it makes the card act as though showman were always present

#

i.e. multiple copies of it can exist at the same time naturally

grim remnant
#

we're 100% checking for rank & incrementing our sum variable wrong, played 3 5s and it returned 0 when it should be 15. (as of right now, it's not checking other cards, but that's on purpose until we can get it properly incrementing.) what're we doing wrong here?

wintry solar
#

you don't have a context.other_card there

weak gate
#
version = "1.0.0"
dump_lua = true
priority = 10

#Letting the hordedeck give repeated pokemon; smods also changes this line
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = 'elseif not (G.GAME.used_jokers[v.key] and not pool_opts.allow_duplicates and not next(find_joker("Showman"))) and'
position = "at"
payload = '''
elseif not (G.GAME.used_jokers[v.key] and not pool_opts.allow_duplicates and not next(find_joker("Showman")) and not G.GAME.selected_back.name == "hordedeck") and
'''
match_indent = true

a few testers believe they've seen repeated pokémon in any deck when using my mod. I'm not sure how... but it's a somewhat confusing code, what with the double negations

grim remnant
wintry solar
#

no it doesn't exist

autumn coral
#

no but actually tho i'd love like a tool to test a card shader

wintry solar
grim remnant
#

if context.other_card:get_id() == 5 then sum = sum + 5 end --shamelessly copied from Hack (doesn't seem to work?) ?????

wintry solar
#

context.other_card is not a thing in joker_main

grim remnant
#

oh. that makes substantially more sense.

weak gate
#

yep, in debugplus watch shader Mods/MyMod/Assets/Shaders/myshader.fs(unless the location is very different for your mod)

wintry solar
autumn coral
#

just in the console?

wintry solar
#

please please please familiarize yourself with this document

autumn coral
#

for a second i thought u were talking to me

#

😭

normal crest
wintry solar
#

the shader stuff yeah you just throw it in the dbp console

autumn coral
#

oh ok sweet

#

no yea i meant the calculate stuff

#

how do i apply the shader to a card btw by default

wintry solar
#

you have to patch Card:draw

#

well actually that depends on if it's just one card or not

autumn coral
#

like for this specific joker

#

yea

wintry solar
#

you can give it a draw function in your definition

autumn coral
#

oh?

#

uh

#

are there examples

#

sorry i don't fw shaders often lmao

wintry solar
#
draw = function(self, card, layer)
        card.children.center:draw_shader('voucher',nil, card.ARGS.send_to_shader)
    end
#

like this

autumn coral
#

if my shader was called tmtrainer would i have to import it somewhere as well i'm assuming?

wintry solar
#

replace voucher with your shader key

autumn coral
#

do i import it at a high level

#

like main script

#

sorry if this is a stupid question

wintry solar
#

you use SMODS.Shader

autumn coral
#

ah

wintry solar
#

I think the docs for it are on the edition page

autumn coral
#

crying i love when things are undocumented

#

cool

#

i see it

#

thanks

grim remnant
#

okay. since other_card isn't an option in joker_main, what is an option for tallying the card.base.nominal values of the cards played in the hand? tried scoring_hand and it didn't do anything, which. we assume that's tied to the type of hand played, so, that makes sense.

normal crest
#

scoring_hand is a list of scored cards

grim remnant
#

wait, that would be like, the thing to check then, wouldn't it?

shadow rapids
autumn coral
#

there is a nonzero chance i fucked this up but like

normal crest
#

yeah I got that same thing when I did watch shader, but it was after I clicked a button

#

no idea what it's about

autumn coral
#

no i haven't even done anything yet

#

i defined it and put the draw function in

normal crest
#

What's your shader definition and draw function

autumn coral
#

nah i think i got it

#

uh

#

nope

#

this shit is flying directly over mty head into the twin towers

grim remnant
#

ohhh... 9/11... /ref

autumn coral
wintry solar
#

you need your mod prefix

autumn coral
#

oh

#

on which one

wintry solar
#

the draw

autumn coral
#

the draw isn't the problem- i already did that

wintry solar
#

oh

autumn coral
#

i mean i could try again

wintry solar
#

the path needs the file extension

grim remnant
autumn coral
#

that's the opposite of what the wiki says

#

but i'll do it

#

wiki is stupid

#

thanks

wintry solar
# grim remnant wait, why not?

because you can do it all in joker_main, there's absolutely no need to use the individual context, you aren't affecting cards individually

wintry solar
autumn coral
#

yeah

normal crest
grim remnant
#

wait, isn't that the entire goal? since the plan is to sum together every scored card in the hand according to blackjack scoring. (obviously, once the hand is done, the sum is then reset to 0, as otherwise that'd be. confusing.)

normal crest
#

if you want to consider repetitions sure

grim remnant
#

like, including retriggers?

normal crest
#

yes

grim remnant
#

honestly making it so retriggers count for this would be so astronomically stupid that it kinda overflows back into being hilarious. smuggling a score of 20 by playing a 5OAK of red seal 2s.

normal crest
#

and that's exactly why you don't want to use context.individual

#

just count it in joker_main by looping through scoring_hand like you initially thought

orchid thunder
#

Why is this not working i dont understand

grim remnant
normal crest
#

If you want retriggers to count use context.individual

autumn coral
#

oh my god shaders make my head want to explode

#

what the fuck is this shit

scarlet spire
#

shouldn't this give a random suit from smods.suits?

#

I'm trying to randomize the suits of all remaining cards, but not the ranks

hot island
#

im sure theres somewhere else i can find this information but is anything actually random in this game? like if i played the same way on the same seed with everything unlocked on both devices would it always turn out the same way or are there some fully random things

normal crest
scarlet spire
#

doesn't crash, console spits out this

normal crest
#

Ah

scarlet spire
#

suits are weird, and I'm not sure what's up with the ranks because it should be one of each rank

whole hornet
#

i finally got my mod to work and have been working hard on it. but now im a little stuck

normal crest
whole hornet
#

is there a way to see what the next card in the deck will be?

normal crest
#

you need to access the key of the suit

whole hornet
#

the key?

normal crest
#

I was replying to Wheat, idk how to do what you're asking

whole hornet
#

oh, darn

normal crest
#

I heard someone mention a mod that does that already

whole hornet
#

im probably going to have to look through the source code then

hot island
whole hornet
#

i would love to see how they did it

normal crest
#

Oh nvm it was misprint yeah

scarlet spire
#

oh yeah I was just about to say, look into what misprint does

whole hornet
#

im such an idiot, i can use misprint lol

normal crest
#

That's easier than I thought

whole hornet
#

fr

#

i wonder if i can see if it has any modifiers on it or not.

#

ill figure it out

#

ill just put the value into a variable and use that

hot island
#

G.deck.cards[#G.deck.cards].ability.effect?

scarlet spire
keen coral
#

currently trying to replicate Midas Mask's "played face cards become gold" except make the cards wild. referencing Midas Mask's function, i see v:set_ability(G.P_CENTERS.m_gold) . there is no version of G.P_CENTERS.m_ that accounts for wild cards. will i have to create a G.P_CENTERS myself within the function, or is there a simpler way to make a card change its enhancement when played?

hot island
#

m_wild?

whole hornet
#

is there a way to run a test with the joker im working on?

plush cove
whole hornet
#

is that a mod

normal crest
#

yes

plush cove
#

Yep

whole hornet
#

pog ill look for it

autumn coral
#

oh dude i'm going to overdose on painkillers before i get a single shader done

#

i'm gonna take a break from this for a bit lmao

keen coral
# hot island m_wild?

there is no m_wild unfortunately :( ateast not when ctrl + f 'ing for it in the game's source code.

hot island
#

there definitely is

#

i ctrl+fed through the source and found it there

#

well ctrl+shift+f

#

through the full source

plush cove
keen coral
#

LMFAO rly?? no way, lemme try again

grim remnant
#

okay, that's confusing. for whatever reason, when multiple different ranks are being calculated, like a full house or a straight, the math sometimes just does not math correctly. for instance, a full house of 2 9s and 3 7s, which should be 39, totalled to 35. what the heck are we doing wrong here?

aside from. y'know. The Obvious Optimization Issue, but we're trying to get it functioning first.

keen coral
plush cove
#

Mods -> lovely -> dump

hot island
#

game.lua 649

#

in the normal game source

normal crest
keen coral
hot island
#

it is in the base game

normal crest
#

in game.lua

keen coral
#

ah, must be misunderstanding what G.P_CENTERS does then. ok, ty!

#

def gotta move to the dump, that'd make this way easier LOL

plush cove
normal crest
#

So essentially, your sum will be the last scoring card's value multiplied by the amount of played cards

normal crest
grim remnant
normal crest
#

yes read the explanation above

plush cove
normal crest
#

that'd be the chip value of the rank

plush cove
normal crest
#

yeah, ideally you also check if it actually has a rank

grim remnant
# normal crest yes read the explanation above

we mean, it's still doing that even after removing the "sum = 0" line altogether, unless it's doing that because of the declaration of the local variable "sum"? (also sorry we haven't inserted the one elseif replacement, we're trying to figure out this first)

normal crest
#

once again, context.individual is called once for every scoring card (retriggers included)

#

i don't want to just give you the answer, just try to understand what's going on

languid rune
#

Hey all! So I'm making a mod and just winging stuff by reverse enginerring the balala code. Are there SMOD docs and is there a way to lint using the SMOD classes n stuff for type hints?

#

Cuz I'm boutta 'splode

normal crest
#

there is a wiki in the github repo for SMODS, as for type hints... you won't get any unfortunately

languid rune
#

😭

plush cove
normal crest
#

oh?

#

maybe look at that then

#

i wasn't aware

languid rune
plush cove
#

ofc the SMODS version isn't up to date, but I just downloaded the lsp_defs folder and put it into my version

#

(although workspace.disable should be diagnostics.disable)

edgy reef
#

whoops

grim remnant
# normal crest i don't want to just give you the answer, just try to understand what's going on

we mean, the answer is obvious, remove the local sum = 0 step and put it elsewhere, since putting it in if context.individual and context.cardarea == G.play then means it's constantly setting sum = 0, right? but then, where exactly do we put it?

we tried removing the sum local variable and just using card.ability.extra.sum, which does MOSTLY work... but now, it doesn't actually properly reset the value at all, so it just increments forever; even with a card.ability.extra.sum = 0 call at the very end of scoring. what's up with that??

normal crest
#

okay it looks like you basically got it

grim remnant
#

wait is that meant to go out of the return

normal crest
#

before returning, save what the sum is in another local variable

grim remnant
#

(the card.ability.extra.sum = 0 i mean)

normal crest
#

then set the card's one to 0

whole hornet
#

so im looking through the code, and sorry im new to this. what does cost_mult do?

normal crest
#

No idea

#

do you need it for something

whole hornet
#

nope

#

just wondering

#

trying to get a joker to just add mult

normal crest
#

What do you have so far?

whole hornet
#

kinda basic but im teaching my self as i go

#
    key = 'Clint', --atlas key
    path = 'clint_joker.png', --atlas' path in (yourMod)/assets/1x or (yourMod)/assets/2x
    px = 69, --width of one card
    py = 93 -- height of one card
  }
  
  SMODS.Joker{
      key = 'Clint',
      loc_txt = {
          name = 'Clint Eastwood',
          text = {
            'Gain {C:red}Mult{} equal to the {C:blue}value{}',
            "of the next {C:attention}card{} in the deck.",
            "{s:0.7}''The future is coming on,",
            "{s:0.7}It's coming on, it's coming on''"
              } 
      },
      atlas = 'Clint',
      pos = {x = 0, y = 0},
      effect = "Mult",
      cost_mult = 1.0,
      config = { extra = 
        {
          mult = (G.deck and G.deck.cards[1] and G.deck.cards[#G.deck.cards].base.id or 11),
        }
       },
      loc_vars = function(self,info_queue,center)
        return {vars = center.ability.extra.mult}
      end,
      calculate = function(self,card,context)
        if context.joker_main then
          return {
            card = card,
            mult_mod = card.ability.extra.mult,
            message = '+' .. card.ability.extra.mult,
            color = G.C.MULT
          }
        end
      end
     }
#

i got it to do Xmult

#

but i realized i wanted to do just normal mult

normal crest
#

all you have to do to give mult, xmult, chips, xchips, or money is

whole hornet
#

yeah

#

im close

normal crest
#

return { mult = x } where x is whatever you want