#šŸ’»ćƒ»modding-dev

1 messages Ā· Page 192 of 1

normal crest
#

mult, x_mult, chips, x_chips and dollars are some basic valid keys for the return table

whole hornet
#

so i dont need to have that extra = {mult ?

#

i can just return it?

normal crest
#

the stuff in your config gets attached to the actual card ingame

#

which is why you're able to do card.ability.extra.mult

#

you don't really need it

whole hornet
#

oh, so i was useing the actual text to define the mult, which i did not need to do at all

#

lol

#

i get it

normal crest
#

but it's encouraged so if you want to change it at some point you just change it in one place

whole hornet
#

oh

normal crest
#

I mean the extra stuff, not the text

whole hornet
#

im sure you explained it really well, im just not getting it lol

normal crest
#

Also, stuff in your config are the initial values for the card, so that will be locked to the same value always

#

if you didn't get it then I'm not explaining it well lol

whole hornet
#

so for it to work I need a return

whole hornet
#

ive been useing this

normal crest
whole hornet
#

lets see, i think i got it

#

would removing the message remove the popup that tells me the added mult?

normal crest
#

nope

minor furnace
#

Done spritework, time to figure out how to do enhancement gates and unlock conditions for custom jokers

whole hornet
#

oh

normal crest
#

steamodded automatically handles the message for you

whole hornet
#

nice

scarlet spire
#

returning mult is automatically handled

normal crest
#

those are just outdated examples unfortunately

whole hornet
#

bummer

#

so it no longer crashes

#

but now it does nothing

#
      key = 'Clint',
      loc_txt = {
          name = 'Clint Eastwood',
          text = {
            'Gain {C:red}Mult{} equal to the {C:blue}value{}',
            "of the next {C:attention}card{} in the deck.",
            "{s:0.7}''The future is coming on,",
            "{s:0.7}It's coming on, it's coming on''"
              } 
      },
      atlas = 'Clint',
      pos = {x = 0, y = 0},
      effect = "Mult",
      cost_mult = 1.0,
      config = { extra = 
        {
          mult = 0,
        }
       },
      loc_vars = function(self,info_queue,center)
        return {vars = center.ability.extra.mult},
        {mult = (G.deck and G.deck.cards[1] and G.deck.cards[#G.deck.cards].base.id or 11)}
      end,
      calculate = function(self,card,context)
        if context.joker_main then
          return {
            card = card,
            mult = card.ability.extra.mult,
            color = G.C.MULT
          }
        end
      end
     }
  
#

oh

#

i see

#

return {
card = card,
mult = (G.deck and G.deck.cards[1] and G.deck.cards[#G.deck.cards].base.id or 11) ,
color = G.C.MULT
}

#

that might fix it

normal crest
#

you only need to specify mult btw

tired marsh
#

hello, i want to create an effect on a joker for it to randomly destroy a common joker at the end of the round and i am stumped on how to do it. i attempted to create a list and add all of the common jokers you currently have to it, but it keeps crashing the game whenever i include it. i might not understand how to define local variables/lists in lua. can anyone help me?

chrome widget
#

hehe, animated joker sprite. Objectively I probably could've used the AnimatedSprite for this, but I ended up just using sprite pos on a large atlas texture

whole hornet
#

I GOT IT TO WORK

#

THANK YOU

#

theres proably a lot of code that i dont need

#

but yay

tired marsh
whole hornet
old bane
fathom thunder
old bane
#

this too ^
just check if the joker's rarity is == 1

tired marsh
tired marsh
fathom thunder
tired marsh
tired marsh
#

ok i found it

minor furnace
#

So the unlock condition works correctly, but the text only displays the values when I hover over it

#

oh wait I swapped the values too lmao

fathom thunder
tired marsh
#

alr, ty, i appreciate the starting point

chrome widget
#

What's the correct blueprint context for SMODS?

#

I.E. to stop blueprint from scaling itself when copying the effect of a scaling joker

pulsar flower
#

wrap the scaling part of the joker's calculation with if not context.blueprint then

spring lantern
#

well then

#

turns out i've made a joker that makes skipping straight to the boss blind on every ante a valid strategy

pulsar flower
#

is Card.base.value the rank's key?

minor furnace
#

well, my custom enhancement shattering scaled the wrong joker, this is why we test things

plush cove
#

heya! tryna make a Joker that copies the effect of the first Joker acquired that run. I've got the Joker's key, how would I use that to copy the ability?

ty in advance!

minor furnace
#

I think I may need to create a new context? Because this is probably why it's scaling glass joker
for k, v in ipairs(context.glass_shattered) do

plush cove
pulsar flower
#

hm, that actually sounds a bit difficult?

#

copying jokers rely on the joker it's copying to actually exist and be in the jokers area

chrome widget
#

I guess you could basically get all the various config values for the first joker's key, save its functions such as calculate, loc_vars, add_to_deck, etc, and then have your copying joker call those references to the copied joker?

#

That's how I would do it tbh

pulsar flower
#

in theory you could make a hidden cardarea, then make it so your first joker moves to that card area when destroyed

#

it would be nice if you could just store a reference to the joker, but it breaks when saving/loading

onyx sonnet
#

is there a way to check if a player enters a shop?

minor furnace
#

Just when I finally think I know what I'm doing, this crashes with attempt to index field 'extra' (a number value) when I hover over

        extra = {
            x_chips = 1,
            gain = 0.75
        }
    },
    loc_vars = function(self, info_queue, center)
        return {vars = {center.ability.extra.gain, center.ability.extra.x_chips}}
    end,```
spark remnant
#

what would the context be for when a hand is played but before each individual card is scored?

minor furnace
scarlet spire
#

I have a joker that creates tags... how do I ensure it doesn't do this, which tries to upgrade a nil poker hand, crashing the game?

tired marsh
red flower
#

check for context.main_eval too

tired marsh
#

regardless of if u hav an explanation, it worked perfectly so ty!!

red flower
#

end_of_round is called for cards too so it ensures you're in the main joker evaluation

orchid thunder
#
    key = "greedy",
    name = "omega_greedy",
    config = {
        extra = {
            Emult = 2,
            suit = 'Diamonds'
        },
    },
    pos = { x = 0, y = 0 },
    soul_pos = { x = 1, y = 0 },
    cost = 50,
    rarity = 'b_omega_omegacommon',
    unlocked = true,
    discovered = true,
    blueprint_compat = false,
    eternal_compat = true,
    perishable_compat = false,
    atlas = 'b_omegagreedy',
    loc_vars = function(self, info_queue, center)
        return {
            vars = {
                center.ability.extra.Emult
            }
        }
    end,
    calculate = function(self, card, context)
        if context.cardarea == G.play and context.individual then
             if context.other_card:is_suit(card.ability.extra.suit) then
                return {
                    message = '^' .. card.ability.extra.Emult .. ' Mult',
                    Emult_mod = card.ability.extra.Emult,
                    colour = G.C.MULT,
                    card = context.other_card
                }, true
           end
        end
    end,
}```



Anyone know why this doesn't work
faint yacht
#

...why the , true?

crisp coral
#

joker retrig compat i think???

gloomy rain
#

Im running into issues while trying to make a dollar version of Canio, I know I have to do something with context.remove_playing_cards

but I suck with Lua and I am so lost right now

orchid thunder
atomic hornet
#

Oops I slipped. (How do they look, is the yellow a bit too... not balatro yellow? Should I make red and black cards only and not assume everyone uses high contrast?)

gloomy rain
atomic hornet
#

Yea, they conveniently fit perfectly into Balatro card sizes

gloomy rain
#

yea it looks nice, but a bit basic

I would've prolly made the box around the characters look a little different. Maybe just inward curving around the edges

#

It would be pretty easy overall to make the low contrast colors aswell, just fill tool

and of my friend group, half of them use low contrast

atomic hornet
#

Yea, at the moment it's just using the black frame from the base game cards, recoloured. I would say I done a quick and easy job... but uh... I sort of made a whole mix and match your team thing with loads of pokemon.

#

But yeah, I didn't want to go too far down a hole of making my own fancy backgrounds when I'm aware there needs to be room for enhancements and things. So I tried to keep focus mostly central, so they'd work with whatever mods people use.

plush cove
#

guys i just got this fatal error, i dont know what i should do should I be scared?!?! /j

daring dirge
#

how do i use SMODS.Back calculate to retrigger cards

#

wait i got an idea

#

nope didnt work

#

ive got it triggering on the cards i want it to, but whenever it does it crashes, saying "attempt to index field 'ability' (a nil value)"

bold gyro
#

Hey y'all, I'm trying to implement a joker with a rotating rank similar to Mail-in-Rebate, but I'm having trouble with programming the code that specifically chooses the rank. This code is heavily based on the Castle2 code from the SMODS example jokers, and I believe I've made a mistake somewhere converting from suit terms to rank terms. As is, the Joker does nothing, as a valid rank isn't found.

-- WORDSEARCH JOKER SELECTION FUNCTIONALITY
local igo = Game.init_game_object
function Game:init_game_object()
  local ret = igo(self)
  ret.current_round.wordsearch_card = { rank = '14' } 
  return ret
end

function SMODS.current_mod.reset_game_globals(run_start)
  G.GAME.current_round.wordsearch_card = { rank = '14' }
  local valid_wordsearch_cards = {}
  for _, v in ipairs(G.playing_cards) do
    if not SMODS.has_no_rank(v) then 
        valid_wordsearch_cards[#valid_wordsearch_cards+1] = v
    end
  end
  if valid_wordsearch_cards[1] then 
      local wordsearch_card = pseudorandom_element(valid_wordsearch_cards, pseudoseed('wordsearch'))
      G.GAME.current_round.wordsearch_card.rank = wordsearch_card.base.rank
  end
end```
minor furnace
copper ermine
#

(i did not make this art i just took the portraits from disco elysium and put a gradient map on it)

main mica
#

trying out retrigger_joker_check, this does nothing, what am I doint wrong?

faint yacht
#

Add to enable joker retrigger with your mod.

SMODS.current_mod.optional_features = function()
  return { retrigger_joker = true }
end
daring dirge
#

how do i get certain card values to retrigger with the deck calculate()

plush cove
#

check the code for Hack

daring dirge
#

ive gotten it to detect the values i want but the return{} never does it

daring dirge
#

well not hack

#

but sock and buskin + walkie talkie

#

the problem i think is those are for jokers while i want it for the deck

#

the sock and buskin code mentions "card.ability.extra.repetitions" but whenever i do something with that it says something to do with ability being a nil value

plush cove
#

have you set repetitions in your config

daring dirge
#

i have

#

at least i think i have

#

"config = {extra = {repetitions = 1}}"?

kind olive
#

hey stupid question, but where do I find all of the keys? I'm trying to replace default textures for all images and can't figure out where to look.

daring dirge
#

had to change it to self.config.extra.repetitions

#

i had tried self.extra.repetitions and config.extra.repetitions

keen coral
#

finishing up a test mod- do i need to make a custom sprite before i can attach a png to the modded atlas, or can i route it to an existing image in the source code?

zinc turtle
#

How do I replace text strings with a mod? I'm re-skinning all the consumable cards. Have figured out the art, but not sure where to find an example of changing strings.

minor furnace
#

Time to figure out how to set up a custom context for when my custom probability-based enhancement triggers

grim remnant
#

say, if we're making an edition, where do we put the code for it to do something? does it really just go in config?

noble schooner
#

Is there a "how to make a mod" tutorial? I wanna try adding something like a second shelf for jokers so that Blueprint is manageable in absurd runs with like 27 jokers

minor furnace
#

I have been unsuccessful thus far in my attempts at figuring out how to implement a custom context

#

The reason I (think I) need it:

crisp coral
#

don't need, just loop through SMODS.find_card(key) at the end of the round and add the value to them

minor furnace
#

well, even if it wasn't necessary I just figured out how to do it

grim remnant
gloomy rain
#

How would I add more "collab" things

iron iron
#

do you mean like how cryptid does it

gloomy rain
#

haven't played cryptid, but I mean like having an extra selection on the new face cards selections

#

instead of changing an already existing one

iron iron
#

oh you mean friends of jimbo

gloomy rain
#

yea

#

I forgot the name

gloomy rain
#

thanks

random sleet
#

chat hi i made another card

iron iron
gloomy rain
#

Wait, I already made one

#

I meant liek the coding aspect of adding it

random sleet
#

and an xchip one

iron iron
#

and the one that does absolutely nothing

gloomy rain
#

best build

vivid dirge
#

Hey I have never modded anything before, but some of my buddies and I have stupid ideas we want to add to balatro. How would I go about starting? and any tips for a complete beginner?

gloomy rain
#

I'm not great with the coding aspect

#

but I'll get you started

vivid dirge
#

no i have 0 mods installed currently

scarlet spire
gloomy rain
iron iron
rose dragon
vivid dirge
#

thank you all for the help!

minor furnace
#

so glas joker checks for where context.glass_shattered, but I did Ctrl + Shift + F in the Lovely dump files and could not find any instance of it being set anywhere

faint yacht
#

card.shattered is something that's set by Card:shatter(), fwiw.

rose dragon
#

If I'm looking for a pattern with lovely patches, how can I tell it which instance of the line if it's been repeated multiple times?

minor furnace
#

and instead I want it to trigger the effect of my custom joker when it shatters

shell belfry
#

If I wanted to check for a full house, then compare the ranks of the 2 of a kind and the 3 of a kind, how would i do that

paper zealot
random sleet
minor furnace
rose dragon
minor furnace
#

I patched one check, but it looks like I missed a different one so we'll see if that fixes it

#

sure enough

quasi comet
#

How do you add cards to your consumeable area from a booster pack? I've tried select_card but it doesn't let me choose anything

minor furnace
full flame
#

Is there a way to change the back sprites of jokers with SMOD functions?

full flame
#

The way that custom decks are declared, yes. I want to make a joker similar to e.g. Square Joker that looks different when flipped

sturdy compass
#

Does anyone happen to know if it's possible to do Splash-like functionality?

sturdy compass
fathom thunder
sturdy compass
#

Kinda? The idea is Splash with a few extra steps. The main thing I’m after is the full hand scoring regardless of if they fit the hand type

fathom thunder
sturdy compass
#

I did and I didn’t like what I saw, hence why I’m turning to here to see if anyone has cracked that code a bit better

fathom thunder
#

Show me the code cuz I can’t check for myself since I’m on mobile

sturdy compass
#

I just got in bed so no can do lmao

fathom thunder
#

Oh lmao

sturdy compass
#

But basically it’s not handled in a calculate function, it’s done during actual hand scoring (which makes sense but kinda tells you why I’m not a fan)

rose dragon
sturdy compass
#

I don’t think indentation messes with it, though I usually do just for readability

rose dragon
sturdy compass
#

I will replace all of them unless you add a ā€œtimesā€ value to the patch syntax. It will always start from the first instance of the pattern

rose dragon
sturdy compass
#

No. If your pattern is looking for one line, it will look for a line that is an exact match (not counting indents). Same goes for code blocks in the sense it looks for an exact match

rose dragon
sturdy compass
#

You could use regex but that’s a little more resource intensive

paper zealot
rose dragon
novel violet
#

been thinking of taking a break from my main project, expanding my horizons, and working on something potentially a little easier - balatro modding seems pretty perfect for me!

is there anyone currently making a genshin-themed content mod (beyond that one with element textures on the cards)?

#

that's what i'm thinking of doing but i don't want to step on anyone's toes if it's already a project

sturdy compass
#

Even if someone is don’t let that discourage you. There’s plenty of mods out there with duplicate themes or ideas

novel violet
novel violet
paper zealot
sturdy compass
rose dragon
sturdy compass
#

Actually I’ve done something similar with one of my cards. Lemme get you a link to the file I have for it

#

The Hanged Man section is probs what you should look at

rose dragon
#

nvm i got it working with regex

quasi comet
#

but still shows the counter has increased?

#

it's strange

daring dirge
#

can you use calc_dollar_bonus on decks?

#

if not how do i simulate it

random sleet
#

chat why does this joker work

#

i figured out i could just do this for graveyard so i can arbitrarily check parameters of cards
functions are just variables hee hee hoo hoo

marsh basalt
#

Would it be a bad idea to call the calculate functions on jokers manually with my own context?

#

Uh

normal crest
marsh basalt
#

Yeah that's a scam

normal crest
#

<@&1133519078540185692>

marsh basalt
#

<@&1133519078540185692> ?

#

Ah, oops

grand violet
robust tundra
#

šŸ”«

#

hi egg

normal crest
grand violet
marsh basalt
random sleet
#

the added context flag avoids an infinite loop

normal crest
#

At this point I just look at smods source so I don't know what's in the wiki anymore

random sleet
#

fellow ctrl shift f user

normal crest
#

honestly I just use grep

marsh basalt
#

Funnily enough, I did find eval_this and, while being a thing I was not looking for, was also yelling at me that it is deprecated

edgy reef
#

grep users where

random sleet
#

i love that my stupid name for that function stayed btw

edgy reef
#

Funny enough it was not indicated correctly.

wintry solar
edgy reef
#

Surely today won’t be eaten by new Cryptid update or SMODS beta setup (clueless)

wintry solar
#

I have no idea how you motivated yourself to do all the lsp stuff, writing docs is dull as hell

plush cove
daring dirge
#

how i increase the interest payout

#

like $2 every $5, but still cap at the same amount of $25

robust tundra
#

(I haven't coded a Balatro mod before but) perhaps look at how To The Moon works?

paper zealot
daring dirge
#

(i looked at golden specifically)

random sleet
#

to the moon is the joker that does exactly that

daring dirge
#

oh wait

#

i was thinking of rocket lmao

#

for future reference where do i find the vanilla jokers that arent in the example doc

random sleet
#

in the game executable; 7zip can open it

daring dirge
daring dirge
paper zealot
#

C:\Program Files (x86)\Steam\steamapps\common\Balatro\Balatro.exe

daring dirge
#

i meant i have that file open

random sleet
#

most joker effects are in card.lua

#

but its worth extracting the whole source so you can refer to it

#

treat it like documentation for itself, as that is what code is

opal spade
daring dirge
#

yeah ive extracted it just couldn't find the file with the code that runs it, i checked main and game but not card

#

got it now ty

shadow rapids
#

how do you make a blind that has effects that occur after a hand scores

vale tulip
#

hello, I've just started out, can anyone share with me the available guides and docs? I've found the steamodded documentation, but I still cannot figure some things out.

bold sleet
#

Here.

#

A repository with examples of some stuff.

#

If you still don't get how something works, ask about it.

#

Now my question: Is there a way to have a joker trigger it's effect immediately after being bought/created?

#

nevermind, got answered elsewere

tepid crow
#

use add_to_deck

#

oop

bold sleet
bold sleet
vale tulip
vale tulip
#

Are there easier ways to test things than just using them ingame?

tepid crow
#

not really lol

tepid crow
vale tulip
#

I've also been trying to insert the joker i've made into a deck, but I keep getting crashes when I'm trying to create a card using it's declared key

#

So let's say that I declare a joker with the key "my_joker", i would need to create the card using
create_card("Joker', G.Jokers, nil, nil, nil, nil, "my_joker") right?

bold sleet
#

You need your mod's prefix first.

spark remnant
#

iirc create_card is mainly used for joker effects, the easiest way to give yourself a joker is by using either first round joker or DebugPlus

bold sleet
#

j_[your_prefix]_[your_joker_key]

vale tulip
#

oh thank you very much, both of you.

random sleet
#

looking for feedback on this graveyard counter ui

#

-# the (27) at the bottom, if unclear

strong jacinth
#

Whats the standard joker size?

random sleet
#

71x95

strong jacinth
#

Thanks

strong jacinth
#

Like 138x186

tepid crow
random sleet
#

the deck counter defaults to that position; i figured err on the side of not pissing off people used to vanilla bulbaSip

tepid crow
#

I know haha

#

it'd still say see if it works or not šŸ˜…

tall wharf
random sleet
tepid crow
#

ah okay

wintry solar
#

Omg cryptid new calc is live will people finally stop developing on old versions now šŸ¤ž

tall wharf
#

ill just have to find a way to make my mod work with that i guess

tall wharf
#

people will finally stop complaining about Cryptid crashing their game because they downloaded the wrong version of Talisman

#

and Steamodded

tepid crow
#

you guys seem to have way too much faith in people

random sleet
#

no now people will just complain that they downloaded thac and talisman together

tall wharf
#

i can't have faith anymore can i

tepid crow
#

like someone is gonna develop on old-calc just because Jen's is still on old-calc

random sleet
#

why does cryptid not work on smods 0.9.8 its the latest release

tall wharf
#

THERE IS A BIG TEXT SAYING "DON'T DOWNLOAD THIS"

random sleet
#

98%

crisp coral
#

is there cryptid on 0.9.2

tall wharf
#

if you didn't read the giant text you deserve to get stung

#

i don't get the 98% can someone explain

tepid crow
#

aww man that doesn't work?

tall wharf
tall wharf
#

i can't read

random sleet
tepid crow
#

I like it, idk about you

wintry solar
#

is it possible to get it underneath?

random sleet
#

not with the method i'm using currently

tepid crow
#

oh underneath might not be bad either

random sleet
#

oh but yeah underneath actually isnt that hard one sec

runic pecan
#

Just ran into this issue:

#

Which corresponding to this part:

#

However I did check nil at the very start of the function:

#

Now I don't know why is this happening.

tepid crow
#

_c.key is nil, not _c

runic pecan
#

How come something in this game doesn't have its key?

tepid crow
#

idk why it happened, only that it happened šŸ¤·ā€ā™‚ļø

wintry solar
#

isn't _c just a card?

runic pecan
#

And, if there is a card not having a key, how do I identify the card that caused the problem?

wintry solar
#

I dont think a card object will ever have a key

#

it's within the center of the object

spring lantern
#

this is gonna be fun

runic pecan
#

You mean like _c.center.key instead?

spring lantern
#

🄲

wintry solar
#

_c.config.center.key

tall wharf
#

"seen"

tepid crow
#

heya Eremel, I'm trying to use retrigger_joker_check, but Mods that only use Events for their joker and return nothing don't get retriggered

spring lantern
#

yea im jus gonna create a table and use my create card hook to check when new cards appear

wintry solar
#

they need to return nil, true

tepid crow
#

would adding return {} to their calculate work without unexpected side-behaviour?

#

oh

tall wharf
#

seen PokƩmon

crisp coral
#

damn.

wintry solar
#

I don't think there's any other clean way of knowing if a joker was triggered or not

tepid crow
#

ah yeah I found the code for it

#

that sucks

#

thanks

random sleet
#

nvm underneath is a nightmare

final pewter
#

hey uh does anyone know any guide for how to make mods? i genuinely cannot find anything, there is only one youtube tutorial that misses a lot of things that need to be addressed

#

and outside of youtube i am either too blind or have also not found anything

opal spade
#

this

final pewter
tall wharf
#

hello friends

storm kraken
#
calculate = function(self, card, context)
    if G.GAME.current_round.hands_left == 0 then
    if context.retrigger_joker_check and not context.retrigger_joker then
                return {
                    message = localize("k_again_ex"),
                    repetitions = card.ability.extra.repetitions,
                    card = G.joker.cards,
                }
    end
end
end

the compounds in my brain are being decomposed (trying to retrigger all jokers)

onyx sonnet
#

is there a context for checking when the player enters the shop?

frosty dock
#

no

bold gyro
#

I'm trying to make a joker that removes the enhancement from Stone cards, and then adds 50 permanent chips to the card. I've cobbled together this code based on the Vampire and Hiker jokers, but then the game crashes when the Stone card's enhancement is removed. What should I do to fix this?

calculate = function(self, card, context)
    if context.cardarea == G.play and #context.full_hand == 1 and not context.blueprint then
      if SMODS.has_enhancement(context.other_card, 'm_stone') and not context.other_card.debuff then
        
card.set_ability(G.P_CENTERS.c_base, nil, true) --Remove enhancement from playing card
        
context.other_card.ability.perma_bonus = context.other_card.ability.perma_bonus or 0 --idk what this bit does
        
context.other_card.ability.perma_bonus = context.other_card.ability.perma_bonus + self.ability.extra --add permanent chips to playing card
        
          return {
              message = "Chisel!",
              colour = G.C.CHIPS,
              card = self
          }
      end
    end
    end```
marsh basalt
#

Try changing the period to a colon in the set_ability

wintry solar
#

should be card:set_ability

frosty dock
marsh basalt
#

Okay

frosty dock
#

the base center is still a center, and a card can't just not have one

marsh basalt
#

I think I might've mistaken it with an another function ^^"

bold gyro
#

Okay, the change to a colon now stops a crash from that part now. Unfortunately, the part where permanent chips are added causes a crash:
attempt to index field 'extra' (a nil value)

context.other_card.ability.perma_bonus = context.other_card.ability.perma_bonus + card.ability.extra.big_bonus --add permanent chips to playing card```
Is there something fundamentally wrong here that causes the crash?
marsh basalt
#

What does the config table in your joker look like?

onyx sonnet
bold gyro
wintry solar
onyx sonnet
#

ty for the info!

#

@wintry solar sorry for the ping but i honestly still cannot figure out how to make it work with retriggers

wintry solar
#

what's it supposed to do?

onyx sonnet
#

Retrigger the rightmost card per scored ace (including retriggers like chad or seal)

wintry solar
#
if context.individual and context.cardarea == G.play and context.other_card ~= context.scoring_hand[#context.scoring_hand] and context.other_card:get_id() == 14 then
  card.ability.extra.repetitions = card.ability.extra.repetitions + 1
end
if context.repetition and context.cardarea == G.play and context.other_card == context.scoring_hand[#context.scoring_hand] then
  return {
    repetitions = card.ability.extra.repetitions
  }
end
if context.after then
  card.ability.extra.repetitions = 0
end```
onyx sonnet
#

what was i doing wrong?

wintry solar
#

you're doing everything in the individual context

onyx sonnet
#

ohhh

#

thank you so much!!

prisma loom
#

Is there a way to prevent the transfer of Negative edition from one playing card to another (via Death, Cryptid, DNA etc.)?

#

(yes, playing cards)

broken cliff
#
  1. prob via lovely patches
  2. why exactly would u ever need negative edition in the first place
manic rune
#

good morning everyone

crisp coral
#

bestie its fuckin 10:25pm

manic rune
#

sounds like morning to me ā¤ļø

prisma loom
#

It's very useful

#

Or just your most pump up card for the powerful poker hand play

manic rune
#

i think that will require a patch, as smell has said, you will have to edit the code of Death, Cryptid, and DNA so that they will remove the Negative edition from the new cards

prisma loom
#

Like polychrom red seal

wintry solar
#

I dont see why you'd want a copy effect to strip certain editions

manic rune
#

true

prisma loom
manic rune
#

i mean, jokers are fundamentally different compared to playing cards because they are literal powerhouses, you can just make negative playing cards somewhat rare honestly

prisma loom
#

What's the point of a spectral card that gives negative to a playing card if after just one use it becomes pointless?

manic rune
#

a negative steel card isn't as good as most uncommon jokers when they are negative (i love lucky cat), but if you still want to do it then sure

prisma loom
#

Sure, negative playing card isn't as strong as a negative Joker but the payment is less smaller

#

-1 hand

wintry solar
#

how is it pointless after one use

prisma loom
manic rune
#

that patch alone would certainly make some strategies in other mods worse btw lol

wintry solar
#

I genuinely have no idea what you're on about

prisma loom
#

that's all

manic rune
#

honestly, id never pick exchange

marsh basalt
#

I feel -1 hand is an extremely bad downside

manic rune
#

mhm

prisma loom
#

I don't think this should be free either

manic rune
#

look at black deck and see how -1 hand made it extremely annoying to play with ā¤ļø

wintry solar
#

yeah I feel like you're vastly overestimating the power of negative on a playing card

#

and if you do keep this downside, you should absolutely be able to copy it to other cards

prisma loom
manic rune
#

either that or you are underestimating how big of a drawback -1 hand is

marsh basalt
# bold gyro `config = { extra = { big_bonus = 50 } }`

also super late to this but I'm not sure what could be going wrong - I'd suggest putting for k, v in pairs(card.ability) do print(k) end before the crash as a sanity check to see everything inside of the ability table if you have not fixed it yet

wintry solar
#

I mean I would never use this spectral anyway

prisma loom
#

I think you underestimate the power of negative playing card

#

Especially since it's not the only thing that mod adds

marsh basalt
manic rune
#

i think that the only way for negative playing cards to actually have an impact on your run would be:

  • get perkeo
  • somehow get exchange inside your consumable slot

and thats IF exchange didnt have that big of a cost

vapid cloak
#

hey yall how can i access the source code for balatro through steam? im trying to read through it to get a better idea of how to woprk with the cards

manic rune
#

download 7-zip, then extract balatro.exe

vapid cloak
#

tyty

prisma loom
manic rune
#

or maybe about 6, definitely under 10 if you got dem voucher to give bonus hands

prisma loom
vapid cloak
#

what about deaths with it?

prisma loom
#

Just saying

wintry solar
#

like what?

prisma loom
#

Obsidian and Antimatter enhancement and black seal

#

And green seal in rare scenarios

wintry solar
#

which do?

prisma ferry
#

I'm sure this has been asked a million times but what resources can i look at to begin modding balatro

prisma loom
# wintry solar which do?

"Anti-matter Enhancement"
X0.5 Mult
1 in 4 chance to upgrade by X0.5 Mult
(Up to X2 Mult)

"Obsidian Enhancement"
Lose 1$
1 in 4 chance to create a Negative consumable card

Black Seal
Counts in scoring if held in hand

Green Seal
Draw 2 extra cards when scored or discarded

manic rune
#

id use this instead of exchange ngl 😭

prisma loom
#

That's a -1 Joker slot

wintry solar
#

black seal is the only card there that works with a negative card

wintry solar
#

well why would any of the others care about being negative

manic rune
#

ok but its very unlikely you are gonna get one so maybe thats a bad point

prisma loom
#

Also steel, gold and blue seal as I've mentioned before

manic rune
prisma loom
#

Gold Enhancement

wintry solar
#

but you already need a handful of those effects to get an increase

manic rune
#

oh

prisma loom
#

Wait actually now that I think about it

manic rune
prisma loom
#

Negative transfer protection a big downside

#

Yeah, -1 hand is unnecessary

manic rune
#

it really is

wintry solar
#

I still think both are unnecessary

manic rune
#

and even without -1 hand, you would still need perkeo to consistently build a negative card deck because of not being able to copy negative

wintry solar
#

a negative card is +1 hand size, some of the time

manic rune
#

and i dont think having to rely on a legendary joker for a spectral card to work is a good idea

prisma loom
manic rune
#

yeah but not when its locked to one playing card

onyx sonnet
wintry solar
#

you have to draw the card to make use of the hand size and keep the card in hand

onyx sonnet
#

mhm

wintry solar
#

which if it isnt providing you a benefit for being in your hand, either with it's own effect or making up the hand you want to play, also doesn't really do much

onyx sonnet
#

-1 hands played stunts your possible scoring and early econ so much

manic rune
#

literally the reason for black deck hate lol

prisma loom
#

Well, I trust you folks on that but if it turns out to be as broken as I've imagined then I'll just add negative transfer protection

#

I hope that sounds reasonable

onyx sonnet
#

with enough deck fixing the profit from a negative card would be insane

#

but that requires work

prisma loom
#

Well, deck fixing enables a lot of broken stuff in general

manic rune
#

it really wont, you still need a bunch of Death to make it work beautifully anyways

#

(i shouldve replied to the specific message, but what i mean is that it will take quite a few rounds and cash to ramp up its potential)

marsh basalt
manic rune
#

it blocks playstyles from other mods too, dont forget that

marsh basalt
#

Other editions and seals transfer over

onyx sonnet
#

It makes sense for jokers because joker copying is already powerful on its own, but playing cards dont need it

prisma loom
#

Cuz power of playing cards is much more limited

#

ic

wintry solar
#

it's also because of the fact that you won't always have the playing card, whereas a joker is a permanent thing you have

quartz ravine
manic rune
#

pretty much everyone does

prisma loom
#

where's obligatory all my homies hate pic

quartz ravine
#

I also find plasma to be super hard too. I can't put into words why I struggle with it. I guess it gets super duper hard at the second or third stake

onyx sonnet
#

yeah its just inherently harder to play because hand reduction limits you in so many ways but i was mainly talking about hand reductions in general

manic rune
#

stone cards actually become quite viable for early game too

quartz ravine
#

So is everyone who makes mods also pixel artists? I programmed a bunch of cards for a vanilla style mod and am now trying my hand at pixel art and...wow is it hard to make things look good

onyx sonnet
quartz ravine
onyx sonnet
#

You could also ask friends for help if they want to make stuff with you, or commission someone

prisma loom
#

Aseprite app was huge "skill" boost for me

#

It's very good

onyx sonnet
#

i just use gimp lol,i used to use paint.net when i had windows

manic rune
#

aseprite works so beautifully when it comes to pixel art

onyx sonnet
#

really any image editing software with basic functionality like layers will work

prisma loom
#

Yeah, but the comfort and speed is better in aseprite imo

onyx sonnet
#

That is a perfectly valid take

manic rune
#

šŸ—£ļø

onyx sonnet
#

i was talking about paint DOT net

prisma loom
#

Paint2 just dropped

manic rune
#

yeh but by that logic, paint should work too ā¤ļø

onyx sonnet
#

which is an image editing software separate from MS paint

wintry solar
#

paint has layers?

manic rune
marsh basalt
#

Since Windows 11

onyx sonnet
#

oh shit really?

#

damn

wintry solar
#

oh shit I have never seen this button lol

manic rune
crisp coral
#

pros:
layers for mspaint

cons:
having to update to win11

onyx sonnet
manic rune
broken cliff
quartz ravine
# onyx sonnet i just use gimp lol,i used to use paint.net when i had windows

I'm using paint.net on my pc too! I did just get a pencil for my eight year old ipad, I am going to try that.

I think my biggest sin was starting with the 2x resolution cards. That allows for extra detail and when I shrink it down, wow it looks bad. I was reading up on pixel art and the style ideas and it seems liek folks generally start with smaller images and scale up.

crisp coral
quartz ravine
onyx sonnet
#

I dont think modded jokers really even need 1x, its only used in the challenge screens

crisp coral
manic rune
quartz ravine
#

Texture smoothing?

crisp coral
#

that

broken cliff
#

dayum bro

onyx sonnet
#

ah ic

broken cliff
#

so u can make 1x look ugli and make 2x look good?

quartz ravine
#

i love how much detail I can put in a 2x card but then it doesn't really fit the pixel aesthetic

manic rune
#

make 1x card sprites nothing but the text: "Turn On Texture Smoothing"

#

ā¤ļø

onyx sonnet
#

Also for scaling pixel art, you should generally turn off interpolation

#

i scaled my jokers from 2x to 1x with interpolation off and they looked fine

quartz ravine
#

I feel like the jokers and packs and tarots I added are very vanilla friendly and folks will like them, if I can spend a week of free time learning lua and adding the jokers, I can take two more weeks to do good hand made art too.

onyx sonnet
#

Lua isnt all that hard to understand, as far as programming languages go its pretty similar to human speech, the difficult part is learning all the contexts smods has and what they mean in regards to ingame circumstances

minor furnace
#

I can't decide if I should make this x0.1 to match the scaling of Vampire or not

manic rune
#

i think it should be x0.1

quartz ravine
#

In hindsight I wish I'd tried learning lua 10 years ago, I could have made some fun WoW mods. It's been easy to understand

minor furnace
manic rune
#

the hardest part of modding balatro is actually remembering all the functions, variable names and allat ngl

quartz ravine
#

I also confuse ability, enhancement and ability. End users might too

minor furnace
#

It's only when an enhancement is placed on a card that already has an enhancement

onyx sonnet
#

Enhancements are the ones on playing cards

#

LIke gold, steel, bonus, mult, glass, stone

manic rune
#

would turning a lucky card to a lucky card work

minor furnace
#

yes

broken cliff
#

ur right about everything else tho

quartz ravine
#

Would you listen to context.consumable_used? SMODs lets you take ownership so you could do something afterwards

Now if lua took in lambda functions...that would make it pretty easy

broken cliff
#

lua is like the easiest

#

then python

#

put c on the last place bcuz u also have to make it S A F E

minor furnace
#

My only complaint is please give me my strong typing back

#

We put respect on declaring variable types in this household šŸ—£ļø

tall wharf
#

😭

minor furnace
#

The duality of man

strong jacinth
#

Yo

quartz ravine
#

Why isn't it null safe? I had to write safety functions for it. I do love the SMODS.Inspect option

#

Does anyone here have good recommendations for pixel artists they worked with?

strong jacinth
#

X mult is for multiplying the mult. How do you add?

#

Like +10 to the mult

long sun
#

mult

strong jacinth
#

Wdym?

broken cliff
long sun
#

eg. return { mult = card.ability.extra.mult }

broken cliff
#

^

strong jacinth
#

Oooh

#

Thanks!!

long sun
#

and then add mult to your loc_vars

#

np!

broken cliff
#

alr how do i add cards into the deck with a specific rank and suit

strong jacinth
#
elseif (context.other_card:get_id() <= 9) and (context.other_card:get_id() >= 2) then
  xmult = context.other_card:get_id()
end

So this line returns 2 - 9 depending on the card, how do i add 0. before?

#

ex. instead of 9 0.9

long sun
#

divide it by 10.0

#

not 10, that does integer division

#

which will return 0

strong jacinth
#

By using ... / 10.0

long sun
#

mhm

final pewter
#

does your mod have to contain content to be detected by steammodded? i have implemented the .json metadata file but it still hasnt been detected
heres the metadata

    "id": "Examplumod", 
    "name": "Examplumod", 
    "author": ["biggie"], 
    "description": "adds genuinly nothing", 
    "prefix": "xmpl", 
    "main_file": "main.lua", 
    "priority": 0, 
    "badge_colour": "FF230A", 
    "badge_text_colour": "FFFFFF", 
    "display_name": "ballers", 
    "version": "~1.0.0", 
    "dependencies": [
        "Steamodded (>=1.*)"
         ]
}```
#

there is nothing in main.lua

broken cliff
#
--- MOD_NAME: The Nothing Mod
--- MOD_ID: NothingMod
--- MOD_AUTHOR: [Steamo, TheVoid]
--- MOD_DESCRIPTION: This Mod doesn't do anything !

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

----------------------------------------------
------------MOD CODE END----------------------```
limpid halo
#

dont use the header

#

its deprecated

frosty dock
strong jacinth
#

How do i change the joker rairyty

wintry solar
#

you can / 10 just fine

broken cliff
#

where is is the rarity

#

afaik 4 is legendary

frosty dock
bold sleet
#
SMODS.Joker {
  rarity = 1
}
broken cliff
#

3 is rare
2 is uncommon
1 is common

frosty dock
final pewter
bold sleet
frosty dock
broken cliff
#

do i add playing cards with smods.create_card()?

bold sleet
final pewter
#

its not...

bold sleet
#

then uh...

#

beats me

final pewter
#

imma try and reinstall lovely

broken cliff
#

wait

#

@final pewter did u save the file

broken cliff
#

json file is 0 kb

final pewter
final pewter
#

probably the cause

broken cliff
#

yh u should prob save the file

#

in whatever editor u are

frosty dock
#

smh

final pewter
#

sorry for wasting y'alls time 😭

broken cliff
#

its fine

strong jacinth
#

So uh this crashes

broken cliff
#

error?

strong jacinth
broken cliff
#

whats at line 110

strong jacinth
frosty dock
#

that's not how lua tables work

#

also change your centers to card

strong jacinth
minor furnace
#

I assume you’d want return {x_mult = …}

frosty dock
#

you put a key like x_mult and a value

#

if you want to give xmult, you put x_mult = <value> into a returned table

strong jacinth
#

I want center.ability.extra.Xmult to be xmult more

frosty dock
#

if you want to change a config value of the card, you do that outside of a table

strong jacinth
#

center.ability.extra.Xmult = center.ability.extra.Xmult + xmult

frosty dock
#

also like i said

#

you're using center but it's not defined

#

change it to card

strong jacinth
#

Thats how you wouldve done it in another lang

crisp coral
#

cryptid really made a bad example on how jokers are structured huh

strong jacinth
frosty dock
#

you just don't shove it in a table constructor

#

you can't wrap random statements into a table

#

either you do card.ability.extra.Xmult = card.ability.extra.Xmult + xmult and change the config value

#

or you return { Xmult = <value here> } and tell the game to give that xmult

#

a combination of the two does not work

strong jacinth
#

So like this

frosty dock
#

good so far but you're never giving the xmult, you're just changing around config values

strong jacinth
#

Thue

frosty dock
#

also line 113 is assigning to a global mult

strong jacinth
#

Yeah

frosty dock
#

in every possible context

strong jacinth
#

So i should change that to?

frosty dock
#

you should change that

#

I don't know the exact effect you have in mind, but you probably want to give the mult in context.joker_main?

strong jacinth
#

So a seven adds 0.7 to the total mult of the joker when scored

#

Then it multiplies your total hand with this

broken cliff
#

to add +0.7 to mult

#

if u want to multiply then its return {xmult = card.ability.extra.xmult}

#

at line 113

normal crest
#

that will give mult on every possible context

broken cliff
#

oh right

#

he should put that inside the context

strong jacinth
broken cliff
#

change center to card

strong jacinth
quartz ravine
#

Can you show your cards ability section?

strong jacinth
#

Like thias section

quartz ravine
#

It should have a section like this

 config = {
            odds = 2,
            extra = 1.5,
            earnedPlusmult = 0,
            multGrowthRate = 1
        },

#

Config for a joker is interpretted as ability

strong jacinth
normal crest
#

Did you start a new run

#

After adding that

broken cliff
#

u should chance xMult to Xmult at line 113

#

and put the line 113 into a context

quartz ravine
#

Your line 96 has a typo. Locvars isn't taking in card, it's taking in self. So change line 96 to self.ability.blah

broken cliff
#

does anyone know how to create a playing card?

quartz ravine
#

tell me more? Like add a new card to the deck or hand, or what?

broken cliff
#

to deck

strong jacinth
#

So like this?

frosty dock
broken cliff
#

like put it in the if statement

frosty dock
#

change the center in the loc_vars arguments to card and change self back to card

#

Also put line 113 into if context.joker_main then ... end

wintry solar
#

I love watching people give bad advice

strong jacinth
#

Soo next question. How do i check the suit?

broken cliff
#

alr heres my questions(purpose is to have 1/4 chance of card splitting into 2)

  1. how do i create a playing card and put it into deck
    or(if 1 is hard to answer)
  2. how do i clone a card and THEN edit the cards rank
broken cliff
strong jacinth
#

Suit, typo

broken cliff
#

alr thx

normal crest
broken cliff
#

alr

quartz ravine
broken cliff
strong jacinth
#

so card:is_suit(clubs)?

normal crest
#

"Clubs"

broken cliff
#

"Clubs"

wintry solar
#

if you just want to know the suit rather than check it is a certain one you can use card.base.suit

final pewter
final pewter
normal crest
wintry solar
#

that sounds like a problem

vapid cloak
#

hey for art for mods what pxl height/width should it be

#

for a joeklr

#

joker*

normal crest
#

I think so anyway, I didn't test it, but it looks similar to what we did in paperback

#

And I had that issue

vapid cloak
#

thank you!!!!!!!!

hardy viper
#

np

wintry solar
#

should be an easy fix

strong jacinth
#

How do you check which cards the player has in hand

broken cliff
#

oh wait

#

hold on

#

in hand as in not playing right

#

its G.hand for the hand cards

strong jacinth
#

Or can i like G.hand(1)

normal crest
#

G.hand.cards[1] to get the first card

strong jacinth
#

Can you get the total amount of cards?

normal crest
#

#G.hand.cards

#

or if you want the hand size, G.hand.config.card_limit

broken cliff
#

afaik u can js do
if context.cardarea == G.hand then

it will go through each card in the hand area

#

OH AND CONTEXT.INDIVIDUAL

#

so its
if context.individual and context.cardarea = G.hand then

#

then it will loop through all cards in ur g.hand

strong jacinth
hardy viper
#

length operator

broken cliff
#

oops

hardy viper
#

lol

broken cliff
#

#gets the lenght of a table

final pewter
#

so my mod still isnt being detected by steammodded, could it be because of this in the metadata? every mod has a specified version but idk if this works either

broken cliff
#

can u chance the version to be 1.0.0?

#

maybe thatll do it

final pewter
#

ill see

hardy viper
#

thats redundant

#

0.9.8 doesnt recognize json formatted metadata anyways

final pewter
#

so i have to use <=1.*

broken cliff
#

no the version: "1.0.0"

hardy viper
#

??

#

just remove the dependency

final pewter
#

alright

hardy viper
#

anything <1.* wont recognize the mod anyways

broken cliff
#

i confused Everyone

#

what i meant by My statemtents was "version": "1.0.0"

#

not "~1.0.0"

final pewter
#

it worked!!

#

thx!

strong jacinth
#

How do i do a for each loop in lua

#

Like foreach .... #G.hand.cards

broken cliff
#

for i,v in ipairs(table) do

frosty dock
#
for i, v in ipairs(G.hand.cards) do
  -- i is the index, v is the value
end
for i = 1, #G.hand.cards do
  local v = G.hand.cards[i]
  -- this is the same thing effectively
end
#

if you're modifying the table you're traversing, you need a while loop instead

strong jacinth
#

So v would be 7 if the card was a seven?

minor furnace
#

G.hand.cards[i].base.id would be 7, or G.hand.cards[i]:get_id() (I think that’s the method I’m not at my computer rn)

frosty dock
final pewter
#

in game the name and description wont show up, did i get misorganized with the {} brackets?

normal crest
#

yes you're missing a closing bracket

final pewter
#

no, its just not in the screenshot

normal crest
#

ah, it's loc_txt not loc_text

final pewter
#

ohhh, makes sense, thanks!

normal crest
#

also please format your code!

final pewter
#

what was formating again, i am rly new to this

normal crest
#

ctrl + shift + i if you have the lua extension should do it

#

or just right click anywhere in the text and press format document

final pewter
#

kk, looks a lot better now

#

oh yeah, its all coming together

#

now i just gotta make it eternal and not provide the negative multegg

strong jacinth
#

What will the base id be

minor furnace
#

This is also the value displayed for them when you hover over Misprint

strong jacinth
minor furnace
# strong jacinth

Do you have a variable called mult somewhere else that you forgot to make local?

strong jacinth
#

Like mult is the multiplier

minor furnace
#

Oh wait nvm it’s throwing the error because you didn’t set a context, so it’s calling it when there are no cards in your hand

strong jacinth
#

(Im new to lua, in case you didn't notice)

minor furnace
minor gyro
strong jacinth
minor furnace
#

The documentation is your friend (until you realize there are some contexts you need that exist but the wiki does not mention)

minor gyro
#

this
it's too much text in one line

copper ermine
#

(sorry if this is obvious i'm a complete beginner) the joker resets if a face card is scored, the actual reset part works fine but the "Reset!" message isn't showing up, how do i fix it

minor gyro
#

this is how u break code in case u didn't know

minor furnace
strong jacinth
minor furnace
#

I would put the context outside of the for loop

strong jacinth
#

Thats smart thanks

rose hamlet
#

yo guys i need help making a mod
i want to make a mod that adds new skins for the face cards
but idk how to add a new tab to scroll to and how to add the cards in the game
just like yk the witcher face cards thing etc
i want to make my own face cards and add them into the game in customize cards area but idk how if someone can help me out that would be amazing

strong jacinth
#

But the stuff wont work

copper ermine
#

yea

#

also i got rid of that stray comma at the end of localize but it still doesn't display the message

frosty dock
# copper ermine yea

Uh I'm pretty sure Eremel is asking what version of smods you're running, not if you have it at all

minor furnace
wintry solar
#

The full version…

frosty dock
copper ermine
frosty dock
#

you're almost 2 months out of date

#

joker calculation was changed fundamentally since then, so it's a huge difference

copper ermine
#

skulll ah ok thank you

frosty dock
#

your code should work just fine on the latest version

strong jacinth
minor furnace
frosty dock
hushed field
#

context.destroying_card only checks for cards played, right, not cards held in hand?

copper ermine
frosty dock
strong jacinth
frosty dock
#

context.destroying_card is explicitly only played scoring cards, for others use context.destroy_card and context.cardarea == G.hand (or whatever other area)

hushed field
#

aaah okay

frosty dock
#

Also that's not how context.individual works

strong jacinth
frosty dock
#

totalmult

minor furnace
#

You need to declare
local totalmult = 0 before you use it

frosty dock
#
if context.cardarea == G.play and context.individual and context.other_card:get_id() < 11 then
  return { mult = context.other_card:get_id() }
end

this should be closer to what you need if you want to use context.individual

#

or if you want cards held in hand, you need to evaluate in G.hand. I'm still not sure what you're trying to do exactly though

frosty dock
#

you don't need to totalmult then

#

but uh

#

I realize that breaks with stones

strong jacinth
#

Stones?

minor furnace
#

Stone cards are assigned a negative id iirc

normal crest
#

stone cards have a negative id

frosty dock
#
if context.cardarea == G.hand and context.individual then
  local id = context.other_card:get_id()
  if id > 0 and id < 11 then
    return { mult = id}
  end
end

more like this

normal crest
#

And it's a really small number like -48000 or whatever

#

it's random iirc

frosty dock
#

yeah it's random, I didn't check for these kinds of errors lmao

strong jacinth
#

It doesnt work?

frosty dock
#

how so?

strong jacinth
#

Oooh, it gives mult for each played card, i want it to give mult for every card in hand

frosty dock
#

see you never specified that

strong jacinth
#

Every numberd card

normal crest
#

change G.play to G.hand

strong jacinth
#

What happens here, at end it does it again?

#

So this happens

wintry solar
#

Needs context.main_scoring too

#

Which we could have told you straight away if you told us what the effect was

strong jacinth
#

You mean like this?

frosty dock
half mesa
#

is cryptid refactor branch gone?

frosty dock
strong jacinth
#

But i want it to add mult for every card in hand, so for a 7 it adds 7

#

Face cards not included

#

So no mult for face cards

frosty dock
#

what you had before that change should be good

strong jacinth
#

Sometimes it play at the end again?

frosty dock
#

oh right there's some confusion here

strong jacinth
#

What do you mean?

normal crest
#

ah

wintry solar
#

oh maybe it is just on playing card eval

normal crest
#

try adding not context.end_of_round

frosty dock
#

I don't think we actually have a positive identifier for that

wintry solar
#

no I was just thinking that

frosty dock
#

it can't be context.main_eval either

strong jacinth
#

Thanks

wintry solar
#

my initial thought would be to change the end_of_round one

#

but that is ehhhh

#

maybe context.score_eval?

strong jacinth
#

Last question

#

How do I check what cards the playes has in deck

unkempt thicket
#

What causes this? The layers i added looks like they're also being emplaced.

normal crest
strong jacinth
#

What's the difference again

minor furnace
#

Current deck excludes cards already seen in the round

strong jacinth
#

Ooh, full deck

minor furnace
#

i.e. Blue Joker calculates off of current deck, Cloud 9 calculates off of full deck

strong jacinth
normal crest
#

full deck is in G.playing_cards

gloomy rain
#

Yo, I am AWFUL with lua

#

anyone got a good source or video that would help me learn it

strong jacinth
#

To get number of aced

normal crest
#

No

strong jacinth
#

Aces

normal crest
#

it's an array of cards

strong jacinth
#

How would i do then?

#

Use a for each

normal crest
#

yes

#

you'll have to count them manually

strong jacinth
#

Awe

grim remnant
wintry solar
#

in calculate

grim remnant
#

Ah. we were taking the docs too literally in this case, as calculate() isn't mentioned on the SMODS.Edition page atm. ;P

wintry solar
#

that is very strange

humble girder
#

docs have a few oddities - ever since joker calculation is gone as a page i don't think there's a description of the exact order contexts happen in scoring

grim remnant
#

for whatever reason, editions is pitching a fit about the "extra" in the config line. is this normal?

humble girder
#

that can't be the direct issue with it

#

oh dude

#

you're referencing card.ability.extra on 148

#

you're looking for card.edition.extra

grim remnant
#

oh, that'd do it ;P

humble girder
#

i'm also not sure returning repetitions will do anything on context.main_scoring

#

but that's just a hunch

nova finch
#

How do I make a joker that updates its values in real time? (ex. Joker Stencil)

humble girder
#

stuff like this should be happening on if context.repetition and context.repetition_only

wintry solar
grim remnant
#

it does at least proc the "Again!" message, so it's not like it's being entirely ignored. still, gonna try another context at least.

humble girder
humble girder
humble girder
wintry solar
humble girder
#

stencil doesn't "update its values" in real time, it just calculates it every time in those functions ^

nova finch
#

oh ok

#

i thought it was

rose dragon
#

does anyone know the sticker id of eternity?

humble girder
#

'eternal'

wintry solar
#

it does actually do it in real time because thunk doesn't care about your performance šŸ™ƒ

humble girder
#

stickers are weird

rose dragon
humble girder
#

stickers aren't exactly a center

#

they're weird

gusty sequoia
#

What do I write for the orange text, is it just {C:orange}?

humble girder
#

it's just a flag on the card ability

gusty sequoia
#

Interesting

humble girder
#

joker.ability.eternal = true | nil

humble girder
gusty sequoia
rose dragon
humble girder
#

info_queue[#info_queue+1] = {key='eternal', set='Other'}

#

that's how vanilla does it, anyway

edgy reef
#

SMODS does store both custom and vanilla stickers the same way other SMODS objects do, but idk if you can just pass them into info_queue and get the sticker tooltip output.

humble girder
#

that's actually incorrect though

#

SMODS.Sticker extends GameObject, not Center

frosty dock
#

iirc it doesn't work with SMODS.Stickers.xyz, maybe I should implement that

humble girder
#

stickers are so all over the place

minor furnace
#

I now realized that I’m terrified of any updates horribly breaking any of the modded content I’ve made

humble girder
#

vanilla set_perishable cannot even unset perishable

wintry solar
#

stickers are mega jank

frosty dock
#

they are

minor furnace
#

yeah they're really weird

frosty dock
#

they were even more jank before better calc though

#

guys i think we should make localization files have proper buffer names

orchid thunder
#

how can i have multiple mesages show up on a card

humble girder
#

nah it's fine just stop comparing numbers with tables?

unkempt thicket
#

How do you check if a certain mod is installed?