#💻・modding-dev

1 messages · Page 400 of 1

sonic cedar
#

no

#

can i see your mod_dir variable

keen loom
#

where do i find that?

sonic cedar
#

?

#

do you not

#

have it with your file loading

#

something like this (it's mod_path here but it should be fine)

paper zealot
#

Is cookierun_teams declared in the main file before you run this? If not, it might just be an issue of the files being loaded out-of-order, where the file using the table is loading before the one declaring it

sonic cedar
#

that too

keen loom
sonic cedar
#

ok cool

#

so yeah try breeze's thing because the code itself looks fine?

#

order is important

paper zealot
#

It's also good practice to name global variables with an Uppercase first letter for clarity

keen loom
paper zealot
sonic cedar
#

you could also maybe turn your file load into a folder load function? just to make things easier in the long run

keen loom
ancient plinth
#

I am working on making a joker that's a combination of Invisible Joker and Ectoplasm (minus the hand size reduction), how is this so far?

ancient plinth
daring fern
paper zealot
sonic cedar
#

the triple is crazy

vale plinth
#

bump :p

sonic cedar
#

invis NEEDS that

ancient plinth
sonic cedar
#

just put what you have already within a function

#

example

ancient plinth
keen loom
sonic cedar
#

loc_vars is just your localization variables (go figure). you use it instead of loc_txt, in which you'll need a separate localization file

ancient plinth
#

I am confused ngl

sonic cedar
#

ok so

hardy viper
#

i think for the main platforms (mac/windows) the only differences are with case sensitivity

bold sleet
#

-# are they trying to load different files from their mod?

#

-# if so, I may know a method to ensure they laod in the same order always

hardy viper
#

tbh smods should have a load folder function that loads everything in the same order on every platform

red flower
#

the method is to order the load_files in the correct order

sonic cedar
# ancient plinth I am confused ngl

say i had this

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

that "vars" bit is connected to the values you put in your config table
in this case

config = { extra = { mult = 4 }, },
pulsar radish
#

Good morning, how can I start modifying balatro?

bold sleet
#

what if...

#

you like, do just that?

red flower
#

👍

bold sleet
red flower
#

why

bold sleet
#

idk, looks slightly cleaner?

#

or idk

red flower
#

there's literally no difference when ctrl c ctrl v exists

sonic cedar
#

np

bold sleet
#

In any case, you can do both approaches.

#

And files will be loaded in the same order every time.

#

also I eat for loops for lunch every day

turbid maple
#

im not putting dependencies in an array and iterating over them just to import them why would i do that

red flower
#

what about

bold sleet
#

fnui

turbid maple
#

umm.. DRY? have asl prepend src/ to the path then ill be happy

primal robin
#

import

sonic cedar
#

N' did you do vr invis yet or nah

red flower
#

like invisible joker?

sonic cedar
#

yeah

red flower
#

yes all jokers are done

sonic cedar
#

they want to comb-FR?

#

goated

keen loom
#

crash again...

            for i = 1, #COOKIE_TEAMS{brave_team} do
                if #COOKIE_TEAMS{brave_team}[i] == context.other_joker then
                    return {
                        xmult = card.ability.extra.xmult
                    }
                end
            end
        end```
primal robin
#

what a weird brackets

sonic cedar
daring fern
wintry solar
#

it should actually be .

sonic cedar
#

i was about to say

wintry solar
#

or a string inside the brackets

keen loom
#

so either #COOKIE_TEAMS.brave_team or #COOKIE_TEAMS{"brave_team"}?

red flower
#

#COOKIE_TEAMS["brave_team"]

ancient plinth
#

How do I fix the error?

#

Nvm

#

I just had to delete the brackets

#

Aside from the brackets, how does it look?

sonic cedar
sonic cedar
#
loc_vars = function(self, info_queue, card)
  --stuff
end
keen loom
#

ok, so the third part isn't really working. it is supposed to give x0.2 mult when a card in that list scores

sonic cedar
#

does it crash

keen loom
red flower
#

is the list a list of keys?

vale plinth
#

i have no clue what im doing 😭 this infinitely makes the sound of enhancing a card (softlock)

red flower
#

oh also post_joker doesn't have other_joker?

sonic cedar
#

it does not

keen loom
sonic cedar
red flower
#

i would change that post_joker for other_joker and then you need to check context.other_joker.config.center.original_key

#

i think its original_key

sonic cedar
#

post_joker is for after scoring

#

while other_joker is probably what you're looking for

paper zealot
red flower
#

that too yeah

sonic cedar
#

i forgot to go back and look at that

keen loom
sonic cedar
#

ic

ancient plinth
keen loom
#

i want the xmult to happen when the other joker scores

sonic cedar
#

bump

wintry solar
#

thats post_trigger

sonic cedar
sonic cedar
#

you wont need the draw function or the unlock check

ancient plinth
placid star
#

jarvis why do so many of my ideas make me implement new card areas

ancient plinth
#

Thx

keen loom
sonic cedar
# sonic cedar bump

so how am i supposed to check if the ante is at least 3 if doing G.GAME.round_resets_ante >= 3 crashes it

sonic cedar
keen loom
sonic cedar
#

What’s it look like

placid star
#

this works for any domain cards, yet i cant get a use button on todo, is it because hes a joker and CANT?

plain gazelle
#

I want to test my joker, but hovering above it in collection and pressing 3 does not spawn it for some reason?

sonic cedar
normal crest
plain gazelle
#

thanks

normal crest
#

lol np

sonic cedar
#

this is why we use placeholders pensiveclown_cc

rustic atlas
#

hi! is there a way to get all the base game jokers 'calculate function', in a joker calculate - so for example: a joker that has the effect of other random joker every hand played

sonic cedar
#

this might be set_ability shenanigans

keen loom
#

i just notice that the joker calculates weirdly

daring fern
rapid stag
#

bump

rustic atlas
daring fern
daring fern
rapid stag
daring fern
rapid stag
placid star
#

does anyone have a joker with a use button i could peek at in their mod?

rapid stag
#

it's definitely something with event manager

#

i was only able to get this to reproduce properly after setting up the events like that

#

which suggests that the events are displacing the retrigger message

snow vale
#

how can i destroy every card from the hearts suit?

#

(with a joker)

daring fern
daring fern
snow vale
#

btw the destroyed cards are the played ones

rapid stag
rapid stag
#

actually, why am i doing that in the func cirLost i can just do it before it

#

nvm, pebkac

slow brook
#

how do i check how many cards have been discarded in a blind?

daring fern
slow brook
placid star
#

these dont show up in the shop, any ideas?

tawdry shale
#

do you guys know how to check if the game is currently in the shop? this isn't anything joker related

daring fern
summer flume
#

how would I "get rid of" a vanilla suit? part of the mod i'm making replaces the 4 vanilla suits with 6 of my own
i know it has something to do with taking control of it, maybe?

#

i want it to not show up at all here

daring fern
summer flume
#

ah, thank you!

vale plinth
#

can someone explain why this doesnt work

scarlet thorn
daring fern
vale plinth
#

how do i then do it

daring fern
vale plinth
#

all jokers in the shop are negative

scarlet thorn
#

Make everything eternal and negative by the looks of it

vale plinth
#

yeah

daring fern
vale plinth
#

i was starting with just jokers, but i do want everything yes

#

the negative playing cards do work

plain gazelle
#

is there a way to get a joker's price in shop?

daring fern
# vale plinth the negative playing cards do work

You need something like this in your file: ```lua
local oldcardareainit = CardArea.init
function CardArea:init(X, Y, W, H, config)
local r = oldcardareainit(self, X, Y, W, H, config)
if not config.temporary and not config.collection then
mod.all_card_areas = mod.all_card_areas or {}
table.insert(mod.all_card_areas, self)
end
return r
end

daring fern
plain gazelle
#

thanks

daring fern
# vale plinth my god

Then hook update and check for the deck and put this in there: ```lua
for k, v in pairs(mod.all_card_areas) do
if (type(v) == "table" and v.cards and type(v.cards) == "table") then
for k, v in pairs(v.cards) do
if not (v.edition and v.edition.negative) then
v:set_edition("e_negative", true, true)
end
end
end
end

vale plinth
#

so what does the first code do

#

im very new to this sorry

daring fern
vale plinth
#

ohhhhh

slow brook
#

is there a context for discarding?

vale plinth
#

and the first code before the event?

daring fern
daring fern
daring fern
vale plinth
summer flume
daring fern
summer flume
#

ah, a type

#

typo

#

silly me

sonic cedar
#

hell yeah

slow brook
#

how do i check what poker hand was discarded?

turbid maple
daring fern
turbid maple
#

i forgot what the functions called but theres one that calculates poker hands contained in a set of cards

sturdy flower
vale plinth
#

how do i then make an update hook

daring fern
daring fern
# vale plinth how do i then make an update hook
local oldupdate = Card.update
function Card:update(dt)
    for k, v in pairs(mod.all_card_areas) do
        if (type(v) == "table" and v.cards and type(v.cards) == "table") then
            for k, v in pairs(v.cards) do
                if not (v.edition and v.edition.negative) then
                    v:set_edition("e_negative", true, true)
                end
            end
        end
    end
    return oldupdate(self, dt)
end
sonic cedar
#

is there a way to affect all probability at once?

#

oh my god im stupid

#

oa6

vale plinth
#

oa6

sonic cedar
vale plinth
#

oops is goated

daring fern
vale plinth
#

thanks

#

lemme try

keen totem
#

so idk what i did

#

but retriggers dont happen anymore

#

not from base game cards, not from cards from other mods, and i dont even have any that do that

#

retriggers have been removed from my copy of balala

#

chad doesnt work

#

its a base game card

#

HOW

vale plinth
keen totem
#

somehow my mod managed to turn off retriggers

#

and i have no idea what the hell i did

vale plinth
#

thats impressive

keen totem
#

it doesnt make any sense

daring fern
keen totem
#

how the hell did i manage to break a base game card

daring fern
vale plinth
keen totem
#

yes

#

i dont know how

vale plinth
daring fern
keen totem
#

what the fuck

vale plinth
placid star
#

can jokers debuff your playing cards?

keen totem
#

yes

#

look at cryptid's mask joker

#

so i figured out what happened

#

well

#

whats causing it

#

not why

vale plinth
limber obsidian
#

Whats the card size again for 1x and 2x?

keen totem
#

local scie = SMODS.calculate_individual_effect
function SMODS.calculate_individual_effect(effect, scored_card, key, amount, from_edition)
    local ret = scie(effect, scored_card, key, amount, from_edition)
    if
        (
            key == "x_mult"
            or key == "xmult"
            or key == "Xmult"
            or key == "x_mult_mod"
            or key == "xmult_mod"
            or key == "Xmult_mod"
        )
        and amount ~= 1
        and mult
    then
        if next(SMODS.find_card("j_CGN_RedJoker", false))then
            for i,v in ipairs(SMODS.find_card("j_CGN_RedJoker", false)) do
                v.ability.extra.mult = v.ability.extra.mult + v.ability.extra.scaling
                SMODS.calculate_effect({message="+"..v.ability.extra.scaling.." Mult",colour = G.C.MULT}, v)
            end
        end
    end
end

somehow this managed to turn off hanging chad and all retriggering of playing cards

keen totem
daring fern
keen totem
#

and for 2x its just double that

limber obsidian
#

Aight

keen totem
vale plinth
#

also thanks for this

keen totem
#

so at the end of everything just put
return ret

daring fern
# vale plinth also thanks for this
local oldupdate = Card.update
function Card:update(dt)
    if mod.all_card_areas then
        for k, v in pairs(mod.all_card_areas) do
            if (type(v) == "table" and v.cards and type(v.cards) == "table") then
                for k, v in pairs(v.cards) do
                    if not (v.edition and v.edition.negative) then
                        v:set_edition("e_negative", true, true)
                    end
                end
            end
        end
    end
    return oldupdate(self, dt)
end
placid star
keen totem
#

idk

#

i just know that cryptid does it

red flower
placid star
#

but idk what to use to calculate the debuff since i cant use context

red flower
#

what are you trying to do?

#

debuff_hand is to prevent the hand from being played

placid star
#

im tryna debuff anything that doesnt contain a flush

vale plinth
red flower
#

yeah you can use that

sonic cedar
#

patterns should always be one line in patches right

red flower
#

no there can be multiple lines

sonic cedar
#

oh cool now i dont have to worr

#

y

#

do i just press enter

daring fern
red flower
placid star
vale plinth
sonic cedar
daring fern
# vale plinth wdym
local oldupdate = Card.update
function Card:update(dt)
    if mod.all_card_areas and G.GAME and G.GAME.selected_back and G.GAME.selected_back.effect and G.GAME.selected_back.effect.center and G.GAME.selected_back.effect.center.key == "b_prefix_key" then
        for k, v in pairs(mod.all_card_areas) do
            if (type(v) == "table" and v.cards and type(v.cards) == "table") then
                for k, v in pairs(v.cards) do
                    if not (v.edition and v.edition.negative) then
                        v:set_edition("e_negative", true, true)
                    end
                end
            end
        end
    end
    return oldupdate(self, dt)
end
keen totem
red flower
vale plinth
#

ohhhh

placid star
red flower
placid star
#

jonker

red flower
#

jokers dont have a debuff_hand function

#

use the context

keen totem
#

you could just put it all on a single line

#

you just have to be really good with figuring out the syntax

placid star
red flower
#

but what does that have to do with their question

rapid stag
#

this fixes on quitting to menu and loading the run again, but when invisible joker creates a custom joker, it switches to the default atlas and not the custom joker's? cirLost is this a known thing with the current steamodded build or

keen totem
sonic cedar
#

no wait

#

im using multiline formatting

#

that's a single line

#

no wait cause

#

huh

spice wadi
#

im writing a library mod currently, how can i easily get the mod thats calling my function without passing the mod as an argument

placid star
vale plinth
red flower
sonic cedar
daring fern
red flower
vale plinth
red flower
#

instead of the ' inside the pattern

sonic cedar
#

oh ok

spice wadi
sonic cedar
#

ohhh

red flower
#
'''
 if the pattern uses \'quotes\' you escape them
'''
sonic cedar
#

in the reference pattern im putting \ behind each qu-yeahhh

red flower
#

i think thats the problem at least

sonic cedar
#

and that's only a multiline issue right

#

cause the above patch has those but it's single line

red flower
#

it's an issue of using the same type of quote around the pattern and inside the pattern

placid star
red flower
#

with a single line you might need to escape ' or " too

red flower
vale plinth
#

just negative also didnt work

red flower
vale plinth
#

which is the key

sonic cedar
#

ofc

sonic cedar
# red flower uhhh can you copy it here
[[patches]]
[patches.pattern]
match_indent = true
times = 1
target = "card.lua"
pattern = '''
    if self.ability.name == \'Ectoplasm\' or self.ability.name == \'Hex\' or pseudorandom(\'wheel_of_fortune\') < G.GAME.probabilities.normal/self.ability.extra then 
        G.E_MANAGER:add_event(Event({trigger = \'after\', delay = 0.4, func = function()
'"
position = "after"
payload = '''
    G.GAME.chudhit = G.GAME.chudhit + 1
'''
red flower
#

also i lied you dont need to escape them lol

daring fern
sonic cedar
#

but im just trying stuff

red flower
#

thats a double qoute

#

quote

#

it shouldnt be

sonic cedar
#

no way i put a double quote

#

are we fr

#

oml

#

hopefully it works though

vale plinth
plush depot
#

sorry to bother anyone but can someone teach (tell) me how to make my joker have X-2 mult

red flower
#

you can probably just return { xmult = -2 } but idk

#

question: the game doesnt keep track of hands contained in hands played, right?

plush depot
primal robin
#

WAIT

#

Can we run Balatro on OpenComputers?

red flower
plush depot
#

ok

rapid stag
#

question, is the function in a joker return table evaluated before calculate_seal()?

rapid stag
#

the function comes after? or calculate_seal

vale plinth
plush depot
#

why is it red

vale plinth
#

cause its evil

plush depot
daring fern
plush depot
#

uh

daring fern
plush depot
#

ok

daring fern
plush depot
daring fern
plush depot
#

i just changed it to main.lua and now this is it

daring fern
plush depot
#

...how do i do that?

#

i dont know anyhting

daring fern
plush depot
#

i know that but like what do i do to change it

daring fern
plush depot
#

um

#

its not showing rename

#

😔

daring fern
summer flume
#

suit symbols are showing up correctly in View Deck but not on hover?

#

any obvious mistakes?

upper onyx
#

can someone help me understand this code? its from cryptid (specifically the old blueprint joker), and im trying to use it as reference for a blueprint-like joker im making, but i dont understand how context.blueprint and context.blueprint_card work:

context.blueprint = (context.blueprint and (context.blueprint + 1)) or 1
context.blueprint_card = context.blueprint_card or card

if context.blueprint > #G.jokers.cards + 1 then
    return
end
daring fern
upper onyx
daring fern
scarlet imp
#

is there a way I can just straight up access the amount of chips and mult currently in my score?
like context.current_chips or something like that

gentle rain
#

this should set every hand's base chips to 1, right? it doesnt seem to be doing anything though

#

card.ability.extra.savedchips[i] is to save the number of chips to be restored later

gentle rain
#

nvm solved

scarlet imp
normal crest
#

a global variable

#

two global variables

scarlet imp
#

I see, thanks

scarlet imp
#

does Debug-Plus have a command that levels up hands?

#

or do I need to do it manually with cards

upper onyx
#

how do i get a jokers key?

scarlet imp
#

joker.config.center_key

shut crater
wintry basin
plush depot
#

it wont change from .json

sonic cedar
#

Why are you putting jokers in a metadata file

vale plinth
#

Hes trying to make it lua

#

Save as and then lua

sonic cedar
#

the

#

The metadata file?

vale plinth
#

I think so

shut crater
sonic cedar
#

Why?????

plush depot
#

im slow

#

oops

shut crater
#

I believe he saved his main file as a json instead of lua

sonic cedar
#

ok but theres literally metadata in it

shut crater
#

oh yeah look at that

plush depot
#

yeah i uh

shut crater
#

so yeah you need two separate files

plush depot
#

i opened the wrong file 😭

sonic cedar
#

just make a lua file dawg 😭

#

you need that json file

shut crater
#

your metadata should be a json with all the metadata stuff, your main file should be a lua file with all your mod code

plush depot
#

i made a new file

#

i was being a little slow

scarlet imp
#

anyone know how to count seconds spent in an Ante?

shut crater
#

and then at some point you should probably also make a localization file, but let's take this one step at a time

scarlet imp
#

just a regular old time function?

faint yacht
vale plinth
#

What is the json file necessary for?

plush depot
#

making the mod the mod

#

i think

shut crater
#

it makes sure smods recognizes your mod files, yeah

sonic cedar
#

stores all the information about your mod and so smods can re—yeah

shut crater
#

and loads all the correct data associated with your mod, like the version and creator and all that stuff

vale plinth
#

Ohhh but you can also do it in a lua file

#

Written differently

shut crater
#

yes, but they strongly encourage the json file method

vale plinth
#

How come?

shut crater
#

excellent question, I don't know but I trust programmers to have valid reasons for things

#

the smods folks kinda know what they're doing

vale plinth
#

Thats fair

#

Thanks

plush depot
#

someone help idk what it wants

vale glen
#

JSON is portable and standard in lots of web software, so it's easier to maintain since it's more about library calls than custom code. Dunno what format the legacy stuff is in, but it seems to be custom. Might be wrong though.

plush depot
#

oops wron file

vale plinth
#

Lol

plush depot
vale glen
#

The less code one is responsible for and has to maintain (while still keeping the same functionality), the better the code is.

vale plinth
#

Okay thank you

#

Ohhhh

vale plinth
plush depot
#

yes

frosty rampart
#

you need a comma after the bracket that closes the loc_txt

#

oh and you need it after the key and path in your atlas too

#

(you have a typo in your loc_txt too, it should be X:mult with an l instead of a k)

scarlet imp
#
calculate = function(self, card, context)
        if context.end_of_round and not context.game_over and G.GAME.last_blind and G.GAME.last_blind.boss then
            card.ability.extra.time = os.clock()
            return {
                message = localize("k_reset"),
                colour = "G.C.BLUE"
            }
        end
        local seconds =  math.floor(os.clock() - card.ability.extra.time)
        card.ability.extra.chips = math.max(0, math.floor(card.ability.extra.chips - seconds * card.ability.extra.subtract))
        if context.joker_main then
            return {
                chips = card.ability.extra.chips
            }
        end
    end

supposed to count seconds (with I thought I accounted for with the math.floor) but I think its counting nanoseconds since the value is always 0

vagrant grail
sonic cedar
#

is there a way to print G.GAME.probabilities in the console

shut crater
#

print(tprint(G.GAME.probabilities))

#

or print(inspect(G.GAME.probabilities))

sonic cedar
normal crest
#

or just open the console and type eval G.GAME.probabilities

shut crater
shut crater
#

the same way you installed the other 17 mods

sonic cedar
#

i didnt even see the dependency error

shut crater
sonic cedar
wind steppe
#

is this balanced

sonic cedar
#

pretty sure that's jimbo but ok

scarlet imp
#

make sure it can't go below 0, but yeah I'd say so

wind steppe
scarlet imp
#

pairs super well with vagabond

wind steppe
ancient plinth
#

How should I go about inserting the ectoplasm code into this joker I am trying to make?

#

The joker is a combination of Invis and Ectoplasm btw, you sell it after 3 rounds to give a random editionless joker negative

shut crater
vagrant grail
shut crater
plush depot
#

is there a way to change the tag color of the thing that says "Free Diddy"? (its the display name for the mod not just a badge)

scarlet imp
#

nahh

#

insane joker

plush depot
#

yeah

#

but is there a way

wind steppe
#

yes

plush depot
#

🙏

#

tell

wind steppe
ancient plinth
wind steppe
ancient plinth
#

At the mod name

wind steppe
#

oh

#

no we're not

ancient plinth
#

Understandable

plush depot
#

that was placeholder

plush depot
ancient plinth
plush depot
#

ok

#

its now "Jimmy B Mod"

shut crater
frosty rampart
#

no i think they want it to act like ectoplasm when you sell the joker (i.e. it gives negative to a random editionless joker you already own)

shut crater
#

ah I see

wind steppe
#

(just for the joker)

keen loom
#

why am i receiving a nil value error?

        info_queue[#info_queue+1] = { set = "Other", key = "brave_effect" }
        info_queue[#info_queue+1] = { set = "Other", key = "element_earth" }
        local xmult_count = 0
        local count = 0
        if G.jokers then
            for i = 1, #G.jokers.cards do
                if (G.jokers.cards[i].config.center.rarity == "CRB_common") and (G.jokers.cards[i] ~= card) then
                    count = count + 1
                end
                for j = 1, #COOKIE_TEAMS.brave_team do
                    if (string.find(G.jokers.cards[i].label, COOKIE_TEAMS.brave_team[j]) ~= 0) and (G.jokers.cards[i] ~= card) then
                        xmult_count = xmult_count + 0.2
                    end
                end
            end
        end
        return { vars = { card.ability.extra.mult, card.ability.extra.mult + (card.ability.extra.bonus * count), card.ability.extra.xmult + xmult_count }}
    end,
}```
ancient plinth
plush depot
#

it didnt wokr

wind steppe
#

should be line 136 onward

keen loom
plush depot
#

what

ancient plinth
wind steppe
#

your joker

#

ecto is freely available on vanillaremade

keen loom
plush depot
#

ok

#

my jokers gone now

#

i dont think either of us are right

shut crater
ancient plinth
sonic cedar
#

it worked evil_plotting

keen loom
scarlet imp
#

how does it increment? just want to know to make sure the calcs are done correctly

shut crater
ancient plinth
# ancient plinth

Btw the dark edition text color doesn't work, so let me know if you figure out what's wrong

plush depot
keen loom
# plush depot

oh, it's in a different format i'm not used to, my bad

plush depot
#

ur good

wind steppe
# ancient plinth

replace

local jokers = {}
            for i = 1, #G.jokers.cards do
                if G.jokers.cards[i] ~= card then
                    jokers[#jokers + 1] = G.jokers.cards[i]
                end
            end
            if #jokers > 0 then
                if #G.jokers.cards <= G.jokers.config.card_limit then
                    local chosen_joker = pseudorandom_element(jokers, pseudoseed('vremade_productgoo'))
                    local copied_joker = copy_card(chosen_joker, nil, nil, nil,
                        chosen_joker.edition and chosen_joker.edition.negative)
                    copied_joker:add_to_deck()
                    G.jokers:emplace(copied_joker)
                    return { message = localize('k_duplicated_ex') }
                else
                    return { message = localize('k_no_room_ex') }
                end
            else
                return { message = localize('k_no_other_jokers') }
            end

with (may have to fix indentation)

local editionless_jokers = SMODS.Edition:get_edition_cards(G.jokers, true)
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.4,
            func = function()
                local eligible_card = pseudorandom_element(editionless_jokers, pseudoseed('ectoplasm'))
                eligible_card:set_edition({ negative = true })

                G.GAME.ecto_minus = G.GAME.ecto_minus or 1
                G.hand:change_size(-G.GAME.ecto_minus)
                G.GAME.ecto_minus = G.GAME.ecto_minus + 1

                card:juice_up(0.3, 0.5)
                return true
            end
shut crater
wind steppe
plush depot
wind steppe
keen loom
vale plinth
plush depot
#

we are fr

wind steppe
#

also what line number is the start of loc_vars?

shut crater
# keen loom

for the things that you're adding to the info_queue, do their descriptions have #1# in them?

plush depot
#

anyone know what the mod is called for spawning in jokers or blinds when u need

scarlet imp
plush depot
wind steppe
#

i think info_queue needs the modprefix

keen loom
ancient plinth
wind steppe
shut crater
#

try using set = "Joker" instead

ancient plinth
wind steppe
keen loom
scarlet imp
#

lines 27 and 28

ancient plinth
wind steppe
scarlet imp
ancient plinth
#

I did the stuff

#

Should I test it now?

#

K

keen loom
wind steppe
keen loom
ancient plinth
#

Also, how do I do the currently number/number text that some jokers have? Like Yorick or Loyalty Card?

shut crater
keen loom
#

oh wait, i think i found the problem

ancient plinth
#

Brb

#

Dinner is ready

sonic cedar
#

will this work

keen loom
wind steppe
sonic cedar
wind steppe
#

so no

#

it'll prob just be nil

sonic cedar
#

ok but

wind steppe
#

it might work then

sonic cedar
#

say nomore

keen loom
#

this is what i am trying to do, the third vars is supposed to be for the external description

sonic cedar
wind steppe
sonic cedar
#

gains x mult if you score a probability

wind steppe
shut crater
sonic cedar
shut crater
#

or more accurately there is no way to track down every probability check in the game

wind steppe
sonic cedar
#

if i can tie an unlock condition to failing on the wheel of fortune, what's stopping me

wind steppe
#

i can only think of one probability consumable

#

regardless if its limited you could just take ownership of each consumable

#

and check for the joker in question when failing the roll

shut crater
plush depot
#

guys can someone help me understand whats wrong with this code so far

#

SMODS.Atlas{
key = 'JimboFather',
path = 'JimboFather.png',
px = 71,
py = 95
}
SMODS.Joker{
key = "jimbofather",
loc_txt = {
name = 'Jimbos Father',
text = {
'{X:mult,C:white}X#-2#{} Mult'
}
},
atlas = 'JimboFather',
pos = {x = 0, y = 0},
config = {
extra = {
Xmult = -2
}
},
loc_vars = function(self,info_queue,center)
return {vars = {center.ability.extra.Xmult}}
end,
calculate = function(self,card,context)
if context.joker_main then
return {
card = card,
Xmult_mod = card.ability.extra.Xmult,
message = 'X' .. card.ability.extra.Xmult,
coulour = G.C.MULT
}
end

    if context.setting_blind then
        local new_card = create_card('Joker', G.jokers, nil,nil,nil,nil, 'j_joker')
        new_Card:add_to_deck()
        G.jokers:emplace(new_card)
    end
end

}

#

oops didnt mean to send it like that

spice wadi
#

You should send the error

plush depot
#

its not an error my joker says Xnil

shut crater
wind steppe
wind steppe
#

the #-2# isn't the actual number it shows its what index in loc_vars it looks at

spice wadi
plush depot
#

alr gotcga

#

thx guys

sturdy compass
#

Why negative Xmult tho?

sonic cedar
plush depot
#

frick

sonic cedar
plush depot
#

this happened when i hit play

sonic cedar
plush depot
#

ok

shut crater
#

that won't fix the error though

sonic cedar
#

it wouldve been an issue later

sturdy compass
sonic cedar
#

oh

sturdy compass
shut crater
plush depot
#

😔

shut crater
#

too british that time

sturdy compass
#

Honestly you could just make your return table this and it'd do the exact same thing:

return {
   x_mult = card.ability.extra.Xmult
}```
sonic cedar
plush depot
sonic cedar
#

what do you mean global chris_griffin

sturdy compass
#

change the center field in your loc_vars function to card

sturdy compass
spice wadi
#

Both of them

#

In the arguments for loc_vars you put center as well

shut crater
spice wadi
#

I think you should read through the smods wiki and the VanillaRemade examples

sturdy compass
shut crater
sturdy compass
#

gotcha

plush depot
#

now it says this

sonic cedar
sonic cedar
#

like what you have now

plush depot
#

how do i do that again

sonic cedar
#

three backticks

#

at the beginning and end

#

```lua
(paste code here)
```

spice wadi
#

```lua

plush depot
#

what

#

like this??

sonic cedar
#

NOT IN THE CODE 😭

plush depot
#

oh

#

its my first time guys 😔

sonic cedar
#

youre good

#

formatting it for discord is what i meant

plush depot
#
    key = 'JimboFather',
    path = 'JimboFather.png',
    px = 71,
    py = 95
}
SMODS.Joker{
    key = "jimbofather",
    loc_txt = {
        name = 'Jimbos Father',
        text = {
            '{X:mult,C:white}X#1#{} Mult'
        }
    },
    atlas = 'JimboFather',
    pos = {x = 0, y = 0},
    config = { 
        extra = {
        Xmult = -2
    }
},
    loc_vars = function(self,info_queue,card)
        return {vars = {card.ability.extra.Xmult}}
    end,
    calculate = function(self,card,context)
        if context.joker_main then
            return {
                x_mult = card.ability.extra.Xmult
            }
        end

        if context.setting_blind then
            local new_card = create_card('Joker', G.jokers, nil,nil,nil,nil, 'j_joker')
            new_Card:add_to_deck()
            G.jokers:emplace(new_card)
        end
    end
}```
#

did it work

sturdy compass
#

yes

sonic cedar
#

enough

plush depot
#

yay

shut crater
keen totem
#

what do yall think about this joker

plush depot
keen totem
#

yes

plush depot
#

j and k

#

wow

keen totem
keen loom
sonic cedar
sturdy compass
#

x_mult works too

#

that's not the problem

sonic cedar
#

wait i did it backwards again

#

disregard

sturdy compass
#

lmao

keen totem
#

all of these work

scarlet imp
#

they are indeed the same

plush depot
#

gee wizz whats wrong with it doc

sonic cedar
keen loom
plush depot
#

give it to me straight doc

#

is it a new deformity

sturdy compass
#

I am genuinely confused as to why this isn't working

sonic cedar
#

same

#

hold on

#

are you making sure to start a new run

plush depot
#

doctor what happened

sonic cedar
#

like youre not continuing from the same run are you

sturdy compass
#

true

plush depot
#

no

sonic cedar
#

ok good

keen totem
#

also i just tested, negative mult works

plush depot
#

i just got a new error message

keen totem
#

its new_card not new_Card

plush depot
#

oops

#

imagine that was the problem

#

this entire time

sturdy compass
#

It wasn't

sonic cedar
#

wouldnt explain the index error

plush depot
#

IT WORKS

#

IT WAS THE ERROR

sonic cedar
#

are you serious

plush depot
#

yes 😭

keen totem
#

.mkv

wind steppe
#

error reporting sucks sometimes

sonic cedar
#

not the mkv file,,

willow plinth
scarlet imp
#

how can I paste a clip lol

#

never done that before

sonic cedar
#

just send an mp4

#

or mov

wind steppe
keen loom
#

uh... it's not supposed to say X0 mult

plush depot
#

COOKIE RUN KINGDOM

sonic cedar
#

gingerbright is not in crk

plush depot
#

fake ahh cookies

#

skater cookie

#

gingerdozer

sonic cedar
#

fake fan

plush depot
#

witchberry

scarlet imp
sturdy compass
#

Oooo an Isaac mod

sonic cedar
#

bro reset the playing card

scarlet imp
#

it resets every card for some reason

plush depot
#

yeah it was supposed to do-15 therer right

#

not -285

shut crater
scarlet imp
plush depot
#

oh

scarlet imp
sonic cedar
#

i was goofin

scarlet imp
#
if G.GAME.blind and G.GAME.blind.boss and context.end_of_round and not context.game_over then
    card.ability.extra.cards_played = 0
    card.ability.extra.chips = 300
    return {
        message = localize("k_reset"),
        colour = G.C.BLUE
    }
end

reset code

sturdy compass
#

Ope lol

sonic cedar
#

i think it looks like that astra

sturdy compass
#

I think you're right

wind steppe
#

why do they spawn with an edition when this is my create_card

                local card = SMODS.create_card({
                    set = 'Joker',
                    area = G.jokers,
                    key = 'j_para_bonnie',
                    no_edition = true,
                    stickers = {"eternal"}
                })
#

(only sometimes)

wild escarp
#

Can someone help me out with this crash? Only thing I did was add some stuff for a spectral.

sturdy compass
#

anyways you need to specify and not context.individual and not context.repetition in that check

shut crater
sturdy compass
#

That also works

shut crater
#

oh or that

wind steppe
#

why not both

shut crater
#

well that would just be silly

spice wadi
shut crater
#

bro contexts are so cursed

sturdy compass
#

probably misunderstood

keen totem
#

(even tho they alr were)

#

but i made them the same color as in the image

spice wadi
keen loom
scarlet imp
sturdy compass
wind steppe
#

why do they spawn with an edition sometimes when this is my create_card

                local card = SMODS.create_card({
                    set = 'Joker',
                    area = G.jokers,
                    key = 'j_para_bonnie',
                    no_edition = true,
                    stickers = {"eternal"}
                })
sonic cedar
shut crater
scarlet imp
# sturdy compass Oooo an Isaac mod

yeah if anyone ever has ideas for TBOI jokers, let me know (preferably passive items, gonna work on implementing an active item function later on)

wind steppe
#

they're my joker btw they do nothing with editions

sonic cedar
#

oh lmao nvm

#

oh wait

#

just set edition to the base i think

#

cause no_edition is for random

wind steppe
#

would that be edition = base?

north swallow
#

guys how do i add probabilities into a joker

#

im stupid

wind steppe
#

i can't test because editions arent that common

#

how do you put a code block without it starting a new line

sonic cedar
wind steppe
#

when i do that it always is on a new line

sonic cedar
#

you mean like this?

wind steppe
#

yes like that

sonic cedar
#

one backtick

north swallow
sonic cedar
#

50/50 is 1

#

if you want it to be halved probability

#

you want v/2

#

think of v as 1 here

north swallow
#

alright so if i want a 50/50 chance i do
for k, v in pairs(G.GAME.probabilities) do
G.GAME.probabilities[k] = v/2
end

#

just like that?

ancient plinth
sonic cedar
wind steppe
#

what's the key for base edition

north swallow
#

???

keen totem
sonic cedar
#

iirc yea

wind steppe
#
                local card = SMODS.create_card({
                    set = 'Joker',
                    area = G.jokers,
                    key = 'j_para_bonnie',
                    edition = e_base,
                    stickers = {"eternal"}
                })
``` this also does not stop bonnie from spawning with an edition
keen loom
wintry basin
keen loom
keen totem
#

hello

#

discord is being evil and wont let me post images

lucid owl
#

@pure salmon here's how i did it, pretty simple patch that involves a card modifier (but can be easily changed to any variable that you can set on a card)

#

i'm assuming you're doing it for blinds

keen totem
#

but i want you to know that my mod has a line that has a column 40132

lucid owl
#

but also, here's how i did it for challenges just in case @pure salmon

pure salmon
keen totem
limber obsidian
#

Yo, i have tried everything to my knowledge but i cant seem to make a card that has a 1 in 10 chance to go extinct and give you 200$. I would show what i got so far but i kinda crashed out and deleted the mod file so i had remake everything, anyone know how to make it?

wind steppe
#

how would i stop a joker from spawning with an edition (using SMODS.create_card)
setting the edition to base manually and no_edition = true both don't work

lucid owl
keen totem
#

so you can just compress an entire lua file into one line

#

so i did

keen totem
#

because

#

fuck readability

wind steppe
#

who needs obfuscation

sonic cedar
wind steppe
#

just do this

shut crater
solid mesa
keen totem
wild escarp
shut crater
# limber obsidian ?

cavendish has all the ingredients for what you're doing except the $200, so start with that code and once you get it working add in the functionality for money

keen totem
#

and also thats why discord doesnt show the big header of your username if you do multiple messages in sucession

#

so you can say multiple lines

keen totem
#

without filling up the channel

limber obsidian
#

Ill try it

wind steppe
#

wtf is the point of no_edition if it doesn't stop a joker from having an edition

shut crater
#

big brain strats

keen totem
#

regardless

#

who cares

#

you can bump questions

shut crater
keen totem
#

its not like im spamming on purpose

wind steppe
keen totem
#

i just say stuff on several lines

#

because its easier to read without trying to compress an entire paragraph into one line

sonic cedar
# north swallow and where would i put that

actually far better way, and it goes in whatever context you want it to trigger in
if pseudorandom('yourseed') < G.GAME.probabilities.normal / card.ability.extra.odds
in this case you'll set your locvar odds to 2

like if this was gros michel

if pseudorandom('vremade_gros_michel') < G.GAME.probabilities.normal / card.ability.extra.odds then
--code that kills gros michel
else
--code that does safe message
end
keen totem
#

which gets across the same thing

shut crater
keen totem
#

also its because i hate people who are going
@keen totem is typing...
for 17 hours

feral panther
#

why is thunk chat removed?

keen totem
#

idk

ancient plinth
#

I got around to testing my joker

shut crater
ancient plinth
wild escarp
wind steppe
sonic cedar
shut crater
ancient plinth
wind steppe
ancient plinth
keen loom
#

this script is not working as intended. this is what i'm trying to do

  • +4 mult when it scores
  • +2 mult when each eligible joker scores (triggers before the other jokers start scoring if the other jokers are the same as itself)
  • x0.1 mult when each eligible joker scores (doesn't trigger at all)
sonic cedar
elfin stratus
#

i drew some jokers and i have no idea what to do with them

keen totem
#

shouldnt it be card.ability.extra.varName?

#

@ancient plinth

elfin stratus
#

any ideas for these guys?

keen loom
sonic cedar
keen totem
#

oh wait nvm

#

i thought the config was loc_vars

ancient plinth
sonic cedar
#

did flipping them work

#

that's all i can see really

ancient plinth
sonic cedar
#

yeah

ancient plinth
#

Gonna try that

scarlet imp
#

can someone link the SMODS.rarity page?

wind steppe
#

is this balanced

clever rose
#

hey, im making a joker that when sold halves the number of chips required by the boss blind, is there a variable i can access or way i can change the visible chips required? i've got the joker functioning fine, but i'd like to give a more clear visual cue for the player

scarlet imp
scarlet imp
sonic cedar
#

did you mean link

scarlet imp
#

oh yeah mb

wind steppe
sonic cedar
#

ok but *remove the embed

wind steppe
sonic cedar
#

hover over it and click the x

wind steppe
thorn furnace
#

My custom rarity does not appear to be cooperating

scarlet imp
ancient plinth
keen loom
#

when does context.post_joker occurs?

sonic cedar
#

why is that there

sonic cedar
ancient plinth
sonic cedar
#

like deleted it or

keen loom
#

like... after each joker or after all jokers?

ancient plinth
thorn furnace
sonic cedar
keen loom
#

i tried using it and it did nothing

shut crater
ancient plinth
keen loom
#

guess i'll go the boring part and just... return the total value instead of triggering it one by one

shut crater
tawdry shale
#

bump

wind steppe
#

essentially the sin jokers for everything, but for a limited time only

shut crater
#

you're increasing the xmult in an event, so it's going to get run after all the calculate code has finished

shut crater
tawdry shale
wintry basin
#

I’m suggesting Someone to please do a antonblast face and suit skin for balatro
hearts because of red
Poker chips and heart beets = heart symbol on the cards
anton (Up = Normal ~ Down = Oni) annie (Up = Normal ~ Down = Oni) Danton (Up = Danton ~ Down = Annalyn) Nina (Up = Nina ~ Down = Brulo) = king
Brawlbuster Tallbuster Maulbuster Smallbuster = Queen
satan (Up = Normal ~ Down = Giga) jewel ghoul (Up = Jewel Ghoul ~ Down = Jewel Girl) freako dragon (Up = Freako Dragon ~ Down = Lil Freak) Ring-a-Ding (Up = Normal ~ Down = Biblical Angel) = Jack

shut crater
# tawdry shale i updated the code to be this but now there's no mult increase or decrease

So you're setting samehand to false, then in context.before you set it to true if it was the same hand. But then the calculate function ends without running the context.joker_main code, because it's not joker_main yet.

Then later, context.joker_main happens, and samehand is set to false, but the context.before code doesn't get run, because it's not context.before anymore, it's context.joker_main now. And then your context.joker_main code gets run with samehand equalling false

shut crater
keen loom
#

why is this not triggering at all?

shut crater
# keen loom why is this not triggering at all?

because you have a return statement in your for loop. Probably what's happening is that return statement is being reached before the other one, causing the function to end before the other statment is ever reached

shut crater
thorn furnace
tawdry shale
wind steppe
thorn furnace
#

oh

shut crater
shut crater
thorn furnace
shut crater
#

try both and report back

thorn furnace
#

none seemed to work KHD_TrunksWat

#

hmm

shut crater
#

show the rarity declaration?

thorn furnace
shut crater
#

hm

#

yeah idk, I would expect either k_requiem or k_prefix_requiem to work

#

you put the k_ before both the dictionary and the label versions, right?

thorn furnace
# thorn furnace this?

surely it can't be how it's declared in the Joker file because the colour and everything else is still there

keen loom
#

the second part isn't working at all

shut crater
#

it has to just be an issue with the localization entry

thorn furnace
shut crater
thorn furnace
#

i was basing it off of how VanillaRemade does it

shut crater
#

one last thing, where is the misc = located?

thorn furnace
#

uhh

#

(I changed it back to triple check)

shut crater
#

yuuuuuup

#

it's in descriptions

#

it shouldn't be

thorn furnace
#

it's time for me to explode

keen loom
thorn furnace
shut crater
#

I know you put it up there somewhere but I forgot

keen loom
shut crater
#

I would try just getting rid of the post_trigger check

#

I think context.other_joker does what you want

wind steppe
#

is this balanced