#💻・modding-dev

1 messages · Page 295 of 1

long sun
#

(bump)

hushed field
#

there's no default dropdown menu option for ui, is there?

red flower
#

i havent seen one at least

#

whats the code

long sun
#

_ _

red flower
#

no idea sorry

hushed field
#

I don't feel like going through the effort of making a dropdown ui element, that sounds like it'd be difficult and time consuming

zealous glen
long sun
#

if effect.juice_card then G.E_MANAGER:add_event(Event({trigger = 'immediate', func = function () effect.juice_card:juice_up(0.1); scored_card:juice_up(0.1); return true end})) end

zealous glen
#

I think that's a SMODS bug

#

It's trying to juice the deck but there's nothing to juice

long sun
#

ah

zealous glen
#

Maybe

#

Try asking someone who knows better like Eremel or aure

long sun
#

@wintry solar being asked to ask you :D

wintry solar
#

hmmm?

long sun
#

lemme redescribe my bug ^^

#
  • my deck draws some cards face down
  • currently, it's drawing a full hand of face-up cards, then crashing
#
  • code is here
#
  • crash log is here
long sun
lucid owl
#

is there a way to manipulate pools easily? i'm trying to make a voucher that requires blank and antimatter, and when purchased, brings the blank and antimatter vouchers back into the pool of purchasable vouchers

hushed field
wintry solar
#

I am unsure on how context.stay_flipped works, I can take a look in an hour or so for you

long sun
#

that'd be awesome, thanks :D

lucid owl
#

pretty sure it's used_vouchers

#

i can probably just loop through that and delete values that match once the voucher is redeemed

tardy reef
#

Hi, I'm trying to mod a single joker into the game to try and get familiar with the process, and I wanted to ask if there's anything special that's necessary to get a legendary joker to spawn from a soul card?

long sun
#

nope! that happens automatically :D

tardy reef
#

Hmm, then I'm either really unlucky or I messed up somewhere lol

#

I'm using the brainstorm mod to get a soul card right away and have found every vanilla legendary multiple times already

long sun
#

mm, you should use DebugPlus to spawn it

tardy reef
#

I managed to get him to show up in the collection, so I must've done parts of it right at least lol

long sun
#

ooh looks awesome!

#

ya it should spawn, you're probably just unlucky

tardy reef
#

Oop, there it is lol

long sun
#

:D sweet

tardy reef
#

Yeah that was just unlucky lol

modern kindle
#

Lady luck is a fickle mistress

tardy reef
#

Now to figure out how to get the ability working, cause it crashed right away after earning money

faint yacht
# wintry solar I am unsure on how `context.stay_flipped` works, I can take a look in an hour or...

Been meaning to actually ping you about atlas and enhancement stuff, kinda forgot whilst figuring the wackiness out.

  • Atlas is 71x104, but I want the suit atlas to remain drawn 71x95.
  • display_size = { w = 71, h = 104 } is defined. Setting pixel_size = { w = 71, h = 95 } does nil.
  • Whenever cards are drawn to hand, if the card has this enhancement, it is automatically drawn to hand, even if it was not chosen to be during the initial draw.
  • Whilst the if context.hand_drawn and G.deck and #G.deck.cards > 0 and card and context.cardarea == G.deck then check works with draw_card(G.deck, G.hand, nil, "up", true, card) within calculate of the SMODS.Enhancement definition, if you exit to the main menu without doing anything else and re-enter the saved game, the drawn cards by the draw_card function are back in the deck instead.
placid star
#

can anyone see any errors? my code crashes on use of the consumable

tall apex
#

does anyone know how to make the legendary joker do the legendary thing?

#

like with the hovering texture

placid star
#

soul_pos for the hovering sprite and pos for the back sprite

tall apex
#

gothca, tysm!!

#

WORD?S??

#

gotcha

#

thamnks X3

tardy reef
#

Ok it seems to work just fine (effect is very simple all things considered, and I based a lot of the code from a joker from the extra credit mod that does a similar thing), but the little pop-up when the XMult scales doesn't show up

#

I don't really have a clue of what I'm doing, and I also don't know where to look for how to do it right

lucid owl
faint yacht
#

Forgot an extra end there for the Blank voucher set.

lucid owl
faint yacht
#

iirc Betmma's Vouchers has a voucher that "unredeems" vouchers without removing the effects so that they can be purchased again. 🤔

heady siren
#

I'VE BEEN MENTIONED

zealous glen
#

Kàeda mentioned

heady siren
#

Catbot acknowledged

lucid owl
faint yacht
#

Been a bit since then, not sure.

next timber
#

is there a way to tell how many hands have been played so far in a run?

zealous glen
#

I think so because there's a Tag that uses it

placid star
#

does anyone know how to get my vscode to autofill function parameters? i tried to add the smods folder to my workspace but it didnt work...

quartz ravine
#

Wow that stunk, two + hour power outage due to these storms

#

I am working on my last two jokers, trying to think of a fun idea. I have an adorable FF6 moogle and I want to play around with his ability of random chance and also dancing, since he does dance related moves in the game.

I was thinking he would respect the same random hand selected every round that 'To Do List' rewards, and if you play that he would randomly enhance cards played for that hand.

Too powerful?

glass scaffold
#

How do I make the Xmult variable constantly change?

primal robin
#

Am I only one who make entry point for mod as index.lua? JangSchna

modern kindle
primal robin
#

<@&1133519078540185692>

modern kindle
#

<@&1133519078540185692>

#

Shoot him dead

edgy reef
#

Roll the tanks out

primal robin
#

Light them up

keen gorge
#

🔫

placid star
#

mods cut off his balls

modern kindle
quartz ravine
#

I thought every round, it would call poll_enhancement

primal robin
#

Here's your 20$ as promised

#

But we'll take 5 cards

modern kindle
quartz ravine
modern kindle
#

Er, not too but

modern kindle
#

Will it be guaranteed 5 applications for 5 cards, or can it be 1 of the 5

quartz ravine
#

It will do 1 / 3 odds

modern kindle
#

Gotcha so the played hand entirely gets the enhancement and not indiv rolls per card

#

Honestly it's probably fine I'd say around a uncommon area or so

quartz ravine
#

Interesting, I did not know that to_do_pokerhand isn't a public var, like G.GAME.AncientJokerSuit (or however that goes)

placid star
#

can anyone help? my game keeps crashing on this line, so basically im trying to generate any joker with the custom rarity 'special', my mod prefix is jjok btw

strong jacinth
#

Luke show why there is a squiggly

placid star
#

that happens with all my G's tho

strong jacinth
#

And the error is?

#

Please screenshot and don't paste

placid star
strong jacinth
#

Go to mods/lovely/dump/functions/common_events.lua

#

And screenshot around the line 2312

placid star
strong jacinth
quartz ravine
placid star
#

i thought the key could be of a rarity and it would generate a random joker of that rarity?

quartz ravine
placid star
#

turns out i was a stoopy head and this was all i had to do ^^

quartz ravine
#

Oh you made a custom rarity? I haven't done htis, only custom enhancements and editions

placid star
#

tbf the github gives the impression that you need to input an integer value imo

placid star
quartz ravine
#

I haven't seen the show but that looks sooo slick

placid star
#

frrr its actually a pretty good show! hence why im making the mod on it

#

otherwise it woulda been elden ring or something 😆

scarlet spire
#

I've created a custom stake that goes before gold stake, how do I get the changes in that stake to retroactively apply to gold stake?

quartz ravine
#

Today I learned lua does not allow PowerShell style Verb-Noun function names 😦

tender meteor
#

how would i go about changing the skins of a few joker cards?

quartz ravine
#

Well that was very easy. I have overwritten To-do list to now always fire, so my moogle card will coalesce with it

stark geode
#

anyone know how to retrigger jokers

faint yacht
#
SMODS.current_mod.optional_features = function()
  return {
    retrigger_joker = true
  }
end

if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= card then
  return {
    message = localize('k_again_ex'),
    repetitions = 1,
  }
end
primal robin
#

Again!

glass scaffold
glass scaffold
placid star
#

you mean the badge colour?

glass scaffold
tall apex
#

does anyone know how i'd go about making a joker that always rolls for an edition when spawned and can't have the standard edition? :3

quartz ravine
#

Hi folks, anyone have a sample of how to check for the rpesence of another joker card? I want to program a card to use the value of another card if present

tall apex
quartz ravine
# tall apex guh????? :3

here, add this

        -- sendInfoMessage("triggering on pickup logic for this card", self.key)
        local edition = poll_edition()
        card:set_edition(edition, false)
        card.cost = 10
    end,```
placid star
glass scaffold
placid star
#

pos is for the background though and soul_pos is for the floating sprite

glass scaffold
#

no, i mean where'd you get the background (like in the screenshot)

scarlet spire
#

that's just the legendary background recolored

glass scaffold
#

where do you get it without the text or having a sprite on top of it?

#

I need it for art I'm wokring on for a mod

quartz ravine
quartz ravine
#

it's found in resources\textures\1x\jokers.png, it's like half day down

tall apex
#

im spawning it in but no edition but that might be a like, debugplus thing

quartz ravine
quartz ravine
#

I use that to ensure one joker always has hologram applied to it

tall apex
#

ohhh to appear in a list

tall apex
graceful magnet
#

trying to make a Joker that makes Uncommons be free, and I've copied over the set_cost function (so I don't break it) and added what I'd assumed would work, but it doesn't, as Madness here would be $0

faint yacht
#

.extra_value?

tall apex
#

i feel like a cavewoman given a smartphone rn

remote sequoia
#

How can one check if it's specifically (not) a celestial pack in a consumable's can_use function with G.STATES.SMODS_BOOSTER_OPENED consolidating all the packs together?

graceful magnet
remote sequoia
#

Not in a joker, a consumable, specifically in the can_use function.

graceful magnet
#

welll self.ability.name:find('Celestial') is usable outside of Jokers so it's probably a good idea to fiddle around with that

remote sequoia
#

I'll give it a shot!

remote sequoia
#

Crashed, no ability field

graceful magnet
#

self needs to be your target

#

the booster pack

remote sequoia
#

can_use only supplies self and card as arguments unfortunately

tall apex
#

hmm, does anyone know how to reffer to the edition of the joker in a context?

red flower
#

joker.edition?

tall apex
#

i thought it'd be like center.self.edition

tall apex
graceful magnet
tall apex
#

hmm.,,

remote sequoia
#

I'm not sure it does, but here ya go lua can_use = function(self, card) if G.STATE ~= G.STATES.HAND_PLAYED and G.STATE ~= G.STATES.DRAW_TO_HAND and G.STATE ~= G.STATES.PLAY_TAROT then if G.play and #G.play.cards > 0 then return true end if G.STATE == G.STATES.SMODS_BOOSTER_OPENED or G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK then return true end end return false end,

tall apex
#

say whats the difference between two equals signs and one?

quartz ravine
#

!!

#

one is assignment, the other for comparison

graceful magnet
#

== is a comparison, = is assigning

remote sequoia
#

two equals is comparing the variables, one is assigning

tall apex
#

big brain, big learn

#

im taking a coding class this summer :3

quartz ravine
#
local k = 4
--k is now 4

k == 4
-- returns true or false
tall apex
#

visual examples do me super good :3

graceful magnet
#

integral bit of code knowledge because the vast majority of languages will scream at you for mixing it up

tall apex
#

does that make ~= comparison?

red flower
#

yes

remote sequoia
#

yeah, that's specifically not equal to

tall apex
#

oooh :3

graceful magnet
#

~= is Lua (this language) for "Not Equals"

!= is the one I'm used to, which is JavaScript, C#, Python too I believe

maiden phoenix
tall apex
#

trying to troubleshoot this without overtly asking for the solution :3

remote sequoia
#

Which you'd think not x == y and x ~= y would always return the same, but depending on the variables in question might not be true.

graceful magnet
red flower
tall apex
#

i was like, trying to figure out the right lingo

red flower
#

joker is just a generic name i gave it because i didnt know what context you were talking about

tall apex
#

i thought it reffered to the thing but that was stupy because all objects are cards

graceful magnet
#

I have a Joker with an editions gimmick

red flower
tall apex
maiden phoenix
graceful magnet
maiden phoenix
#

You can get make your loc_vars modular

red flower
#

yeah it's not a good idea to do things in update unless you really need to

maiden phoenix
#

Something like this

loc_vars = function(self, info_queue, card)
            local foilMult = 2
            -- bla bla edition check
            return {vars = {foilMult}}
        end,
tall apex
#

wait isn't there a place to check all the functions and stuff

#

like repititions, editions, all that junk :3

graceful magnet
graceful magnet
red flower
graceful magnet
tall apex
maiden phoenix
graceful magnet
tall apex
graceful magnet
#

if you do have Balatro's decompiled code

I'd like to say that's still better because Balatro's code fucking sucks, but it's technically a better resource because then you can actually find the code for basically everything you'd want to do

tall apex
maiden phoenix
#

Or just look into your Mods/lovely/dump folder, it's better since it lets you see applied lovely patches too

silk scaffold
#

i return again to ask for help!!!

#
  calculate = function(self, card, context)
  if context.end_of_round and context.main_eval and not context.blueprint then
      if G.GAME.blind.boss then
          card.ability.extra.ante_count = card.ability.extra.ante_count + 1,
          card.ability.extra.chip_gain = card.ability.extra.chip_bonus * card.ability.extra.ante_count,
          card.ability.extra.mult_gain = card.ability.extra.mult_bonus * card.ability.extra.ante_count
        return {
          message = localize("Ante up!"),
          colour = G.C.attention,
          card = card
        }
      end
    end
      if context.joker_main then 
          return {
              chips = card.ability.extra.chip_gain,
              mult = card.ability.extra.mult_gain,
          }
      end
  end
}```
for some reason its saying theres an unexpected symbol near line 45 which is the chip gain and the mult gain calculate function
red flower
#

remove the commas

silk scaffold
#

oh lol

#

ty lol

#

i assumed it was like other parts of making a joker haha

tall apex
#

my turn for troubleshooting im at a loss for why this isn't triggering

#

it certanly only crashed my game when the editions matched beforehand but now its like, yeah i see it but im not gonna do anything

red flower
tall apex
#

splendid

tall apex
#

still no repetitions :c

primal robin
#

Imagine adding gamepad support when you don't have gamepad to work with ehehe

red flower
#

half of my mods have gamepad support and the other half are unplayable if you use a gamepad (i only made 2 mods)

primal robin
tall apex
#

heck

gilded narwhal
#

Is there a way for the +10 extra chips to appear before the gains +10 chips when scored?

#

The +10 extra chips is just coming from a bonus

zealous glen
#

@tepid crow ?

silk scaffold
#

someone told me how to make a joker always spawn as eternal regardless of stake but i forgot

tepid crow
gilded narwhal
#

just from loc_txt

tepid crow
#

cuz I'm guessing this is a lovely patch which means you just need the right order of localize calls

#

oh, it's an enhancement?

tall apex
#

is card.edition wrong here? im confuse ._.

gilded narwhal
tepid crow
tall apex
tepid crow
#

more like a crime

#

or possibly a crime scene

tepid crow
# gilded narwhal Yeah lmao

Yeah I don't think smods has anything built-in to shift those around (?), so it'll be in the order of:

  1. base chips
  2. enhancement
  3. perma bonuses

if you really want to change the order, you could start making lovely patches, but it'll be a bit of pain

gilded narwhal
#

it's not worth 😭

tall apex
daring fern
tall apex
#

you need to check for the context for..,, the thing im trying to output?

daring fern
stark geode
#

how do i check for the key of a specific joker

#

in Other_card

daring fern
#

if context.other_card.config.center.key == key

daring fern
# tall apex like this?

You need to replace all other_jokers with other_card and you should only be checking retrigger joker for when you are retriggering a joker

silk scaffold
#

how do i make it so a joker only spawns as eternal?

#

or as an edition?

tall apex
stark geode
#

cant get my jerker to retrigger my perkeos

#
SMODS.Joker{
    key = 'just_the_perks',
    rarity = "Perkolator_Perkeo_R",
    calculate = function (self,card,context)
        if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= card and (context.other_card.config.center.rarity == "Perkolator_Perkeo_R" or  context.other_card.config.center.key == 'j_perkeo') then
            print("triggered")
            return {
              message = "Again!",
              repetitions = 1,
            }
          end
    end,
}
faint yacht
#

j_modprefix_key

stark geode
#

i took owneership of perkro

#

so ig that makes sense

tall apex
next timber
#

new joker what do we think

stark geode
gentle rain
stark geode
#

even if i take owner and give it the perkeo rarity

tall apex
stark geode
#

every other joker i give the rarity to retiggers

gentle rain
stark geode
tall apex
#

but like, its just being like nuh uh

gentle rain
#

hmmmmm

tall apex
#

this is my current code

gentle rain
#

how would you fetch a card's edition?

tall apex
#

well like this no?

#

the edition is getting fetched, its the repitition that isn't happening

stark geode
#

context.other_card ~= card

#

i think you need this

tall apex
#

where?

stark geode
#

with context.rep

#

if context.retrigger_joker_check and not context.retrigger_joker and context.other_card

unborn bay
quartz ravine
#

Whoa....does lua support breakpoints?!

faint yacht
stark geode
#

ehh

#

ig

#

lemme try iy

tall apex
unborn bay
tall apex
#

im so confused..

red flower
stark geode
tall apex
red flower
#

yes

stark geode
# red flower comparing edtions directly didnt work for me but comparing keys did
SMODS.Joker{
    key = 'just_the_perks',
    rarity = "Perkolator_Perkeo_R",
    calculate = function (self,card,context)
        if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= card and (context.other_card.config.center.rarity == "Perkolator_Perkeo_R" or  context.other_card.config.center.key == 'j_Perkolator_perkeo') then
            print("triggered")
            return {
              message = "Again!",
              repetitions = 1,
            }
          end
    end,
}
#

shouldt this retrig perkeo

red flower
#

was just looking at it, looks correct to me comparing with cryptid but i literally never worked with retriggers

#

joker retriggers

tall apex
red flower
stark geode
#

yeah

#

it retiggers all jokers of the perkeo rarity

#

but perkeo wont

#

even if i give it the rarity

tall apex
red flower
tall apex
#

wait quick whats the joker card area called

stark geode
#

still odd

tall apex
red flower
#

then its a problem with perkeo retriggering specifically

#

rather than your code

stark geode
#

odd

stark geode
daring fern
# stark geode odd

Maybe it’s because perkeo doesn’t return anything so it has nothing to retrigger

shrewd cobalt
#

Trying to spawn a card when the deck starts, getting the attempt to index local 'center' (a nil value)" error

stark geode
red flower
shrewd cobalt
#

ahhh, thank you

gilded narwhal
peak obsidian
signal oak
#

how do i uninstall lovely

tall apex
#

blink blonk :3

maiden phoenix
signal oak
peak obsidian
signal oak
tall apex
#

hey im in the home stretch, where am i going wrong retriggering other jokers?

maiden phoenix
#

I think verifying the game files work too?

red flower
tall apex
#

i forgot

signal oak
dense yoke
#

i just reinstalled balatro to teach my gf
can yall remind me how to install steamodded..?

#

i just cant remember anything

tall apex
maiden phoenix
# dense yoke i just reinstalled balatro to teach my gf can yall remind me how to install stea...

Get everything you need to know about installing Balatro mods in today's guide. Installing Balatro mods should only take a few minutes & the first thing you will need to do is download and install lovely Injector and then steammodded as shown in the video.

Path for mod directory: %AppData%/Balatro/

Lovely Discussion: https://discord.com/chann...

â–¶ Play video
red flower
tall apex
faint yacht
#

Is .edition.key even defined? Are you checking if the Joker has any edition?

tall apex
high sinew
#

Could anyone help me with initial mod running?

tall apex
#

IT WORKS

high sinew
#

i think ive set up most of the mod to just try and see if it works if anyone is expirenced lmk in terms of helping

red flower
#

what happened

tall apex
#

it triggered the played cards twice as much

#

which i think i can just.,,,,,,,,

#

delete that part then?

red flower
#

hmm i dont think thats the problem but try it out

tall apex
#

well that just made it stop workin x-x

#

so back to what i had before, i still need to define the first part to target jokers and NOT the played cards

red flower
#

can you format your code lol

tall apex
#

i dont really know how but i can try :3

red flower
#

right click > format document if you have the lua extension

placid star
tall apex
#

i dont think i have that

red flower
tall apex
tall apex
#

i tried getting rid of space :3

red flower
#

my problem was indentation mostly

tall apex
#

ok i installed it :3

#

wheres the magic format button

red flower
tall apex
#

hm, that doesnt seem to have changed anything

#

or wait did it?

red flower
#

try format document with > lua

tall apex
#

no it just made calculate green

#

still nothing, just changed colors around

red flower
#

weird well having the extension is nice anyway

#

oh wait i see why

tall apex
#

it made my file name redd :3

red flower
#

you have a syntax error

#

it doesnt format with syntax errors

tall apex
#

AH

#

still nope

#

i fixed that

red flower
#

is it still red

tall apex
#

its yellow now

#

and underlining smods, poll_edition, and localize

red flower
#

yeah that makes sense
i recommend adding the smods folder to your workspace

tall apex
#

-# what the hell is a workspace

red flower
#

the space youre working on :3

tall apex
#

oh.,,

#

so adding smods would help?

red flower
#

it will give you autocomplete

#

for all the smods stuff

tall apex
#

AH! AND THERE IS COLOR ONCE MORE

#

formatting still isnt doing anything tho

red flower
#

does the mod run

tall apex
#

it do :3

red flower
#

then ur computer is cursed and cant do formatting

tall apex
#

guh??

red flower
# tall apex

anyway this looks ok to me idk why it is repeating twice

tall apex
#

idk either

lament agate
#

@high sinew this is the channel where you ask helps for developing a mod

high sinew
#

oh ok bet

red flower
#

what do you need help with

high sinew
pseudo current
#

Guys help

#

Every time a Joker upgrades itself this Joker gains x0.05 Mult
(Current x1.0 Mult, excludes himself and his copies)

Is this posible to code?

zealous glen
#

what's upgrading?

#

In the game, only poker hands can be upgraded

minor furnace
#

what on earth kind of table is this what is talisman doing

#

what were they smoking

pseudo current
#

like when square Joker gains 4 chips

#

like that

#

Like this

zealous glen
#

I don't think it can work for modded Jokers but you could maybe hardcode vanilla Jokers and your mod's Jokers to make it work

twin flicker
#

Can someone help me with a joker Im making? It currently retriggers twice for every played Jack but I want it to also retrigger the next scored card once

minor furnace
#

I hate Talisman

tall apex
red flower
tall apex
#

valid

#

... ok so its retriggering cards 13 times? the retrigger is set to 3

placid star
#

erm guys... i dont even know whats happening anymore and i wrote the code

plush cove
#

card.ability.extra

#

not card.extra.ability

placid star
#

ahhh

minor furnace
#

talisman got me adding a new decimal place to my version number out of pure spite

tall apex
#

im still on 0.0.1 :3

plush cove
red flower
minor furnace
stark geode
# plush cove

Lmao I might switch to single numbers at this rate

#

That or ver.revison

minor furnace
#

the other reason I hate talisman, is in addition to turning things into tables and making my life a pain, it feels wrong playing without the card scoring animations

tall apex
minor furnace
#

ah good to know

plush cove
#

my versioning scheme is:

MAJORUPDATE.BREAKINGMINORUPDATE.NONBREAKINGMINORUPDATE

minor furnace
#

why is no animations the default though 😔

plush cove
#

breaking updates are generally ones where I've either restructured or added new data

#

to the G.GAME object

placid star
plush cove
#

i dont think you can control loc_vars like that

placid star
#

oh damn, i was looking to change the description of my joker based on which phase out of 3 it was in...

#

could i just straight up change the entire description of the joker in loc_txt

minor furnace
#

I was going to say you could use a localization file to add something to the info_queue, but then I don't know if you'd be able to pass variables to it

pseudo current
#

Written In Stone (Uncommon) $7
Stone cards count as any rank to other Jokers

Is this one posible to code?

minor furnace
#

as someone who made an enhancement that counts as every rank, I had to manually patch each of the vanilla jokers to be compatible with it

#

it is doable, but it will have a lot of overhead

pseudo current
#

damm

zealous glen
#

what is this

minor furnace
placid star
river crane
#

I had an idea for an enhancement and a Joker that I want to add, but I have no Lua knowledge. How difficult would it be for someone with zero Lua knowledge, but has experience in other langs to add an enhancement, and a joker to apply that enhancement?

tall apex
#

does anyone have any idea why this is retriggering played cards 13 times when repetitions is set to 3?

minor furnace
#

you could just do
return { vars = { "gain" .. card.ability.extra.dollars .. "dollars at end of round" } }

zealous glen
#

@placid star

#

That one probably does way more than you need because I have some dynamic ones

#

actually here's a simpler one

#

it's similar to Invisible Joker

#
local _generate_main_end = function(card)
    if not misc.is_in_your_collection(card) then
        local add_node = function(nodes, text, colour)
            nodes[#nodes + 1] = {
                n = G.UIT.T,
                config = {
                    text = text,
                    colour = colour,
                    scale = 0.3
                }
            }
        end

        local nodes_ = {}

        add_node(nodes_, '(Currently ', G.C.UI.TEXT_INACTIVE)
        add_node(nodes_, tostring(card.ability.extra.blinds_defeated), G.C.FILTER)
        add_node(nodes_, '/', G.C.UI.TEXT_INACTIVE)
        add_node(nodes_, tostring(card.ability.extra.blinds_to_defeat), G.C.FILTER)
        add_node(nodes_, ')', G.C.UI.TEXT_INACTIVE)

        return {{
            n = G.UIT.C,
            config = {
                align = "bm",
                padding = 0.02
            },
            nodes = {{
                n = G.UIT.R,
                config = {
                    align = "cm"
                },
                nodes = nodes_
            }}
        }}
    end
end
#

-# At some point this hardcoded text should be localized

#

@minor furnace an example of what you can do with main_end

minor furnace
#

ah I see

zealous glen
tall apex
#

ive narrowed it down to the line before this, whenever that one isnt working the bottom one does the right amount of retriggers, so somehow the top part is looking at played cards

#

but.,.,, not giving them retriggers?

placid star
minor furnace
#

I would imagine you can do something similar to that
it would have to go in your loc_vars function

#

although I have no clue what ino_function is

placid star
#

i have no clue what im doing tbh im so tired

#

even i dont know what my code does atp

minor furnace
# placid star

that loc_vars should be
loc_vars = function(self, info_queue, card)

placid star
#

oh yeah, i keep forgetting how to actually do loc_vars lmao

twin flicker
#

Does anyone know how to make it so a joker triggering makes the played card to right of the current one being scored trigger an additional time?

#

Sounds pretty confusing lmao, but the concept is if played card is a jack retrigger itself twice and the card to its right once

rich geyser
#

Hey guys, does anyone know how to put discards to an absolute 0? I'm using the base config, which works for white stake (discards = -3, means starting with 0 ), but on blue stakes and higher, it starts with -1 discards, which is not optimal for pretty obvious reasons

quartz ravine
#

I thought $15 would be enough, but it still seems too cheap

#

What sounds like a good price? Now I am thinking ~$25 maybe

scarlet spire
#

maybe, i'd say 15 is already a decent investment, especially if you can't guarantee the received joker will actually fit your build

#

20 might be a good middle ground

twin flicker
#

I think 25 is solid tbh 20 not bad either

quartz ravine
#

I will make the price linked to how many people are in this discord at a given time 😈

scarlet spire
#

also worth noting that getting new negatives (especially random) is less powerful than having one of your existing jokers turned negative

#

i'd say 20 is pretty good for choosing 1 negative joker out of a completely random 5

zealous glen
twin flicker
#

My opinion is that theres so many more jokers that are useful negative than are useful non-negative

placid star
minor furnace
# placid star okay so could i apply styling to this? e.g. `{C:white,X:mult}`

something like this should work

    key = 'ino',
    loc_txt = {
        name = 'Takaba Ino',
        text = {
            "Cycles through effects",
            "Currently gives #1#"
        }
    },
    config = {
        extra = {
            stage = 0,
            xmult = 1,
            chips = 1,
            money = 1
        }
    },
    atlas = "atlas_name",
    pos = {x = 0, y = 0},
    blueprint_compat = true,
    loc_vars = function(self, info_queue, card)
        if card.ability.extra.stage == 0 then
            return {vars = {"X" ..card.ability.extra.xmult .. " Mult"}}
        elseif card.ability.extra.stage == 1 then
            return {vars = {"{C:chips}+" ..card.ability.extra.chips .. " Chips"}}
        else
            return {vars = {"$" ..card.ability.extra.xmult .. " at the end of round"}}
        end
    end,
    calculate = function(self,card,context)
        if context.setting_blind then
            card.ability.extra.stage = card.ability.extra.stage + 1 % 3
        end
    end
}```
#

however, you can't get color formatting this way

quartz ravine
#

I asked my artist to make this little baby and I totally forgot my plans for what it was going to do

high sinew
#

Im creating a joker leveling system for my mod right now the idea is that it starts on the pimento pepper (ive attached photo). I also want it to keep track of mult at bottom and to say it gains +3 mult. When the joker destroys itself and adds the next level it crashes my game

placid star
high sinew
minor furnace
#

but then it'll always be the xmult color

placid star
#

yeah i just thought of that whilst writing the code

#

can i use variables to declare styling?

tall apex
#

oh also fox i had an ask, i wrapped up the actual ability i just need help with your little script thingy

placid star
#

GUYS CAN I USE VARIABLES TO DECLARE STYLING??

quartz ravine
tall apex
# quartz ravine Hi Kawaii, what's up?

hi! so my joker is occasionally spawning in with an edition and i think thats from your script you gave me! I need make sure it is garunteed to spawn with an edition, but any edition

#

do you know how i could use this to do that?

quartz ravine
tall apex
placid star
quartz ravine
# tall apex oh wonderful! :D

local polledEdiiton = nil
local counter = 0
while(nil == polledEdiiton)
do
   polledEdiiton = poll_edition()
   counter = counter +1
end

print("It took " .. counter .. " tries, but we will apply edition of " .. polledEdiiton, self.key)
--bonus, do something fun with the counter
card.ability.perma_bonus = counter
#

oops, a few tyops there

tall apex
#

tyops yum :3

tall apex
quartz ravine
#

removed what you had and put the new sample instead

tall apex
#

gotcha :3

#

silly print command..,,

#

it.,.,, it didn't apply the edition but it definately rolled for one LMAO

placid star
#

wait howd u do that...

zealous glen
#

{V:x} and inside loc_vars you can return {vars = {colours = {…}]} and the x-th color in vars.colours is used for the respective part of the textbox

tall apex
high sinew
tall apex
quartz ravine
tall apex
quartz ravine
#

oops, I see what happened. Sorry to lead you into the briars!

tall apex
quartz ravine
#

Hey, you asked for help. That is more than like 50% of junior devs do!

tall apex
#

help is important in learning a new skill!! as an artist ik that all too well

quartz ravine
#

Shhh don't tell people you're an artist around here!

tall apex
#

guh wha why

#

is it a TOS nono?

remote sequoia
#

whoops hit enter

#

looks like you're calling the joker's name where you want the area that the joker should be getting put in.

tall apex
#

im so close i can feel it . w.

quartz ravine
quartz ravine
#

is it polledEdition or edition?

tall apex
#

polledEdition, no?

quartz ravine
#

yes! but which one are you using when you call set_edition?

high sinew
high sinew
#

not sure how you remove a joker to replace with another in a sense

#

like its leveling up the joker

tall apex
#

im calling for the current edition rather then thee one polled for if im interpreting it correctly

remote sequoia
tall apex
quartz ravine
#

You're welcome 🙂

tall apex
#

this joker is so cool, i love editions and this joker is just me as a 2010 scene core clown girl XP

remote sequoia
red flower
old bane
#

im really bad at shaders... how would i make something like cryptid's astral or vanilla's polychrome but just yellow? i'm trying to make it highlight something

red flower
remote sequoia
# red flower please use the smods function 😦

Just trying to get their current code working with as little issue as possible. Unless there's a reason for it I'm not aware of, I think what they want to do could be done with a single joker changing rather than multiple jokers replacing one-another in the first place, which wouldn't require SMODS.create_card at all.

red flower
#

yeah that's why i recommended set_ability

stark geode
#
if context.card_added  and context.card.ability.consumeable and not context.blueprint then
            print("triggered")
            if context.card.edition.type == 'negative' then
                print("secnd")
                card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_mod
                return {
                    message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xmult,card.ability.extra.Xmult_mod } },
                    colour = G.C.MULT
                }
            end
        end
#

so i had this working

#

it would increase when a negative consumeable was created

#

but now it wont

#

idk what i did

twin flicker
#

Does anyone know of a way I can queue a retrigger for a card that isnt being scored yet, and if its possible to pop that retrigger before the initial scoring of that card? if that makes any sense

#

Or here, does anyone know if there is a way to make the message that pops up for a retrigger different for each retrigger? Like if I had a joker that makes a card retrigger 3 additional times the first time it says "X" under it when it retriggers the second time "X" also and the third time "Y" for example

red flower
old bane
#

how do i get the player's current hand when they reload a run?

red flower
stark geode
#

istg if smods changed somthing

tall apex
#

multiplier.,,

twin flicker
#

Im not sure what I want is possible though due to only being able to return one thing

stark geode
#

card_added isnt triggering

#

idk what to do

proud moon
red flower
glad osprey
twin flicker
red flower
#

the newest version should do what you want

tall apex
#

Not like a crazy amount but lots of rng markiplier quotes

twin flicker
#

Cool thanks, how should I go about updating smods or is it as straightforwards as it sounds? I just dont want what ive been working on to get messed up in any way

tall apex
#

And associated chips mult etc

glad osprey
#

hello everyone my name is multiplier and welcome back to two retriggers at chads

red flower
tall wharf
#

nb

twin flicker
#

does anyone know how
"if context.other_joker"
works? can I use it to make a joker retrigger the joker to its right or something?

sacred quarry
#

Hey guys, super new to modding on here (and coding as well). I really want to add a few of my custom joker art works into the game and mess around with things. Are there any good resources out there to learn what I'm doing? Saw a couple youtube videos, but each person did things differently and skipped a few key steps

rich geyser
glad osprey
sacred quarry
rich geyser
#

tho if you need more help, you can always check youtube tutorials or just ask here, people are usually quite supportive

#

I talk from experience lol

sacred quarry
#

I feel like we need more youtubers out there lol]

#

I am so new to this that anything past naming a joker becomes confusing

glad osprey
#

ngl I should make a youtube tutorial series for balatro modding

sacred quarry
#

I kind of understand position and what not, but yeah its so confusing

#

I literally want to make a joker with +2 mult

#

thats it lol

sacred quarry
blazing cairn
#

theres a balatro modding starter pack in the modding threads section

sacred quarry
#

need to make this guy a reality

blazing cairn
# sacred quarry I feel like we need more youtubers out there lol]

https://www.youtube.com/watch?v=Zp-4U5TlbxY&t=8s youtube vid about creating jokers

STEAMODDED 1.0.0
A tutorial on how to make a modded Joker.

https://github.com/art-muncher/Example-Mod -- EXAMPLE MOD
https://github.com/Steamopollys/Steamodded -- STEAMODDED
https://github.com/WilsontheWolf/DebugPlus -- DEBUGPLUS
-----------------------------------------------------...

â–¶ Play video
sacred quarry
blazing cairn
#

kinda just brute forced thru everything

narrow iron
#

G.GAME.current_round.most_played_poker_hand this is the most played poker hand right???

sacred quarry
#

haha yeah i feel it

rich geyser
wind steppe
#

trying to learn balatro modding, does anyone know why this joker isn't doing anything? here's main.lua:

--- STEAMODDED HEADER
--- MOD_NAME: Test Joker
--- MOD_ID: TESTJOKER
--- MOD_AUTHOR: [UnusedParadox]
--- MOD_DESCRIPTION: test joker for testing purposes
--- PREFIX: test
----------------------------------------------
------------MOD CODE -------------------------


SMODS.Atlas{
    key = 'Jokers',
    path = 'Jokers.png',
    px = 71,
    py = 95
}
SMODS.Joker{
    key = 'Jonkler',
    loc_txt = {
        name = 'xmult joker for sevens',
        text = {
            'Each played {C:attention}7{} gives',
            '{X:mult,C:white}X#1#{} Mult'
        }
    },
    atlas = 'Jokers',
    pos = {x = 0, y = 0},
    config = { extra = {
        Xmult = 77
    }
    },
    loc_vars = function(self,info_queue,card)
        return {vars = {card.ability.extra.Xmult}}
    end,
    calculate = function(self,card,context)
        if context.individual == G.play and context.cardarea == G.play then
            if context.other_card:get_id() == 7 then
                return {
                    card = context.other_card,
                    Xmult = card.ability.Xmult
                }
            end
        end
    end
}


----------------------------------------------
------------MOD CODE END----------------------
lucid owl
crisp elbow
#
        if G.shop then
            if (love.timer.getTime() - 1) > card.ability.shop_update_interval then
                if G.shop_jokers and G.shop_booster then 
                    for k, v in pairs(G.shop_jokers.cards) do
                        v.extra_cost = math.random(0, 49390)
                        v:set_cost()
                    end
                    for k, v in pairs(G.shop_booster.cards) do
                        v.extra_cost = math.random(0, 49390)
                        v:set_cost()
                    end
                end
            end
        end```

Trying to make a joker work by randomly changing prices in shop every second, did I mess something up in this function?
lucid owl
sacred quarry
#

anyone know why my joker may be looking like this ? I thought I had dimensions right, but it looks really rough on the edges

crisp elbow
#

what's the resolution

sacred quarry
#

I basically did an overlay of the in game joker reference sheet that is provided and added a 1x and 2x folder

#

just exported the 2x at 200% in asepirite

#

for example I just made the canvas size fit this joker on the left and exported

old bane
wind steppe
crisp elbow
sacred quarry
#

so weird

crisp elbow
#

And you sure it's lined up perfectly? Usually when I try to make a Joker atlas I have it start with just the base image and not use a pre-existing Atlas

sacred quarry
#

you know what

#

I am an idiot

#

I updated the PNG files in a separate folder and never dragged into my %appdata% mods folder LMAO

halcyon osprey
#

is there a context for Held in Hand stuff?

lucid owl
#

try updating

narrow iron
halcyon osprey
#

i got what i wanted it to do, im gonna try to make a marioparty like deck thingy and right now im making card enhancements for the board spaces

#

I want each card (good or bad) to have a Played function or Held in hand Function

#

red space, if played -6 money, if held x0.5 mult

#

Actually something i dont know how to do is to make a Random integer on Lua

like picks a number from 1-10 and if its 3, it summons blank card such and such

shut crater
#

is there a way to prevent a ConsumableType from getting its own collection page?

old bane
#

you might be able to put no_collection = true in the definition of the consumable type

shut crater
#

I tried that, no luck though

narrow iron
shut crater
#

I thought about rewriting the modsCollectionTally function but idk how Lua works

old bane
shut crater
#

there is only one consumable of that type and its no_collection is set to true, it gives me a collection tab with nothing in it

old bane
#

oh i see

narrow iron
wind steppe
# lucid owl try updating

newest version of steamodded, but the joker still does nothing

--- STEAMODDED HEADER
--- MOD_NAME: Test Joker
--- MOD_ID: TESTJOKER
--- MOD_AUTHOR: [UnusedParadox]
--- MOD_DESCRIPTION: test joker for testing purposes
--- PREFIX: test
----------------------------------------------
------------MOD CODE -------------------------


SMODS.Atlas{
    key = 'Jokers',
    path = 'Jokers.png',
    px = 71,
    py = 95
}
SMODS.Joker{
    key = 'Jonkler',
    loc_txt = {
        name = 'xmult joker for sevens',
        text = {
            'Each played {C:attention}7{} gives',
            '{X:mult,C:white}X#1#{} Mult'
        }
    },
    atlas = 'Jokers',
    pos = {x = 0, y = 0},
    config = { extra = {
        Xmult = 77
    }
    },
    loc_vars = function(self,info_queue,card)
        return {vars = {card.ability.extra.Xmult}}
    end,
    calculate = function(self,card,context)
        if context.individual and context.cardarea == G.play then
            if context.other_card:get_id() == 7 then
                return {
                    xmult = card.ability.xmult
                }
            end
        end
    end
}


----------------------------------------------
------------MOD CODE END----------------------
narrow iron
#

return Xmult not xmult

lucid owl
narrow iron
#

that too

lucid owl
narrow iron
#

ah okay

#

ive been using uppercase so i wasnt sure if lower worked

lucid owl
#

both work, i've just seen lowercase more often

lucid owl
halcyon osprey
#

tryna remove the cards, and they just hangout

#

like they are gone, dissapear and reappear as like ghosts

shrewd cobalt
#

Is it possible to use SMODS.Atlas to replace the texture Jimbo uses?

narrow iron
narrow iron
shrewd cobalt
#

Ahhhh, thank you!

halcyon osprey
narrow iron
#

it would be
variable = pseudorandom_element({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, pseudoseed('random number 1-10'..G.SEED))

#

the string can be whatever

halcyon osprey
#

ooh oki

glass scaffold
#

how do I make a value in a Joker change constantly?

daring fern
narrow iron
#

oh

lucid owl
lucid owl
halcyon osprey
#

guess last part is how tf do i give it my enhancements

daring fern
blazing cairn
#

my joker doesn't trigger when cards get retriggered how do i fix this

#

also it doesn't function properly with blueprint

halcyon osprey
daring fern
halcyon osprey
#

yeah

#

holy shit it did the copy thing weird;y

blazing cairn
halcyon osprey
daring fern
glass scaffold
#

Can someone tell me how to make this xMult instead of +Mult?

#

I stole some code from the Misprint in the lovely dump

daring fern
blazing cairn
daring fern
unborn bay
daring fern
halcyon osprey
#

i mean.... what???? its like a touchable ghost card it generated lmao

#

i can drag iot everywhere

#

doesnt have a function

crisp coral
#

your card isn't emplaced to a cardarea

daring fern
halcyon osprey
glass scaffold
#

So, somehow, I got it to work

glass scaffold
blazing cairn
silk scaffold
#

hey i know its late but

set_ability = function(self, card, initial)
    if card.config.key == "old_joker" then
      card:set_eternal(true)
    end
    return
 end,```
does this not like make a joker eternal when found in shop and packs
shut crater
#

can someone explain the parameters for Consumable.load?
load(self, card, card_table, other_card

#

I'm trying to access a value from extra

blazing cairn
silk scaffold
#

oh lol

daring fern
#

Also you need to put j_modprefix_ infront.

silk scaffold
#

wdym j_modprefix_ where?

#

or where in front

#

its rlly hard to find all the documentation i cant lie...

daring fern
silk scaffold
#

or my vsc isnt really showing me all the options that i can do

#

ohh

silk scaffold
daring fern
glass scaffold
#

This code worked in earlier versions of smods, but now throws attempt to index field 'other_card'.

Anyone know a fix?

halcyon osprey
#

okay im struggling, How can i just make the card destroy itself if its played or held without it becoming a ghost

silk scaffold
#

I appreciate it, I hope to one day return back here and be able to give help like yall

daring fern
#

And also why do you have those events?

tall wharf
#

ah yeah

hexed stump
#

Are the names of the suit changing tarot anywhere in code? I’m trying to find them for a joker I’m making but they’re not defined in card.lua, only the suit change

tall wharf
#

why do you have nested event anyway

#

@halcyon osprey

halcyon osprey
tall wharf
#

huh

#

that doesn't sound right to me

halcyon osprey
#

probably cause all of the effect stuffs and i just removed all of that as Juice Up always crashes me

halcyon osprey
daring fern
halcyon osprey
#

Oh this is for the enhanced cards, which i want both a Played effect and Held in Hand effect. The Joker i made for it is to just generate them

daring fern
halcyon osprey
#

i want it so that the cards get destroyed once your selected effect takes place, so you can never have more than 1 when the joker generares tgem

#

(wanting to make a deck based around this)

daring fern
halcyon osprey
#

but how do i trigger that context?

daring fern
halcyon osprey
#

Ooh

#

Okay well my main issue now is discarding

#

as i would also like the cards to get destroyed whenever anything gets discarded

daring fern
halcyon osprey
#

the enhancement

#

(because i want discards to act as rerolls kinda for this (im making a mario party type board thing)

daring fern
# halcyon osprey the enhancement

Try something like this ```lua
if context.discard and SMODS.has_enhancement(context.other_card, 'yourenhancement') then
return {
remove = true,
}
end

last sentinel
#

Is it possible to have a custom deck prevent certain boss blinds from occurring? (the same way certain challenges do)

normal crest
#

Probably using the G.GAME.banned_keys table

#

Never used it myself tho

last sentinel
#

that would make sense

halcyon osprey
#

ill try pre_discard

#

didnt work either

daring fern
halcyon osprey
#

Okay its destroying them on discard, but the last thing is i want them destroyed when other cards are also discarded

#

Also essentially the only thing i want the deck to have is Starts you with an Eternal Board Card (so you always get the Enhanced cards)

#

well i managed to do something lmao

runic pecan
#

Which joker/voucher in which mod stops anymore jokers from showing up in shop?

hexed stump
#

Okay so, you can’t grab the key of one of the suit changing consumables off of something like consumeable.key or ability.key, but it’s clearly there when you print off the table of the whole thing

#

Is there something simple I’m missing to just grabbing it? Would the location of it in the table change, in theory? So if I were to reference that index of the table I could grab it?

#

That seems a bit too good to be true

daring fern
hexed stump
#

Holy fuck thanks

#

I’ve been grappling with this problem and changing the scope of my joker all day

glass scaffold
#

wouldn't you like to know weather boy

fickle stag
#

indeed

glass scaffold
#

it's m6x11.

fickle stag
#

thanks <3

glass scaffold
#

Same one used in Balatro

#

You'll need WinRAR or 7Zip to grab it from the game's .EXE.

#

(it should be in the resource folder.)

glass scaffold
daring fern
#

Is there a way to add perma Emult?

long acorn
#

it finally works (i gave up and just let it take suits)

zealous glen
#

What’s your issue

long acorn
#

no need i gave up on that

zealous glen
#

If you can generate a random suit then you can generate a random rank

modest iris
#

hello guys, does anybody know how can i get the first card scored, not played in press_play, i need it for a boss blind. i can't use context to acces the hand played

press_play = function(self)
        if not G.GAME.blind.disabled and G.play and G.play.cards then
            G.E_MANAGER:add_event(Event({
                trigger = 'after',
                delay = 0.5,
                --de pus sunet
                func = function()
                    local destroyed_card = nil
                    play_sound('tarot1')
                    destroyed_card:juice_up(0.3, 0.4)
                    G.E_MANAGER:add_event(Event({
                        trigger = 'after',
                        delay = 0.5,
                        func = function()
                            G.deck:remove_card(destroyed_card)
                            destroyed_card:start_dissolve(nil, 1)
                        return true
                        end
                    }))
                return true
                end    
            }))
        end
    end

}
long acorn
maiden phoenix
modest iris
#

imma try this, thank you

long acorn
# long acorn

im trying to adapt castle's code to generate ranks rather than suits

tepid rock
#

Hey guys, I'm trying to follow the guide in the starter mod message and having some issues. Code looks fine but lovely isnt detecting it and therefore it isnt showing up in the game. I have assets of the right size in 1x and 2x and i can post my script if needed but it feels like i am missing something more than not having something in my script

hushed field
tepid rock
#

correct

modest iris
#

do you have the smods.json file in your mod folder?

#

when i first started i forgot to add it and had the same issue

tepid rock
#

i do not, i have a main.lua only. I do have smods downloaded

hushed field
modest iris
hushed field
#

you definitely want a json file

tepid rock
#

the outdated youtube vid ^^'

#

artmuncher one

modest iris
#

look into the mod metadata and follow the steps, it should work

tepid rock
#

is writing a json file the same as the lua one?

#

i also have visual studios on my computer and that opens whenever i open a json

hushed field
tepid rock
#

thank you

long acorn
# long acorn

how the fuck is it a nil value the lua file for it is right there is this game fucking blind or something

hushed field
hushed field
# tepid rock thank you

let us know if you run into more problems! The set up can definitely be a bit iffy if it's your first time!

long acorn
manic rune
#

how does the voucher that reduces costs work?

hushed field
# long acorn

can you show the whole code for this? I have no cue what you're trying to do here, but all I know is that I've never seen someone use filenames to refer to information on their jokers

manic rune
#

this currently doesnt account the for discount

tepid rock
long acorn
#

oh i meant the joker id (which is the same as the filename)

tepid rock
hushed field
hushed field
hushed field
tepid rock
#

brilliant, thank you

long acorn
#

how do i load in the joker ids in main then

hushed field
#

what is the effect you're going for, and what does the actual code look like?

long acorn
#

so like every [rank] gives it +3 mult

#

and it changes every round

hushed field
#

you'd never need to access the joker by id, in that case

long acorn
#

ok so i moved the hook to the joker file itself but it still reads it as nil

hushed field
#

you can set the global variable by hand the first time. The information on which suit or rank a card like castle is checking for shouldn't be stored on the joker itself

long acorn
hushed field
# long acorn

the file the hook is in doesn't matter to its function

long acorn
#

yeah

hushed field
#

also, even in that file, there's no global named jokermostwanted

long acorn
#

im just confused at what im doing wrong since it worked when it was checking suits instead

#

since i copied it from the example mod castle

hushed field
#

I'd check some other mods to see how they've set this up, because this isn't a great way to go about it

hushed field
long acorn
#

i did and it works

#

my problem was it read suits

#

i need it to read ranks

hushed field
#

i know

#

your implementation is actually not similar to the castle example mod

#

you're using globals because I think you're missing that the example is first selecting its targets by creating locals. It never uses the joker's key to access anything, for example

#
function SMODS.current_mod.reset_game_globals(run_start)
    -- The suit changes every round, so we use reset_game_globals to choose a suit.
    G.GAME.current_round.castle2_card = { suit = 'Spades' }
    local valid_castle_cards = {}
    for _, v in ipairs(G.playing_cards) do
        if not SMODS.has_no_suit(v) then -- Abstracted enhancement check for jokers being able to give cards additional enhancements
            valid_castle_cards[#valid_castle_cards + 1] = v
        end
    end
    if valid_castle_cards[1] then
        local castle_card = pseudorandom_element(valid_castle_cards, pseudoseed('2cas' .. G.GAME.round_resets.ante))
        G.GAME.current_round.castle2_card.suit = castle_card.base.suit
    end
end```
#

As you can see here, the castle_card variable, which is the same usecase as your jokermostwanted variable, isn't a joker id or anything. It's defined locally in the line above it

#

You're checking if you have valid target cards, but not ever doing anything with that array. You even set the target_card as a local. All you'd need to do is replace the use of jokermostwanted.base.value and jokermostwanted.base.id for target_card.base.value and target_card.base.id

long acorn
#

holy shit it works now

#

so i did read the example code wrong lmao

#

thanks a lot

zealous glen
#

Also check how Rebate works in vanilla

tepid rock
#

Sorry to interrupt, I'm seeing in the guide that there is auto complete/suggestions on what the person is typing (the artmuncher guide still). Should I be seeing that?

zealous glen
#

What program are you using

tepid rock
#

visual studios

#

used zerobrane for a bit and that did not either

zealous glen
#

Normally these programs give autocomplete suggestions automatically

tepid rock
#

It is giving them when i type up something and type it up again later (eg every time I write "Jo" it suggests "Joker" and "joker2") but it doesnt show up if i havent used it already

hushed field
#

that's normal

#

if it's not recommending the use of standard lua code, like setting up if ... then statements, though, you'll wanna install the lua extension for vsc

tepid rock
#

gotcha, so stuff specific to balatro probably wont show up but lua stuff will?

hushed field
#

yup!

hushed field
# long acorn so i *did* read the example code wrong lmao

a good thing to remember is that you basically never want to access a joker's information by using the joker's key, unless you specifically know what you're doing. Most functions shouldn't care for it. The key's use is to see if a joker is owned or to create it, but it shouldn't be used to get into its ability or try and set variables

long acorn
#

gotcha thanks

hushed field
#

Fixed my list of bugs for Kino, time to make some more config UI 🥲

#

And more messing around with configs to see what it likes, and what it doesn't

last sentinel
#

Is there a way to access the last Tarot card played? (not necessarily tarot/planet)

coral flume
#

G.GAME.last_tarot_planet,

#

Is the code in the fool

last sentinel
#

yeah but thats one gets overwritten if a planet is played

#

at least i think

#

trying to find a last tarot only but might just have to make it

coral flume
#

I think you'll have to make it

coral flume
#

Does anyone know if you can check, how many times a non specified card is played per hand
for example a flush house have 3 "10 of hearts" and 2 "king of hearts", or a pair being 2 "4 of spades" rather than just 2 "4's"?

wintry solar
#

You can just work it out manually

coral flume
#

Yeah makes sense

next timber
#

is it possible to add a friends of jimbo pack that reskins the entire suit, not just face cards?

coral flume
#

I think paperback does that

daring fern
next timber
#

oh cool thx

zealous glen
#

You don’t need that specific input

#

I think any one but collab would work

stark geode
#
SMODS.Joker{
    key = "Perkeo_Template",
    rarity = 1,
    config = { extra = { Xmult_mod = 1,Xmult = 2} },
    loc_vars = function(self,info_queue,card)
        return { vars = {card.ability.extra.Xmult_mod, card.ability.extra.Xmult} }
    end,
    calculate = function (self,card,context)
        if context.card_added then
            sendDebugMessage("test", "perkeo")
        end
        if context.card_added  and context.card.ability.consumeable and context.card.edition and not context.blueprint then
            sendDebugMessage("test", "perkeo")
            if context.card.edition.type == 'negative' then
                card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_mod
                return {
                    message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xmult,card.ability.extra.Xmult_mod } },
                    colour = G.C.MULT
                }
            end
        end
        if context.joker_main then
            return {
                message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xmult } },
                Xmult_mod = card.ability.extra.Xmult
            }
        end
    end 
}```
this is supposed to scale every time a negative consumeable is added, but ot doesnt
modern kindle
#

Good schmorning chat (part 1 in case I pass out again)

stark geode
#

looks like card_added isnt triggering

#

idk why

#

it was working before

#

i didnt change anything

manic rune
modern kindle
#

But hi bepis!!

manic rune
#

hi :3

zealous glen
modern kindle
#

I took a nyquil pill last night and some melatonin

#

I was sleep sleepin

zealous glen
#

Hello dilly 👋

stark geode
modern kindle
#

Hi vic :D

zealous glen
#

I can’t test it right now or try to diagnose the issue

modern kindle
#

You mean you can't spend every waking second working on this stuff? Ugh, and to think we spent our time talking to you...

hushed field
#

I think I may have spent as much time on Kino as I spent on my actual job the last month, haha

modern kindle
#

Busy ice man

Also hi ice :)

stark geode
modern kindle
#

I won't lie i didn't do a lick of work yesterday I don't think

#

I was lazy

#

Aside of in the early morning anyway but early morning work doesn't count

reef belfry
#

just so i dont spend the next hour pissing myself tryna figure out whats wrong

#

this DOES check if the card played is a poly stone right

wintry solar
#

No

reef belfry
#

💔

wintry solar
#

How could the center be two different things?

reef belfry
#

iontkno

manic rune
reef belfry
#

oh my god

#

i forgot smods has that as a thing

manic rune
#

i mean, you need to use that in combination of something to check for the card's edition

#

v.edition and v.edition.key == "e_foil", probably (change e_foil to e_polychrome in your case, i grabbed that from my code :p)
-# v.edition check is important

daring fern
primal robin
#

Imagine v.edition?.key in lua

manic rune
#

since mine does :p

manic rune
zealous glen
#

you could do v['edition?'].key

manic rune
#

what

#

you can?

primal robin
#

JangSchna No, it's not how it works

manic rune
#

💔

zealous glen
#

What do you mean?

#

A key can be any strong

#

string*

manic rune
#

strong

#

💪

#

sleepy, when are you gonna be awake

primal robin
#

context?.other_card?.edition?.key is a shorthand for context.other_card and context.other_card.edition and context.other_card.edition.key

modern kindle
#

Is anyone ever truly awake

zealous glen
primal robin
#

Of course, it would be too easy

zealous glen
#

Why are you saying that my syntactically correct code isn’t how it works then

primal robin
#

Because it's correct in javascript

stark geode
#

turns out my smods was broken

primal robin
#

I'm not say that is correct on lua

#

But I wish it was

stark geode
#

i delteted the entire folderand put it back

#

now it works

zealous glen
stark geode
#

yeah

primal robin
#

Okay time to test blindkit

#

If it works I can finally do some more blinds

#

Because drawing them pissing me off

stark geode
#

turns out you shoul del your whole smods folder and not just blindly trust windows to rplace everthing corecctly

faint yacht
zealous glen
manic rune
# faint yacht hecc. 💀

im guessing that "2" card only triggers the drawing stuff when its drawn, not when its in hand :p
so when the game loads back, nothing is saved but that card is already in hand (past the drawn phase, so it wont trigger whatever effect that is)

zealous glen
manic rune
#

you could force the game to save when the card is drawn, dunno

faint yacht