#đŸ’»ăƒ»modding-dev

1 messages · Page 147 of 1

frosty dock
#

change_base just takes a suit key

#

e.g. 'Diamonds' or 'bunc_Fleurons'

leaden wren
#

this much i know
i just wasn't sure how to retrieve the table from SMODS.Ranks and get the key out

nova finch
#

how do i check if the scored card has a certain enhancement?

leaden wren
#

i think SMODS.Ranks.key didn't work
or whatever i tried

frosty dock
#

uhh

#

can I see the code you have?

#

I'm not sure I get what you're doing currently

leaden wren
#
SMODS.Joker {
  key="AliceRabbit",
  loc_txt = {
      name="Alice_Rabbit",
      text={
        "Changes all {c:spades}Spades{} in deck to",
        "a random Rank each, each {C:attention}Blind{}" 
      },
  },
  config = {
      extra = {
      }
  },
  atlas='FOM1',
  pos= {x=3,y=0},
  rarity=2,
  cost=5,
  loc_vars = function(self, info_queue, card)
      return { 
        vars = {
          card.ability.extra.cost 
        }
      }
  end,

  calculate = function(self, card, context)
    if context.end_of_round and not context.repetition and not context.individual then 

      local rank = pseudorandom_element(SMODS.Ranks, pseudoseed('alicerabbit'))
      for i,v in pairs(G.playing_cards) do
        if v:is_suit("Spades") then
          SMODS.change_base(v, nil, pseudorandom_element({'2','3','4','5','6','7','8','9','10','Jack','Queen','King','Ace'}, pseudoseed('alicerabbit')))
        end
      end
      SMODS.calculate_effect {
        message = 'Scrambled!',
        sound = 'myo_alicerabbit',
        card = card
      }
    end
  end
}
#

this works but i want it to work with modded ranks

#

the bit of attention is that giant change_base at the bottom

#

the local rank is just a leftover

#

from testing

frosty dock
#

rank.key

#

or pseudorandom_element(SMODS.Ranks, pseudoseed('alicerabbit')).key or whatever

leaden wren
#

okay THAT'S how i'm supposed to do it

#

i was passing pseudorandom_element(SMODS.Ranks.key

#

i think

frosty dock
#

oh

#

that's what you meant by that

runic pecan
#

If I name my variable as card.ability.extra.chancemodif would the game multiply it to G.GAME.probabilities.normal automatically?

frosty dock
#

why would it?

#

it's not some magic value the game uses anywhere

tender gale
#

Ok, I did that, and now it crashes instead

runic pecan
leaden wren
#

SMODS.change_base(v, nil, pseudorandom_element(SMODS.Ranks, pseudoseed('alicerabbit').key))

#

that's a crash

#

oh wait

#

lol, lmao

#

nvm

tender gale
cerulean rose
#

joker_main doesn't have other_card

leaden wren
#

uhhhhhh
how do i pass sound volume to calculate_effect

#

do i pass it a table?

tender gale
#

but it didn't do anything

cerulean rose
#

iterate over context.scored_hand

tender gale
#

how do I do that

zealous glen
#

abilities can work in multiple contexts if you need them to

leaden wren
minor gyro
#

what do y'all think?

leaden wren
#

ooo fun

#

i do have one suggestion

#

gimme a sec

minor gyro
#

forgot shade lmao

grave arch
#

No I want it to be generating 3 time, all this part work for me - but the juice up animation only play once and i don’t understand why it does that

minor gyro
#

now it's complete hahaha

leaden wren
#

actually not sure i like how that looks ignore me

minor gyro
#

my first mod so idk what to expect

leaden wren
#

i had a similar issue

minor gyro
leaden wren
minor gyro
#

it's an easy fix tbh, but idk

leaden wren
leaden wren
#

fairly self explanatory

minor gyro
leaden wren
#

e.g. pass mult how you would to return {}

minor gyro
#

like, u want the white parts to be dark when in the joker text?

grave arch
minor gyro
#

o think I get it

leaden wren
#

it also handles the timing and stuff automatically

#

you use it for anything that does more than one "thing" per trigger, afaik

grave arch
#

Ohh I see!

grave arch
#

So thank you, it should help me :)

minor gyro
#

@leaden wren

#

it's not very visible tho

#

idk if instead of inverting colours maybe making it a little darker blue

#

like this?

tender gale
#

ok I finally got it to work'

#

i moved the set to false to only trigger when the hand triggers the Joker effect

#

This way it does its intended effect

leaden wren
#

i like that

#

especially on the misty one

minor gyro
#

hantu!

#

i love that ghost

#

It's quick as hell when it's cold

zealous glen
#

are the skulls a reference

autumn geode
#

my jokers still spawn in the shop when i own them without me having showman i tried to set the value of allow_duplicates to false but it seems to have not done anything

zealous glen
autumn geode
#

yea

#

oh does that bypass it

#

i spawned them in with the debug mod

wintry swallow
#

hi hi yall :3 this is probably a question that gets asked decently often, but
im lookin to make a mod with a friend that aims to add multiple new suits, and jokers that use those suits. is there some good way to get started on something like that, or is it more of a "work your way up to it" type of thing

raw geyser
merry raven
#

What is programming but not blatantly copying from others

vocal verge
#

something something infinite monkeys infinite time etc

ionic verge
#

what does trigger and delay mean here?

#

i mean delay is fairly obvious

#

(this is in card.lua)

vocal verge
#

delay - delay
trigger - v

#

"immediate" (default) - Runs as soon as possible "after" - Will run after a set amount of time. Also see delay "condition" - Will not finish until the condition is met. For most cases, you probably just want to use immediate with a check (see func). See ref_table, ref_value and stop_val for how to set this. "ease" - Used to interpolate values. Useful for score incrementing or movement. Also see ref_table, ref_value and ease_to for how to set this. "before" - Will run immediately, but if it doesn't complete before the set amount of time, it will be cancelled. Also see delay

ionic verge
#

i see

runic pecan
#

What context is for "after each hand"?

ionic verge
#

.after?

runic pecan
#

I've used context.after and then context.joker_main but my joker still got caught looping in collection page.

ionic verge
runic pecan
runic pecan
orchid thunder
#

It's the update

#

What are you trying to do

#

It's juicing it and aying the sound every frame it can

runic pecan
#

Oh crap, I forgot update is an already taken function name.

orchid thunder
#

Do like _update

#

If you want update

#

And tell me if it works

runic pecan
#

I'll check if roll works.

orchid thunder
#

Roll works too maybe

#

I'm not sure if that's how functions in jokers work

runic pecan
#

It worked. No more endless drum roll.

#

And I just noticed the description almost rhymes.

ionic verge
#

how would i call the name of the last hand played?

runic pecan
ionic verge
#

what function or what not for that

runic pecan
#

you want the hand type or?

ionic verge
#

hand type

#

trying to put it in this

#

i would do this how space joker does it, but it bugs a little

runic pecan
#

I think I remember seeing it somewhere in the Balatro code. Let me go check.

ionic verge
#

specifically, this happens and doesnt clear until something replaces it

#

so itll stick through the shop

#

and such

#

i probably could just clear it with a different function or something, but this would be cleaner

ionic verge
#

cool

#

oh goodie

#

wait

#

im dum

weary jungle
#

how do i make this not freeze my game?


    if G.RETURNLOCALIZATION then
        G.RETURNLOCALIZATION = false
        return {
            message = localize('k_extinct_ex')
        }
    else
        return waitReturnLoc()
    end

end```
ionic verge
#

fuck me
its still happening

orchid thunder
ionic verge
#

i just undid it all bc nothing changed and arguably worked a little worse

orchid thunder
#

And what's problem

ionic verge
#

the text is supposed to reset

#

no lvl 13, no chips x mult

orchid thunder
#

Hmm

ionic verge
#

cus this is at end of round

orchid thunder
#

Do you have njy?

ionic verge
#

njy?

orchid thunder
#

Not just yet

ionic verge
#

i dont know what that is

orchid thunder
#

Then no ok

#

Hmm

ionic verge
#

this is the guy

#

this is the code

#

blue_seal_failed is a context i patched in so i could detect for the condition the card requires

weary jungle
#

update_hand_text?

ionic verge
#

what would i put in its arguments

weary jungle
#

idk

vocal verge
#

do you need the whole card_eval stuff

#

i'm looking at space joker rn

ionic verge
#

maybe

#

probably not

vocal verge
#

it's probably why it gets stuck

ionic verge
#

no its not

#

happened before i did that

wispy rose
ionic verge
#

and its just for the message thing that happens when a joker does something
like
'+4 mult!'

vocal verge
#

isn't that just the message part? or do you need to use eval for custom stuff

#

or i guess message just links to the card_eval

ionic verge
#

i needed to move it to the playing card, and seemingly that was the only way to do so

#

message works

#

but it ties it to the joker

#

which isnt what i wanted

vocal verge
#

maybe look at hiker?

#

hiker does it on card

ionic verge
#

im gonna be real, its not causing a problem

vocal verge
#

i mean fair

#

as long as it works and doesn't cause insane lag

ionic verge
#

yeah

vocal verge
#

better than having a louder Miku depending on hand size

#

still need to fix that

ionic verge
#

well
its better

vocal verge
#

Need to learn more about balatro code

#

So many joker ideas now

#

Equity - Turns all jokers in hand to the average value HemiSalute

gaunt thistle
#

what's the average value?

vocal verge
#

average value of hand

#

so lower value goes up, higher value goes down

#

sorry not jokers

#

playing cards

ionic verge
#

oh that makes a lot more sense

runic pecan
#

Expected effect: "Discarded non-Spade cards get destroyed."
Result: " 'Sacrificed!' message displayed normally but no card get destroyed."
I need help.

ionic verge
#

yo spade supremacy?

#

this is the code i use for destroying selected cards when the specific joker is sold

#

(kinda like hangman but cracked)

runic pecan
ionic verge
#

true

runic pecan
ionic verge
#

yeah pretty much

#

and the shatter thing for glass cards cus while ive never destroyed a glass card i presume they do that instead of disolving

runic pecan
#

But I also want to track destroyed card count for leveling up this joker, though.

ionic verge
#

mmm

#

add a counter var?

#

increase it anytime that something gets dissolved/shattered

#

how do i get the level of the last hand played?

#

need it for this line

placid frigate
#

are there good resources for making a modded challenge for Balatro

vocal verge
#

You can probably look around for mods that add challenges to see how they do it as well

narrow pendant
#

Anyone know off the top of their head how to make these two trigger seperately?

placid frigate
placid frigate
crisp coral
#

Cryptid does that because it has its own loader system, it also uses SMODS.Challenge

placid frigate
placid frigate
#

That sounds correct

vocal verge
cerulean rose
willow quiver
#

any open stability concerns with better calc lately? Trying to gauge if it's safe for me to make KCVanilla's better calc migration branch the official release

novel rain
#

Where do mods go?

soft timber
#

If you made a mod and uploaded it on github and etc, do you just create a new thread on #1209506514763522108 or is there anything to do beforehand?

narrow pendant
#

Thanks <3

willow quiver
placid frigate
narrow pendant
#

Huh, extra is interesting

willow quiver
#

ask @south pagoda about it... i wasnt aware of it either

south pagoda
#

Its a recent feature bettercalc added

narrow pendant
#

still only seems to do the chip trigger

willow quiver
#

yes sir

#

i tested it again

willow quiver
#

are you on better calc?

narrow pendant
#

No idea

willow quiver
#

whats ur smod ver

narrow pendant
#

ig im behind

willow quiver
#

ohh yeah

#

you need to update

#

be warned that better calc can break existing stuff

narrow pendant
willow quiver
#

yeah it aint easy... sorry

wild patrol
#

@cerulean rose figured I should ask permission before doing this but do u mind if I take it exodia code and rework into a similar card effect that requires 4 cards?

wild patrol
#

Also is there code for if a joker is active the next round you can make it create a specific joker card?

narrow pendant
#

Sushi is broken ✅

narrow pendant
#

For some reason Lineup is crashing the game trying to call juice_up, even though that card doesnt use juice_up

runic pecan
#

So for some reason return { remove = true } under if context.discard then does not destroy discarded cards despite SMODS doc states so.

violet void
wild patrol
#

Gonna try this

wild patrol
violet void
wild patrol
#

Honestly anything I've ever coded is held together by ducktape and glue

#

I'm a firm believer in the if it works it fucking works method of coding

violet void
#

What's that picture đŸ«„

wild patrol
#

Art

tender gale
#

If #context.scoring_hand triggers on only scoring cards would #context.hand trigger on all played cards

wild patrol
#

Hmmm I wonder if I can use the smod create on pot of greed when you draw it from a pack to create it as a tarot card

wild patrol
#

As a work around to the use button not working when lumped in with jokers

#

Because I have the use function in the card but when u draw it u can't use it or add it to the consumables

violet void
wild patrol
#

Because I'm gonna guess because it's in a state where u can't draw the use can't trigger lol

#

And when u pull a tarot from a pack u can't add it to the consumables

#

The duck tape and glue is coming together

#

Someone should make a GitHub report for example codes for people to start with

#

Would help a lot for beginners the joker template is nice but doesn't really teach much

gaunt thistle
#

beautiful art

violet void
#

I hope someone adds examples in the docs yeah

gaunt thistle
#

that's what it is

wild patrol
#

đŸ€”

tender gale
#

This is the code for Death, and on the right is my code for a Joker that's supposed to work like this

#

You play some cards and a three, those cards get transformed into the three before scoring

#

how would I do that

narrow pendant
#

Damn i like your colours

tender gale
#

Its the github theme

gaunt thistle
#

one of the best themes imho

tender gale
#

anyone know how to do that?

violet void
#

There's probably a better way though

sturdy compass
#

That reminds me I'll probably have to make contexts for myself as well pain

tender gale
#

Maybe it could be after, I mean that would also make it less powerful

tender gale
#

I really just mean how to use copy_card to change the cards into the three

violet void
#

Does it need to only copy the rank or the editions/enhancements too

tender gale
#

Copy everything, like death

violet void
#

Ah ok

sturdy compass
#

One of my more ambitious goals for my mod is to implement a new class of card that almost act like Chaos upgrades in Hades, where you have to debuff yourself and then gain a great buff once a condition is met. Gonna need a new card area for it and everything probably

violet void
#

A new class?

sturdy compass
#

The closest they would really be is a consumeable but at the same time not really

violet void
sturdy compass
#

lmfao

tender gale
sturdy compass
#

An example

violet void
#

That looks powerful

sturdy compass
#

Exactly

violet void
#

So then it disappears?

sturdy compass
#

They're like risk/reward quests almost

sturdy compass
tender gale
violet void
#

Could be a joker with self destruct

Unless you don't want to it to occupy the joker slots

tender gale
#

thats like, 10 now including me

sturdy compass
sturdy compass
violet void
#

Have fun with cardarea, I have yet to delve into it too

sturdy compass
#

I will definitely be asking around here

violet void
#

And I will conveniently read the responses đŸ‘ŒđŸœ

sturdy compass
#

Actually here lemme show off the full list of ideas for this card type

violet void
#

Aries is going to be pain and not compatible with mods

tender gale
#

Is matador not?

violet void
#

Matador is not efficient in what it does, as in it doesn't trigger with all boss blinds

#

In vanilla, so let alone in modded blinds

#

Astra either hard codes it or makes it work like matador

tender gale
#

My Zodiac cards are much simpler

#

+5 chips to all cards of a specific type and then increase by 3

violet void
tender gale
#

👍

runic pecan
#

Which keyword in {C:} do I use on Negative,
edition or dark_edition?

sturdy compass
#

C:dark_edition

tender gale
#

I've been trying to figure out how to copy since yesterday

#

This effect is really hard to use

wintry solar
#

Isn’t it just copy_card(original_3, card_to_change)

tender gale
#

idk how to define what cards need to be changed

wintry solar
#

What’s the effect again?

tender gale
#

If played hand contains a three and two other cards, transform them into the three

#

for a triangle Joker

wintry solar
#

Okay so how are you identifying the 3?

random sleet
#

eremel you should play thac /j

#

-# oops this is dev chat sorgy-

wintry solar
#

I still have your original version downloaded đŸ€Ł
-# I will when I play the game again lol

tender gale
wintry solar
#

That’s looking for cards with an id of 0 and doing it across all cards for every card

tender gale
#

oops

wintry solar
#

You can do it all in context.after

#

Lemme write some rough outline code for how I’d do it

long sun
#

Ooh more Tarots!

runic pecan
#

Which vanilla sound is closest to clock ticking?

sturdy compass
#

probably generic1

wintry solar
#
if context.after then
  if #scoring_hand ~= 3 then return {}, false end
  local threes = {}
  for _, card in pairs(context.scoring_hand) do
    if card:get_id() == 3 then
      threes[#threes + 1] = card
    end
  end
  if #threes == 1 then
    for _, card in pairs(context.scoring_hand) do
      if card ~= threes[1] then
        copy_card(threes[1], card)
      end
    end
  end
  return {}, true
end
#

I’m pretty sure this will work but it is mobile typed

tender gale
sturdy compass
#

#context.scoring_hand instead of #scoring_hand lol

tender gale
#

so it turns your threes into threes unless you have splash

sturdy compass
#

Yes that does look like what the code is doing

wintry solar
#

Oh not better calc 👎

tender gale
#

I changed it to G.play.cards and it works

wintry solar
#

But that’ll include non scoring cards

sturdy compass
#

I genuinely have no clue if my code is on better calc or not ngl

wintry solar
#

What smods version are you on?

sturdy compass
#

I've been updating somewhat consistently so it should be a somewhat recent version

tender gale
wintry solar
#

Well that’s not what you said đŸ€Ł

#

Though I suppose how I interpreted it isn’t possible

sturdy compass
wintry solar
#

That’s fine then

sturdy compass
#

Ok cool. I didn't know if there was something specific I had to do for better calc or not

runic pecan
#

How do I check if context.consumeable is a c_world?

tight thistle
#

i downloaded jimbo's pack to see how it handles jokers with text boxes but it seems to just crash when i hover over certain jokers? but the crash says its from common_events.lua

#

could something be wrong with my game files or is this just the mod's fault entirely?

#

ah, reading more it seems that there are a few items regarding the mod itself

tender gale
#

ok, I think its because of the return {} but a little orange square shows up with no message after every hand

wintry solar
#

Try return nil instead

tender gale
#

I also tried to make it send a message when triggering but that has the unintended consequence of breaking its effect

tender gale
wintry solar
#

No brackets

tender gale
#

ok now it still has a square but only when the effect doesn't trigger

#

weird

wintry solar
#

Same in the non trigger check at the top

tender gale
#

alr thanks

wintry solar
#

Though you should absolutely be developing on better calc, not a month old smods build

wild patrol
#

What's the function used by the emperor to create 2 random tarot cards

tender gale
#

doesnt bettercalc not work

wild patrol
#

Wondering if I use that on pot of greed to create a second version of pot of greed to get the plus 2 effect working

wintry solar
#

Better calc didn’t work for less than 24 hours nearly three weeks ago

foggy carbon
#

that >24h period lined up with me learning how balatro modding worked lol

tender gale
#

where can I download better calc

rough furnace
#

its just the latest steamodded

tender gale
#

ok

vocal verge
#

I can't wait for Jan 25

#

I get to patch license joker to be permanently debuffed

#

Wonder how hard it would be to check for date and update based on that

random sleet
#

what lol

vocal verge
#

24th Jan 2025 expiry date

gaunt thistle
#

amazing

random sleet
#

thats fantastic that its so soon

vocal verge
#

God discord mobile sucks on bad internet

rough furnace
#

you can check dates

vocal verge
#

Is it possible to simply display text? Cause now I really wanna flesh this out

#

Add consumables that refresh dates and display it on the joker

#

Not as a little pop up but directly on the art

rough furnace
#

like for debugging?

#

you can print and look at the lovely console or install DebugPlus and use it's console

#

otherwise you can put varibales in the descriptions of jokers

vocal verge
#

I mean like straight up text on the joker that gets updated

#

But I guess doing it in the description would be better

#

And simpler for my doggy brain

rough furnace
#

you can update the sprite but as far as I know you would need to make a sprite for every text, or probably use some shader witchcraft

foggy carbon
#

how would I spawn a specific other joker? I looked at Riff-raff's code but I don't see where it defines which joker to spawn

rough furnace
#

you can set a key

#

Look at SMODS.create_card

#

it's a bit easier to use

vocal verge
crisp coral
maiden phoenix
#

It was funny the first time but now I hate it lol

crisp coral
#

we take our work very seriously

maiden phoenix
#

The common people already find it hard to get Steamodded now they'll definitely think it's not serious

foggy carbon
#

switching to add_card because apparently create_card doesn't actually place the joker in the joker slot

maiden phoenix
#

Yea create_card is just to create the card, but it doesn't place it

wild patrol
maiden phoenix
#

No you use the add_card util

wild patrol
maiden phoenix
#

Add_card is like a step above create_card

wild patrol
#

Do I even need create card?

#

Or is add card enough

maiden phoenix
#

Add_card is enough 👍

wild patrol
#

Ok

#

That's why I was confused

spring lantern
#

i must create more jimbos. my jimbo army must grow.

vocal verge
#

big fan of Jimbro just being a gym bro

spring lantern
#

that's the idea lul

zealous glen
#

@frosty dock y’know with the new optional features, Quantum Ranks could be suboptimized at least for release. Or maybe have a version with optimized limited functionality in addition to the full, suboptimal version

zealous glen
frosty dock
#

đŸ€”

runic pecan
#

Is context.consumeable.key == 'c_world' correct for checking if the used consumeable is a The World?

summer shard
#

I tried deleting the ,

#

which removed the error

#

But then the game crashed without even a log

#

soooo

#

not sure what to do

#

Is there a name I can put there?

spring lantern
#

more...

#

(downgraded dealer to uncommon i was gonna make it stronger but didnt bother)

summer shard
# summer shard Is there a name I can put there?

Nothing seems to work, tried replacing it with "local fortune_jokers = pack_pools['Fortune'] and pack_pools['Fortune']['Joker'] or {}
local suits_jokers = pack_pools['Suits'] and pack_pools['Suits']['Joker'] or {}" so there would at least be a value...

summer shard
summer shard
frosty dock
#

no that's not the issue

#

but this specific mod was made for a really old version of steamodded

candid epoch
#

apparently, i cant make symetrical bricks for deck texture 😭

summer shard
frosty dock
#

I can't bother to debug such obviously illmaintained mods

summer shard
#

Ok will do, thank you

frosty dock
summer shard
#

Thank you for your time

frosty dock
#

np

tender gale
#

am I crazy or does this not do anything? I was trying to see this blind's code since its effect is similar to one I want to code for a joker, but by the looks of it it doesn't do anything

wild patrol
#

dumb queston but how exactly do I use SMODS.add_card lol

violet void
#

key should be of interest for your case

wild patrol
#

so do I make this a function or something similar to atlas

violet void
#

Just type SMODS.add_card('Joker', G.jokers, ... ,'j_joker')

wild patrol
#

I guess ... would be the key for the card name?

violet void
#

No it's the other parameters

#

The key is j_joker or whatever you want to create

wild patrol
#

oh ok

#

and if it's a tarot Replace joker with tarot

#

etc etc

violet void
#

The first 'joker' yes

wild patrol
#

gotcha thanks

wintry solar
wild patrol
#

gonna be honest trying to debug errors with lovely is ass

#

especially when it barely tell su what there error is within ur mod

wintry solar
#

That’s not how add card works, it takes a table of values

violet void
#

So the order doesn't matter

wintry solar
#

SMODS.add_card({set = ‘Tarot’, key = ‘c_death’}) etc

violet void
#

That's even better

#

That makes it easier for you chowder

I admit I hadn't used it yet lol

wild patrol
#

ty

#

also

#

what would be the proper g.game function for can use if the card is in a booster pack?

#

facing_blind i'm assuming is when ur actually in the game

#

and not at the booster pack

#

guessing I need something like this if G.STATE == G.STATES.TCG_Yugioh then return true

#

to tell the game that it's ok to enable the use button when the game is in the yugioh booster pack?

#

tried the key group name and group key can't get the use button to be enabled

#

use = SMODS.add_card({set = `Tarot`, key = `PotGreed`})

#

so something like this?

#

or would this have to be it's own seperate thing and I use create_card in use?

#

or just replace smod with function add_card?

minor gyro
#

heyo, is there a way to make a joker double the final result? after the calc

minor magnet
#

i took the code for constellation to activate on every planet card used

wild patrol
#

or should I set set = 'Tarot' to the custom booster pack name?

#

what would the game state be considering when in a custom pack?

#

I think that's my main issue right now

wintry solar
#

I don't know what you're trying to do

wild patrol
#
    if G.GAME.facing_blind then
      return true
    elseif G.STATE == G.STATES.TAROT_PACK then
      return true
    else
      return false
    end
  end,
    use = function(self, card, area, copier)
        G.FUNCS.draw_from_deck_to_hand(2)
    end,```
#

elseif G.STATE == G.STATES.TAROT_PACK then

#

since it' s a custom pack of cards I don't think the game state works properly?

#

becausae the USE button is always greyed out

cerulean rose
#

yeah, the game state is G.STATES.SMODS_BOOSTER_OPENED

wild patrol
#

i'll see if that helps

minor gyro
#

Is there any open git where I can read ones code?

wild patrol
#

and it works lol

#

now the hard part is getting it into the deck or the tarot slot

wild patrol
#

SELECTING_HAND

#

?

cerulean rose
#

i think so

faint yacht
#

Can I not display info_queue if the item has not been discovered yet?

wild patrol
#

what's the function to put a card in ur deck?

#

add_to_deck seems to be it but looks like it's for joker effects?

minor magnet
#

got this error when i tried to copy my joker with brainstorm

#

anyone has any clue what may be the cause or fix?

#

this is the joker's code

faint yacht
#

Just don't return anything outside of those events.

wild patrol
#

so just add return to the pot of greed card?

#

and just have it nil?

faint yacht
#

Sorry, I accidentally set the reply to wrong person-

#

See the code snippet-

faint yacht
minor magnet
#

thank you very much

wild patrol
# faint yacht ? ```lua local _card = ... _card:add_to_deck() G.deck.config.card_limit = G.deck...
    key = 'PotGreed', --joker key
    set = 'Tarot',
    loc_txt = { -- local text
        name = 'Pot Of Greed',
        text = {
            'Draw 2 cards from your Deck.'
        },
    },
    atlas = 'TCGyugioh', --atlas' key
    cost = 10, --cost
    unlocked = true, --where it is unlocked or not: if true,
    discovered = true, --whether or not it starts discovered
    pools = { TCG_Yugioh = true },
    pos = {x = 0, y = 0}, --position in atlas, starts at 0, scales by the atlas' card size (px and py): {x = 1, y = 0} would mean the sprite is 71 pixels to the right
    loc_vars = function(self, info_queue, center)
    return {vars = {2}}
    end,
    config = {
      extra = {
        card_limit = 3 --configurable value
      }
    },
    can_use = function(self, card)
    if G.GAME.facing_blind then
      return true
    elseif G.STATE == G.STATES.SMODS_BOOSTER_OPENED then
      return true
    else
      return false
    end
  end,
    use = function(self, card, area, copier)
        if G.STATE == G.STATES.SMODS_BOOSTER_OPENED then
            local _card = 'PotGreed'
            _card:add_to_deck()
            G.deck.config.card_limit = G.deck.config.card_limit + 1
            table.insert(G.playing_cards, _card)
            G.deck:emplace(_card)
        elseif G.STATE == G.STATES.SELECTING_HAND then
            G.FUNCS.draw_from_deck_to_hand(2)
        end
    end,
})```
#

hopefully i'm doing this right

faint yacht
#

The _card is actual card you want to perform actions on... in my case (from where I pulled the code snippet), I use it to copy a playing card and then place it into the deck.

wild patrol
#

but in terms of the structions of the use = function

#

is that correct

#

like am I able to use if game states

#

in that way

faint yacht
#

...is the if G.STATE == G.STATES.SMODS_BOOSTER_OPENED then check in use meant to add the PoG (tarot card) to the deck of playing cards?

wild patrol
#

and i replace _card in with the key of the card name right

wild patrol
#

because it's gonna come from a booster pack

#

and the other state is to check when it's in ur hand to use the draw two

faint yacht
#

Is it meant to be in the playing hand and not just in the consumable slots?

wild patrol
#

yeah

#

I know sounds dumb

#

but trying to make it function like the actual tcg

#

just for extra bit of dumbness to it

faint yacht
#

You'd want to "create" the PoG card again, then, and then emplace it into the deck.

wild patrol
#

what's the best way going about that

#

wait I think I see

faint yacht
#

local _card = SMODS.create_card({ set = 'Tarot', area = G.deck, key = 'whateverkeyisforpogcardwithmodprefix' })

wild patrol
#

I saw in the vanilla game something similar

#

Was about to as lol

wild patrol
faint yacht
#

Should be it, yeah.

wild patrol
#

alright let's test this spaghetti code out

#

crashes on use

#

may not be possible to add the card to the deck

#

guessing I need a area = something?

faint yacht
#

I'm not as experienced, so can't really say much else. ¯_(ツ)_/¯

wild patrol
#

i wonder if I just remove area from the function

worthy stirrup
wild patrol
#

maybe @frosty dock might know

#

maybe it's just not possible lol without the game freaking out

minor magnet
#

would this be too strong?

#

and most importantly, is the description clear?

frosty dock
wild patrol
#

was thinking of doing this local _card = SMODS.create_card({ set = 'Tarot', area = G.deck, nil, nil, nil, nil, nil, key = 'j_tcgyugi_PotGreed' })

#

because I noticed the vanilla game has something similar

frosty dock
#

69 = 3x23 usable pixels which sure isn't very divisible

minor gyro
elder vapor
minor magnet
elder vapor
#

since its a table

wild patrol
frosty dock
#

you can make an atlas a different size

#

might do weird things with other sprites like stickers though

#

usually doesn't matter too much with back textures though so eh

wild patrol
#

should I use the same texture sheet

#

or make a new one?

minor gyro
wild patrol
#

what I have right now is from a template

#

SMODS.Atlas({
key = "yugioh",
path = "yugioh.png",
px = 71,
py = 95
})

minor magnet
#

but ye your solution makes sense

valid trench
#

I'm using the MoreSpeeds mod as an example and how come it's main function gets called when the vanilla settings tab is called?

minor gyro
wild patrol
#

error seems to be from this center = nil

wild patrol
#

functions/common_events.lua:2256: attempt to index local 'center' (a nil value)

valid trench
#

no () just {}

minor magnet
minor gyro
#

danke

valid trench
#

also comma after 95

wild patrol
#

ok

#

what if USE create_playing_card FUNCTION INSTEAD?

valid trench
#

what are you doing?

wild patrol
#

scroll up and you'll see

wild patrol
#

I was looking at the code

#

what if I add center = G.P_CENTERS.c_base, G.hand, nil, nil, nil ?

#

that didn't work lol

#

still returns a nil vaule

wild patrol
#

so i guess I need some kinda force key?

#

use = function(self, card, area, copier) if G.STATE == G.STATES.SMODS_BOOSTER_OPENED then local _card = SMODS.create_card({ set = 'Tarot', area = G.deck, key = 'j_tcgyugi_PotGreed' }) center = G.P_CENTERS.c_base _card:add_to_deck() G.deck.config.card_limit = G.deck.config.card_limit + 1 table.insert(G.playing_cards, _card) G.deck:emplace(_card) elseif G.STATE == G.STATES.SELECTING_HAND then G.FUNCS.draw_from_deck_to_hand(2) end

#

so maybe something like this?

#

that didn't work

valid trench
#

is there a way to detect and edit a vanilla uibox as it spawns

#

I was able to set up what I want pretty easily with Lovely but idk if it'd be better without it

hardy viper
#

hook the function to create it? most of them are something like create_UIBox_xxxx_xxx

valid trench
#

well I tried doing that but it isn't triggering and idk why

#

basically something like this

#

of course this looks bad but the general idea

#

I've tried a lot of random stuff but none of it matters because it's not even calling the function like ever

wild patrol
#

so lovely is now saying I have an unepxected symbol near =

#

which is this center = G.P_CENTERS.c_base, G.hand, nil, nil, G.C.SECONDARY_SET.Tarot

#

found the unpected symbol

#

but still center is returing is as nil

minor gyro
#

wait

#

i think i got it

minor magnet
#

would "transforms into a legendary joker if a soul card is used" be too stupid an effect to be fun?

#

in more than 90% of games the joker would be totally useless, but we live for tha gamble

wild patrol
#
        if G.STATE == G.STATES.SMODS_BOOSTER_OPENED then
            local _card = SMODS.create_card({ set = 'Tarot', area = G.deck, key = 'j_tcgyugi_PotGreed' })
            front = pseudorandom_element(G.P_CARDS, pseudoseed('cert_fr')) 
            center = G.P_CENTERS.c_base, G.hand, nil, nil, G.C.SECONDARY_SET.Tarot
            _card:add_to_deck()
            G.deck.config.card_limit = G.deck.config.card_limit + 1
            table.insert(G.playing_cards, _card)
            G.deck:emplace(_card)
        elseif G.STATE == G.STATES.SELECTING_HAND then
            G.FUNCS.draw_from_deck_to_hand(2)
        end```
#

best functioning code I can get is this

#

but always crashes with the center error when I hit use

#

maybe i'm m issing something else?

minor gyro
#
    key = 'poltergeist_jk',
    loc_txt = {
        name = 'Poltergeist',
        text = {
          "{C:chips}+50{} chips per discard.",
          "{C:red}+#1#{} discard each round."
        }
    },
    rarity = 2,
    atlas = 'Jokers',
    pos = { x = 1, y = 0 },
    cost = 4,
    config = { extra = { chips = 50, discard_size = 1 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.discard_size } }
    end,
    add_to_deck = function(self, card, from_debuff)
        -- Aumenta o tamanho do descarte
        G.GAME.round_resets.discards = G.GAME.round_resets.discards + card.ability.extra.discard_size
    end,
    calculate = function(self, card, context)
        if context.discard then
            -- Adiciona chips por descarte
            return {
                chip_mod = card.ability.extra.chips,
                message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chips } },
                card = context.other_card
            }
        end
    end
}

But the game crashes...
[SMODS _ "src/utils.lua"]:985: attempt to perform arithimetic on global 'hand_chips' (a nil value)

#

the game crashes when i discard

long sun
#

(unrelated, but seems a bit OP? with Wasteful, you can get up to 250 chips, which is what Stuntman does, but without the hand size constraint)

#

(OP for Uncommon, I mean)

minor gyro
#

yh, I will change that, don't worry

long sun
#

(all g)

minor gyro
#

i just put some random rarity and than compare with others

#

but thanks anyway!

wild patrol
#

use = function(self, card, area, copier) if G.STATE == G.STATES.SMODS_BOOSTER_OPENED then for k, v in ipairs("j_tcgyugi_PotGreed") do if center.key ~= v and #SMODS.find_card(v) == 0 local _card = SMODS.create_card({ set = 'Tarot', area = G.deck, key = 'j_tcgyugi_PotGreed' }) _card:add_to_deck() G.deck.config.card_limit = G.deck.config.card_limit + 1 table.insert(G.playing_cards, _card) G.deck:emplace(_card) then elseif G.STATE == G.STATES.SELECTING_HAND then G.FUNCS.draw_from_deck_to_hand(2) end end,

#

my last duck tape solution

#

before I give up

cerulean rose
#

you cant call ipairs on a string

minor gyro
#

I still need help y'all pleaseee

wild patrol
viscid field
wild patrol
#

well I ave up and tried making it it's own function

#
    for k, v in ipairs("j_tcgyugi_PotGreed") do
        if center.key ~= v and #SMODS.find_card(v) == 0 then
            return
        end
    end
    local _card = SMODS.create_card({ set = 'Tarot', area = G.deck, key = 'j_tcgyugi_PotGreed' }) 
        _card:add_to_deck()
        G.deck.config.card_limit = G.deck.config.card_limit + 1
        table.insert(G.playing_cards, _card)
        G.deck:emplace(_card)
end```
#

not sure if it's returning the same error or not but nothing mentions center anywhere

#

any suggestions to try before I give up for the day

solar eagle
#

how does one render multilayer cards like Soul?

wild patrol
#

I give I guess I'll just make it a consumeable

#

that would be wouldn't it?
local _card = SMODS.create_card({ set = 'Tarot', area = G.consumeables, key = 'j_tcgyugi_PotGreed' })

#

and i'm still getting the center nill issue?

#
    key = 'PotGreed', --joker key
    set = 'Tarot',
    loc_txt = { -- local text
        name = 'Pot Of Greed',
        text = {
            'Draw 2 cards from your Deck.'
        },
    },
    atlas = 'TCGyugioh', --atlas' key
    cost = 10, --cost
    unlocked = true, --where it is unlocked or not: if true,
    discovered = true, --whether or not it starts discovered
    pools = { TCG_Yugioh = true },
    pos = {x = 0, y = 0}, --position in atlas, starts at 0, scales by the atlas' card size (px and py): {x = 1, y = 0} would mean the sprite is 71 pixels to the right
    loc_vars = function(self, info_queue, center)
    return {vars = {2}}
    end,
    config = {
      extra = {
        card_limit = 3 --configurable value
      }
    },
    can_use = function(self, card)
    if G.GAME.facing_blind then
      return true
    elseif G.STATE == G.STATES.SMODS_BOOSTER_OPENED then
      return true
    else
      return false
    end
  end,
    use = function(self, card, area, copier)
        if G.STATE == G.STATES.SMODS_BOOSTER_OPENED then
            local _card = SMODS.create_card({ set = 'Tarot', area = G.consumeables, key = 'j_tcgyugi_PotGreed' })
        elseif G.STATE == G.STATES.SELECTING_HAND then
            G.FUNCS.draw_from_deck_to_hand(2)
        end
    end,
})```
maiden phoenix
#

If your card is a tarot why did you use j_ in the key? It should be c_

wild patrol
#

is

#

trhat really the reason why

#

and i've just being looking in the wrong area

weary jungle
#

how do i make this not freeze my game

wild patrol
#

ONE FUCKING CHARACTER TYPO

tight thistle
#
function Card:add_speech_bubble(text_key, align, loc_vars, extra)
    if self.children.speech_bubble then self.children.speech_bubble:remove() end
    self.config.speech_bubble_align = {align=align or 'bm', offset = {x=0,y=0},parent = self}
    self.children.speech_bubble =
    UIBox{
        definition = G.UIDEF.vic_speech_bubble(text_key, loc_vars, extra),
        config = self.config.speech_bubble_align
    }
    self.children.speech_bubble.states.hover.can = false
    self.children.speech_bubble.states.click.can = false
    self.children.speech_bubble:set_role{
        role_type = 'Minor',
        xy_bond = 'Weak',
        r_bond = 'Strong',
        major = self,
    }
    self.children.speech_bubble.states.visible = false
end```
#

any idea why this keeps giving me this error?

wild patrol
#

little buggy but it worked

#

just the funtion for drawing doesn't seem to work yet

#

elseif G.STATE == G.STATES.SELECTING_HAND then
G.FUNCS.draw_from_deck_to_hand(2)

#

guess I need a differtent state

sudden dew
wild patrol
#

IT WORKS!

tight thistle
wild patrol
#

I would be tearing my hair out for weeks figuring this shit out

maiden phoenix
#

Lol nw

sudden dew
weary jungle
#

yes, i want to only return the localization if G.RETURNLOCALIZATION, but i think that if i were to exit, i couldnt catch the G.RETURNLOCALIZATION

sudden dew
sudden dew
# weary jungle yes, i want to only return the localization if G.RETURNLOCALIZATION, but i think...

As it is, your function won't "catch" anything because no other code will run while your function loops infinitely. If you want something that will wait in the background until G.RETURNLOCALIZATION is true, check out https://github.com/Steamodded/smods/wiki/Guide-‐-Event-Manager

GitHub

A Balatro ModLoader. Contribute to Steamodded/smods development by creating an account on GitHub.

weary jungle
#

but i need to return something, and i cant return something in an event

minor magnet
#

how do i make it so a certain joker can appear multiple times in the shop?

#

like showman for just itself

minor gyro
#

showman can appear twice if u have one tho

sudden dew
minor magnet
#

thank you!

sudden dew
weary jungle
#

idk, my code is all messed up

sudden dew
#

We've all been there

#

But if you don't know what you want the method to be doing, it's hard to help

weary jungle
devout elk
#

How exactly does the sticker argument for the SMODS.create_card function works ?
Currently trying to add an eternal sticker to a joker, but trying to find usage examples of the create_card and add_card function is quite hard

weary jungle
sudden dew
weary jungle
#

it doesnt though

#

let me see

sudden dew
#

If it doesn't, the next step is to find where in the game's code that "extinct" message event is being put on the queue, and look at the details of the event itself. It may be set to be non-blockable or something like that. An option if that's the case is to patch a change to that event, set it to not block other events, and have it return false until your events have completed

viscid field
#

for some reason I'm tempted to make a HTML DOM to Balatro UI converter even though I know it'd be so horrible

idle estuary
#

Hello I want to create my own mod for balatro, but I am new to creating mods and have never done anything like this, I do know how to code in a bunch of languages but I'm not sure how to get started creating a mod.

weary jungle
weary jungle
weary jungle
#

yw

timid parrot
viscid field
wintry solar
minor gyro
#

please som1 help 😭

sudden dew
minor gyro
#
  SMODS.Joker {
    key = 'poltergeist_jk',
    loc_txt = {
      name = 'Poltergeist',
      text = {
        "Gain {C:chips}50{} chips per remaining discard."
      }
    },
    rarity = 2,
    atlas = 'Jokers',
    pos = { x = 1, y = 0 },
    cost = 5,
    config = { extra = { chip_mod = 50 } },
    loc_vars = function(self, info_queue, card)
      return { vars = { card.ability.extra.chip_mod } }
    end,
    calculate = function(self, card, context)
      if context.joker_main then
        local remaining_discards = G.GAME.round_resets.discards or 0
        local chips_awarded = remaining_discards * card.ability.extra.chip_mod
  
        -- If remaining discards are 0, chips_awarded will be 0
        if chips_awarded > 0 then
          return {
            chip_mod = chips_awarded,
            message = localize { type = 'variable', key = 'a_chips', vars = { chips_awarded } },
            card = card
          }
        end
      end
    end
  }

I have this issue and i cannot figure it out. I tried AI too... Nothing. It just keeps giving the same amount of chips
first mod btw so idk alot of the libary and etc

#

idk if I should update the code every time i discard, so it checks every discard

wintry solar
#

You’re using the round reset value to get discards

#

Rather than the current amount of discards

minor gyro
#

that's the only mod I found that uses discards, and it's like that

#

idk how to do it otherwise

#

not like this either lmao

barren fjord
#

just a question, I'm getting a grey screencrash when loading balatro with cryptic, can anyone help?

minor gyro
sudden dew
minor gyro
#

but thanks

sudden dew
#

What operating system are you using?

minor gyro
#

w11

sudden dew
#

Gotcha, I'm on mac so I won't be any help with that

minor gyro
#

y'all are gods bro

#

wtf

#

I've been 2hrs into this shit

sudden dew
#

Although there's an easier way to check the source code, actually. If you go to the folder where you installed lovely, inside there should be a folder called dump. That's where it puts all of the game files after they've been patched. It's actually a bit better than looking at the original game files since SMODS sometimes changes a lot of the source code

minor gyro
#

danke

manic grotto
#

How can I change the names of hands? Like in the run info menu

#

New to modding but I have the source code open.

minor magnet
#

any clue why this may not be working?

#

it it supposed to destroy all chemical 7 jokers if you own 3 and give you the money

#

it does exactly nothing

tepid crow
#

is that from LBAL?

minor magnet
#

yessss

tepid crow
#

nice

manic grotto
#

seeing this, can I just edit this and it will change in the run info?

tepid crow
sudden dew
# minor magnet any clue why this may not be working?

Off the bat, you can replace your logic for finding all your chemical7 jokers with SMODS.find_card(key)which will return all jokers matching the key you provide. It also adds some compatibility since another mod might have a joker named Chemical 7

#

But your joker

#

's key should be unique

minor magnet
#

ok great imma try that

sudden dew
#

Also, what function is this logic placed in?

minor magnet
#

like this?

tepid crow
#

no

#

just SMODS.find_card

minor magnet
minor magnet
#

how do i do that

#

with the find card function

tepid crow
sudden dew
#

Put it in add_to_deck(self, card, from_debuff) instead, which is called when you acquire the joker

manic grotto
#

Ok so just changing the name of the hands in self.handlist doesn't work as it doesn't display on the run info

#

Any thoughts?

frosty dock
#

these are localization strings

manic grotto
#

oh

wintry solar
manic grotto
minor magnet
#

reimplemented the code, still does not work

frosty dock
#

G.localization.misc.poker_hands I believe

manic grotto
minor magnet
#

lemme try again

#

nope, still not working

sudden dew
minor magnet
#

i fixed the #SMODS.find_card("garb_chem7") == 3 then not having the hashtag

minor magnet
#

fixed that

sudden dew
#

Also, your joker's id is probably j_garb_chem7

minor magnet
#

still doing nothing

minor magnet
#

forgot i have to use the whole slug

#

still not working

#

updated code

manic grotto
wintry solar
minor magnet
wintry solar
#

But you never define it

minor magnet
#

and i have used it in other jokers

minor magnet
minor magnet
#

it also does not kill the fourth joker

#

seems like an easy fix, just change the necessary chem7s to two add a little bit of code which gives the money and then kills the third joker

frosty dock
manic grotto
#

tysm

minor magnet
#

no wait that's an easy fix.

manic grotto
# frosty dock the English loc strings would be in en-us.lua

alright so i've found myself the massive list file under smods, just unsure what to add in once i add poker_hands={}, and the same for the descriptions, not that seasoned on lua or balatro modding. doc didnt have the syntax for everything

minor magnet
manic grotto
#

Nevermind, I've figured it out.

sudden dew
minor magnet
#

oh, so it was an easy fix

#

ok im just dumb

#

lol

#

i was overcomplicating things by having the money as a remove from deck return value

#

WORKS PERFECTLY NOW

wild patrol
#

So I just had an insane idea

#

I found a nes emulator written in Lua+love

#

Hear me out a joker card that forces you to play smb1

#

Or a boss battle

edgy reef
#

Isn’t this already a thing

#

Can’t remember if it was ported from Balamod to Steamodded or not.

minor gyro
#

roblox is also written in lua...

manic grotto
#

getting this error upon launch, i havent edited utils.lua at all

hardy viper
#

thus if you wanted to interface with it (which you couldnt even realistically do because hyperion) youd use cpp

#

which you can do by writing a DLL in cpp and linking that via luajit ffi (where all the lua-available functions are using extern "C")

#

so honestly just bypass hyperion easy as that..

#

although idk i stopped paying attention to roblox stuff ages ago

blissful dagger
#

How do I get an enhanced card to destroy itself after the hand is finished calculating like glass cards? Since I can't return true like with Jokers, do I just need to come up with my own solution?

knotty wren
#

Hello ! how do I go about adding a singular legendary joker that can be obtainned through the soul card?

hardy viper
#

should i only say anything serious on a topic when someone else is also being serious about it or what

minor gyro
#

why are u mad tho

#

Ior aren't you

#

idk

hardy viper
#

not mad

#

just providing my thoughts

minor gyro
#

maybe u thought I was being serious about playing roblox in balatro

hardy viper
#

i didnt consider it because it didnt matter to me

gaunt thistle
#

I think it sounds like a good idea

minor gyro
#

lmao

gaunt thistle
#

robloxatro?

#

robalatro

minor gyro
#

bablox

gaunt thistle
#

too on the nose

minor gyro
#

ba

#

blox

gaunt thistle
#

ooh ooh what about a fornite collab called "fortlatro"

hardy viper
#

add miku from fortnite to balatro please

knotty wren
#

how to make it so that X mult when joker is scoring when a hand is a certain size?

minor magnet
#

i wanted to send that as video, idk why its in that format

minor magnet
wintry solar
#

because your contexts are wrong

minor magnet
sudden dew
#

Each card gets evaluated at end of round

wintry solar
#

add context.main_eval

minor magnet
sudden dew
#

Joker scoring guide recommends if context.end_of_round and not context.repetition and not context.individual

wintry solar
#

if context.end_of_round and context.main_eval

frosty dock
sudden dew
#

Never been clear on when new calc was introduced. Pretty sure I've been on a version of smods with new calc the whole time but idk

frosty dock
violet void
#

It was right after the arrow 😭

#

smh

foggy carbon
#

Is there a way to tell if players are using the Plasma Deck? One of my jokers seems to be busted specifically with Plasma

minor gyro
#

is there any joker that verifies how many x cards are in the deck? Like:
it gains 0,10x mult per glass card in deck?
I need to take a look at the code...

foggy carbon
violet void
minor gyro
knotty wren
#

can someone help me pls BWAAH I want to make it so that my joker only scores when played hand is 4 cards, as of now the joker ads X4 every hand

wintry solar
#

if context.joker_main and #context.scoring_hand == 4 then

minor gyro
# foggy carbon
j_steel_joker=      {order = 32,  unlocked = true,  discovered = false, blueprint_compat = true, perishable_compat = true, eternal_compat = true, rarity = 2, cost = 7, name = "Steel Joker", pos = {x=7,y=2}, set = "Joker", effect = "Steel Card Buff", cost_mult = 1.0, config = {extra = 0.2}, enhancement_gate = 'm_steel'},

that's all?

faint yacht
knotty wren
faint yacht
#

That is Legendary rarity, yeah... unless the particular Joker is not set to appear by its' in_pool function.

minor gyro
faint yacht
#

Unpack it with 7zip or something, then look for .lua files.
But the code for the actual Steel Joker is

if self.ability.name == "Steel Joker" then 
  self.ability.steel_tally = 0
  for k, v in pairs(G.playing_cards) do
    if v.config.center == G.P_CENTERS.m_steel then self.ability.steel_tally = self.ability.steel_tally+1 end
  end
end
minor gyro
#

have it already

knotty wren
faint yacht
faint yacht
knotty wren
#

just played a seeded run

#

first soul card gave me my modded joker

#

:D

#

how can I make it so that my mod has a custom icon ?

minor gyro
faint yacht
#

SMODS.Atlas({key = "modicon", path = "iconthing.png", px = 32, py = 32}):register()

rough furnace
#

make an atlas named modicon

#

I don't belive register is correct

violet void
#

It worked for me

knotty wren
#

how to add multiple atlases?

#

; 3 ;

violet void
rough furnace
#

I belive register is just for 0.9.8 compat and shouldn't be used

violet void
#

oh I see, whats the correct way

rough furnace
wintry solar
rough furnace
#

no register

faint yacht
#

👍 Removed on my end for next time I push to my mod repo.

knotty wren
#

just made all the icons that :B

#

what the fuck

violet void
#

It reminds me of that one paperback joker

knotty wren
#

I'm making a mod for that juggler clown on twitter

#

how did this happen tho?

soft timber
#

Pestrica my beloved

knotty wren
soft timber
#

I love that so much

knotty wren
#

I already knew the code for making custom joker designs just didn't know jack about scoring

minor gyro
rough furnace
faint yacht
rough furnace
#

I forgor to make lovely mods not use the no prefix mod icon

knotty wren
minor gyro
knotty wren
#

nvm fixed it

#

still this tho

rough furnace
#

show code

#

I suspect your mod is being put into 0.9.8 comapt mode

tight thistle
#

i have a very specific question!

#

is there a way to make a self-destructing joker wait before self-destructing?

knotty wren
rough furnace
#

yeah you shouldn't be using the SMODS.INIT

knotty wren
#

oh do I just delete the function and the end?

#

at the end

#

lmao

rough furnace
#

yes

faint yacht
#

Just do it raw.

knotty wren
#

oh so the function init makes it only work on old calc?

rough furnace
#

no its something from really old steamodded versions that theres still a bit of comaptibiltiy for but you shouldn't use

knotty wren
#

that explains lot

wintry solar
#

I wonder if in beta we just wipe the compat layer

knotty wren
#

hold on gotta change the code for another mod

minor gyro
#

return math.floor(allsteel/4)
why tho?

rough furnace
knotty wren
#

thanks!

faint yacht
minor gyro
#

oh ok

knotty wren
#

hey I removed the function and now the mod doesn't work?

tight thistle
violet void
#

a few events can do that probably

rough furnace
#

you can delay events

weary jungle
#

how would i, for no reason at all, patch a smods patch?

rough furnace
#

smods patches load before normal priority patches so just put what the file looks like after smods patches it

weary jungle
#

ok

#

thanks

knotty wren
# rough furnace how so?

NVM fixed it, i had a debug deck with the joker before the change and when continuing the run it was basically trying to get a joker that didn't exist, just had to make a new deck

weary jungle
#

where is SMODS.calculate_context?

wintry solar
#

smods/src/utils.lua

orchid thunder
#

is there a way to activate add to deck in calculate

wintry solar
#

why would you want to do that

orchid thunder
#

long story shory scalae(cryptid) does not work in add_to_deck and only calculate

wintry solar
#

what does scalae do?

orchid thunder
#

scale caling jokers by a degree polynomial

wintry solar
#

then why do you need add to dekc in calculate?

orchid thunder
#

because the scaling happens when added to deck

orchid thunder
knotty wren
#

is there an alternative for playing hand instead of just scoring?

night pagoda
knotty wren
#

crash ; 3 ;

knotty wren
#

it only gives mult when there's 4 scoring cards

wintry solar
#

G.play.cards

knotty wren
#

not like a hand with 3 scoring cards and 1 non scoring card

#

where can I see example of jokers code in the base game?

minor gyro
tight thistle
#

quick question! in text, what are the values E, S and s?

#

i assume S and s correspond to font size, but what about E?

minor gyro
#

s is for size, s:0.8 would make it smaller.

#

Never seen E tho

#

maybe edition?

tight thistle
#

ohhh true, maybe it adds some sort of glow to the text

#

i found it in another mod and was curious, thanks for the answer!

minor gyro
#

np

wintry solar
#

E is for effect

minor gyro
minor gyro
wintry solar
#

just iterate through the deck and count them

minor gyro
#

with a for loop?

#

the thing is

#

does G.deck exist? or something like that

#

for k, v in pairs(G.playing_cards) do
if v.config.center == G.P_CENTERS.m_steel then self.ability.steel_tally = self.ability.steel_tally+1 end
end
end

#

that's the stone card code

wintry solar
#

you're going to have to get used to looking at code that already exists and adapting it

minor gyro
#

yhyh

#

ik