#💻・modding-dev

1 messages · Page 127 of 1

vagrant cedar
#

My friend wanted a Joker in my game, he said "+5 mult when playing a Two Pair, x10 mult when playing a Four of a Kind"

nocturne estuary
#

any ideas why is the return being skipped here?

calculate=function(self,card,context)
        local multAdd = 0
        if context.remove_playing_cards then
            for i= 1, #G.hand.highlighted do
                multAdd = multAdd + G.hand.highlighted[i].base.nominal
            end
            card.ability.extra.mult = card.ability.extra.mult + multAdd
            return {
                card = card,
                message = '+' .. multAdd,
                colour = G.C.MULT
            }
        end
    end
hardy viper
#

have you verified that context.remove_playing_cards is a real thing

nocturne estuary
#

yes

hardy viper
#

because there's no other branches there

nocturne estuary
hardy viper
nocturne estuary
#

no

hardy viper
#

then it's either that you've seen something wrong or that context doesn't support a return and you need to use card_eval_status_text

#

id say use SMODS.eval_this but that's apparently deprecated

vagrant cedar
#

Somebody able to figure out where I got this error from?

nocturne estuary
vagrant cedar
maiden river
vagrant cedar
violet void
#

Whats wrong with this?

rough furnace
#

Apparently aure merging better calc deleted it (so litterally was removed like the next version)

#

but its not in the git diff

#

it's werid

frosty dock
#

huh

vagrant cedar
#

Uh

#

My Balatro was working

#

I re-enabled Cryptid

#

And this happened

#

What do I do

#

Only change was enabling Cryptid

frosty dock
vagrant cedar
#

I just took off Pokermon and it worked

#

It was trying to load too many Jokers

heady dragon
#

yo, is there a specific master post I should be looking at if I'm trying to get into mod creation?

tall wharf
#

closer to truth

hardy viper
#

might not be the issue in question but

#

you should use pairs

vagrant cedar
#

This card is SUPPOSED to give 5 mult when a two pair is played, and X10 mult when a four of a kind is played. Instead, it gives those values to every single card that is played instead of the hand itself. Anyone know how to fix this?

#

Unintentionally way more powerful than anticipated

violet void
thick panther
#

for SMODS.Booster, how can I have the suit for all created playing cards be the same (e.g. Hearts)?

create_card = function(self, card, i)
    local _card = create_card("Base", G.pack_cards, nil, nil, true, nil)
    return _card
end
dreamy thunder
#

how am i going to get this to work?

#

im confused

#

i want it to gain mult when the consumable is used

rough furnace
#

Readded in 1309a

#

that was weird

wintry solar
# dreamy thunder how am i going to get this to work?
if context.other_consumeable and context.other_consumeable.config.center.key == 'c_crv_mp' then
  card.ability.extra.mult = card.ability.extra.mult _ card.ability.extra.mult_gain
  return {
    message = 'Upgraded!'
  }
end  ```
dreamy thunder
wintry solar
#

you could check the type yeah

thick panther
valid trench
#

idk what would be causing this

#

I didn't touch my png or atlas

tall wharf
#

LET'S GO

cerulean rose
wintry solar
#

what smods version are you on

dreamy thunder
#

let me check

#

i think im a bit behind

cerulean rose
#

yeah bettercalc is ready now

thick panther
wintry solar
#

this will only work on better calc

violet void
#

is G.playing_cards correct to get the list of cards in the deck?

rough furnace
#

I should reword the warning in the install for better calc

dreamy thunder
cerulean rose
#

new steammodded update

valid trench
#

I think I fucked up my game

#

it won't even launch anymore even without mods and after I verified my files

#

I have no idea why

rough furnace
#

does it have an error?

#

also how did you disable mods

vagrant cedar
rough furnace
nocturne estuary
#

what is the function for redeeming vouchers (not the SMODS one, the one in game)?

rough furnace
#

Card:redeem

#

iirc

nocturne estuary
dreamy thunder
wintry solar
#

oh you want it when it's used

dreamy thunder
#

yeah

wintry solar
#

context.using_consumeable iirc

dreamy thunder
#

aight

wintry solar
#

instead of other_consumeable

dreamy thunder
#

ima try it

thick panther
#

how do you add a card to your deck? is it something like G.playing_cards:emplace(_card)?

nocturne estuary
dreamy thunder
vagrant cedar
#

I have a Joker that is supposed to give mult or Xmult depending on hand played. It's doing that correctly, but it's making the cards played give the mult or Xmult instead of the Joker, so it ends up retriggering 4 times. Can someone help me fix this?

rough furnace
dreamy thunder
vivid canyon
#

hi sorry im having a weird modding issue i couldnt find a fix for so i figured id come ask here!
im making a stupid texture pack mod but the tarot sheet isnt working properly?
the tarot cards are displaying properly, i tested it in pink but it only replaced 5 of the spectral cards (that i actually changed all of) and none of the planet cards (which i also marked in pink)

wintry solar
dreamy thunder
#

i think

violet void
#

does anyone know why I cant access cards properties from G.playing_cards?

dreamy thunder
#

well atleast i fixed the previous one

rough furnace
vivid canyon
#

using a texture pack template mod and just replacing the textures there
it all worked 100% fine until i modified the tarot sprite sheet

rough furnace
#

so you are just redefininf the atlas?

dreamy thunder
vivid canyon
rough furnace
#

snded code

wintry solar
#

oh the card is on a different bit

#

I dont remember it off the top of my head though

weary jungle
#

how do i check how much you have scored at the end of the round? what is the variable and do you need a to_big?

vivid canyon
#

shit i probably didnt untag you auugh

dreamy thunder
#

just had to remove using_ from the second one

tall wharf
frosty dock
dreamy thunder
tall wharf
vivid canyon
#

idk when i downloaded steamodded it told me to grab an old vers
and this template is also probably old too lol

vivid canyon
#

yea lol
im making all the spetral cards fnaf at freddy's cause i thought itd be funny

weary jungle
#

does the context contain the amount of chips scored

frosty dock
#

hand_chips and mult are globals

#

if that's what you mean

cedar stream
#

how would one add a new consumable to the collection ui

nocturne garnet
cedar stream
#

yea

nocturne garnet
#

i wanna send you something but technically its against the rules for self advertisement

#

uhh

cedar stream
#

`SMODS.ConsumableType {
object_type = "ConsumableType",
key = 'Land',
collection_rows = { 3,4 },
primary_colour = HEX("E08C50"),
secondary_colour = HEX("97572b"),
loc_txt = {
collection = 'Land Cards',
name = 'Land',
label = 'Land',
undiscovered = {
name = "Not Discovered",
text = {
"Purchase or use",
"this card in an",
"unseeded run to",
"learn what it does"
},
},
},
}

SMODS.UndiscoveredSprite {
object_type = "UndiscoveredSprite",
key = "un_magic",
atlas = "un_back.png",
pos = {
x = 0,
y = 0
}
}`

#

thats the code, and i am unsre what im not doing right

thick panther
#

How would I use ease_background_colour(self) for SMODS.Booster to change the background color to a defined one?

nocturne garnet
#

(im probably mistaken)

cedar stream
#

is there anything i could maybe be missing?

nocturne estuary
#

is there a way to modify the boss blinds chip requirement?

nocturne estuary
cedar stream
#

would i have to have at least 1 consumable implemented to have it apear

cedar stream
nocturne estuary
cedar stream
#

have you tried refrencing any mods that do something similar

tall wharf
#

silly little oopsie

nocturne estuary
cedar stream
#

thats what i usssually do

#

a good place might be SDM_0's stuff

nocturne estuary
minor magnet
#

stupid question, where do i check base game joker code?

cedar stream
#

i think in the lovely/dump is where you can find some of it

#

but using 7zip you can look in the exe file of balatro

minor magnet
#

ye i knew the second one, i just dont know which file contains joker code

#

i need to make something similar to dna so looking at the dna code would be of use

cedar stream
#

i think its card.lua

minor magnet
#

many thanks :]

cedar stream
#

@nocturne estuary did you look at data/joker.lua in the SDM_0's stuff

#

cuz cupidon does a similar thing you are trying to do

nocturne estuary
sonic cedar
#

how do i add a counter to a joker's description? akin to the one invisible joker has

thick panther
#

is there a way to remove this circle question mark here?

#

if not delete, how can I change it?

sand oasis
#

looks like it hasn't been discovered yet I think

thick panther
#

i know, but i dont want the icon in the middle.

minor magnet
#

can anyone tell me what is wrong with my code? i am trying to make a joker duplicate played glass cards

nocturne estuary
#

shouldn't it be?

minor magnet
#

i am inept in lua, thank you, i will try and see if it works

nocturne estuary
#

I am also not that good at it

minor magnet
nocturne estuary
#

oh wait

#

add a comma after the 1

minor magnet
placid frigate
nocturne estuary
vivid canyon
minor magnet
thick panther
#

how do you access the level of a modded poker hand?

nocturne estuary
minor magnet
#

what is the juice

#

imma search it up in the fileù

rough furnace
#

are you checking the lovely dump?

minor magnet
#

fixed.

#

using card = card

#

instead of card = self

#

stupid solution but if it works it works

rough furnace
#

yeah self is your center not your card

thick panther
#

how would you do the config for the text field of loc_txt when making a planet card for a modded poker hand?

violet void
#

So one thing I noticed is when I resume the run from the menu, all the cards lose the property cs_fake (which makes them score negative)

rough furnace
#

where are you storing the property

violet void
#
function Card:init(X, Y, W, H, card, center, params)
    originalCardInit(self, X, Y, W, H, card, center, params)

    self.cs_fake = false
end```

here
rough furnace
#

stick it in card.ability

#

thats saved in the save file

violet void
#

ty I'll try that

rough furnace
#

you might need to wait for Card:set_ability to be called

#

nto sure the exact specfics of it

light echo
#

We get a bit silly

hollow locust
#

Name it "What are the odds?!" instead

rough furnace
#

Cruptid rigged

violet void
# rough furnace nto sure the exact specfics of it
function Card:set_ability(center, initial, delay_sprites)
    original_set_ability(self, center, initial, delay_sprites)

    if self.ability then
        self.ability.cs_fake = false
    end
end```

Worked like a charm, thanks
mystic river
#

which is if anything funnier
you can't even rig it

thick panther
#

for implementing the use method of SMODS.Consumable, I can get my modded hand to upgrade, but the text above the chips and mult display is blank. It will show the lvl after its leveled up, but the hand name doesnt appear. Why is that?

use = function(self, card, area, copier)
    level_up_hand(self, base_mod_flush.key, false, 1)
end
viscid bough
#

anyone know what i should make this guy do

light echo
#

whoopsie, guess infinity is too big to score

hollow locust
#

Can i make a card type that just makes you lose the game

fallen tendon
#

Is it possible to change a value in a joker master after ots created

#

Like say i made SMODS.Joker{ some stuff }

#

and then later in the code i change its order value

rough furnace
#

you can access it's center (if you make it you can just store the result of SMODS.Joker and index it)

fallen tendon
#

Ok

sonic cedar
fallen tendon
#

Im trying to make a table based ordering system for cryptid

thick panther
#

to get a modded poker hand's level, do you just call <poker hand>.level? It always displays 1 for me, even when I level it up several times.

rough furnace
#

how do you get poker hand?

frosty dock
#

if you get it from G.GAME.hands, that works

thick panther
long sun
#

zodiac graphics are done!

thick panther
frosty dock
#

yes

rough furnace
long sun
#

oh ya so

#

i'm implementing them, and i've got an atlas and undiscovered sprite

frosty dock
#

otherwise it would be a mess to reset when starting another run

long sun
#

here's my other thing:lua local zodiac = { object_type = "ConsumableType", key = "Zodiac", primary_colour = HEX("4076cf"), secondary_colour = HEX("5998ff"), collection_rows = { 3, 4 }, shop_rate = 0.0, loc_txt = {}, default = (SMODS.Mods['jen'] or {}).can_load and "c_cry_oboe" or "c_cry_crash", can_stack = true, can_divide = true, }

#

i don't quite get these lines, could someone explain? (i pulled this from Cryptid)

default = (SMODS.Mods['jen'] or {}).can_load and "c_cry_oboe" or "c_cry_crash",
    can_stack = true,
    can_divide = true,```
fallen tendon
long sun
#

yes i know

#

i've been told that the zodiacs are in other mods

frosty dock
fallen tendon
#

Maybe tartarus should be leap day?

frosty dock
#

default is the card that gets created when there's nothing available in the pool

long sun
frosty dock
#

i.e. if you have every tarot in the consumable slots or shop, arcana packs will default to spawning strength

light echo
# light echo We get a bit silly

Would it be possible to add a win round condition to my joker? As on the absolute off chance someone gets lucky enough to hit the mult, I would like the game to continue rather than just end.

long sun
#

what does the first part of that line mean? with the jen

long sun
rough furnace
#

its being used to check if the mod with id jen (jen's almnac) can load (aka it's installed and not disabled)

long sun
#

ahh icic

thick panther
#

What does the V:1 in the planet's localization do? is that the level coloring? It crashes when I use it.

frosty dock
#

if you want to use it, you need to define the color var in your loc_vars

#

like return { vars = { 'var here', colours = { G.C.WHATEVER } } }

thick panther
#

Where do the Planet cards have their level colors? I cant seem to find them.

hollow locust
#

screencap a level, get the hex color and %hex in VSC

thick panther
rough furnace
#

They are put in loc_vars

hollow locust
#

ded It appears i have failed

frosty dock
minor magnet
#

how do i add a card to deck from shop without it showing up on the screen like an ugly roach?

#

like if i want to add a card on reroll

thick panther
frosty dock
#

it's part of generate_card_ui in functions/common_events.lua

thick panther
#

Awesome, thanks!

violet void
#

is this ok as common

long sun
#

this is very long and takes a minute to process

#

cool idea though! and i think it fits as common

violet void
long sun
#

mhm

#

lemme give this a go

rough furnace
#

I would change the so long as there are any left to just resets when there are no fake cards

long sun
#
6 cards in your deck become Fake
Gains +9 Chips per hand played without Fake cards
Resets if there are no Fake cards in your deck```
rough furnace
#

the first line doesn't really work

#

oh unless it is just always the current value

#

but still needs something to say it adds 6 when obtained

long sun
#

how about that?

violet void
#

I suppose if you manage to destroy all 6 fake cards, you could keep the chip bonus but it wouldnt scale anymore

rough furnace
#

I almost wonder if it would make sense to get chips per fake card in deck

#

so if you have like 12 fake cards it scales twice as fast

sand oasis
#

experiencing a bizarre problem trying to make this joker, error at line 54, } expected (to close { at line 53) near '=' but I'm not seeing a way where the syntax is necessarily wrong

rough furnace
#

thats not how table names work

frosty dock
#
When this joker is obtained,
6 cards in your deck become Fake.
Gains +9 Chips per consecutive hand
played without a (scoring?) Fake card.
Resets if there are no Fake cards in your deck
long sun
#

hmm, still pretty wordy though

frosty dock
#

tbh it could lose the resets when there are no fake cards, idk

sand oasis
#

i'm working with a very low functioning knowledge of the mechanics after running through the SMODS TutorialPack lua file

rough furnace
#

you are returning a table but you seem to just wwant to be settign values of existing things

sand oasis
#

ah

frosty dock
#

you can't just put expressions statements like G.GAME.dollars = 0 inside a table

#

you only want the message in the return table here

#

the rest should just be normal statements

violet void
sand oasis
#

Oh okay

thick panther
#

Finally I got them working. I think they turned out good.

#

other image got messed up.

wise narwhal
#

hello, im trying to check for if a card has any enhancement at all, but i cant seem to figure out how to. i tried a lot of different functions but none of them worked, even checking for a specific enhancement like 'Glass Card' doesnt seem to work for some reason.

frosty dock
#

this is the computationally more expensive version that accounts for quantum enhancements
if next(SMODS.get_enhancements(card)) then
this is the basic version that doesn't
if card.ability.set == 'Enhanced' then

long sun
#

yoyo! adding packs, and looking at Cryptid's code again, i'm confused about where G.C.SET.Code is defined, and where i need to define my own G.C.SET.Zodiac. and i'm also generally lost. help?

local pack1 = {
    object_type = "Booster",
    key = "phanta_normal1",
    kind = "Zodiac",
    atlas = "pack",
    pos = { x = 0, y = 0 },
    config = { extra = 2, choose = 1 },
    cost = 4,
    order = 1,
    weight = 0.96,
    create_card = function(self, card)
        return create_card("Zodiac", G.pack_cards, nil, nil, true, true, nil, "phanta_zodiac")
    end,
    ease_background_colour = function(self)
        ease_colour(G.C.DYN_UI.MAIN, G.C.SET.Zodiac)
        ease_background_colour({ new_colour = G.C.SET.Zodiac, special_colour = G.C.RED, contrast = 2 })
    end,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.config.center.config.choose, card.ability.extra } }
    end,
    group_key = "k_phanta_zodiac_pack",
}```
#

also, i don't get why the weight for normal boosters is 0.96

wise narwhal
wise narwhal
#

this should work when i use any enhanced card, right?

frosty dock
frosty dock
long sun
#

ohh i see

frosty dock
#

context.other_card is what you should target

long sun
#

thanks!!

wise narwhal
#

ohhh that makes sense

#

tyvm

frosty dock
#

np

sand oasis
rough furnace
#

for new calc with a enhancement that does an in hand effect, whats the proper check? I was helping someone and they had if context.cardarea == G.hand and not context.repititon and not card.debuff then. However, this condition matches the check_enhancement check

wintry solar
#

if context.cardarea == G.hand and context.main_scoring then

runic pecan
#

Just found out that context.open_booster only happens when the open booster pack animation is finished,
but I need a trigger at the moment you buy a booster pack.
Does anyone know if such thing exists?

sonic cedar
#
    if context.end_of_round and not context.repetition and not context.individual then
        card.ability.extra.rounds = card.ability.extra.rounds + 1
        if card.ability.extra.rounds == card.ability.extra.roundReq then
        card.ability.extra.active = true
        local eval = function(card) return not card.REMOVED end
        juice_card_until(card, eval, true)
        end
    end```

can someone tell me why this just crashes the game? is it where it's placed in the main code, or something with this chunk itself?
sick sparrow
#

there's a hook that prevent removal when this card has absolute sticker, but how to bypass check if the player sees the deck or collection?

local hooke = Card.start_dissolve
function Card:start_dissolve(...)
    if self.ability.unbreakable then
        SMODS.eval_this(self, {
            message = localize('k_nope_ex')
        })
    else
        hooke(self,...)
    end
end
local hooke = Card.shatter
function Card:shatter(...)
    if self.ability.unbreakable then
        SMODS.eval_this(self, {
            message = localize('k_nope_ex')
        })
    else
        hooke(self,...)
    end
end
local hooke = Card.explode
function Card:explode(...)
    if self.ability.unbreakable then
        SMODS.eval_this(self, {
            message = localize('k_nope_ex')
        })
    else
        hooke(self,...)
    end
end
local hooke = Card.remove
function Card:remove(...)
    if self.ability.unbreakable then
        SMODS.eval_this(self, {
            message = localize('k_nope_ex')
        })
    else
        hooke(self,...)
    end
end
local hooke = Card.can_sell_card
function Card:can_sell_card(...)
    if self.ability.unbreakable then
        return false
    else
        return hooke(self,...)
    end
end
#

also i'm sorry for message bomb

sonic cedar
rough furnace
#

this seems like a terrible idea

#

you can check the area the card is in

#

but also things like the card needs to be removed when qutiting tio the title

runic pecan
thick panther
#

I want to break my mod's main lua file into seperate files for different parts (packs.lua, consumables.lua, etc.). How do I improt them into the main lua file?

runic pecan
tepid crow
#

you can also just assert(SMODS.load_file(...))()

sick sparrow
wooden nexus
#

All I'm going to say is that I'm getting REALLY close to figuring playing cards out somewhat

tepid crow
thick panther
runic pecan
#

Would there be any issue if I set G.GAME.reroll_cost to zero/double?

gilded narwhal
#

hey gang, so this increases eor_boss_discards by 7 for some reason, I presume because it's activating every frame. How do I fix that?

tepid crow
#

either print out your context or look at some vanilla jokers

sick sparrow
#

when it's on view deck window or collection

gilded narwhal
#

also if I'm not misunderstood in order to take_ownership of a calculate function it needs to have the exact same contexts correct?

wooden nexus
#

WELP

wintry swallow
#

well these are a bit busted aren't they

wooden nexus
#

yes

#

but it's not the point

#

idc about balancing with Shinku's Card binder btw

wintry swallow
#

where did the +5 chip thing go

wooden nexus
#

what +5 chips?

wintry swallow
#

you know when you play a vanilla card it tells you how many chips you gained

wooden nexus
#

There are no chips

wintry swallow
#

oh

#

yeah there are no chips

#

that's from the high card

wooden nexus
#

yup

#

Also before anyone says it's an enhancement in disguise...

wintry swallow
#

bonus rare card

gilded narwhal
wintry swallow
#

see i would use a hook for that

thick panther
#

How to you ensure a modded tarot works with The Fool? It crashes when I use the modded tarot and hover over the fool with center as a nil value.

wintry swallow
#

oh my fucking god i think i have to set a metatable on context.blind to do what i need to do

#

you KNOW nothing good can ever come out of me saying 'i have to set a metatable'

thick panther
wintry swallow
#

oh god i have to dive into the hellscape that is calculate_joker

elder vapor
frosty dock
thick panther
frosty dock
#

-# the deck is not in fact colourful, i don't do sprites

wintry swallow
#

what is a spectrum

#

is that when you have one of all six suits in a hand

frosty dock
#

that's a hand with 5 different suits

#

-# i don't have 6-card hands

dull saddle
#

i think it sounds nice, would encourage straights or five of a kinds

frosty dock
#

-# i could add cross-mod support for asc hands

#

taking sprite suggestions for it btw, rn it's just an orange deck sprite

dull saddle
#

oooooo im a pixel artist want me to take a crack at it?

frosty dock
#

sure

dull saddle
#

mkay! quick questions, what colors are your custom suits

wintry swallow
# frosty dock

well according to the text colour, moon is dark purple and star is pink

frosty dock
#

these are the playing card textures

wintry swallow
#

that's more grayish than what i was thinking

frosty dock
#

these are the same color

#

the transparent background makes it look that way

wintry swallow
#

they're what

dull saddle
#

thank you!

frosty dock
wintry swallow
#

yeah makes sense

frosty dock
#

looks like this in-game

cyan dune
#

Red or Yellow probably, since the Clubs and Spades aren't consistent enough

gilded narwhal
#

Hey guys where is the main portion of the cash out screen located?

vagrant cedar
#

I am very proud of this Joker

livid tapir
vagrant cedar
#

He's too straight to wear makeup

sick sparrow
# wooden nexus

how did you made custom card that isn't rank or suit or enhancement

livid tapir
viscid bough
#

Is that joker from texas

vagrant cedar
sick sparrow
viscid bough
#

anyone got an idea for what these fellas could do for their ability? (ignore the unfinished clown hair)

wintry swallow
wintry swallow
vagrant cedar
#

Name: Insurrectionist

#

@viscid bough Also real talk if you aren't doing the idea I just said, can I use that art for that idea in my custom pack that I'm only sharing with friends?

viscid bough
vagrant cedar
#

Nah i can downscale it myself

#

I appreciate it though

viscid bough
#

if you have an issue down scaling it i can send a 1x though just lemme know

vagrant cedar
#

Bet

sonic cedar
#

hook lua
fixin that thang

viscid bough
#

how can i detect when a specific consumable card is used?

tepid crow
#

you could check .ability.name

viscid bough
tepid crow
frosty dock
#

should be context.using_consumeable

tepid crow
#

anyone able to explain what

INFO - [G] :: DEBUG :: Test :: context = {
  destroying_card_hand = table: 0x1f3e98d0,
  full_hand = table: 0x1f070588,
}

the destroying_card_hand context is? 🤔

#

the code implies it's supposed to trigger once per joker per played card

frosty dock
#

it seems to be for... destroying cards held in hand?

#

idk

#

that's just by the name

#

I could be wrong

tepid crow
#

weird thing is that if I play a 5 card hand my joker receives it 3 times

#

but if I play high card I get it... 6 7 times?

#

correction, 7

frosty dock
#

yeah then it's for cards held in hand

tepid crow
#

OH I'M DUMB

#

cheers

viscid bough
tepid crow
#

not really

frosty dock
tepid crow
#

nothing actually organised anyway

#

that guide's the best we have, the rest you're going to have to go through the code

frosty dock
#

in the source code it's also not nicely in one place because all sorts of things in the code get calculation contexts, which is unimportant to where they actually are

#

so that's not the most helpful

#

but the only thing available beyond those docs so

viscid bough
gilded narwhal
#

Okay guys help me out do you guys think that this deck effectively incentivizes skipping

tepid crow
faint yacht
#

Moving out of Steamodded's thread, this doesn't show up the messages I need, instead just being two blanks. Still attempting to update for BetterCalc.

return {
  x_mult = card.ability.extra.x_mult > 1 and card.ability.extra.x_mult or nil,
  xmult_message = card.ability.extra.x_mult > 1 and localize({ type = "variable", key = "a_xmult", vars = { card.ability.extra.x_mult } }) or nil,
  x_chips = card.ability.extra.x_chips > 1 and card.ability.extra.x_chips or nil,
  xchip_message = card.ability.extra.x_chips > 1 and localize({ type = "variable", key = "a_xchips", vars = { card.ability.extra.x_chips } }) or nil
}
viscid bough
#

holdon

sick sparrow
faint yacht
#

This is BetterCalc, forgot to mention.

#

For old-calc, I used eval_this for Xmult and return for Xchips.

tepid crow
#

I believe you still can't multi-message in bettercalc?

#

you can use SMODS.calculate_effect({effects}, card) though

#

(unless extra can do something like that? no clue tbh)

viscid bough
tepid crow
#

lez go

tepid crow
faint yacht
vagrant cedar
#

Anyone able to help me figure out my error?

#

Supposed to be +20 mult when a Jack and a 6 are scored together

#

It did nothing

#

I played a two pair with Jacks and 6s

faint yacht
#

You're checking if a given card is both a Jack and a 6. You should iterate over the scored hand and check if there's a Jack and a 6 outside.

vagrant cedar
#

I have no clue what that means if I'm being honest with you

#

I understood the first sentence

faint yacht
vagrant cedar
faint yacht
#

The link should've highlighted the lines for the function that I use.

tepid crow
#

y2kbug

faint yacht
#

138 - 149 for external function that I use for checking if I had a 2 and a King, 167 - 170 for actual thing.

vagrant cedar
#

I'll be honest I'm so new to Lua, I have absolutely no clue what Im looking at

#

I attempted to throw some of that into my code to see if it works

#

Did this as soon as I played a hand

faint yacht
#

Line 411 is...? Show code around that.

vagrant cedar
#

I've never done any local functions

#

So I literally have no clue what I'm looking at

faint yacht
#

You define local jack, but use jacks.

#

Also, only incrementing sixpresent in both 6 and Jack checks.

wintry swallow
#

holy shit i fixed madness

#

i have a challenge that replaces all blinds with boss blinds

sonic cedar
#

does anyone know how would i make a joker add to a (mult) counter after a certain number of rounds?

wintry swallow
#

unfortunately that means madness and other boss blind jokers didn't proc

#

i solved this with this incredible proxy object

vagrant cedar
#

409 is:
if six > 0 and jack > 0 then

wintry swallow
#

sixes

faint yacht
#

local sixes, jack

vagrant cedar
#

sixes ?

#

local sixes but jack

sonic cedar
#

sixes not six

vagrant cedar
#

I'm so confused

wintry swallow
#

your variable is named sixes, not jack

#

you are trying to compare nil and 0

vagrant cedar
#

Why is one of them plural

wintry swallow
#

because 'six' doesn't exist

#

because you wrote it as plural

sonic cedar
#

you named the variable in plural

vagrant cedar
#

oh

#

so i change that one

sonic cedar
#

to sixes

vagrant cedar
#

change them both to sixes

#

or change them both to six

wintry swallow
sonic cedar
vagrant cedar
ancient ore
#

hey gang how add probability effects to joker

wintry swallow
#

you'd wanna use the pseudorandom function

#

look at gros michel's code

#

honestly a good answer to "how do i do X" where X is something thunk did in vanilla is always "look at the code for the X in vanilla"

vagrant cedar
#

so it didn't work exactly as I planned

#

But I'm not going to fix that, I'm just gonna rewrite the text to what it does lmao

wintry swallow
#

you also want your locvars to specify half of the chance's fraction

#

like X/4

#

(where X is normally 1)

#

this is for the sake of oops all sixes

ancient ore
#

I peeped a couple jokers that used chance effects but I didn't realize what the call for the effect was

sonic cedar
# sonic cedar does anyone know how would i make a joker add to a (mult) counter after a certai...

forgot to elab on this ok so

"{C:mult}+#1#{} Mult in",
            "final hand of",
            "the round",
            "This Joker gains",
            "{C:mult}+#2#{} Mult every",
            "3 rounds",
            "{C:inactive}(Currently {C:mult}+#1#{}{C:inactive} Mult)"

this is the effect of the joker as a whole. i got the first one down (thank you dusk) but i cant figure out how to do the same thing with the second effect? i tried experimenting with invis joker's stuff since it had a counter, but it wasnt for mult so idkkkk

wintry swallow
#

i have been modding this game for like a week and i'm getting into bullshit like proxy objects man this is fun

sonic cedar
#

im excited to be able to do cool stuff like that fr

wintry swallow
#

learn lua!

#

the only reason i can do this kind of shit is because i've been coding in lua for like a decade

sonic cedar
#

learning!

sand oasis
#

Does that make sense?

#

I'm new to this but some ooooold old coding knowledge is slowly shaking off some rust

sonic cedar
#

ok let me break it down rq 😭

vagrant cedar
#

He has risen @viscid bough

#

(ratratguy's art, for anyone wondering)

sonic cedar
viscid bough
sand oasis
#

yeah i see you have #1# for the amount of mult you're using, #2# is the amount of mult you're adding to #1#, you're gonna want to have actually two more variables, one for the amount of rounds you want to wait before 2 is added to 1, and one for the ticker

cedar stream
#

how would one check if a card has a specific suit

wintry swallow
#

there we go, cooked up a simple library for creating proxies

cedar stream
#

`Island_land = SMODS.Enhancement {
object_type = "Enhantment",
name = "mtg-Island_land",
key = "Island_land",
atlas = "island",
pos = { x = 0, y = 0 },
config = { extra = { Xmult_mod = 1.25 } },
weight = 1,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.Xmult_mod } }
end,
calculate = function(self, card, context, effect)
if context.cardarea == G.play and not context.repetition and not card.debuff then
if card == suit_clubs.key then
return {card.ability.extra.Xmult_mod}

        else
         SMODS.change_base(G.hand.highlighted[i],suit_clubs.key,nil)   
        end
        
    end
end

}`

wintry swallow
# wintry swallow there we go, cooked up a simple library for creating proxies

the code for ns_proxy:

-- Nightshade's Proxy Object Library
-- (originally for Balatro)

ns_proxy = {}

function ns_proxy.make_proxy(data)
    assert(data.target, 'make_proxy: nil target specified')
    assert(data.proxies, 'make_proxy: nil proxies specified')

    local obj = {}
    local obj_proxy_meta = {
        __index = function(self, idx)
            if data.proxies[idx] then
                return data.proxies[idx](data.target)
            end
            return rawget(data.target, idx)
        end,
        __newindex = function(self, idx, val)
            if data.set_proxies and
                data.set_proxies[idx] then
                rawset(data.target, idx, data.set_proxies[idx](data.target, val))
            end
            rawset(data.target, idx, val)
        end
    }
    setmetatable(obj, obj_proxy_meta)
    return obj
end

cedar stream
sonic cedar
sand oasis
#

nope you don't need that

wintry swallow
#

the ticker?

#

oh, the counter

sonic cedar
#

counter

#

yeah

wintry swallow
#

yeah no the #1# are "locvars", aka "localisation variables"

sand oasis
#

yeah counter, that's a better word

wintry swallow
#

they're only pertinent to what the text in game is displayed like

sand oasis
#

Ohhhhh so you don't need to have any non-visible variables in loc_vars and just initialized under configs?

sonic cedar
#

dont need a locvar if im not showing the counter (it'd get too cramped/bloated? in the desc)

wintry swallow
sand oasis
#

gotcha

wintry swallow
#

i fucked with the locvar system a good bunch in my challenge mod for the descriptions for the effects

#

so i know how it works

sonic cedar
wintry swallow
#

comical amount of work went into drawing this little text

cedar stream
sonic cedar
#

oh fr

wintry swallow
#

part of my lovely hook for the challenge description localisation stuff

#

then there's another hook in localize

#

then there's ANOTHER hook in loc_colour

#

just so there's pretty colours when a showdown blind is specified in this modifier

sonic cedar
wintry swallow
#

fucking implemented a custom context-sensitive colour tag

sonic cedar
#

imagine it did hex

light echo
#

Arts mostly done, still need to clean up some parts, but a h, glad I got it all working

sonic cedar
#

aint no way

wintry swallow
#

you should specify it in E notation to be funny

light echo
sonic cedar
#

one ://SEED and it's over

dull saddle
dull saddle
wintry swallow
#

those are some really pretty deck sprites wow

light echo
sonic cedar
#

oh those are pretty wowww

dull saddle
#

:D thanks it took forever to figure out how to make the circles centered properly on the card in aseperite

sonic cedar
#

ok but what deck

light echo
#

without

sonic cedar
#

do NOT KEEP THE COMMAS im begging

#

(its gonna look ugly)

light echo
#

I looked at it then felt a twinge of disgust

#

😭

sonic cedar
#

real 😭

light echo
sonic cedar
#

yayyyyyyy
now give it the xmult box do_not_say_that_again

dull saddle
sonic cedar
#

suree

dull saddle
#

im making the jokers give x1.5 mult for each card of the corresponding suit held in hand. was gonna go .5 but that would make it divide and i was worried abt that for balance, so i jsut upped the rarity and cost accordingly instead

light echo
sonic cedar
sonic cedar
light echo
#

What I have is: "card gives {C:red}#X10e1834097#{} Mult",

What I get in game:

#

prolly doin it wrong

sonic cedar
#

{X: }

#

as in xmult

light echo
#

ah okie okie

dull saddle
#

if it helps theyre set as 'rare' for rarity

sonic cedar
sonic cedar
ancient ore
#

can someone tell me why the note in line 3 is true? Like I don't understand what in that line defines "#1#" with the value put after "Xmult ="

sonic cedar
dull saddle
#

this is what i have for code rn, it would be real helpful for a double check b4 i make copies of the code for each suit

    key = 'pridefuljoker',
    loc_txt = {
      name = 'Prideful Joker',
      text = {
        "{X:red,C:white} X#1.5# {} Mult for each",
        "{C:hearts}#2#{} suit held in hand",
      }
    },
    config = { extra = { Xmult = 1.5 } },

    loc_vars = function(self, info_queue, card)
      return { vars = { card.ability.extra.mult } }
    end,
    rarity = 3,
    atlas = 'SinfulJokers',
    pos = { x = 0, y = 0 },
    cost = 8,
    calculate = function(self, card, context)
      if context.other_card:get_suit("hearts") then
        return {
          mult_mod = card.ability.extra.x_mult,
          message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.x_mult } }
        }
      end
    end
  }```
sonic cedar
ancient ore
sonic cedar
sonic cedar
rare bobcat
#

How would I make oil lamp blueprint compatible

dull saddle
#

no i got distracted by pixel art then dinner, but was gonna do that next

light echo
sonic cedar
#

whar

light echo
#

{X:mult, C:white}X10e1834097{} right?

dull saddle
#

put # aroudn the numbers

sonic cedar
light echo
#

ah

dull saddle
#

like X#10e1834097#

light echo
#

okie

sonic cedar
#

wait is that

#

is that the loc var

light echo
#

Thank you Prayge

sonic cedar
#

what line is that in

#

in your code

dull saddle
#

loc txt

#

is where it should be i think

sonic cedar
#

im hoping that's not where

#

because that means he's about to create a variable assigned as

#

10ebignumber

dull saddle
#

SMODS.Joker {
key = 'pridefuljoker',
loc_txt = {
name = 'Prideful Joker',
text = {
"{X:red,C:white} X#1.5# {} Mult for each",
"{C:hearts}#2#{} suit held in hand",
}
},
config = { extra = { Xmult = 1.5 } },

light echo
dull saddle
#

this section, where it assigns the description and key and stuff

sonic cedar
sonic cedar
#

define your value in the config section not the loc txt

#

{X:mult, C:white}#1#{}

etc etc

config = {extra = {Xmult = that big ass number}

#

nvm fixed

dull saddle
#

you can tell this is my first time actually coding

#

but! i think im understanding it i think maybe

sonic cedar
sonic cedar
#

which is why it uses the vars

dull saddle
#

i c/p jsut the desc coding section earlier sorry it was confusing

sonic cedar
#

because it needs something to read

runic pecan
sonic cedar
#

oh i have no idea i havent even used it

sonic cedar
#

just change the 1.5 in the variable section to 1

light echo
sonic cedar
#

ah yes the big thumbnail button of course

runic pecan
light echo
#

Oh

#

uh

sonic cedar
#

doesnt look like you can

light echo
#

Yeah, I don't believe you can

dull saddle
light echo
#

Wait actually you can

sonic cedar
#

wait fr

light echo
#

if you send an image in the post chat, it'll prompt you to add it to your cover

sonic cedar
#

well there you go then

dull saddle
#

does anyone know where the vanilla jokers are located in the lua files? i wanna double check some stuff but i cant figre out what lua file to look in (localization just has the textboxes, not funcionality to my eyes but maybe im missing smth?)

sonic cedar
light echo
#

discord, istg man

#

😭

runic pecan
#

And that prompt is probably not coming back isn't it

light echo
#

not by the looks of it 😭

ancient ore
#

im gonna shit my pants

sonic cedar
#

well it's working that's for sure

#

your scoring doesnt have a high enough limit though

sonic cedar
dull saddle
#

darnit

runic pecan
#

I added a link of my icon into the head post and it worked!

light echo
#

:o

sonic cedar
#

yayyyy

runic pecan
#

Even better thing is that the link is toward my mod github.
Which means technically I can change it whenever I want.

sonic cedar
#

sickkk

sonic cedar
light echo
#

I already got talisman dawg

sonic cedar
#

then turn it higher

light echo
#

higher then omega?

runic pecan
#

[Insert Kylo Ren "MORE" meme]

sonic cedar
#

ok so what you can do insteadddd

#

im not scrollin all that h

#

fine i wil

sick sparrow
#

made the disabler card that debuffs adjacent card

#

it's for testing purposes

light echo
#

got it

sick sparrow
# light echo

what if you use cryptid and use seed card into this

#

it always gives 1.0e1834097 mult

light echo
#

time to find out

#

I think with seed it makes it 1/10

sick sparrow
#

it's always 100%

light echo
#

My probability is higher then they accounted for

light echo
#

only thing I know works is the AAAAH?! It's Infinity!? joker from snows mods

#

Cause that boosts base by 10^300

#

cryptid is like 10^9

#

mine is like 10^10

forest hinge
#

quick q: I'm using card_eval_status_text when my joker copies a playing card to flash the 'Copied!' message. it works, except when the joker is copied by blueprint, the message shows up under the original joker, rather than under blueprint. is anyone more of a card_eval_status_text understander than I am to know what could cause this?

#

nvm, read some source code and found out about context.blueprint_card

sonic cedar
#

i thought you were using it alr lmao

#

so i started searching

#

yeah the one labeled blueprint may or may not help you with blueprint

#

also remember if you want it to say that it's compatible with blueprint (visually only it's a separate thing), put blueprint_compat = true before your locvars section

forest hinge
#

yeap, I'd gotten that stuff

sonic cedar
#

kk

ancient ore
#

Alright no calling me stupid allowed, but simply cannot figure out how to add new variables

#

This obv aint the way

karmic kelp
#

in what way is it not acting how you hope

ancient ore
#

#2# doesn't call the variable

karmic kelp
#

what does the body of loc_vars look like

ancient ore
karmic kelp
#

so you need to put the second ability inside of the vars = {blah}

#

because doing it like that, if I recall my Lua properly, sets it to index 1 or 2 or something you're not wanting

ancient ore
#

Oh like with the same {}

karmic kelp
#

ye

ancient ore
#

Oh wait

#

Nvm I though it was cause I missed a space i have no clue why its crashing

karmic kelp
#

what's the body look like now

ancient ore
karmic kelp
#

odd... those brackets look matched

ancient ore
#

Thats what im sayinnn

sick sparrow
ancient ore
#

wait what is the difference between center.ability and card.ability

ancient ore
light echo
#

nah dude was shittin

ancient ore
#

ohhhh

#

so is this telling me that it can't find the closing bracket?

light echo
#

I've used seed and have yet to hit the mult

crisp coral
#

isn't seed e999

#

huge is e308

light echo
#

would this have changed in a recent update?

#

cause I haven't updated my mods for about 2-3ish days

#

okay yeah

#

with seed it becomes 1/10

#

took me a bit but I finally hit mult

crisp coral
#

nvm its 1e9

wintry swallow
#

now read it and despair

sick sparrow
# light echo not enough apparently

yes it is the math.huge is largest number and it has higher chance than AAAAH?! It's Infinity!? joker from snows mods, and rigged from cryptid

#

in fact math.huge is ieee 754 infinity and you can't get any higher than that

light echo
#

Well with snows joker card, it hits every time, with seed it hits 1/10th of the time, so I don't know what to tell you dawg

#

😭

sick sparrow
wintry swallow
#

i'm glad i managed to fix the bug where madness was thinking every blind was a boss blind even if it was on the 1st or 2nd blind of the ante

gilded narwhal
#

srry for the block of code but is this just like the sound or is it something else

hollow bronze
#

I have a dummy project going on for my mod (trying to inject the "touch controls" on desktop (dragging cards to buy/sell/use) and I have a few questions which might me noob modding/lua questions but:

  1. is there a way to write patches.pattern patch blocks from like, a Git diff?

  2. I guess it's more of a Lua/Love2D question but: if I want to override the method of a class (let's say Card) do I need to do it inside of card.lua ? And can I just add my own Card:foobar() method and it will take precedence over any existing Card:foobar() method?

wintry swallow
#

i did it by hooking the start of calculate_joker and overwriting context.blind with a proxy object that has its boss field modified depending on whether it's the last blind of the ante (via my custom system that tracks it because that was broken too)

wintry swallow
#

like uh, inserted code would look like

function Card:foobar(params)
  return my_card_foobar(params)
  -- rest of original Card:foobar here, which never runs
#

you can also use position='at' patches

#

which delete the pattern altogether and replace it with the payload

dry merlin
#

tryingto make a challenge but i cant get it to give you a joker?
probably set this up wrong can someone help me pls

sick sparrow
light echo
#

I'm just confused about what you are trying to tell me quite honestly. All I said was Seed doesn't work 100% of the time, and it is about a 1/10 chance, The only card I know capable of always hitting the mult is snows infinity dice joker, since it boosts the probability up by e300, not e9 like seed does. So from my point of view, it seems you are trying to say I'm incorrect, when what I am playing with shows otherwise. /nm /gen

ancient ore
#

gang what this mean

sick sparrow
light echo
#

ahhhh

#

sure

sick sparrow
sick sparrow
# light echo ahhhh

and try increasing tower of babel to 10^304, it will prove this is infinity chance

cedar stream
#

`Island_land = SMODS.Enhancement {
object_type = "Enhantment",
name = "mtg-Island_land",
key = "Island_land",
atlas = "island",
pos = { x = 0, y = 0 },
config = { extra = { h_x_mult = '1.25' } },
weight = 1,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.h_x_mult } }
end,
calculate = function(self, card, context, effect)
if context.cardarea == G.play and not context.repetition and not card.debuff and context.scoring_hand then

        return { card.ability.extra.h_x_mult }
        
        
    end
        
    
end,

}`

am i doing something wrong here?

dry merlin
#

firstly use tripple backtick for large blocks, its easier and looks better

#
Island_land = SMODS.Enhancement {
    object_type = "Enhantment",
    name = "mtg-Island_land",
    key = "Island_land",
    atlas = "island",
    pos = { x = 0, y = 0 },
    config = { extra = { h_x_mult = '1.25' } },
    weight = 1,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.h_x_mult } }
    end,
    calculate = function(self, card, context, effect)
        if context.cardarea == G.play and not context.repetition and not card.debuff and context.scoring_hand then
            
            return { card.ability.extra.h_x_mult }
            
            
        end
            
        
    end,
}
crisp coral
vagrant cedar
#

I think I'm getting carried away with my meme Jokers

dull saddle
#

how do i check what version is latest of steammodded (like the vers number) so i can put it down right for mod dependences and such?

#

bc there is no numbered release on github, and the alpha version jsut auto downloaded im not sure where to check? would love if anyone knew

tall wharf
#

damn

nova finch
#

what albums should i add?

dull saddle
tall wharf
#

ok sorry

dull saddle
vagrant cedar
dull saddle
vagrant cedar
#

Idk still not placing it

#

Does anybody know the code to make a Joker add 4 to your hand size?

#

@dull saddle ?

dull saddle
#

no idea i started coding today

cedar stream
#

have you looked at the code for mspaint joker

dull saddle
#

let me double check the vanilla exapmles mods bc i already have it open

vagrant cedar
vagrant cedar
cedar stream
#

i would reccomend doing that

vagrant cedar
#

I don't know what mspaint joker means

cedar stream
#

its the one you are talking about

vagrant cedar
#

Nothing comes up for that on Google

cedar stream
#

its called MSpaint joker

vagrant cedar
#

Is that not a base card?

cedar stream
#

no

#

its a card from morefluff i belive

vagrant cedar
#

why would I possibly know that 😭

cedar stream
#

but the card that adds +1 hand size is called jugeler i belive

dull saddle
vagrant cedar
#

Yeah I found it

#

I'm looking at it right now but I'm lost

#

Because the "first hand of the blind" part

#

also why is every variable 0

#

OH

#

I see it at the top

#

Okay

#

I'll figure out how to work this out

dull saddle
#

if you know the hand modifier you SHOULD be able to work it out with the vanillajokers smods example pack i think? im not sure

vagrant cedar
#

This is making me more confused honestly

#

I'm so lost

silk compass
#

luigi is coming

#

not tonight though im exhausted

cedar stream
past holly
#

is there an existing function similar to pseudorandom_element but it selects multiple unique elements from a table instead of just one?

sick sparrow
runic pecan
#

For some reason my joker did NOT pop up any messages.
Any suggestions?

livid tapir
runic pecan
#

Should I change it to card = self ?
Or the problem isn't that one?

livid tapir
#

they couldve been executed and the card was just wrong so
try doing a print() to debug in the if and else statements to get more info on if the if statements were done correctly

livid tapir
#

so i dont think so

#

wait what is pseudorandom do?

runic pecan
#

a random number from zero to one

livid tapir
runic pecan
livid tapir
#

you could always do math.random() since without arguments thats the same thing right

#

or is it like that you need pseudorandom

frosty dock
#

pseudorandom makes randomness consistent with seeds

livid tapir
#

just put a unique print statement on all of the if statements

runic pecan
livid tapir
#

ah ok

livid tapir
dull saddle
#

does anyone know how to set conditions that interact with vanilla jokers? i want to set an unlock condition config where it unlocks/is discovered once you play one of the suit jokers (like lusty) but im unsure of all of the stuff i can do with config and i cant find the documentation

#

would i have to do the weird take ownership thing?

frosty dock
#

I don't think pseudorandom itself does more than that

livid tapir
#

ok cools

lyric blade
#

Guys, I have a joker that gives a random tag at end of shop. Should it be rare or legendary?

runic pecan
#

I think it should be Rare.

#

It's not OP enough to be Legendary on my scale.

lyric blade
#

That's what I thought too

glass scaffold
#

I have a new Joker working, but it doesn't do the visible effect when triggered.

tall wharf
#

i am going insane

frosty dock
tall wharf
#

day 3 of rewriting straight logic

glass scaffold
glass scaffold
frosty dock
#

try card = card instead of other_card and remove the colour fields

glass scaffold
#

But the colour fields are what show that the Joker's giving chips and mult, yeah?

#

Nevermind. You were 100% on it.

#

Thanks for the help

long sun
glass scaffold
sick sparrow
#

me trying not to utilize sound util and using love's internal sound library and they are complaining that file dosen't exist (even tho this file exists)

frosty dock
#

(mod paths are /-terminated)

sick sparrow
calm rose
#

i'm not trying to be a bother, but could someone help me out? i am trying to create a joker that works like ceremonial dagger but without the mult, but whenever i try to test it i am met with this error. i don't know how to fix it? i also put my code in for reference.

frosty dock
#

Also why would you be trying not to use sound util?

frosty dock
sick sparrow
frosty dock
#

there's sound api in steamodded

random sleet
#

we have sound api at home

calm rose
frosty dock
#

move the code outside of the if statement inside of the if statement

random sleet
#

when the if statement ends, all variables created in its scope vanish into clown dust

calm rose
#

i see, that makes sense

#

well, it doesn't crash now, so thank you for helping with that, but nothing gets sliced

#

everything just kind of keeps living

random sleet
#

relatable

calm rose
#

i mean, it's not too bad, as the whole point of the joker was to be annoying and while an eternal useless joker is not as annoying as an eternal joker that keep destroying your other jokers, it's still fairly annoying, so thanks guys

sick sparrow
#

how to quick reload in balatro

sick sparrow
violet void
torpid crane
#

is there such a thing as discard retriggers? as in a way to say, get two tarot cards from a purple seal or hit the road getting two hits from one jack

sick sparrow
#

how to unhighlight card?

tall wharf
#

hello I'm still struggling in making straight logic do i just

sick sparrow
#

also thanks discord for converting tabs to whitespaces

#

it exceeds 2000 character limit and this makes fail to send message

vagrant cedar
#

I doubt anyone here plays Bohnanza, but I made a card based off Bohnanza's Cocoa Bean

#

This was my reference image

#

It functions essentially the exact same as Golden Joker though

#

Just slightly improved

final kettle
#

hey chat, I've been thinking about making a localisation mod, where do I get started?

tall wharf
frosty dock
#

like wdym i have to click view whole file to be shown whitespace

shell timber
# vagrant cedar

looks alright, but i'd probably make the art take up the whole card like in the original and make the "cocoa bean" text on the card say joker instead

sudden nexus
sick sparrow
#

looks like cryptid does not handle create_playing_card and appears as normal card

crisp coral
sick sparrow
#

if the balatro is lagging, the cards (moveables) go crazy

tall wharf
#

i will go mad by rewriting this over and over again

#

maybe i needed that 60 suits mod or something to test this

merry raven
#

Why are you writing code by hand

random sleet
#

why arent you

tall wharf
#

i was writin that during dinner

hardy viper
#

balatro modding mid dinner is wild

thorny adder
#

Just use vencord at this point

worthy stirrup
#

where would i begin with coding my own deck

brittle stump
#

Hi how to make vouchers

worthy stirrup
#

i know this is an older message but do you know how i can import G and Event?

#

okay, ive got that down, but how do I change the number of a card in the deck

#

Im getting this crash message

--- STEAMODDED HEADER
--- MOD_NAME: Absolute Deck
--- MOD_ID: AbsoluteDeck
--- MOD_AUTHOR: [Steamo]
--- MOD_DESCRIPTION: Absolute Deck of PolyGlass!
--- DEPENDENCIES: [Steamodded>=1.0.0~ALPHA-0812d]

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

math.randomseed(os.time()) -- Seed random number generator

Cardnumber = {"A", "K", "Q", "J", "10", "9", "8", "7", "6", "5", "4", "3", "2"}
Rankchoose = {"Spades", "Hearts", "Diamonds", "Clubs"}

function PickRandomCard()
    local index = math.random(#Cardnumber) -- Get a random index
    return Cardnumber[index] -- Return the card at that index
end

function PickRandomRank()
    local index = math.random(#Rankchoose) -- Get a random index
    return Rankchoose[index] -- Return the card at that index
end


SMODS.Back{
  name = "Absolute Deck",
  key = "absolute",
  pos = {x = 0, y = 3},
  config = {polyglass = true},
  loc_txt = {
      name = "One of a Kind Deck",
      text ={
          "Start with a deck with only one kind of card."
      },
  },
  apply = function()
      G.E_MANAGER:add_event(Event({
          func = function()
            local SuitChosen = PickRandomRank()
            local NumberChosen = PickRandomCard()
              for i = #G.playing_cards, 1, -1 do
                  G.playing_cards[i]:set_base(i, SuitChosen, NumberChosen)
              end
              return true
          end
      }))
  end
}

----------------------------------------------
------------MOD CODE END----------------------
torpid crane
#

would three fingers be a thing that could be modded in

hardy viper
#

yeah

tall wharf
#

god no

hardy viper
#

wdym you could absolutely do that

tall wharf
#

trying to accounting for most cases that would happen to a hand

summer lotus
#

IS there a way to relock a joker to test it's unlock condition?

worthy stirrup
# worthy stirrup

Okay, i made it so it no longer crashes, but it just gives me a normal deck

#
--- STEAMODDED HEADER
--- MOD_NAME: Absolute Deck
--- MOD_ID: AbsoluteDeck
--- MOD_AUTHOR: [Steamo]
--- MOD_DESCRIPTION: Absolute Deck of PolyGlass!
--- DEPENDENCIES: [Steamodded>=1.0.0~ALPHA-0812d]

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

math.randomseed(os.time()) -- Seed random number generator

Cardnumber = SMODS.Suits
Rankchoose = SMODS.Ranks

function PickRandomCard()
    local index = math.random(#Cardnumber) -- Get a random index
    return Cardnumber[index] -- Return the card at that index
end

function PickRandomRank()
    local index = math.random(#Rankchoose) -- Get a random index
    return Rankchoose[index] -- Return the card at that index
end


SMODS.Back{
  name = "Absolute Deck",
  key = "absolute",
  pos = {x = 0, y = 3},
  config = {polyglass = true},
  loc_txt = {
      name = "One of a Kind Deck",
      text ={
          "Start with a deck with only one kind of card."
      },
  },
  apply = function()
      G.E_MANAGER:add_event(Event({
          func = function()
            local SuitChosen = PickRandomRank()
            local NumberChosen = PickRandomCard()
              for i = #G.playing_cards, 1, -1 do
                  SMODS.change_base(G.playing_cards[i], SuitChosen, NumberChosen)
              end
              return true
          end
      }))
  end
}
----------------------------------------------
------------MOD CODE END----------------------
sick sparrow
urban veldt
#

Thoughts on this, balancing wise

Light Glyph (uncommon)
Scored Diamonds without enhancements get a random enhancement.

#

(assume the cycle for each suit)

runic pecan
#

In the future I want to make a series of jokers with each refers to a song.
Should I sort them by singer or by release date?
Sorting by singer is easier for searching, while sorting by release date can deal with cases when a song is sung by multiple singers.

dreamy thunder
#

Def by singer

hardy viper
#

as long as the singers are somewhere in the name/description of the joker

runic pecan
hardy viper
hardy viper
#

or per year if you wanted to do that instead

sudden dew
#

Anyone seen this error before when running lovely?

called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at core/src/panicking.rs:221:5:
panic in a function that cannot unwind
stack backtrace:
   0:        0x101c53af4 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h3d0e24a4535ce4a3
   1:        0x101c9614c - core::fmt::write::hd34db2896e39eb13
   2:        0x101c484e8 - std::io::Write::write_fmt::h98389850cc502a9b
   3:        0x101c539a8 - std::sys::backtrace::BacktraceLock::print::h8c49194dd201ac13
   4:        0x101c55e34 - std::panicking::default_hook::{{closure}}::h22169dc05f5fc34f
   5:        0x101c55c78 - std::panicking::default_hook::hb4863983bafae804
   6:        0x101c56700 - std::panicking::rust_panic_with_hook::hf1bec629684c50de
   7:        0x101c5638c - std::panicking::begin_panic_handler::{{closure}}::had7997efec54e09d
   8:        0x101c53fb8 - std::sys::backtrace::__rust_end_short_backtrace::h215b9fbcb4f29906
   9:        0x101c5606c - _rust_begin_unwind
  10:        0x101c92968 - core::panicking::panic_nounwind_fmt::h898482d001fe481b
  11:        0x101c929e0 - core::panicking::panic_nounwind::h306994f5812defd0
  12:        0x101c92b58 - core::panicking::panic_cannot_unwind::hbdfca1a598de8224
  13:        0x1019e9f08 - lovely::construct___rust_ctor___ctor::construct___rust_ctor___ctor::h5a2a7dad8e66a0d9
thread caused non-unwinding panic. aborting.

Just started happening all of a sudden. I tried removing all of my patch files from my mod, but no luck

hardy viper
#

wtf is a lovely::construct___rust_ctor___ctor::construct___rust_ctor___ctor

runic pecan
hardy viper
noble frigate
#

unzip the .love

#

or whatever it is lmao i omor

hardy viper
#

balatro.exe on windows

#

it's much simpler than the love bundle

hardy viper
noble frigate
#

no way

noble frigate
#

womp womp ik

tall wharf
#

real helpful the game crashed with no crash screen

bold sleet
#

Hello, is there a way to check if the player is in a run or not?

night pagoda
#

How do I pass variables to a locked Joker's localization?

worthy stirrup
#

ive never unzipped a exe

sudden dew
#

Open up your favorite unzipping tool (winrar, 7zip, whatever), then use that to open Balatro.exe like you would any other .zip file

noble frigate
#

its amazing

#

self extracting exes moment

weary jungle
#

how do i get the chips scored after the round

worthy stirrup
#

ah, okay

worthy stirrup
#

It doesn't crash but it doesnt change the cards

tepid crow
bold sleet
#

How do I change a card to a custom enhancement?

weary jungle
bold sleet
#

if the mod prefix is sbc and the enhancement naie is 'fire', then how would I make it?

#

Exactly?

worthy stirrup
#

how do i set a card to a specific suit and rank

weary jungle
#

try :set_ability(G.P_CENTERS["m_sbc_fire"])

bold sleet
#

ok

#

ok, it works, thanks.

storm kraken
sonic cedar
#
    calculate = function (self, card, context)
        if context.joker_main and G.GAME.current_round.hands_left == 0 then
          return{
            mult_mod = card.ability.extra.mult,
            message = localize{type = 'variable', key = 'a_mult', vars = {card.ability.extra.mult} },
          }
        end
        if context.end_of_round and not context.individual and not context.repetition and not context.blueprint then
            card.ability.extra.c_rounds =  card.ability.extra.c_rounds + 1
            if card.ability.extra.c_rounds >= card.ability.extra.rounds and (card.ability.extra.c_rounds - 1) < card.ability.extra.rounds then
             local eval = function(card) return not card.REMOVED end
             juice_card_until(card, eval, true) 
            end
            return {
                message = (card.ability.extra.c_rounds < card.ability.extra.rounds) and (card.ability.extra.c_rounds..'/'..card.ability.extra.rounds) or localize('k_active_ex'),
                colour = G.C.FILTER
            }
        end
        if (card.ability.extra.c_rounds >= card.ability.extra.rounds) and not context.blueprint then
            local eval = function(card) return (card.ability.loyalty_remaining == 0) and not G.RESET_JIGGLES end
                juice_card_until(card, eval, true)
            return{
                mult_mod = card.ability.extra.mult_gain,
                message = localize{
                    type = 'variable',
                    key = 'a_mult',
                    vars = {card.ability.extra.mult_gain},
                    },
            card = card 
             }
         end
    end```

morning, people! can someone tell me why this calculate function isnt working as intended? 
intended: the card gains a certain number of mult ONCE every 3 rounds
wooden badge
#

I'm not super savvy but trying to learn so will attempt to help if you don't mind.

#

what text do you want the joker to say exactly?

#

and also what is the joker doing at the moment?

wooden badge
#

jeez that really isn't what you want