#💻・modding-dev

1 messages · Page 163 of 1

late shadow
#

what is j_*

#

or is the * a stand in for the word im searching for

normal crest
#

SMODS.create_card({ key = 'j_<mod_prefix>_phj_moe' })

cursive glade
#

j_{the key name of your joker} like j_madness or j_rocket

late shadow
#

ohhhh

normal crest
#

@weak gate ^

late shadow
#

whats the -- for in that case

cursive glade
#

-- = comment

#

was just showing you where to put the code to look for stuff

late shadow
#

ah i just wasnt sure why the comment was there

#

ohh

native cargo
late shadow
#

oh dont worry i have

#

for like
4 hours

#

but ty

normal crest
native cargo
#

Maybe read up the basic syntax section

cursive glade
#

lua is both simple and infuriating at the same time. i love/hate it

late shadow
#

same

#

its fun or hell

cursive glade
#

it's a hell of a lot of fun >.>

#

hokay, back to mobile. gotta get kids to bed

weak gate
#

once a codebase is big enough, you really want a compiler to check everything before you run it yep

late shadow
#

after the second line would
if context.other_joker.config.key and containsString('Meeb') then
be on the right track

#

i know its the general right track but idk

normal crest
#

that does not look correct, what are you trying to achieve

#

all jokers with 'meeb' in their key?

late shadow
#

yeah i didnt think so lol

#

and yeah

#

that are any of the jokers u have

#

baseball card except for a specific set of jokers

#

mult scales with how many u currently have

normal crest
#

string.find(context.other_joker.config.key, 'Meeb')

late shadow
#

thank you so much

#

does it matter if meeb is the entire key or is within it with other text

normal crest
#

I am not entirely sure what you were trying to say to be honest

late shadow
#

its ok

normal crest
#

it is probably case sensitive

late shadow
#

yeah meeb is the second word in the names

normal crest
#

In the name or the key

late shadow
#

both

normal crest
#

what does the joker key look like

late shadow
#

two words

#

i gtg in a min

native cargo
#

replace that space with an underscore, keys shouldn't have spaces.

late shadow
#

ohh ok thx

native cargo
#

generally in anything programming wise, keys are one word.

late shadow
#

ty

#

i think i have to go like rn so thx for the help every1

normal crest
#

And string.find is case sensitive, so it has to be exactly 'meeb' not 'Meeb'

naive notch
late shadow
#

yeah lol

naive notch
#

oh lol

late shadow
#

my friend and i making a mod based on it

#

since were fans of it and ethereal just sounded like a balatro mod name

naive notch
#

nice

old bane
#

is there a mod somewhere that has X chips in a Joker?

naive notch
#

Cryptic I believe

old bane
#

is that a feature of cryptid or is that a feature of talisman?

naive notch
#

that I wouldnt know, sorry

solar eagle
#

The code I use for xchips is:

  message = "X"..card.ability.extra.x_chips.." Chips",
  colour = G.C.CHIPS,
  x_chips = card.ability.extra.x_chips
}```
where card.ability.extra.x_chips is the amount to multiply chips by
#

and this goes in a newcalc calculate function to complete it

lucid owl
solar eagle
#

I am aware that the message is a bad and hacky way of doing it

solar eagle
lucid owl
#

well they're distinct enough

solar eagle
#

true

lucid owl
#

woke can continue

solar eagle
#

hell yeah tbh i love the idea

old bane
lucid owl
solar eagle
#

It displayed the text but chips werent multiplied for some reason

#

x_chips works??

spare knot
#

hey, any good tutorials to get me started making collab mods?

loud citrus
old bane
solar eagle
#

aka, newest version of steamodded

#

it'll be defined as calculate = function(self, card, context)

#

on your joker, enhancement, etc etc etc

old bane
#

oh wait wrong question i meant how does x_chips end up multiplying the chip amount?

#

is it also a newcalc function

cerulean rose
#

yeah talisman newcalc stuff

naive notch
#

How do you do that code text?

old bane
#

` (your text here) `

naive notch
#

So to declare a variable in lua do I just write out its name and what its equal to?

#

example:
dog_points = 0

wind turtle
#

how do I make a joker that scales like fortune teller? like every time a tarot card is used increase a variable

#

and totally unrelated how do I apply xmult again?

#

(as in how do I apply xmult comma again, not how do I apply xmult multiple times)

old bane
#

Xmult_mod

old bane
# wind turtle how do I make a joker that scales like fortune teller? like every time a tarot c...

so you'll usually want one variable to store how much mult total you have, and then another variable to store how much mult you gain whenever you upgrade it.

Then, when you program the condition for when you upgrade the card, you do:

return{
  // message code and others
  card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
}

and then you do

if context.joker_main then
   return {
      mult_mod = card.ability.extra.mult
   }
end

or something similar

wind turtle
#

also is there a hot reload

naive notch
old bane
wind turtle
#

is it case sensitive?

cedar stream
solar eagle
solar eagle
wind turtle
#

ok yeah it is case sensitive

#

it works now

#

but it's displaying a blank message, how do i fix that?

old bane
solar eagle
#

you have to return the message parameter

wind turtle
old bane
solar eagle
wind turtle
#

so how do i make it not display a message

solar eagle
#

Do not use self

#

use card, self will crash

wind turtle
#

i changed it to use card and

#

that's in the loc_vars thing, ```lua
return {vars = { card.ability.extra.xmult }}

solar eagle
#

can you attach the lua file

wind turtle
#
SMODS.Joker {
    key = "fortnuteguy",
    name = "Whatever",
    atlas = "lbm_atlas",
    cost = 5,
    unlocked = true,
    discoverable = true,
    blueprint_compat = false,
    pos = {x = 0, y = 0},
    config = {xmult = 1},
    ability = {name = "fortuneguy", extra = {xmult = 1}},
    rarity = 3,
    loc_vars = function(self, info_queue, card)
        return {vars = { self.ability.extra.xmult }}
    end,
    loc_txt = {
        name = ":3",
        text = {
            "Gives +0.25xmult per Tarot",
            "card used",
            "(currently #1#)"
        }
    },
    calculate = function(self, card, context)
        if context.using_consumeable then
            if (context.consumeable.ability.set == "Tarot") then
                self.ability.extra.xmult = self.ability.extra.xmult + 0.25;
            end
        end
        if context.joker_main then
            print(self.ability.extra.xmult)
            return {Xmult_mod = self.ability.extra.xmult, message = localize { type = "variable", key = "a_xmult", vars = { self.ability.extra.xmult } },}
        end
    end
}
#

i changed it back to self so it stopped crashing

#

just replace all self. with card.

solar eagle
#

weird

#

ive had to use card or it breaks

wind turtle
#

seems to be the opposite for me lol

#

but the card works now

solar eagle
#

nice !!

naive notch
#

what would the context be for after scoring is finished?

foggy carbon
cursive glade
#

Is it possible to make a new hand type with a joker mod?

wind turtle
#

im trying to get this text color and background, i tried {C:white}{X:mult} but that didn't work

foggy carbon
#

{X:mult,C:white}

shell lagoon
#

try {X:mult,C:white}

#

i was too late 😭

wind turtle
#

nvm checked docs lol

dusk harness
#

if i want to get the info about the jokers and packs available in the shop where would i start looking?

wind turtle
#

this one is for the scott the woz discord server 🔥

twilit cargo
wind turtle
#

how would I make a joker check if there are 2 of the same card played at once?

weak brook
wind turtle
weak gate
#

I want all my jokers to run a bit of code after the hand is played, print('hi') for example. How to do that?

weak brook
#

oh

#

figures

wind turtle
#

he said there should be a joker that scales like fortune teller but with xmult instead

weak gate
#

Ah, apologies - I want all of them to run the same code, if possible I don't want to paste the same code block in all jokers' context.affter

cerulean rose
#

don't think there's a way to do that

wind turtle
weak gate
#

Oh, right, pasting
if context.after then commonfunction() end
seems pretty good

wind turtle
#

only the highest quality jokers for my mod

#

i plan on making it trigger if you play 2 of the same card at once, so how do I detect that

#

like is there a list of cards i can go through

cerulean rose
#

what do you mean by “2 of the same card”

wind turtle
cursive glade
#

detect them in a hand of multiple cards, or explicitly just two cards played?

cerulean rose
wind turtle
#

like this would trigger

#

this wouldn't

old bane
#

how do i get a joker that does the shaking animation (or the juice up animation) every time a Spade card is scored?

cerulean rose
#

card:juice_up

old bane
#

i know that, but whenever i put that in context.individual it only juices up once

wind turtle
#

i checked loyalty, juice_card_until(self, eval, true) (i wouldn't trust this because i am stupid)

cerulean rose
#

can you send the full joker code?

wind turtle
#

also i'd still like to know if there's a "hot reload" so i don't have to restart the game every time i edit my code

random sleet
#

hold m

worn palm
#

hey real quick, is there documentation for stuff like ipairs(hand)? i cant find anything in the SMODS docs so im assuming thats a balatro specific function? i guess im just asking if theres any other documentation i should know about

worn palm
#

oooh okay

tall wharf
#

you need to know a bit of lua

worn palm
#

i mean ive used lua before, its just not something i use often, my apologies

#

beyond that, is there any docs for the structure of tables? or like a way to read them?

tall wharf
#

table in lua is a mess

#

it can be anything

merry raven
#

Are there any checks to see if a card has an ability to always score, like Stone Card or modded cards with always_scores = true

tall wharf
#

base game just checks if the card is stone 😭

#

maybe look at the lovely dump and see what you got?

twilit cargo
# tall wharf you need to know a bit of lua

first time lua user over here proud to admit i spent like 25 minutes trying to figure out why something didn't work only to realise the not equal operator is ~= instead of != 🗣️

worn palm
#

yeah that one got me too lol

#

very cool

twilit cargo
#

why would they do that 🥀🥀🥀🥀

worn palm
#

doesnt lua use ! for something specific? idk, never trust a guy that counts from 1 instead of 0

twilit cargo
tall wharf
#

AND I CODE JS BACKEND

ionic verge
#

so if i want to split my mod into several files (i.e. jokers.lua decks.lua etc) what would i need to do in main.lua to prepare that?

wind turtle
#

how do i get what suit a card is

cedar stream
#

look at how MTJ does it, i found that it is easy to understand

wind turtle
tall wharf
# ionic verge so if i want to split my mod into several files (i.e. jokers.lua decks.lua etc) ...

what i did in my code

assert(SMODS.load_file("./modules/atlasses.lua"))() 
assert(SMODS.load_file("./modules/hooks.lua"))() 
assert(SMODS.load_file("./modules/sounds.lua"))() 
assert(SMODS.load_file("./modules/misc.lua"))() 
assert(SMODS.load_file("./modules/consumables.lua"))() 
assert(SMODS.load_file("./modules/stickers.lua"))() 
assert(SMODS.load_file("./modules/blinds.lua"))() 
assert(SMODS.load_file("./modules/cards.lua"))() 
assert(SMODS.load_file("./modules/ui.lua"))() 
assert(SMODS.load_file("./modules/jokers.lua"))() 
assert(SMODS.load_file("./modules/pokerhands.lua"))() 
ionic verge
wind turtle
#

(number 2 is javascript, number 1 is java)

wind turtle
ionic verge
#

greal

twilit cargo
ionic verge
#

i probably hate it for the wrong reasons but hearing 'java bad' after a horrid computer science class in high school feels so vindicating

tall wharf
twilit cargo
#

Iused C for with no documentation no nothing just sheer willpower Horrible language fuck C all my homies hate C

tall wharf
#

jenku i will ask politely for you to help me with my mod

#

this is the balatro equivalent to hi wanna collab

twilit cargo
twilit cargo
ionic verge
#

im at about 2ish weeks now

#

i cant properly colab though

#

am working on own project

twilit cargo
#

💥💥💥

tall wharf
#

cross mod content is always fun

cerulean rose
#

im at *checks repositories* 3 months?

#

HOLY WHAT

#

3 MONTHS

tall wharf
#

yooo veteran

cerulean rose
#

it does not feel like its been that long

tall wharf
#

I've been making the aikoyori shenanigans for a month

#

i gave up on quadruple thirteeen straight flush for now

#

basically it's just 4 sets of King thru Ace Straight Flush

#

guys would it be funny to add Potassium-40 as a joker

wind turtle
cerulean rose
#

omg really?

wind turtle
#

yeah

cerulean rose
#

actually yeah ive run into this before

ionic verge
#

i will say in blind defence of lua
for i,v in ipairs is a joy to use

ionic verge
#

also i dont know what continue is

cerulean rose
ionic verge
#

noted

#

is why i said blind defence

wind turtle
tall wharf
#

^1.15 Mult
1 in 1,250,000,000 chance the card is destroyed at the end of the round

wind turtle
#

"continue" makes the loop skip that iteration

cerulean rose
ionic verge
#

mmmmmmm

#

yeah thats nice

wind turtle
#

i had to add in a special if statement 😭

tall wharf
#

you know as an upgrade to cavendish

cerulean rose
wind turtle
#

anyways this works now

cerulean rose
#

thats op as hell

tall wharf
#

I've been doing silly things with the game

twilit cargo
#

X5 is wild 😭

wind turtle
#

to be fair, the mod's a shitpost

#

you're not meant to take it seriously

cerulean rose
#

real

tall wharf
#

😭😭😭😭😭

wind turtle
cerulean rose
#

lul

tall wharf
#

you remember this?

wind turtle
#

you know what

#

im gonna check cryptid to see how they did something

tall wharf
#

you are not gonna be able to dig thru that

cerulean rose
tall wharf
foggy carbon
cerulean rose
wind turtle
cerulean rose
#

vscode folder search:

dusk harness
#

if im in the update shop event how can i get the list of jokers on sale?

tall wharf
dusk harness
#

thanks

cerulean rose
#

you can get that anywhere actually

dusk harness
#

but its gonna be null when the player is in game?

cerulean rose
#

yes

dusk harness
#

ok, makes sense

cerulean rose
#

i mean you can get it from any execution point

tall wharf
#

mr strange pencil

#

how would you rate my wordle gamemode

dusk harness
wind turtle
#

i'm analyzing jimball to see how it changes the music when you obtain it

tall wharf
#

this one i know kinda

wind turtle
#

ive got this

#

oh for those who haven't played cryptid, jimball plays funky town when you have it

foggy carbon
cerulean rose
cerulean rose
dusk harness
#

but at that point it would be null, which makes sense

tall wharf
#

sorry strange pencil person

dusk harness
#

ok thanks

cerulean rose
dusk harness
#

you seem like a good ressource i might ask more quesitons, while you're here

tall wharf
#

i hate number go up

cerulean rose
wind turtle
tall wharf
chilly lily
wind turtle
#

joker that gains +10 chips when you play your most played hands and loses 20 when you don't

dusk harness
twilit cargo
#

joker that gains x0.5 mult every time you get Nope!d

tall wharf
cerulean rose
tall wharf
#

your -10 chips is nothing

foggy carbon
#

_ _

cerulean rose
hushed briar
#

how do challenge names work in localization...? none of these are working

cerulean rose
tall wharf
hushed briar
#

oh is there a prefix for challenges

cerulean rose
# tall wharf

not sure if you're aware but you can add custom font characters

#

bunco does that

wind turtle
tall wharf
wind turtle
#

how do i check if you have a certain joker?

cerulean rose
tall wharf
#

oh

#

i hooked to the discard number dynatext

cerulean rose
#

so it doesn't look lopsided

foggy carbon
tall wharf
#

replacing the UI is a bad idea so I stopped doing that

#

it literally broke animations

cerulean rose
#

you should be able to just set the text inside the element

#

if using a font

tall wharf
#

ok yeah you're right

cerulean rose
#

SMODS.find_card

wind turtle
#

and is it [mod_id]_[card_id] or [mod_id]-[card_id]

foggy carbon
#

Underscore

wind turtle
#

thanks

ionic verge
merry raven
wind turtle
#

(i'm trying to change the music to TlT fnaf song)

merry raven
#

There's no not card.always_scores or something right

cerulean rose
wind turtle
wind turtle
cerulean rose
wind turtle
#

fair enough

#

my lua experience is
- this
- two roblox games

cerulean rose
merry raven
#

I did do this but what does [1] do

cerulean rose
#

if there's multiple pairs for whatever reason it will only select the first one

#

maybe

#

i don't know but i saw it in G.FUNCS.get_poker_hand_info

#

the game sets scoring_hand to that at some point

merry raven
#

In my case if I play a Pair alongside always-scoring cards like Stone Cards, the Stone Cards get affected too
My aim is to remove the always-scoring card interactions

dusk harness
#

so i assume that G.shop_jokers.cards[1] is a class of some sort, can i just do .name on it to get the name or is there a special ritual for it to work?

cerulean rose
dusk harness
#

that doesnt help me much

cerulean rose
dusk harness
#

i want to get the description and name

ionic verge
#

is there a way to modify the probabilities of each rarity spawning in a shop?

cerulean rose
cerulean rose
dusk harness
#

if i can get the key i can just go get teh desc freom somewhere else correct?

cerulean rose
#

idk

tall wharf
#

chat

cerulean rose
#

but if you fetch it directly from the table its loc vars will still be the placeholders

tall wharf
#

what if

cerulean rose
tall wharf
#

rhythm game in balatro

cerulean rose
wind turtle
# wind turtle

right now it either always plays the song or never plays itg

wind turtle
cerulean rose
tall wharf
wind turtle
#

this is if you can get a superb on like. remix 8 ds or something really hard

tall wharf
#

my joker has x6 mult

cerulean rose
#

^10 is 3.3 ^2s

tall wharf
#

but it disables one random other joker

wind turtle
#

yeah well MYYYYYY joker gives x20 for every A, 9, 8, or 7

cerulean rose
tall wharf
wind turtle
#

(because of the bite of 87 of course)

tall wharf
#

ok i can't read

cerulean rose
cerulean rose
tall wharf
#

x^10 is ((x^5)^2) actually

cerulean rose
#

yes it is

tall wharf
#

where did 3.3 come from

cerulean rose
#

log₂(10)

cerulean rose
wind turtle
#

can someone send how SMODS.find_card works pls

#

like link to the docs or anything

tall wharf
#

oh ok I'm probably stupid but shouldn't 3.16^2 = 10

wind turtle
#

close enough

#

"ermnnnn actually it's 3.1622776601683793319988935444327 🤓 ☝️"

tall wharf
#

3.16227766017^2

cerulean rose
#

but also thats the wrong calculation

cerulean rose
#

that would be to verify that (x^3.16)^3.16=3^10

wind turtle
#

it's still not working though

#

it's searching for a card named goldenfreddy

tall wharf
#

ok what are we even arguing about

wind turtle
#

i have it doing #SMODS.find_card("goldenfreddy")

#

i tried lbm_ and lbm- too

rough furnace
#

you would need to add the j_ prefix and your mod prefix

wind turtle
#

ohhhhhh

cerulean rose
wind turtle
#

i wouldnt have thought of the j_ prefix, thanks

wind turtle
tall wharf
#

ok can you fill me in what it does again I'm very lost

wind turtle
#

😥

cerulean rose
#

rhythm joker gives ^10
square chip gives ^2

tall wharf
#

hm

wind turtle
#

ok it finally works

tall wharf
#

so what's the argument here because that sounds straightforward

wind turtle
cerulean rose
spring osprey
#

how do i check what hand was just played?

tall wharf
#

oh

cerulean rose
spring osprey
#

ty

cerulean rose
#

also thx @spring osprey for reminding me that pringles exist 😋

spring osprey
#

ur welcome

#

its what im here for

tall wharf
#

so how many Square chips does it take for them to be equal to Rhythm joker

cerulean rose
#

log₂(10)

tall wharf
#

ok let me think for a bit I'm dumb

wind turtle
#

ok for some reason golden freddy is broken now

tall wharf
#

ok you're correct

cerulean rose
wind turtle
#

ok something's very wrong here so lemme just try Remaking this shit

runic pecan
wind turtle
#

no comment

runic pecan
tall wharf
#

how many of the x would you have to multiply itself to be equal to y would be log base x of y

cedar stream
#

is this a bad idea?

cerulean rose
tall wharf
#

flush pair let's go

cerulean rose
runic pecan
spring osprey
#

no?

native cargo
#

Do I need do something other than declaring a SMODS.Joker to create a joker?

#

Don't know if I'm just getting unlucky with my custom joker pulls or if they're not in the game fully yet.

wind turtle
#

so why isn't this working

wind turtle
#

freddy works but golden freddy doesn't

tall wharf
#

i just got a crazy idea

#

I'll implement it in secret tonight :>

#

probably not as crazy as the wordle idea but still kinda crazy

wind turtle
storm kraken
wind turtle
#

fuck it im just changing golden freddy to +1,987 mult for every A, 9, 8, or 7

cedar stream
#

that would actually probs be easier tho

#

@storm kraken

storm kraken
#

oh

storm kraken
#

theres a symbol for the needlr

wind turtle
#

golden freddy nerf 💔

wind turtle
tall wharf
#

+1 +9 +8 +7 individually

#

💔

wind turtle
storm kraken
tall wharf
#

x2

#

but still

cerulean rose
tall wharf
#

css is awesome

wind turtle
tall wharf
#

won't fit

#

@wind turtle why is your website so buggy on mobile

wind turtle
spring osprey
tall wharf
#

fair

wind turtle
#

this is what it looks like on desktop

tall wharf
#

idk it does keep refreshing as i move

cedar stream
#

so aiko when will we get phryexian letter support for the letter deck (just jokeing)

tall wharf
#

I'll probably add a hook so mods can add their own word list and associated poker hands detection

spring osprey
#
    calculate = function(self, card, context)
        if context.cardarea == G.play and context.scoring_name == 'Full House' then
            if pseudorandom('fuller') < G.GAME.probabilities.normal / card.ability.extra.odds then
                return {
                    Xmult_mod = card.ability.extra.x_mult,
                    message = 'X' .. card.ability.extra.x_mult,
                    colour = G.C.MULT
                }
            end
        end
    end
``` for some reason when running this it works how i expect it too but then afterwards it deselects all the cards and destroys them
#

idk what i did to do that

wind turtle
#

yes, it ignores eternal

#

it's totally intentional

#

Completely Balanced™️

#

also segfault my beloved

rugged star
#

is there a way to add dollars to an end of round? as in, add bonus dollars for a round without it being tied to a joker's calc_dollar_bonus

foggy carbon
tall wharf
#

imo eternal jokers are supposed to be eternal until the end of the run

foggy carbon
tall wharf
#

commitment

cerulean rose
#

really just feels like a downgrade of riff‐raff

#

@wind turtle idea: analgyph deck
gain a uranus when boss blind defeated

tall wharf
#

this idea is fire 🔥🔥🔥🔥

#

in the hole

cerulean rose
#

even better if analgyph and anaglyph randomly switch places in the deck selection screen

foggy carbon
#

oh I hate that. It's perfect

tall wharf
#

the next tag is removed

cerulean rose
#

now that's just uncecassary

tall wharf
#

it's so ass

tall wharf
#

you just don't get to use it at all

cerulean rose
#

heh

#

feels a bit forced imo

tall wharf
#

it's ass so

dusk harness
#

i might be stupid but how do i cycle through the jokers i the shop, i cant seem to figure out the actual way, i keep getting errors or a bunch of shop_joker not instanciated during load and then freeze

cerulean rose
#

the joke i mean

tall wharf
#

oh

cerulean rose
tall wharf
#

alright

cerulean rose
#

to avoid freezing you might have to wrap something in an event

tall wharf
#

I'm still looking for cross mod content

dusk harness
#

im confused

#

i need help

#

i mihgt also just be very stoopid

runic pecan
#

Should it be
Retrigger all steel cards with Diamond suit held in hand. or
Retrigger all steel cards held in hand with Diamond suit.?

dusk harness
#

2

cerulean rose
dusk harness
#

wait, both sound ok

tall wharf
#

Retrigger all Diamond Steel cards

runic pecan
#

"Retrigger all Diamond Steel cards held in hand"
Got it (Kronk face)

dusk harness
foggy carbon
#

is this how you guys would phrase this?

runic pecan
#

"Pockettes"?

foggy carbon
#

the other jokers in my mod are based on canonically tiny ladies

ionic verge
#

where could i find the code that determines the probabilities that the rarities use?

#

(i.e. what defines common jokers appearing as often as they do, uncommon as they do, etc)

cerulean rose
runic pecan
foggy carbon
#

fair enough

cerulean rose
#

feels like this ends up working the same as cryptid's negative joker

runic pecan
# foggy carbon fair enough

What if there are a series of Pockettes between two Dollhouses? Are they gonna be recognized as Occupants of both "buildings"?
This sounds more like a counterpoint against my "+1 joker slots per Occupant in this house" idea.

foggy carbon
#

good question
no, I'll probably want to make sure they only count as being occupied by one. Split the line in half

cerulean rose
#

does it matter which building?

foggy carbon
#

not really

#

I guess "treated as Negative" is the best solution because negative doesn't happen twice

runic pecan
ionic verge
#

so what kind of code would i have to patch in to check for my voucher's existence if im trying to modify the probabilities of rarities?

runic pecan
ionic verge
#

no i mean like

#

it checks if my voucher is there and then modifies that 'probability > x and #' stuff

#

cus thats the idea im thinking to implement my vouchers

#

here's the vouchers

#

(they're by the guy at the top of the image but im the one implementing them for them)

cerulean rose
ionic verge
#

yeah i know

#

im wondering what i need to patch in

cerulean rose
#

check observatory to see how having a voucher is checked

ionic verge
#

where do i find that

cerulean rose
#

also add a T3 voucher that increases epic spawnrate

ionic verge
#

back.lua is real confusing

runic pecan
dusk harness
#

everythiong is very confusing my guy

cerulean rose
ionic verge
#

wait im dum

#

mbmb

spring osprey
ionic verge
#

is it card.lua?

#

yeah

ionic verge
#

which is roughly double the chance

#

though itd actually be something like > .45

cerulean rose
#

so do rarity > (redeemed and 0.45 or 0.7) and 2

runic pecan
#

If me, I'd put the generated rarity number through a continuous increasing function before (_legendary and 4) line, so I don't need to bother with specific numbers like 0.95 and 0.7

ionic verge
#

do i need to do anything to change that 'redeemed'?

cerulean rose
#

yeah replace it with what you found for observatory

ionic verge
#

so this

cerulean rose
#

yeah

ionic verge
#

but yknow, with the right key

cerulean rose
#

ofc

dusk harness
#

i will be back tomorrow to bang my head more against the figuring out the jokers in the shop

#

cause like it dont work

foggy carbon
#

where can I go to see a SMODS unlock_condition implementation?

ionic verge
#

is the position right for replacing code?

runic pecan
tall wharf
#

seems good

#

idk i personally avoid replacing the code directly

ionic verge
#

ok so
with no vouchers the chances are 70% common 25% uncommon 5% rare
with one the chances are 45% common 50% uncommon 5% rare
with both its 45% common 35% uncommon 20% rare

runic pecan
#

If only smods can do something like local rate_Rare = 0.05 local rate_Uncommon = 0.25 rarity = (_legendary and 4) or (rarity>1-rate_Rare and 3) or (rarity>1-rate_Rare-rateUncommon and 2) or...

cerulean rose
dusk harness
#

me right now

ionic verge
#

i feel thats truer to the intention of the vouchers

runic pecan
#

But no, we don't talk about debugging source code, no no no~

dusk harness
#

i wish i could just put breakpoints

#

it would be so much easier

ionic verge
#

how can i spawn vouchers in to test

runic pecan
ionic verge
#

the method i use to spawn jokers (hitting 3 on collection) isnt working

dusk harness
wind turtle
#

like you could get 4 legendaries

#

Keep gambling!

runic pecan
dusk harness
#

joker name and what it does

#

so joker name and description

runic pecan
#

So you want to access jokers on the shelf.

dusk harness
ionic verge
#

(itll spawn one in the shop if youre in it)

runic pecan
merry raven
dusk harness
merry raven
#

Sorry for uber late reply I went out fo r abit

cerulean rose
merry raven
#

Yeah

runic pecan
merry raven
#

No worries it's my Joker's effect, if a Pair or High Card is played, it will evenly split them into two, cloning them but halving their ranks

dusk harness
cerulean rose
#

adding cards to the played hand generally doesn't work

merry raven
#

Oh they just spawn in the middle of the screen like that and then added to the deck

dusk harness
#

or data but further down the line, which i guess im not binding on the right event?

merry raven
#

Maybe it'll work if I explicitly make it only work when there is only 2 cards played for Pair and 1 card for High Card? I dunno

dusk harness
runic pecan
#

The inconsistency of source code's indentations is gonna be the end of me.

dusk harness
#

LOL

edgy reef
steel sage
#

unrelated question sorry

ionic verge
#

so... my vouchers, upon testing, seem to not actually affect anything
my code looks pretty solid, so i dont really know's up

runic pecan
runic pecan
steel sage
#

is that the source code lol?

edgy reef
#

Are you looking at the dump or the vanilla code

steel sage
#

alright i didn’t know that was available

#

thank you

edgy reef
#

It shouldn't look like that to begin with since smods overrides that

#

Also, that's targeting jokers, not vouchers.

runic pecan
steel sage
#

are you allowed to say how to do that in here

cerulean rose
#

yes

runic pecan
ionic verge
steel sage
ionic verge
#

also this is what happens if you spawn a lot of overstock+'s

foggy carbon
runic pecan
ionic verge
#

mhmmmmm

#

me when i forget a comma

runic pecan
#

SMODS doc: "make sure to implement an unlock condition."
Me: "So how do I implement an unlock condition?
SMODS doc: *shrug

random sleet
#

reading the code explains the code

ionic verge
#

oh im sure it does
its just
this is the documentation

#

(ive had my mild annoyances with this too)

runic pecan
edgy reef
#

Class-specific documentation

runic pecan
#

Dude. DUDE. WTF.

edgy reef
#

Basically just return true if the object should be unlocked (there's a lot, and I mean a lot of default args for this).

runic pecan
edgy reef
#

Don't ask any questions about LocalThunk's code quality, ever

cedar stream
runic pecan
#

So by the look of function check_for_unlock(args) I assume this is already within the range of smods patches/overrides...
Now the question is: where to find them?

quasi comet
#

How would I go about always having an enhancement active on a joker? Like it always comes with it? RN it only appears when I start the blind

glass scaffold
foggy carbon
#

honestly it looks more like some Middle Eastern language than Wingdings

#

Doesn't look like Hebrew but similar in formation

runic pecan
runic pecan
quasi comet
#

oh that'd be great, thanks! I've been trying to search but couldn't quite find

cedar stream
#

Isnt it beautiful

foggy carbon
cedar stream
glass scaffold
cedar stream
#

me

frosty dock
cedar stream
#

and any other MTG nerd who got bored and wanted to learn it

steel sage
#

hey, thanks for the help, i've almost got this working. the jokers i want for my deck spawn when i start the game but they can be dragged anywhere on screen and also don't function properly

#
SMODS.Back{
    name = "Shortcut Deck",
    key = "shortcut_deck",
    loc_txt = {
        name = "Shortcut Deck",
        text = {
            "Start run with a {C:attention}Shortcut{}",
            "and a {C:attention}Four Fingers{}."
        }
    },
    pos = {x = 0, y = 3},
    apply = function()
        G.E_MANAGER:add_event(Event({
            func = function()
                SMODS.create_card({
                    set = "Joker",
                    area = G.jokers,
                    key = "j_shortcut"
                })
                SMODS.create_card({
                    set = "Joker",
                    area = G.jokers,
                    key = "j_four_fingers"
                })
                return true 
            end
        })) 
        
    end
}```
#

this seems like it should work to me but i can't find any examples of decks that add jokers

#

so idk whats up

#

nvm got it working

#

add_card is the correct function

#

cool :)

runic pecan
quasi comet
#

ahh

tall wharf
#

ah

runic pecan
#

Chat, is this wording good enough or needs some rework?

quasi comet
#

maybe more like 'whose rank matches the first played card'?

#

or keep the with for the 2nd part

#

"Played cards with Diamond suit whose rank matches with the first played card gives X2 Mult when scored." ?

#

@runic pecan

normal crest
#

Each played Diamond gives x2 mult when scored if its rank matches the first played card this hand, is how I'd word it

steel sage
#

perfect

#

that wasnt too bad

quasi comet
#

so i tried to do an add_to_deck function for the whole enhancement thing but now the card is just using the enhancement description and in the consumable field??? fsr???

#

dont mind the graphic its just a placeholder empty frame to test if the enhancement is applied or not

maiden phoenix
wintry solar
#

let me catch up on what happened whilst I was asleep
people recommending using mult_mod and Xmult_mod on new calc
😭

maiden phoenix
#

x_mult_modular balatrojoker

fallen pelican
#

surely we must put _mod because we are modding scholar

maiden phoenix
#

@wintry solar does returning level_up work in more context thanks to new calc?

wintry solar
#

Yes

#

I think I fixed the display jank too

maiden phoenix
#

Oh awesome I need to replace some horrors

wintry solar
#

If the display is still jank let me know

maiden phoenix
#

Also does repetitions uses "Again!" as a default message? If not it would be nice

#

Yea I'll let you know

wintry solar
fallen pelican
maiden phoenix
#

It keeps getting better 👍

random sleet
maiden phoenix
tall wharf
#

:3

maiden phoenix
random sleet
#

eremel i made a new card layer

wintry solar
#

Correct

maiden phoenix
#

Awesome

wintry solar
#

omg so did I

#

It’s great fun

random sleet
#

i think i can handle returning the right thing in calculate Clueless

#

whats your card layer

#

:?

tall wharf
#

when i do lovely patch i felt like i was performing surgery on code

random sleet
#

you are

tall wharf
#

i mean it makes sense

random sleet
tall wharf
#

i came from modding that one hit 3d block game

#

where they did the surgery you just insert the tubes

tall wharf
#

they look great

random sleet
#

funky

tall wharf
#

i can't get this song out of my head

random sleet
#

are they "technically stickers" or did you do it Properly

wintry solar
#

No it’s done properly

foggy carbon
#

I am using table.insert(card.ability.extra.occupants, G.jokers.cards[z[i]].ability.name), so why is it displaying the affected jokers' keys instead of their names?

random sleet
#

pog

wintry solar
#

I might make a card modifier api to handle it all at some point

tall wharf
#

https://youtu.be/PWbRleMGagU I'm going to make a joker based on this song i like how it sounds

ヨルシカ - 雨とカプチーノ
Yorushika - Rain with Cappuccino

作詞作曲、編曲(Words and Music): n-buna
Vocal: suis

2nd Full Album 「エルマ」 2019年8月28日(水)発売
初回盤はエルマの書く日記帳仕様。
https://sp.universal-music.co.jp/yorushika/elma/

曲目
01 車窓
02 憂一乗
03 夕凪、某、花惑い
04 雨とカプチーノ
05 湖の街
06 神様のダンス
07 雨晴るる
08 歩く
09 心に穴が空いた
10 森の教会
11 声
12 エイミー
13 海底、月明かり
14 ノーチラス

ダウンロード、ストリーミング、アルバム予約等
h...

▶ Play video
random sleet
tall wharf
#

:3

wintry solar
#

I need to finish ortalab first though

tall wharf
#

can we have a mod where we can have poker hands for 6oak

#

and so on up to configurable amount of 100

maiden phoenix
#

darn if I don't use card = card the joker doesn't juice_up tho

wintry solar
#

What are you returning?

maiden phoenix
#

repetitions

#
return {
                    repetitions = card.ability.extra,
                    card = card
                }
wintry solar
#

Huh it should do

maiden phoenix
#

Also h_mult

wintry solar
#

From a joker or playing card?

maiden phoenix
#

joker

wintry solar
#

Wait what do you mean? Doesn’t it juice up when the message plays?

maiden phoenix
#

The joker is a context.individual G.hand one, when I return just h_mult, the playing card does show the mult and juice up. If I add card = card the joker juice up but if I don't it doesn't

#

It's the same for the repetitions one btw

wintry solar
#

Do the repetitions give the message?

maiden phoenix
#

I didnt have time to try I have a meeting soon sorry

bleak bone
#

How interested would one be in a stone card only plasma deck challenge?

wintry solar
#

I’ll take a look at the message stuff later when I’m on my pc

violet void
#

could anyone tell me why this isnt aligned to the middle

    return {n=G.UIT.ROOT, config = {align = "cm", minh = G.ROOM.T.h*0.25, padding = 0.0, r = 0.1, colour = G.C.GREY}, nodes = {
        {n = G.UIT.R, config = { align = "cm", minw = G.ROOM.T.w*0.25 }, nodes = {
            create_toggle{ label = localize("start_with_chameleon"), info = localize("start_with_chameleon_desc"), active_colour = CrazyStairs.badge_colour, ref_table = CrazyStairs.config, ref_value = "start_with_chameleon" },
        }},
    }}
end```
wintry solar
#

It is?

violet void
#

not completely

#

theres more space to the right

wintry solar
#

Toggles have some weird width stuff

violet void
runic pecan
#

Is the highlighted part correct to replace the content of the for loop?

prisma loom
#

So I need my Joker to give either Meteor or Charm or Ethereal Tag. What should I use? Math random?

#

all equal chances

#

33/33/33

maiden phoenix
#

Btw does the game code or SMODS have a failsafe if Orbital Tag is the one picked at random from the tag pool?

tepid crow
faint yacht
#

Tag(tag_name)

runic pecan
prisma loom
maiden phoenix
#

You have to set G.orbital_hand before adding the tag then make it nil afterward

runic pecan
#

Can I replace the first part with the second part?

foggy carbon
#

Got it working, even when sold.

frosty dock
prisma loom
#

Is this correct? Cuz my game crashes now, unfortunately

#

this version also crashes

frosty dock
#

it's the items first, then the seed

prisma loom
#

yeah, I figured it out already! :D

#

I looked at the base game code

#

what is juice_up?

frosty dock
#

makes card wiggle

prisma loom
#

Is everything correct here?

#

Ive tried making my card jiggle when activated

#

but it crashes the game now

#

I did this instead (it works now)

#

btw is there a list of colors?

#

like this G.C.BLUE

#

I don't know the full spectrum of possible chioces availible

#

same question for formatting colors

#

like {C:white}{}

#

for example

maiden phoenix
#

(Or ctrl+shift+f I forgor)

#

Yes its ctrl+shift+f

prisma loom
wintry solar
maiden phoenix
#

Really? I need to test it later

maiden phoenix
prisma loom
#

it now gives me 1k errors

maiden phoenix
#

Wrong Balatro folder

runic pecan
#

How do I determine if context.blind is a boss blind and whether it's disabled?

maiden phoenix
#

There's a variable for it, look up the Rocket joker code

prisma loom
maiden phoenix
#

Extract the Balatro.exe and it should be it, sorry it wasnt clear

runic pecan
#

Found it. G.GAME.blind.boss

#

How do I make this Tag go away after triggered?

#

And how do I make it not be triggered if there are other boss-disabling jokers like Chicot or Luchador?

maiden phoenix
#

Yea was about to send you the link

runic pecan
#

It now looks like this. Is this correct?

#

Oh, wait, forgot tag.triggered = true

#

Alright. Now how do I detect if a boss blind is disabled or not?

maiden phoenix
#

Look up Chicot code, it checks that too

runic pecan
#

Bad news: it didn't disable any boss blind.

minor magnet
#

how would i go about making a joker that makes two ranks be counted as the same?

zealous glen
#

Not currently feasible

#

not in any good way except hardcoding everything

#

and not working with any other mod

minor magnet
#

mm ok

#

good to know, thanks

tiny sphinx
#

im currently making a website to host custom challenges that can be played via a single click, kind of like inspecting a weapon on cs2, although i need a better name for it... any ideas?

wintry solar
#

How does it work

runic pecan
#

I'm planning on the next batch,
does any of these look like in need of tweaking?

tiny sphinx
#

challenges are just stored as a table so i can just parse some json into it

violet void
#

I've added a custom center type but the only thing is that they are discovered as soon as they are created rather than when bought

Whats the solution? I tried bypass_discovery_ui but the center is automatically discovered in the collections too when I open the pack

runic pecan
manic rune
violet void
manic rune
violet void
runic pecan
manic rune
#

you should probably specify that though

#

like, retrigger Steel and Gold cards instead

runic pecan
manic rune
#

that works then

#

you should just put the "Prevents Death no matter what." to "Prevents Death", since that means it will activate unconditionally when you die

runic pecan
#

Is there a flow chart about hand type containing?
Like having an arrow from Full House to Two Pairs.

runic pecan
tepid crow
#

now add the possibilities with four fingers/shortcut

runic pecan
#

Does Four of a kind contains a Two Pairs?

#

🆗

wintry solar
#

Why doesn’t everything point to high card?

runic pecan
#

So sad I can't react to a react

tepid crow
zealous glen
wintry solar
#

Flush can also contain all of the oaks

runic pecan
zealous glen
#

why doesn't this work

tepid crow
#

this chart is "must contain" though, not "can contain"

runic pecan
zealous glen
#

It's breaking inside SMODS.insert_pool

wintry solar
#

Oh right yeah that makes more sense

#

-# minus the high card

runic pecan
#

So since Four of a kind doesn't contain a Two Pairs,
I'll need to change "per scored Kings in played hand."
to "twice if scored hand contains Kings"

minor magnet
#

best joker ive ever made

midnight forum
#

Is there a way i can receive more context or something like intellisense? im trying to start out by looking at modded joker examples but im kinda lost since i just have to guess which methods and variables work with which. Maybe this also just has to do with my lack of understanding of lua

frosty dock
#

there's also LSP definition files in the works for steamodded

midnight forum
frosty dock
#

they should

minor magnet
#

what's the function to check which slot a joker is in?

#

or the variable

#

if it's a variable

frosty dock
#

wdym which slot

maiden phoenix
#

They prob mean pos

minor magnet
#

position in the joker area

minor magnet
maiden phoenix
#

The vanilla way is to iterate over each card and find yours, idk if SMODS.find_card returns an index

frosty dock
#

(it doesn't)

maiden phoenix
#

Look at Ceremonial Dagger calculate code for an example

violet void
#

does anyone know how the partial hide works? (Only description with "Undiscovered" as name)
I only found the full hide

dusk harness
cursive glade
#

is this the right way to add a voucher to the vouchers area? When I tried, it added it to the joker area for some reason

SMODS.add_card({
    set = "Voucher",
    key = "v_grabber",
})
runic pecan
minor magnet
#

what are the text color codes for the suits?

dusk harness
#

back to making CI/CD pipelines at work

runic pecan
runic pecan
runic pecan
minor magnet
runic pecan
cursive glade
#

Nope, still added it to the joker area. Does it need to be in a specific context?

minor magnet
runic pecan
minor magnet
#

would this be too strong?

cursive glade
runic pecan
vocal verge
#

personally i think it's fine

cursive glade
#

It's a little OP. I'd make it Rare or really expensive.

runic pecan
#

game.lua, around line 3100, btw

minor magnet
vocal verge
#

it's basically a flower pot sidegrade but it makes the cards more useful

#

keep in mind flower pot is also uncommon and just gives 3x mult if you got all 4 suits

minor magnet
#

flower pot is also notoriously useless

runic pecan
#

X5 is better than X3, I guess

minor magnet
vocal verge
#

see that part was left out

minor magnet
runic pecan
runic pecan
minor magnet
#

fixed

vocal verge
#

aren't those full stops

manic rune
runic pecan
#

Those are commas.
In which I especially appreciate that garb used oxford comma.

minor magnet
vocal verge
#

must be the low quality

minor magnet
#

everything good now?

runic pecan
minor magnet
runic pecan
minor magnet
#

should it be scoring cards or scored cards

runic pecan
minor magnet
#

im not passing peer review

#

do i need to make any more changes??

runic pecan
dusk harness
minor magnet
#

the last part i was joking about

#

and the numerous typos

prisma loom
#

What this part of invis joker's code does?

runic pecan
runic pecan
manic rune
#

i have to realign every single line of code rn

#

😭

#

this is so mindnumbing

runic pecan
#

So I guess there's no rental_compat, then?

dusk harness
#

but like it was giving me errors, or just infinite log

#

which means im doing something wrong because theres clearly a way to get it only once

runic pecan
#

Tryif G.shop_jokers then for i=1, #G.shop_jokers.cards do print(G.shop_jokers.cards[i].center.key) end end

frosty dock
sturdy compass
#

Hmm, I'm trying to change how stone cards work when a Joker is present but this setup is definitely not right, but I don't know what setup would be right here

dusk harness
#

pinned it in a different conversation so i dont loose it ill update you tonnight at like 7-8pm US estern

prisma loom
#

So this is Space Joker's code. Why there's no 1 in 4 chance memntioned anywhere? Only this wierd pseudorandom stuff that I find on every probability joker

#

how do I set up chances?

#

I couldnt find anything on smods wiki

runic pecan
#

So "this wierd pseudorandom stuff" is a real number ranges from 0 to 1;
and G.GAME.probabilities.normal is usually 1 (unless Oops all 6's is around);
and the joker's ability.extra is 4.

dusk harness
#

thats actually useful to know, i might not use it ever but it makes reading the code better

prisma loom
#

what it checks for

runic pecan
dusk harness
prisma loom
#

nah, I'd do

dusk harness
# prisma loom what it checks for

checks if the pseudorandom value, which is always gonna be between 0 and 1, is smaller than the probability of hitting, which means that it did hit

open aspen
#

heya, is there an example mod or a beginner tutorial that I can use to familiarize myself with making mods?

maiden phoenix
#

pseudorandom is a value between 0 and 1 with the seed "space"
G.GAME.probabilities.normal is the nominator which is a game value that can be modified by say "Oops all 6s"
Self.ability.extra is the value used a denominator

runic pecan
prisma loom
#

ok

#

I imagined

dusk harness
#

so lets say, base case is that space man is 1/4 chance, it checks that the the random value is less then 0.25

prisma loom
#

?

open aspen
#

with oops all 6s it would modify the numerator value in this case to 2 correct?

maiden phoenix
#

Yea it would multiply it by 2

open aspen
# prisma loom ?

G.GAME.probabilities.normal will be 1, the space man has a 1/4 chance so Self.ability.extra is 4

#

1/4 = .25

#

then it takes a random value between 0 and 1 and checks if that value is less than .25

runic pecan
open aspen
#

sorry to necro my question but is there an example mod or a beginner tutorial that I can use to familiarize myself with making mods?

prisma loom
runic pecan
devout pewter
#

Is there a list of functions and attributes and stuff, like card.ability.extra.Xmult?

open aspen
#

tyy

dusk harness