#💻・modding-dev

1 messages · Page 333 of 1

manic rune
#

im not sure, eremel suggested me to make a dummy joker for this one

naive raptor
#

how do i make end_of_round context only trigger when the boss blind is defeated?

manic rune
#

and i think it currently works perfectly fine too

daring fern
glad osprey
#

think it'd be better long term to make your own center

#

so if you want some kind of custom functionality that jokers cant give then you can jsut do that

manic rune
#

🤔 i dont think theres any a dummy joker cant do, or at least, i havent thought of one for now

glad osprey
#

the whole reason we got into this convo was because of something it couldnt do

manic rune
#

how im planning to do the hand_size thing through update is that it compares two number variables

#

if they are different, change hand_size

#

i dont think that should affect performance too much

glad osprey
#

im gonna make a skill tree mod just to spite you

manic rune
#

😭

#

mine saves for the entire profile too, in case you didnt know :3

glad osprey
#

oh its not a per run thing?

manic rune
#

nope

glad osprey
#

ill have to do that too

manic rune
#

im using both G.GAME and G.PROFILES to ensure that theres no cheating inbetween

#

its a pain in the ass when you have to accout for all possibilities 😭

glad osprey
#

seems overly complicated for something even vanilla balatro doesnt do

naive raptor
#

why is my long if statement not working?

manic rune
#

im sure there are people out there who can do this with much less effort lol

glad osprey
#

should be in parenthesis

glad osprey
#

bcus we are going to make rougelite balatro now

#

just to spite you

manic rune
#

😭

naive raptor
glad osprey
#

da

manic rune
#

dawg is gonna steal my job 🥀

glad osprey
#

keep the old parenthesis tho

#

just insace

manic rune
#

anyways, at least i have jokers that wear equipments, stats and buffs :3

primal terrace
#

Sorry for barging in, but I might need some tips on basic stuff

naive raptor
#

why does steam keep closing 😭

primal terrace
#

Is now a good time to ask?

manic rune
#

fair point

glad osprey
#

too many of them to be specific

high sinew
#

for using debug helper for lua in VS how do i use it?

manic rune
glad osprey
primal terrace
#

You guys looked busy at the moment

high sinew
#

im trying to see how code runs im not sure how to do

manic rune
#

whats that??

high sinew
#

LuaHelper for VSCode

glad osprey
#

use these

#

only these

red flower
glad osprey
#

im gonna impale you on those arrows if i see another one

#

:)

high sinew
glad osprey
#

uninstall other ones

#

you only need like one 😭

high sinew
#

ok ok

glad osprey
naive raptor
#

why is if not G.GAME.used_vouchers[v_bvjokers_gamblingdisorder] then not working

daring fern
naive raptor
#

im stupid

glad osprey
#

my dumbass was looking for the error in the key itself 😭

high sinew
#

last thing for the Lua understandingim pretty sure it is reading my joker needed to be made here

#

Here is the loop where it loops at joker combo

#

it is pulling barry and other one pretty sure but doesnt make flayfluff

manic rune
#

question, if i were to use this to check for whenever a card is destroyed, what context do i need to use? i noticed the warning but its not clear enough for me 😭

glad osprey
#

if not scoring_hand i think

manic rune
#

something like this then, right?

glad osprey
#

check caino's code

#

do not trust me 🙏

manic rune
#

...thats a different context

#

😭

glad osprey
#

guh

manic rune
#

i think it doesnt account for immolate or something?

#

from what i heard

glad osprey
#

no it should

manic rune
#

hm, maybe i remembered it wrong

glad osprey
#

check other mods code?????

#

actually maybe just remove playing card

#

try doing that and printing smth

red flower
#

it is remove playing card

manic rune
#

couldve swore there was a bug about destroying cards or something in the vanilla code 😭

red flower
manic rune
#

bluh

glad osprey
#
if context.remove_playing_card then
  print("Hi!")
end
manic rune
#

yeah im gonna try printing

#

oh hey, its correct

#

if context.remove_playing_cards and not context.scoring_hand then

tall wharf
#

hello

#

i made my own context

manic rune
#

hi aiko

manic rune
glad osprey
glad osprey
tall wharf
#

when joker dies

manic rune
#

lovely

glad osprey
#

seals guy i am going to revoke your reaction permissions

manic rune
#

hey, leave them and their reaction privilege alone

glad osprey
#

nah :4

manic rune
#

aaalright i think this should work perfectly now

cyan lagoon
#

how do i make a joker wiggle like dna or invis?

manic rune
#

juice_until

cyan lagoon
#

so uh... how do i use it?

tall wharf
willow plinth
cyan lagoon
willow plinth
#

turns out updating soul_pos every frame is not enough

daring fern
#

Also you have to mention when you want it to stop.

cyan lagoon
#

the context?

daring fern
cyan lagoon
#

can i replace G.GAME with a context?

#

context.ending_shop to be specific

red flower
#

no

#

you need to use G.STATE

#

(or add some logic to update a value in the joker on ending_shop)

primal terrace
#

As a noob, I have been trying to figure this out for an embarrassingly long time

When the hand is played, check the cards held in hand if there are face cards. If there are, then add +15 Chips to itself, If there are not, then do not add Chips. At the end of the hand, add all accumulated Chips to score.

#

Here is what my code looks like, currently it upgrades regardless of if there are face cards held in hand, so I need to fix the face card held in hand checker

crisp coral
#

your code only stops upgrading once it finds a face card

#

so if the hand order is like 32KA, the first two cards will still be upgraded

frosty rampart
#

also, for clarity, do you mean "held in hand" or "in played hand"? the joker description says the former but your code is attempting to implement the latter

crisp coral
#

in played hand would be G.play

frosty rampart
#

oh right i'm dum

primal terrace
#

Yes, context.other_card:is_face() should work during G.hand, right?

faint yacht
#

Yes.

primal terrace
#

That's good

faint yacht
#

context.other_card also exists in G.discard if you enable that optional feature.

frosty rampart
#

yea my bad
the issue is that it will be checking, and upgrading, for every card in your hand, instead of checking over every card in your hand before performing a single upgrade

daring fern
maiden river
#

time to retrigger consumables
(I Know How To Do This, Trust)

quick kraken
#

Does steamodded's support for Xchips have the cryptid sound effect?

quick kraken
#

Yes that's exactly what I meant

hard needle
#

i have a joker that literally does that

quick kraken
#

Thanks for confirmation

daring fern
primal terrace
hard needle
maiden river
#

oh btw
how do you enable the optional features of smods

daring fern
maiden river
#

I see

#

thank you

#

now to get to work

faint yacht
#

If you want to target other CardAreas (say, context.individual and context.cardarea = G.deck), cardareas = {} should be returned, where the {} contains said names of areas.

maiden river
#

nice

#

is this on the docs 😭

daring fern
maiden river
#

ah

#

hopefully this helps me in my Insanity Arc™️

#

why is the tm purple

glad osprey
#

how do you save stuff to the profile

daring fern
heady siren
#

Help I was dreaming about coding my mod and Tobuscus started invading my return tables

faint yacht
wintry solar
maiden river
#

oh

#

I'm assuming those are, uh
private

wintry solar
#

The trick to seeing them is to ask me a question

#

Or wait until I finish them 🤣

faint yacht
#

-# He is the modem to the doc-network.

maiden river
#

I see

#

this must be why you are the Wizard

#

do you have an orb that you ponder

#

and if so, is it the jimball

#

I've found some shenanigans

rapid stag
#

does calculate_retriggers() have documentation '-'

wintry solar
#

No it’s not an outward facing function

rapid stag
#

ah

maiden river
#

I see

#

maybe I'm getting too crazy with it

rapid stag
#

did i break something, why is pseudorandom('mySeedHere') < 0.25 always true

maiden river
#

I mean
you might just be getting lucky

#

how many times did you test it

rapid stag
#

yes

wintry solar
#

What are you trying to do

rapid stag
# wintry solar What are you trying to do

on game start, title screen card has a 1 in 4 chance of being polychrome

except it's obviously being 4 in 4 for whatever reason

it's not been not polychrome once since i implemented this.

maiden river
#

oh
the value's not going to change on the menu

quick kraken
#

Could it be that the seed stays the same?

maiden river
#

yeah

#

I tried that before too

wintry solar
#

Yeah there’s no seed there

rapid stag
#

🫠 wonderful

quick kraken
#

Could there be a pseudorandom function that takes from any other source?

red flower
#

math.random

quick kraken
#

Is there a way to grab the current time maybe or smth?

faint yacht
#

self.SEED = os.time() from globals.lua.

maiden river
limber blaze
#

this has no gameplay effect you can just get away with using math.random

maiden river
#

wheel up

glad osprey
round garden
red flower
#

yes

#

it's what makes the cards wiggle

round garden
#

good to know

wintry solar
#

There’s also juice_card

primal terrace
red flower
#

juice_up: good, takes you out to dinner first, best coworker
juice_card_until: evil, most annoying neighbor, guilty of 10 counts of murder

hard needle
maiden river
#

I've come up with an alternative solution for my retriggering
unfortunately it may end in an infinite loop

wintry solar
red flower
#

yes

maiden river
wintry solar
maiden river
#

I'm trying to retrigger a card I made in a custom cardarea

#

which is a consumable

wintry solar
#

Does it have a calculate function

maiden river
#

yes

wintry solar
#

And you’ve added the custom area to the calculation pipeline right?

maiden river
#

yup

wintry solar
#

So you just want some other object (joker?) to retrigger this custom card?

maiden river
#

yes

#
SMODS.Joker({
    key = "friends_movie",
    atlas = "card_backs",
    pos = { x = 6, y = 7},
    config = {
        extra = {
            repetitions = 1
        }
    },
    loc_vars = function (self, info_queue, card)
        return { vars = {card.ability.extra.repetitions}}
    end,
    rarity = 3,
    cost = 8,
    blueprint_compat = false,
    calculate = function (self, card, context)
        if context.weapon_hit or context.weapon_missed then
            -- loops until there's no ammo, which is expected
            SMODS.calculate_context({friends_movie = true, other_card = context.other_card})
        end
    end
})

here's the jank code, for reference

wintry solar
#

What’s this code supposed to do?

maiden river
#

retrigger all held weapon cards once

#

which technically works with the jank™️

#

(the retriggering part, at least)

wintry solar
#

Have you tried this?

if context.retrigger_joker and context.cardarea = CARDAREANAME then
  return { repetitions = 1 }
end```
maiden river
#

I think I did? if I didn't I might feel silly here in a few seconds

wintry solar
#

I don’t remember how the retrigger context is structured fully because I don’t use it

#

Let me double check

stone lance
#

Did you ever figure this out?

maiden river
#

uh

#

lemme see

wintry solar
#

Maybe this is better

if context.retrigger_joker_check and context.other_context.cardarea == CARDAREANAME then
  return { repetitions = 1 }
end```
willow plinth
hard flume
#

Pikmin Cards are like custom suits that can be created and stored at any time, as long as you have the correct onions

#

You need to have Pellet consumables to create them.

maiden river
faint yacht
stone lance
# maiden river I have no idea 😭

Damn. I have a custom seal and want to make a challenge deck that is JUST that seal (like what you were trying to do) so that's unfortunate.
It shows up with the seals in the deck preview, too

willow plinth
faint yacht
#

Changing .children.floating_sprite at any point?

willow plinth
#

i changed children.front instead

faint yacht
#

...reminds me, wanted to make this silly guy as a floating animated sprite.

wintry solar
maiden river
#

unicode " 😭

wintry solar
#

Oh rip do those ones not work either

willow plinth
wintry solar
#

Mobile coding 😭

sturdy compass
#

Speeeeeeeeeeeen

red flower
willow plinth
#

too bad my code is typescript transpiled to lua 😂

heady siren
#

I mean hey if it works

maiden river
#

do you even want all of it

wintry solar
#

Yes

maiden river
#

okay

faint yacht
#

-# More logs, more details.

wintry solar
#

Screenshot preferable

heady siren
#

'boutta snort those logs like coke

maiden river
#

prepare for a lot of screenshots

wintry solar
#

Or a text file would be fine

maiden river
#

oh okay

wintry solar
#

Just not inline code, it’s a pain in the arse to read on mobile

maiden river
#

god damn I have to stop doxxing myself 😭

wintry solar
#

You want to retrigger the weapon hit?

maiden river
#

yes
or miss; the weapon needs just needs to fire twice

wintry solar
#

This one looks to have fired four times?

maiden river
maiden river
wintry solar
#

Okay let me adapt the print somewhat

#

@maiden river

if context.retrigger_joker_check then
local output = “”
for k,v in pairs(context.other_context) do
  output = output .. k .. “/“
end
print(output)
end
lethal stratus
#

played hands arent going in the hand table properly

maiden river
#

okay 😭

lethal stratus
#

this one used to work but got broken

wintry solar
lethal stratus
#

is it the end?

wintry solar
#

What’s the new card area called?

lethal stratus
#

indented better, still dont see it

maiden river
wintry solar
#

What did you put as the retrigger context code?

maiden river
#
if context.retrigger_joker_check and context.other_context.cardarea == G.weapons then
  return {
    repetitions = 1
  }
end
red flower
lethal stratus
#

?

#

coded this before i got it

agile dew
#

how do i make a joker have a different effect and retrigger cards?

rn im trying to make a joker that retriggers all foils and gives xchips if a condition is met

maiden river
#

nope

wintry solar
#

Huh

red flower
faint yacht
#

...this is not an extension, more of for syntax highlighting & folding. @lethal stratus

wintry solar
#

Can you put a print inside it?

maiden river
#

sure

#

nothing showed up

wintry solar
#

Hmmm

#

Does it print if you change it to G.jokers

maiden river
#

yes

wintry solar
#

Did it retrigger?

daring heron
#

anyone know how to fix this?
this is the code:

--- STEAMODDED HEADER
--- MOD_NAME: Test Mod
--- MOD_ID: TEST
--- MOD_AUTHOR: [CebeeDrawz]
--- MOD_DESCRIPTION: Test Test
--- PREFIX: xmpl

----- MOD CODE-----

SMODS.Atlas{
    key = 'JokersTest',
    path = 'JokersTest.png',
    px = 71
    py = 95
}

SMODS.Joker{
    key = 'jokertest'
    loc_txt = {
        name = 'Test'
        text = {
            'test test',
        }
    }
}


----- MOD CODE END -----
#

i'm trying to follow a tutorial and it looks like i did about everything right but it crashes

maiden river
#

it seems like you're using an old tutorial

daring heron
#

fair enough

#

is there an updated one?

maiden river
#

it's somewhere in here

#

lemme find it

agile dew
#

and after the name of the joker

maiden river
#

oh

#

yeah that would do it too

daring heron
#

i'm kinda looking for a video perhaps

maiden river
#

I don't think there's a more up-to-date video

daring fern
maiden river
#

someone is working on one, I think

daring heron
#

anyway yeah it worked and i'm amazed

#

i didnt even think i could come this far

#

thanks guys

#

didnt use the right image though..

maiden river
#

it's case sensitive

#

you have to write key = 'JokersTest' in your Joker

daring heron
#

oh, i think i found it

#

yeah

#

this is surprisingly fun

sturdy compass
daring heron
#

still doesnt use the right image though

sturdy compass
#

You’re not specifying the atlas and position in your Joker

daring heron
#

where should i do that?

maiden river
red flower
pseudo current
#

Guys is this posible to code ingame?

maiden river
#

gains chips?

red flower
#

yes, i dont know if there's an easy way to do it tho

maiden river
#

yeah

daring heron
#

that did.. something

maiden river
#

it should be (0, 0) not (1, 1)

red flower
daring heron
#

btw is there an easier way to reload the game instead of closing it and opening it back up

red flower
#

alt+f5 i think

maiden river
#

alt f5 is faster

daring heron
#

nice

#

alt f4 tho

maiden river
#

true

pseudo current
red flower
pseudo current
maiden river
#

I mean
if you're a coder dev, wouldn't the answer be yes anyway

red flower
#

yeah

pseudo current
maiden river
#

I mean, I guess

pseudo current
#

or just doing some test things

faint yacht
#

Finishing description for this atm.

sturdy compass
maiden river
pseudo current
red flower
pseudo current
sturdy compass
wintry solar
maiden river
#

yeah

#

get the source code balatrojoker

#

and prepare for a wild ride

#

(it's now revealed that it was all an elaborate trick, to get eremel to play fvb. raevyn cackles in delight)

agile dew
#

can you add xchips to a joker?

#

or am i tweaking?

pseudo current
sturdy compass
#

Like have a Joker give Xchips on scoring or just add Xchips to the Joker?

wintry solar
maiden river
#

fr 🗣️

#

after I stopped playing my mod I discovered that I'm ass at balatro

pseudo current
#

Me playtesting my mod with 0 Jokers from my mod: egg

pseudo current
agile dew
#

a joker giving xchips on scoring

#

theres no xchips_mod from what i see

red flower
#

xchips = value works

pseudo current
sturdy compass
maiden river
#

enter: the plasma deck

#

😔

pseudo current
red flower
#

i like xchips it has a nice sound

maiden river
red flower
wintry solar
#

Coding is fun, there are other games I’d choose over balatro to have fun

maiden river
#

that's fair

#

although I keep accidentally getting into the comp scene of every game I play often

#

but it got me a college scholarship so I'm still unpunished egg

faint yacht
maiden river
#

hmmm

#

something is off about my two pair

maiden phoenix
maiden river
#

I've been wanting to check out replicube for a bit

#

but I'm replibroke

wintry solar
#

Looks interesting

cyan lagoon
#

how do i make a joker see the presence of other joker?

placid star
#

why is there so little documentation on how to make custom card areas 😭

maiden river
maiden river
cyan lagoon
placid star
placid star
red flower
#

for what

placid star
#

for a new type of reusable consumable i want to make

sage crater
maiden phoenix
#

Still a nice game

sage crater
#

also it's 10 dubloons. I feel like I can get the same experience for cheaper on a website or smthn

sage crater
#

currently

maiden phoenix
#

Ok

red flower
maiden river
placid star
red flower
sage crater
red flower
red flower
#

i feel like this is the wrong discord for this convo lol

maiden river
#

😭

mystic river
placid star
red flower
#

balatro should be 80 dollars

sage crater
red flower
#

you could get hundreds of hours out of that game

sage crater
#

my point wasn't about the price, it was that all those other games are monumentally more enjoyable

sage crater
#

unless you replay levels

agile dew
#

how can i give money during a retrigger?

red flower
#

i mean if your point is that its not good enough for the price then yeah maybe but i dont agree with the time/price argument

placid star
red flower
#

yes

#

i dont set it there because im setting it after the consumable area is aligned

#

(i love magic numbers)

placid star
#

omg now i see why people stay away from card areas

#

like theres like 3 mods that does it

maiden river
maiden river
placid star
red flower
#

i mean most mods dont need cardareas

#

and the screen is already pretty crammed

placid star
#

for sure, but tbh most of the reason im coding is for a challenge and to learn

maiden river
faint yacht
#

...redefine Joker and Consumable cardareas to be more compact. 😂

placid star
#

the fact that i love balatro only helps

red flower
maiden river
#

I actually have two card areas in fvb, and three if you have another mod that has a cardarea in it (maximus)

red flower
#

i have 2 visible ones and like 10 invisible ones

faint yacht
#

I didn't speak of other mods, just the two areas by themselves. 🍞

red flower
#

would be funny to make all jokers wee sized

#

and cram them there

faint yacht
#

Wee^2.

maiden river
#

wee debuff

red flower
maiden river
#

they shrink down when you pick them up

#

had to hook emplace but it was all worth it

#

just found this in the shop
I gotta rework this 😭

placid star
maiden river
#

yeah that's what creates the area itself

placid star
#

and do you define the position of the area later?

maiden river
#

I think so

sturdy compass
#

10 more jokers to go and then I’m basically just waiting on art

sage crater
#

ten more?? you're insane

#

I've gotten one joker "done" and it doesn't even work

#

over the span of this entire weekend lol

sturdy compass
#

10 more is light work for me atp lol

maiden river
#

I made 45 consumables

sage crater
#

I can tell 😭

maiden river
#

And like 20 jokers

sage crater
#

I respect the hell out of y'all's commitment to the modding scene of this game

placid star
#

@maiden river @red flower urm guys...

sturdy compass
#

The goal is 150 total jokers to match the base game count lol

#

And that doesn’t even take into account the other features lol

red flower
#

roguelite balatro

daring heron
sage crater
placid star
red flower
#

my goal is also 150 (i have 329 rn so i have to cut down)

daring fern
sturdy compass
red flower
#

tbf i dont do art so that helps

daring heron
pseudo current
# pseudo current
poll_question_text

Question for all coding devs. Are you working on a mod as the codder rn?

victor_answer_votes

9

total_votes

9

victor_answer_id

1

victor_answer_text

Yes

victor_answer_emoji_id

1185774262519337042

victor_answer_emoji_name

blueprint

sturdy compass
red flower
daring heron
pseudo current
placid star
placid star
red flower
placid star
sturdy compass
maiden river
#

Oh

sturdy compass
#

There are two others who have done art too but it’s mainly him

maiden river
#

You didn't call the reference

placid star
daring fern
red flower
placid star
#

ah

placid star
#

how would one find the location of the consumeable tray and set the card areas pos to that - how ever many pixels?

red flower
tall wharf
#

5

placid star
red flower
#

idk

placid star
#

LMAOO

tall wharf
#

OH GOD

cyan lagoon
#

how do i stop info_queue of other jokers appearing in info_queue?

#

like here. i dont want there being 'token joker'

placid star
#

@red flower one last question. why isnt my card area moving like how the others do with parallax when you move your mouse and it doesnt look like its under fisheyes

unborn bay
#
info_queue[#info_queue+1] = {key = "j_whatever", set = "Joker"}
cyan lagoon
#

what do i write in the set?

unborn bay
#

depends exactly on what you're looking for

#

if it's a joker its Joker if its a tarot its Tarot

cyan lagoon
#

ok

#

thanks

placid star
red flower
#

ohhh i dont play with any of that on idk

daring fern
placid star
daring heron
#

how do i make a simple x1.5 mult card that activates each scored card?

cyan lagoon
#

context.individual

daring heron
#

i mean the entire code

#

not just the trigger

cyan lagoon
#

...sure

daring heron
#

well, not the entire code

#

just a tutorial on how to add mult

#

this is my first joker

cyan lagoon
#

oh gimme a sec

daring fern
daring heron
#

not yet

#

i pretty much just want what the default joker does but x1.5 mult

#

but i'll do that tomorrow

#

it's getting late

#

thanks for the help guys

tall wharf
daring heron
#

never coulve done this without yall

dark roost
#

might be really simple and stupid but I can't for the life of me figure out how to just change a joker's name with take_ownership. I got atlases and custom sprites working, but not names.
The 2 ways at the end both just crash the game, and the one at the top just makes all the text disappear. I tried including a description there as well, but then I got a crash because of a variable and I don't want to remake the entire description setting for every joker that might get more complicated.

red flower
#

i think it's because they get overwritten by the localization files

#

you can do that instead

dark roost
#

just change the names in my own local files?

red flower
#

you can have a localization file in your mod and add a descriptions.Joker.j_joker field

#

im pretty sure ive never done it myself

cyan lagoon
high sinew
#

will it spawn the anaheim chile

chilly hull
#

how come this crashes? i copied what the steammodded wiki said just changed the colour

gusty iron
#

I GOTTA

#

I HAVE TO MAKE BLURSED

chilly hull
red flower
#

too classy to say hashtag

chilly hull
#

lemme google

#

thanks mister

high sinew
#

is there a way to test a mod in VS Code?

#

without having to rungame

daring fern
red flower
#

how would that work

#

maybe with the unit testing thing some people were making

dark roost
chilly hull
#

now how am i supposed to use this if i wanna make my bg 13FOEC and my text FFFFFF

placid star
chilly hull
#

idk how o use em with hex when having both B: and V:

#

its ma first time using lua 😭

placid star
chilly hull
#

that does make sense thank you

placid star
#

@red flower so with my cardarea code, when i open the collection the sprites just go onto the screen and become draggable and when i start a run my game immediately dies

placid star
chilly hull
red flower
# placid star

hmm i dont know if that emplace hook works how you want, i think emplace does more things

#

or maybe not idk

red flower
#

nah was thinking of another function

placid star
red flower
#

amazing

placid star
#

but like, how do i emplace my cards now...

red flower
#

i personally do a couple of lovely patches for that

native ridge
#

Just bumping this now that it's a more reasonable time of day

placid star
chilly hull
#

oh i forgor to answer i fixed it

#

just put an enter inbetween the two

cyan lagoon
#

anyone knows how to use retrigger_joker feature?

pale venture
thin swift
#

chat how do we feel about this joker name = 'We Do Some Trolling', text = { '{C:red}+69{} Mult, {X:mult,C:white}X10{} Mult', '{C:red}1 in 10 chance every blind{}', '{C:red}selected that the game ends{}' }

red flower
#

.config.blind.key also works i think

pale venture
#

let me check

#

oh yeah it works

#

couldn't find it in source code for some reason

gentle rain
#

feeling like yandev

sturdy compass
#

😭

sage crater
sturdy compass
thin swift
gentle rain
primal robin
#
if name == rank then
  letter = 'a'
else
  local joined_key = tostring(rank)..":"..name
  local values = { "8:8" = "an", "14:Ace" = "an" }
  letter = values[joined_key] or "a"
end
thin swift
#

does anybody have any context code for creating and destroying playing cards with jokers? i just dont know how to go about it right now

chilly hull
#

i wanna check for the leftmost joker and destroy it but i dont know how to check for it

red flower
#

G.jokers.cards[1]

#

that's the leftmost

chilly hull
#

oh thats what thatt meant

#

thank you

#

why isnt it 0 doe

red flower
#

lua is 1-indexed

red flower
chilly hull
#

how would you check if its the self card

#

like tthe joker itself

red flower
#

card ~= G.jokers.cards[1] for not equals

chilly hull
thin swift
red flower
thin swift
#

thank you!!!

chilly hull
#

it works! you a smart man

placid star
#

is there a context for new ante?

#

also is there a way to not destroy a consumable on use?

faint yacht
#

keep_on_use.

placid star
#

tyyyy

glad osprey
#

how would I add a new tab to this menu

tepid crow
#

I'd start by taking the headset off the screen but maybe that's just me

red flower
#

for the hardcore challenges

gentle rain
#

blehhh why does it crash when trying to check for a rank

glad osprey
red flower
gentle rain
#

oh lmao

tall wharf
placid star
glad osprey
#

idk that's why I'm asking you

tall wharf
#

the patch is not exactly compatible lol

glad osprey
#

dam 😔

tall wharf
#

so like

glad osprey
#

I need it for rougelite balatro

tall wharf
#

😭

glad osprey
#

aka hiker

#

unless yall have any better ideas as to where I should put an upgrade selection menu 🙏

tall wharf
chrome widget
#

Having a minor issue with event timing. I want to add a visual trigger in addition to card activations, but I can't seem to find a way to play an event exactly parallel with another

tall wharf
#

i mean

chrome widget
#

Here's an example:

I can get this aura flare to play when the card is first triggered, but I can't seem to line it up with when the card actually applies its specific mult effect:

chilly hull
#

what does seed mean in pseudorandom?

tall wharf
#

random on computers aren't actually random

#

it basically takes an input and changes it to somethin else

chrome widget
#

You need a seed value in a pseudorandom number generator. You use the pseudoseed() function, which accepts a string, and that gives you a numerical seed for the prng to use

chilly hull
#

ya i know but i was asking on what to put there

placid star
#

does anyone know when G.hand.config.temp_limit resets to G.hand.config.card_limit

chilly hull
chrome widget
#

No, it's just whatever you want that's a unique string for the pseudorandom call

#

Each joker in vanilla usually passes in an abbreviated form of that joker's name

chilly hull
#

how does the seed affect the random chance then?

chrome widget
#

Wdym?

chilly hull
#

how does the seed affect the output of a probability since its not the same with every seed

chrome widget
#

The purpose of unique seeds is so that the pseudorandom calculations of individual rolls don't affect each other

#

The way a psuedorandom number generator works is taking a starting numerical seed, performing some mathematical calculation on it that appears random, and then spitting out a new number. That new number "advances" the seed one place

#

And the game tracks a table of the current seed value for each unique seed used

#

If two rolls use the same seed, it means that one roll advances the seed position of the other, which the game avoids doing to make it harder to scum random rolls

#

(You can't get a different judgement result by opening a booster pack, for example)

chrome widget
# tall wharf random on computers aren't actually random

(With an asterisk, most modern computer systems do actually have access to "true" random calculations. It usually involves getting information about things like atmospheric noise or the value of electric currents, which might be deterministic at some level beyond what quantum physics can predict, but for computing purposes are random)

sage crater
red flower
#

seeds in vanilla are usually the name of what's triggering the effect + the ante number

zealous glen
#

Not always the ante number

#

Sometimes just a suffix

red flower
#

yeah

zealous glen
#

Though there’s a few Ante numbers sometimes

#

I think mainly for shuffling

chrome widget
# chrome widget Here's an example: I can get this aura flare to play when the card is first tri...

anyway, this is the function I use to create the aura effect. These values are just set to tell the shader to do something

--- @param stand Card Balatro card table representing a stand
--- @param delay_time number length of flare in seconds
G.FUNCS.csau_flare_stand_aura = function(stand, delay_time)
    if not stand.children.stand_aura then
        return
    end
    
    G.E_MANAGER:add_event(Event({
        trigger = 'immediate',
        blocking = false,
        func = function()
            stand.ability.aura_flare_queued = true
            stand.ability.aura_flare_target = (delay_time or 1) / 2
            return true
        end 
    }))
end```

but I still haven't figured out how to correctly delay this event to wait until exactly the individual card effect I want to play it on
zealous glen
sage crater
# chilly hull how does the seed affect the random chance then?

usually, random number generators pick a long string of numbers for their seed, and usually it's tied to something that can't be repeated (a really simple example is your computer's unix timestamp)
putting in a seed basically tells the random code "I want you to use this string of numbers instead of whatever you were going to pick".
And forcing a seed means it will always pick the exact same thing every single time in the same order, regardless of any factors. That being said, any seeded randomness inside of a joker will still be affected by the randomness of the run's seed. So there's kinda two layers to this "seeded randomness"

chilly hull
#

ah i see

#

thank yoy

chrome widget
zealous glen
chrome widget
#

Hmm... haven't tried that

#

Still testing putting the mult later

#

AYYY that works

#

thanks Victin!!

chrome widget
#

I have no idea why the opposite doesn't work, I guess the events typically used for the card text are probably unblockable

zealous glen
#

Wait

#

No

#

The other way around

#

Events are usually blocking and blockable

#

Otherwise they’d all happen at the same time

chrome widget
#

Oh, hm

zealous glen
#

Yours isn’t blocking

#

So putting it first makes it happen simultaneously with the next one

#

And nesting with extra ensures the mult is triggered after

#

I have some messy talking Jokers because idk how to make the text not interrupt or not be interrupted by scoring but also not get on top of each other

#

So it’s just somewhat awkward right now

placid star
#

does anyone know if consumables can have an update funcyion?

zealous glen
#

-# why do people keep using update

placid star
zealous glen
red flower
#

can't you use can_use for that

placid star
#

oh shit

#

yeah that sounds alot smarter

#

but can_use cant use context can it?

unkempt thicket
#

How do you increase the weight of a joker in shop?

faint yacht
#

You could set a "used" flag in use and use calculate for the applicable context to set the "used" flag back to false.

placid star
red flower
unkempt thicket
#

Hmmm, i wanted to edit other jokers weights...

red flower
#

a hacky way is to give them in_pool functions that have a pseudorandom chance but i feel like that might have problems

gentle rain
placid star
unkempt thicket
#

Is there a way to get a jokers rate? if there is i could have x chance to replace cards in shop with those jokers

unkempt thicket
placid star
faint yacht
# gentle rain buh

Initialize the roid_card first.

local ret = igo(self)
ret.current_round.roid_card = {}
ret.current_round.roid_card.rank = 7
...
zealous glen
#

I did that for Cow

glad osprey
#

im working on a rougelite mod and i need help figuring out what the hell i should do at this point
what needs to be done is a menu for configuring your upgrades (ill figure that one out on my own)
and saving what upgrades you have unlocked and selected

#

that second one is what i need help with

placid star
#

what is the code to delay a line of code for like half a second?

glad osprey
#

delay = time in seconds inside an event

placid star
#

ah okay

quartz ravine
#

Is this too strong? It's basically like card sharp but it applies for every card in the played hand

#

I am wondering if it should be rare instead

faint yacht
#

"Scoring cards give X2 Mult" would be the better wording.

quartz ravine
#

I made it so it will read the state of To Do list, if you have one and respect that hand, otherwise it will handle duty of settin the todo variable

gentle rain
#

i heard abt a program that turns all text in a file into localization files, does any1 have that on hand?

placid star
glad osprey
#

no

quartz ravine
#

Question - my booster packs appear and have the right cards, but they all say 'error'. What's the fix for this?

zealous glen
faint yacht
red flower
#

where's yusei fudo

quartz ravine
quartz ravine
# red flower where's yusei fudo

I'm watching the shwo and playing the game with the kids, we've only seen part way through the first series so far. Yusei was cool in the movie though!

red flower
#

i think it's a pun on joyousspring

zealous glen
#

gorjus

quartz ravine
#

I have a Yugi jonkler and an Eldlich, but otherwise its all animals in my mod. Had to add Yugi and Eldlich for the kids

#

Now I get the joke 🙂

zealous glen
#

Furry Yugi when

red flower
#

i liked the moogle guy

quartz ravine
#

No! I changed the name from Pawlatro, everyone thought it was going to be furry. Mine are all cute animals

zealous glen
#

Would Yugi have a Kuribohsona

red flower
#

i need to go back to the final fantasies

zealous glen
quartz ravine
# red flower i liked the moogle guy

Thanks! he picks a random hand, and if you play that hand he has a random chance to enhant the cards in the hand. A play on his little dances in ff6

red flower
#

i did actually

zealous glen
placid star
#

how can i make my consumable draw your full hand to deck then change your hand size back to the original, this is what i have

quartz ravine
#

My Yugi swaps back and forth between kid and adult yugi. You have to play the right hand to show you believe in the heart of the cards! It was cool to get the different joker sprites working

faint yacht
placid star
faint yacht
#

G.FUNCS.draw_from_deck_to_hand(amount) is responsible for the drawing.

quartz ravine
#

@red flower I love the booster packs, I didn't notice them before!

zealous glen
#

Ice stays winning

quartz ravine
quartz ravine
#

I read an article with localThunk, talking about his ideas for long term official modding support. It would be so cool if my mobile only friends could play some of these awesome mods.

red flower
#

official lovely patches when

quartz ravine
rare obsidian
#

hey, so Im really bad at coding lol

#

can someone help me make this work?

faint yacht
#

Drop the code screenshot first.
-# Then wait for if someone picks up.

rare obsidian
#

its too much for a screenshot

quartz ravine
rare obsidian
#

thats the broken code

quartz ravine
#

whats the error?

rare obsidian
#

so much lol

#

1 sec

hardy quail
#

is there any way to easily change the names of spades hearts clubs and diamonds in game for when making custom cards and you want to change what the suits are?

hardy quail
#

what is that?

rare obsidian
#

basically cntrl+f

hardy quail
#

ctrl+f in what? the games code?

rare obsidian
#

ig so that might work

hardy quail
#

huh

#

interesting

faint yacht
rare obsidian
wintry solar
#

should be SMODS.load_file

rare obsidian
#

testing

#

nope :/

#

now it just insta crashes

#

any advice?

placid star
#

do you guys know the default weight for existing booster packs?

faint yacht
#

assert(SMODS.load_file("effects.lua", "scribbled_edition"))() ?

heady siren
#

Using my consumeable in my booster pack is taken as selecting a card in the booster pack (this is not intended behavior)

#

This is my code for using, and for my booster pack, I don't know why this is happening

rapid stag
#

how use SMODS.signed_dollar()? :clueless:

placid star
#

does anyone know why my booster doesnt work?

scarlet thorn
placid star
#

ahh

scarlet thorn
#

replace set with key

iron haven
#

ok U works now.

#

now I have to make Y.....

hasty mist
#

how in the world did this happen

#

this is somehow causing issues, code works fine without it, am i missing something here?

placid star
placid star
hasty mist
#

i wasn't aware it was case sensitive, ty

placid star
#

all of lua is code sens <3

hasty mist
#

why is this animated atlas not working properly, ingame it only shows the first frame

hasty mist
#

omg

#

another ena

glad osprey
#

I am also making a mod with anomalies 😭

hasty mist
#

thats insane

placid star
hasty mist
#

this anomaly is simply part of an incredibly complicated pathway to obtaining certain jokers

iron haven
#

how do you destroy a card? because I don't want to find the code for it.

glad osprey
#

mine is a custom rarity

hasty mist
placid star
hasty mist
#

and yet the exact same setup works for my blind

glad osprey
hasty mist
#

consumable

glad osprey
#

ah

#

@scarlet thorn break it down for her

unborn bay
#

if this is for a joker or consumable its not gonna work

#

iirc

scarlet thorn
hasty mist
#

how do i make it work for that then

scarlet thorn
#

why was I on tht message

unborn bay
hasty mist
#

oh

#

god

placid star
hasty mist
#

this is one HUNDRED frames

scarlet thorn
glad osprey
#

you gotta make a custom draw step and stuff

scarlet thorn
#

remove set

hasty mist
#

damn you localthunk

hasty mist
#

💔

#

alright how do i do that

unborn bay
#

seeing 2 people with ena pics here sounds like they're talking to themselves

hasty mist
#

LOL

scarlet thorn
crisp coral
#

animation atlases don't work well with cards

hasty mist
scarlet thorn
glad osprey
hasty mist
#

true

scarlet thorn
# hasty mist a consumable

You have 2 choices, make the center use a different class for the sprite (alot of effort), or change the .pos.x or .pos.y values in the Update function

#

no need for custom draw steps like squid said

#

also, there is a mod that makes alot of things animated

#

maybe it has code you can look at

hasty mist
#

i was gonna try looking at jimball code in cryptid

scarlet thorn
iron haven
#

hmmm

hasty mist
iron haven
#

line 924.....

scarlet thorn
#

or cry_pointer_dt

hasty mist
#

which lua file is it actually in

scarlet thorn
scarlet thorn
scarlet thorn
#

??

#

because you sent a full file

iron haven
#
SMODS.Joker{
    key = 'yankee',
    loc_txt = {
        name = 'Y',
        text = {
            "{C:attention}destroys all played 2's{} gains {C:mult}+#2#{} mult for {C:attention}each destroyed 2{}.",
            "{C:inactive}(Currently {C:mult}+#1#{C:inactive} mult)"
        }
    },
    atlas = "Jokers",
    pos = {x = 0, y = 3},
    config = { extra = {
            mult = 2,
            mult_gain = 3
        }
    }, 
    unlocked = true,
    discovered = true,
    rarity = 2,
    cost = 7,
    loc_vars = function(self, info_queue, card)
        return {
            vars = {
                card.ability.extra.mult,
                card.ability.extra.mult_gain,
            }
        }
    end,
    calculate = function(self,card,context)
        for i = 1, #context.scoring_hand do
            if context.scoring_hand[i]:get_id() == 2 then
                card:remove()
                ard.ability.extra.mult = card.ability.extra.mult + 3
                  message = 'Upgrade!'
            end
        if context.joker_main and context.cardarea == G.jokers then
         return {
            mult = card.ability.extra.mult,
            card = card
        }
        end
    end
end
}```
scarlet thorn
#

for i = 1, #context.scoring_hand do
scoring_hand is not always defined

iron haven
#
for i = 1, #context.scoring_hand do

this line

scarlet thorn
scarlet thorn
hasty mist
#

this is really complicated

scarlet thorn
hasty mist
#

im pretty sure this is where its handled but i dont know how to read this code

#

or how to translate it to my own usecase

iron haven
scarlet thorn
#

if its been 0.1 since last change, run the code in the 2nd if statement

#

the reason for the if elseif elseif, is because jimball uses several lines for its animation

hasty mist
#

im using 10 lines and 10 collums

#

so 100 frames in total

faint yacht
#

That... is a lot of frames.

hasty mist
#

yeah i wasnt even sure if id be able to load it in

#

but its for quite the special card in my mod so

hasty mist
#

i was really hoping id be able to make this work

scarlet thorn
#

Do you mind if I dm you riley?

hasty mist
#

i wish there was just a lib i could use to automate this or something this is way beyond my skill level

#

go ahead!

faint yacht
#

...what about all frames spaced out horizontally instead?

hasty mist
#

wdym

faint yacht
#

One line, 100 frames.

hasty mist
#

that could work

faint yacht
#

Before the Joker definition, Line 1489 also has the "frames" by the x position.

iron haven
#

I played 5 2's and Y disappeared.

#

I want it to remove the 2's not remove the joker.

#

how do I fix that?

#
card:remove()

I have to change this.

sonic cedar
#

Does anyone know how to setup a path in load_file?
One of my lua files is in a folder, and I want to load it from the main file

#

Here's my setup

faint yacht
#

context.other_card?

iron haven
heady siren
topaz tiger
#

just started making my fist mod what is s_mult and s_chips it it the mult of that hand at lvl1?

iron haven
#
card.ability.extra.mult = card.ability.extra.mult + 3

do I have to change this too?

heady siren
heady siren
iron haven
#
SMODS.Joker{
    key = 'yankee',
    loc_txt = {
        name = 'Y',
        text = {
            "{C:attention}Destroys all played 2's{} gains {C:mult}+#2#{} mult for {C:attention}each destroyed 2{}.",
            "{C:inactive}(Currently {C:mult}+#1#{C:inactive} mult)"
        }
    },
    atlas = "Jokers",
    pos = {x = 0, y = 3},
    config = { extra = {
            mult = 2,
            mult_gain = 3
        }
    }, 
    unlocked = true,
    discovered = true,
    rarity = 2,
    cost = 7,
    loc_vars = function(self, info_queue, card)
        return {
            vars = {
                card.ability.extra.mult,
                card.ability.extra.mult_gain,
            }
        }
    end,
    calculate = function(self,card,context)
        if context.before then
            for i = 1, #context.scoring_hand do
                if context.scoring_hand[i]:get_id() == 2 then
                    context.other_card:remove()
                    card.ability.extra.mult = card.ability.extra.mult + 3
                      message = 'Upgrade!'
                end
            end
    if context.joker_main and context.cardarea == G.jokers then
        return {
            mult = card.ability.extra.mult,
            card = card
        }
        end
    end
end
}```

code for Y fyi.
placid star
#

can anyone help me no know why my booster doesnt work... crashes on open

placid star
iron haven
#

ok?

placid star
brisk rose
iron haven
faint yacht
hasty mist
#

what is the card area for consumables called

placid star
heady siren
# iron haven ```lua SMODS.Joker{ key = 'yankee', loc_txt = { name = 'Y', ...

We assumed you were using context.individual, not context.before, that's why you should show all of your code, use context.scoring_hand[i] like you are for the get_id, and message = 'Upgrade!' doesn't work outside of a return, use card_eval_status_text instead, which is structured like this:
card_eval_status_text(context.scoring_hand[i], 'extra', nil, nil, nil, {message = 'Upgrade!'})

brisk rose
# placid star can anyone help me no know why my booster doesnt work... crashes on open
    key = 'small_myth_2',
    atlas = 'prismboosters',
    kind = "Myth",
    pos = { x = 1, y = 0 },
    config = {choose = 1, extra = 3},
    loc_vars = function(self, info_queue, card)
        return {vars = {(card and card.ability.choose or self.config.choose), card and card.ability.extra or self.config.extra}}
    end,
    create_card = function(self, card)
        return create_card("Myth", G.pack_cards, nil, nil, true,  true, nil, "mythpack")
    end,
    ease_background_colour = function(self)
        ease_colour(G.C.DYN_UI.MAIN, G.PRISM.C.myth_1)
        ease_background_colour{new_colour = G.PRISM.C.myth_1, special_colour = G.C.BLACK, contrast = 2}
    end,
    group_key = 'k_prism_myth_pack',
    draw_hand = true,
    cost = 4,
    weight = 1,
    particles = function(self)
        G.booster_pack_sparkles = Particles(1, 1, 0,0, {
            timer = 0.015,
            scale = 0.2,
            initialize = true,
            lifespan = 1,
            speed = 1.1,
            padding = -1,
            attach = G.ROOM_ATTACH,
            colours = {G.PRISM.C.myth_1, lighten(G.PRISM.C.myth_1, 0.4), lighten(G.PRISM.C.myth_1, 0.2), darken(G.PRISM.C.myth_1, 0.2)},
            fill = true
        })
        G.booster_pack_sparkles.fade_alpha = 1
        G.booster_pack_sparkles:fade(1, 0)
    end,

Here's a booster pack from Prism

placid star
#

ah i got it working ty

brisk rose
#

You can see how it works

placid star
#

i was missing SMODS.create_card

old cairn
#

-# (first time asking for help here, so apologies if i say something dumb lol)
so basically i have a joker that debuffs the joker to it's right (don't ask questions it makes sense trust me) and it does debuff the joker, just doesn't show the "X" icon usually on debuffed cards and i can't figure out why
i'm pretty sure i used the right contexts but tbh i have no clue

brisk rose
hasty mist
#

why isn't the use button being highlighted here?

old cairn
iron haven
#

now Y doesn't give you mult.

heady siren
#

Code

iron haven
#
SMODS.Joker{
    key = 'yankee',
    loc_txt = {
        name = 'Y',
        text = {
            "{C:attention}Destroys all played 2's{} gains {C:mult}+#2#{} mult for {C:attention}each destroyed 2{}.",
            "{C:inactive}(Currently {C:mult}+#1#{C:inactive} mult)"
        }
    },
    atlas = "Jokers",
    pos = {x = 0, y = 3},
    config = { extra = {
            mult = 2,
            mult_gain = 3
        }
    }, 
    unlocked = true,
    discovered = true,
    rarity = 2,
    cost = 7,
    loc_vars = function(self, info_queue, card)
        return {
            vars = {
                card.ability.extra.mult,
                card.ability.extra.mult_gain,
            }
        }
    end,
    calculate = function(self,card,context)
        if context.before then
            for i = 1, #context.scoring_hand do
                if context.scoring_hand[i]:get_id() == 2 then
                    context.scoring_hand[i]:remove()
                    card.ability.extra.mult = card.ability.extra.mult + 3
                    card_eval_status_text(context.scoring_hand[i], 'extra', nil, nil, nil, {message = 'Upgrade!'})
                end
            end
    if context.joker_main and context.cardarea == G.jokers then
        return {
            mult = card.ability.extra.mult,
            card = card
        }
        end
    end
end
}```
code!
heady siren
#

You don't need context.cardarea == G.jokers, it only runs in G.jokers

hasty mist
heady siren
hasty mist
#

huh

#

i mean if i have most of it like this, were everything says "hand.highlighted" instead of "domain.highlighted" it works, but it only applies the edition if i have a playing card selected

#

i assumed i could just replace all instances of hand with domain but that didnt work

iron haven
#

what's wrong with steam....

placid star
#

does SMODS have built in exponential mult?

hasty mist
iron haven
#

it is still uploading.

placid star
hasty mist
#

it's just emult/emult_mod, instead of xmult/xmult_mod

glass scaffold
sonic cedar
#

does this not work
this is a joker file, the functions are contained in a center file

placid star
sonic cedar
iron haven
#

Why is cloud status still uploading?

#

is it Localthunk doing it?

placid star
#

can a consumable return +mult with a calculate function?

brisk rose
placid star
brisk rose
heady siren
#

It's SMODS.debuff_card(card, true/false or 'reset', string identifier (can be anything))

placid star
heady siren
heady siren
#

Oh, "mult" isn't a defined variable

placid star
heady siren
#

Hmmm

placid star
#

and even if that didnt work, it should return a message

heady siren
#

Did you check if it was true inside the final_scoring_step context?

placid star
heady siren
#

If you want it to run similarly to an Observatory planet card you could make it joker_main, it'll run after jokers

old cairn
placid star