#💻・modding-dev

1 messages · Page 691 of 1

gilded blaze
#

because tags follow a different calculation pipeline, which is very limited

queen crescent
#

why cant the context stuff be universal to everything like zeebee was a good point to add it

gilded blaze
#

tags behave too differently compared to other objects

#

its return values don't follow the same structure (a boolean for most effects, a card object for creating shop card), which probably explains why it's still not yet decided to be improved

#

let me grab my complaint from smods server about tags ThisIsFine

naive coral
#

is it possible to create a custom color that cycles from for example, red to blue?

naive coral
#

k

#

ty

wintry solar
cloud wraith
#

Yall know if I can make a joker that gives you an specific effect depending on what deck are you playing

rigid solar
#

you can have it check which deck you're playing on

cloud wraith
rigid solar
#

you can get the current deck by checking G.GAME.selected_back_key.key

cloud wraith
#

WTF is this

rigid solar
#

you missed .key at the end

cloud wraith
rigid solar
mystic river
narrow prawn
#

how could i get this to work?

#

like

#

how could i get glass cards that shatter

daring fern
# narrow prawn how could i get glass cards that shatter
if context.remove_playing_cards then
    local function better_copy_card(card, new_card, area, nodeckeffects)
        if not card then return nil end
        area = area or card.area or G.jokers
        local cardwasindeck = new_card and new_card.added_to_deck
        local copy = copy_card(card, new_card, nil, card.playing_card and G.playing_card)
        if not nodeckeffects and new_card and cardwasindeck then copy:remove_from_deck() end
        if card.playing_card then
            G.playing_card = (G.playing_card and G.playing_card + 1) or 1
            copy.playing_card = G.playing_card
            G.deck.config.card_limit = G.deck.config.card_limit + 1
            table.insert(G.playing_cards, copy)
        end
        if not nodeckeffects and ((new_card and cardwasindeck) or not new_card) then copy:add_to_deck() end
        if not new_card then area:emplace(copy) end
        return copy
    end
    for k, v in pairs(context.removed) do
        if v.glass_trigger then
            local other_card = better_copy_card(v, nil, G.deck)
            other_card:set_ability('m_gold')
        end
    end
end
narrow prawn
#

omg thank you

narrow prawn
rigid solar
#

it's context.removed not context.cards

narrow prawn
#

ohhhh

#

ill check it now

#

it works 🥹

silk latch
keen totem
#
attributes = {
    "rank",
    "nine",
    "mult",
    "enhancements",
    "seals",
    "editions",
    "economy",
    "six",
    "chips",
    "seven",
    "four",
    "five"
},

this is genuinely one of the attribute lists for one of my jokers

daring fern
silk latch
#

so then

      if context.destroy_card then
          if context.cardarea == G.play and (context.destroy_card:get_id() == 8 or context.destroy_card:get_id() == 4) and SMODS.pseudorandom_probability(card, 'finalflight', 1, card.ability.extra.odds) then
              return { remove = true }
          end
      end
```?
slate turtle
#

all other tarots/spectrals that add modifiers to cards have this problem

#

why is it doing that

silk latch
#

Also somehow this Joker works almost perfectly first try which I was absolutely NOT expecting

#

Am I secretly goated???

narrow prawn
#

info_queue[#1116390750314307698_queue + 1] = G.P_CENTERS.purple

im trying to get a popup about purple seals

#

but idk the code to

rigid solar
#

you're missing the seal prefix

narrow prawn
#

oh

rigid solar
#

idk what it is tho 😶

slate turtle
#

uh

#

wait isnt it m_ for all modifiers

silk latch
narrow prawn
#

im trying to make a joker that allows me to retrigger the hand played if it has a red, blue and purple seal in that order

#

with 2x mult for each card

slate turtle
rigid solar
#

oh seals don't have a prefix, at least not the vanilla ones

#

it's just purple_seal

daring fern
rigid solar
#

huh

narrow prawn
#

also i may be stupid but its not showing up with the mult amount ingame

daring fern
narrow prawn
#

ohhhh

#

lets go 🥹

silk latch
slate turtle
silk latch
#

doing what

narrow prawn
#

wait a second now i actually need to code the joker....

slate turtle
#

wait gimmie a sec to get the crash message

slate turtle
narrow prawn
#

how could i check to see if your current hand has a red seal, blue seal, and purple seal

red flower
narrow prawn
#

checking for seals

red flower
narrow prawn
#

well

#

both really

#

~_~

silk latch
red flower
# narrow prawn well

you want to loop through context.scoring_hand (scored) or context.full_hand (all) in any of the scoring contexts

red flower
vital granite
#

Hey, has someone created a mod for things that can urge the player not to do a negative effect -- like playing a face card to reset ride the bus, or discarding which would activate green joker?

rigid solar
#

you'd have to do smth like this

for i = 1, total cards in hand
  if cards[i] is red seal then
    for j = i+1, total cards in hand
      if cards[j] is blue seal then
        for k = j+1, total cards in hand
          if cards[k] is purple seal then
            do your stuff and return
vital granite
#

i created a small mod for myself -- but if this isn't a thing someone has created, I might create it

red flower
rigid solar
#

that works if you just care about having the seals in order, and not necessarily next to each other

slate turtle
vital granite
#

or not sure?

red flower
red flower
#

like obelisk

vital granite
#

yeah and it does that little shake effect, which I think the vanilla game does not do

red flower
#

jokerdisplay doesnt add any effects

narrow prawn
#

i absolutely messed something up

slate turtle
narrow prawn
#

ohhhh

#

im checking them all at the same time

red flower
narrow prawn
#

😭

red flower
#

you can just loop in context.repetition directly

#

you dont need the second context

#

it is a little more inefficient but its easier and doesnt really matter

slate turtle
#

question

#

uh

vital granite
#

well if anyone knows of any modpacks that are "anti-suck" (like a "shake" effect that the invisible joker gives, but to the notify you not to accidentally ruin your ride the bus) not accidentally resetting ride the bus), let me know. Maybe i'll create mine own if its not already been made and post it!

slate turtle
#

how can you make it so you can use consumables within booster packs

vital granite
#

I don't want to recreate something that's already been made

red flower
slate turtle
red flower
#

have you checked vanillaremade

slate turtle
#

oh

#

right

#

that exists

narrow prawn
#

so that it can retrigger every card

#

oh wait

#

it is

#

😭

#

im stupid

slate turtle
#

i looked through vanillaremade and still have no clue

keen totem
#

how could i set the round's mult value?

narrow prawn
#

okay it works but i want the xmult to appear on the card

red flower
#

also i assume you want all 3 seals in that order right?

narrow prawn
#

ehhh as long as it works i'll be happy

red flower
#

no i mean thats what youre doing rn

narrow prawn
#

yeah

red flower
#

can i see your current code for boosters

narrow prawn
#

i finished....

slate turtle
red flower
#

remove select_card

#

you're explicitly telling it to save the card

narrow prawn
#

am i just blind or what

#

a comma....

#

😭

#

fixed it

rapid stag
#

i remember someone made something where you could steal jokers or vouchers from the shop, but i forgot how theyr did it and i wouln't know what to search to find that discussion again cirBlech

#

does anyone know

keen totem
rapid stag
#

no

narrow prawn
#

is there a way i could undebuff cards

rapid stag
narrow prawn
#

hmmm

#

what would the source be

wanton jolt
#

Can a Sticker force a certain Joker Description to show up instead of the description the joker it is applied to

ripe fractal
#

Hello, I'm working on a texture pack for a friend that replaces some of the art in the game, I tried to have Hologram be P03 from Inscryption but when I'm in-game most of his face doesn't render, anyone know how I can fix this?

rapid stag
# keen totem do you just mean making a joker free

okay, well i'm working on a mechanic where the player can mark an item in the shop using a joker and when the shop phase ends, they have a chance to get it for free.

the mark should go away if the item is purchased beforehand (i.e. you mark a booster, if you buy the booster anyway, the mark goes away. same for anything else)

the problem being that the only thing i know how to actually do out of all that is the button functionality. that's it. i'm thinking of using a custom sticker as the mark, but then i don't know how to remove it if something else gets marked (only one thing can be marked at a time), i don't know how to remove it if the item in question is bought, and i don't know how to look for the marked item and steal it (i.e. buy for free) at the end of the shop phase cirBlech

#

i could have sworn i saw discussion about a similar idea here once

keen totem
#

a sticker seems like the best solution yea

#

you can iterate through the shop's card areas to check for a marked joker

#

not sure how you'd auto buy it though

rapid stag
#

well if it's something like a joker, consumable or playing card, i imagine i could just do SMODS.add_card with the item key as substitute

the real headache comes from vouchers and boosters

#

like for spectral and mega packs an easy cop out woud be their respective tags, but what about jumbos and mega spectral

#

oh

#

i can refer to how vremade does the free booster tags for all boosters

#

voucher:redeem()?

narrow prawn
#

is there a way to check if you sell a negative joker?

rapid stag
rapid stag
near coral
#

Is it possible to give $0 per remaining hand on a specific boss blind

narrow prawn
#

does anyone know how i could do a popup like this but for a custom seal

vocal helm
#
-- in loc_vars
info_queue[#info_queue + 1] = G.P_SEALS[card.ability.extra.seal] -- whatever the key for your seal is
narrow prawn
#

i may have done something wrong

idle plaza
# narrow prawn

Your seal's key automatically has your mod's prefix added to it, include it when referring to the seal's key in your Tarot

Use G.P_SEALS[card.ability.extra] without adding .seal, because your extra value is the seal's key, instead of a table.

narrow prawn
#

i dont get it 😭

red flower
red flower
#

yes for the first thing, no for the second thing

#

it's like G.FUNCS.buy_card or something

#

let me check

orchid thunder
brittle yacht
#

why does my mouse dissapear when i open the game 😭

tawny mica
#

anyone know the best way to learn pixel art for balatro style jokers and icons

rapid stag
#

is G.shop_jokers.highlighted a thing?

tranquil cypress
#

yeah

rapid stag
#

and for all the other shops? G.shop_booster.highlighted, G.shop_vouchers.highlighted

tranquil cypress
#

yeah

#

all cardareas have a highlighted thing

narrow prawn
#

it just doesnt work

#

oh my god

#

i fixed it

rapid stag
#

question, G.shop_jokers, G.shop_booster and G.shop_vouchers are still populated with the items that were there when context.ending_shop, right?

red flower
#

you can print it and see :3

rapid stag
narrow prawn
#

is this proper code for changing the enhancement?

red flower
narrow prawn
#

they can?

red flower
#

yeah you set it in the config, check vanillaremade

narrow prawn
#

so

#

~_~

red flower
#

ah

#

m_modprefix_FoilEnhancement

narrow prawn
#

yippee

#

perfect

fallen tendon
#

How would I go about adding a 4th layer of playing card modifiers?

#

Something stackable with enhancements, seals, and editions, but not with itself

slim ferry
#

You would need to either pretty much implement all related functions from scratch (calculate, drawing, etc) or extend SMODS.Sticker and steal collection stuff from paperback

#

For the former you can probably also look at some other mod though

fallen tendon
#

Okay, makes sense

rapid stag
red flower
rapid stag
#

is that not right cirDerp

narrow prawn
#

i have something wrong....

rapid stag
#

is it :add_event

#

huh, so it is

narrow prawn
#

it turns too many into the card, and it wont let me set the card that is originally the enhancement to the default enhancement

rapid stag
red flower
#

yeah boosters are weird with states

#

i would recommend maybe another event wrapping that event?

red flower
#

also if the left card doesn't exist the loop won't get to the right card

red flower
#

try one more

rapid stag
#

double event?

red flower
#

yeah

rapid stag
#

that has the blind select screen come up at the same time as the booster opening

#

don't tell me i need to triple event 😭
should i just not put a slight delay on the wrapping event

red flower
#

a delay wont do anything
try the triple event but if that doesn't work the solution is to wait for the state to transition

rapid stag
#

i was thinking of creating a context.blind_select call and doing it in that 😭

red flower
#

you can just wait in the event until the state is blind select

ripe fractal
red flower
#

hmm dunno then

narrow prawn
#

i cant wait to code them

rapid stag
# red flower hmm dunno then

got it working, but i can't get it to save the run where if you quit to menu while in the pack and load the saved run, it will reopen the pack

narrow prawn
#

oh my god it crashed the game 😭

#

also is there a way for when it eats the card to display the card it eats like how it would when you use a planet card or something

red flower
#

ive never done it myself

red flower
narrow prawn
#

aughghgh it keeps crashing when it copies itself

daring fern
# narrow prawn

It should be (#G.jokers.cards + G.GAME.joker_buffer) < G.jokers.config.card_limit

narrow prawn
#

ohhh

rapid stag
# red flower that needs save_with_action or something like that

it's not working.
i've tried all sorts of variations with the same save_with_action behaviour that G.FUNCS.use_card does around the use_card call, in an event, outside of an event, even patching the condition inside the use_card call to do its save_with_action if the state is blind_select as well as shop, nothing

#

the only thing i can think of is that G.F_NO_SAVING might be true

flint fern
#

i came back to balatro modding and forgot EVERYTHING

how do i malverk

versed atlas
#

has anyone tried printing the actual chip value of cards that have been enhanced by Hiker on top of the card? If I need to pick between possibilities, it'd be nice to know the actual chip values quickly.

white zinc
#

i'm running into a syntax error in my lua code. i don't think i fully understand how it works just yet lol. anyone able to help?

#

get_id() returns a card's rank, right?

daring fern
white zinc
#

i'm trying to see if all cards held in hand have different ranks

#

so i figured i'd run a for loop to add all the cards to a table and see if any of them match any other cards

#

i'm grabbing a card held in hand, comparing it to all the cards in the table, and if it's unique, then it gets added to the table as well

daring fern
white zinc
#

i didn't have to do all that extra table stuff?

knotty solstice
#

where is the code responsible for calculating jokers retriggers?

red flower
red flower
white zinc
red flower
#

basically
if ranks[id] doesn't exist it is nil which evaluates to false

white zinc
#

gotcha, ok

#

thank you for the info

red flower
#

ah and the : in get_id is important too

#

card:get_id() is the same as card.get_id(card) which you were missing earlier

karmic prism
#

I have made a custom texture for the base deck. Does anyone know how I can replace the default card texture for my new one? Also is it possible to rename one of the four default suits without having to write an entirely new suit into code?

white zinc
red flower
red flower
white zinc
#

ahh ok

red flower
#

i love documentation

gilded blaze
knotty solstice
#

I just had a idea

#

we should make a public pastebin which every number slop mod uses

#

so when they do tetration it puts the exponentiation number base needs to get to specific height

#

so when doing tetration it'll only pick highest number or equal to tower height and start from there

#

so we could invest like 1 universe worth of memory ram just for number slop balatro

karmic prism
red flower
karmic prism
#

Oh I see

#

Thank you

rapid stag
# rapid stag it's not working. i've tried all sorts of variations with the same ``save_with_a...

@red flower figured something out. on load, the re-opening isn't being done correctly.

something is weird about the card argument (e.config.ref_table) in G.FUNCS.use_card on run load.

if i print card.ability.set, the first time around it's correctly 'Booster', but on reload, it's 'Default'

if i try to learn anything more about card, i get nothing. i've tried printing it directly, i've tried putting it in tprint, i've tried Card.is(card, Card), nothing.

red flower
#

it probably needs to be saved? im guessing

rapid stag
#

at this point, i'm just gonna cheat and patch in my own functionality to savetable action to parse types and do other side and then do it that way

#

doesn't work

#

i am so confused

#

left = my code, right = game.lua, patched

#

oh, i need to save earlier, i see

#

can't save during booster opening

#

still nothing.

i don't get it. i made sure to pass true for nosave into use_card

#

why is the action not saving

signal mulch
#

The mod looks good

#

But i can't help with the code

#

I just make android fixes

#

Not really coding

rapid stag
#

i fixed it. my save timing was wrong

signal mulch
#

👍

gilded blaze
# rapid stag

it's because the booster pack doesn't exist at the time of loading

#

for opening booster packs at an arbitrary time, you need more work

#

well, the keepsake is a card, you can store certain things inside that

#

here's how I do it with a joker from my mod

#

it takes tags that spawn booster packs into account to avoid conflating packs

silent sail
red flower
silent sail
#

its for big hands beyond standard sizing, it works in the ui elements but then the score and displayed calculation are differnet

red flower
#

why can't you make them new poker hands?

silent sail
#

i tried that but it didnt work the way i wanted plus this scales planets easier

red flower
#

can you elaborate?

silent sail
#

well the poker hand method was working but i couldnt get them to level up with the og hands plus it wouldnt let me hid them from menus

red flower
#

that sounds very easy to solve

#

leveling up with the og hand would just be hooking level_up_hand and making them not visible in the menu is literally a feature

silent sail
#

game just hates me ig

#

id rather get this one working but if not i can probably find the old pokerhands code

red flower
#

this one looks like it would break from other things like scoring params

#

i really recommend just using the api features that are designed for this

silent sail
#

yeah fair enough ]

#

i wanted to do it like cryptid does so its adaptable

red flower
#

i would never do something as cryptid does it

#

cryptid probably coded it like 2 years ago

silent sail
#

yeah ok fair enough

tawny mica
#

anyone know how i can make new hands

fading rivet
tawny mica
tawny mica
#

thanks

slim ferry
slim ferry
#

because it leaves out the SMODS.PokerHandParts which are pretty important for custom hands

fading rivet
#

never tried to make them before so I wouldn't know ;-;

slim ferry
#

otherwise youre restricted to vanilla parts

slim ferry
#

or well

#

it just uses the vanilla parts for everything

#

so it doesnt actually really do anything

#

you can make a hand without implementing parts but parts can still be useful

tawny mica
rapid stag
tawny mica
narrow prawn
#

im trying to get this seal to work but it doesnt go down at the end of round

red flower
rapid stag
#

how did this happen

red flower
fading rivet
narrow prawn
#

still not working

#

ohhh

fading rivet
#

not the instance of the seal

#

put card in the arguments and use that

red flower
narrow prawn
#

wait hold on

#

let me test it

red flower
#

also you should use SMODS.destroy_cards instead of start_dissolve

#

oh and card.ability.extra is incorrect too i think

#

because it's a seal not the card's ability

fading rivet
#

yeah idk how seals work with that

#

I can garuentee using self won't work though

red flower
#

yeah

fading rivet
#

oh I think I found it

narrow prawn
#

yeah seals are confusing

fading rivet
#

card.ability.seal.extra

red flower
#

not extra in this case

fading rivet
red flower
#

woah who wrote that

fading rivet
#

no clue
they seem pretty cool though

red flower
#

this reminds me that i should update the game dump i got on my phone

#

its from like a year ago

fading rivet
#

lol

rapid stag
#

does anyone know how to force update a back's sprites

narrow prawn
#

ohuhhghgg

red flower
red flower
narrow prawn
#

ogughghgh

red flower
narrow prawn
#

i am???

#

oh

#

huh i didnt notice that

red flower
#
loc_vars = function(self, info_queue, card)
    return { vars = {card.ability.seal.Xmult, card.ability.seal.roundcount, card.ability.seal.totalrounds} }
end,

should be this

narrow prawn
#

still nothing...

#

supposed to be saying 2 rounds left

#

wait hold on

#

i may be stupid

rapid stag
# red flower update how exactly

my deck sprite randomly started turning into the gold seal sprite on run start & load and i don't know why 😭 i need to force it back

narrow prawn
#

nevermind im not stupid huh

red flower
#

i would look into fixing the issue instead of trying to change the sprites lol

narrow prawn
#

unless its just not triggering at the end of round?

red flower
wispy falcon
#

bump2

narrow prawn
red flower
narrow prawn
#

i think its just the context for end of round

red flower
#

this works

narrow prawn
#

idk it doesnt for me

red flower
#

is the card in hand

narrow prawn
#

no

#

ohhh...

red flower
#

thats the issue

narrow prawn
#

i want it to do it regardless

red flower
#

you need to enable the optional deck cardarea

#

or use mod calculate instead of the seal's calculate

narrow prawn
#

ah

red flower
narrow prawn
#

how?

red flower
rapid stag
tawny mica
#

im still struggling making a custom hand

red flower
deep ether
#

idk if this is the right channel to post this on but it seems the most appropriate, and I apologize for interrupting anything currently going on
I'm trying to make a Balatro mod and I'm getting the hang of the coding aspect, but I still have one big problem: no art
I kinda suck at drawing in general, let alone pixel art, so if there's anyone who's bored enough to work with me, I'd really appreciate it
-# it'd be volunteer work, though, I dont have a stable source of income to even think about paying anyone 😔
you can reply to this message (with @ on) or DM me

tawny mica
red flower
deep ether
tawny mica
deep ether
#

four of a kind flush, three of a kind flush, pair flush, two pair flush

#

etc

#

I'd be interested when the mod's done

tawny mica
#

im trying to make it but im struggling with even getting one hand done 😭

brittle yacht
#

how would i add a sprite to a playing card using enchancements

wispy falcon
red flower
# tawny mica three of a kind flush

for 3oak you can use parts._3 which contains all three of a kinds, then you need to get if those are the same suit which is not straightforward as of yet
i would recommend checking get_flush in the vanilla code for that part

tawny mica
#

id assume that would be in card.lua?

red flower
red flower
tawny mica
brittle yacht
#
        info_queue[#"Info"_queue + 1] = G.P_CENTERS.m_oozing
    end,```

this doesnt add an enchancement description to my joker.
#
    descriptions = {
        Enhanced = {
            m_shit_oozing = {
                name = "Oozing Card",
                text = {
                    "",
                },
            },     
        },  
    },
}```
#

theres no text

#

dont worry about that

red flower
brittle yacht
#

oh

#

mb thanks

brittle yacht
wispy falcon
brittle yacht
#

wait i think i fixed it

red flower
# wispy falcon bump4

i recommend just bumping the original question, i get its funny but it's less likely someone will answer if they have to do more work to see the post

brittle yacht
#

when i hovered over the joker 😭

wispy falcon
#

bump

brittle yacht
brittle yacht
#
    key = 'oscar',
    loc_txt = {
        name = 'Oscar',
        text = {
            'Adds one {C:attention}Oozing{} card to deck when {C:attention}Blind{} is selected',
        }
    },
    atlas = 'oscar',
    pos = { x = 0, y = 0 },
    rarity = 1,
    cost = 1,
    unlocked = true,
    discovered = true,
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = { key = 'shit_oozing', set = 'Enhanced'}
    end,
    pools = { ['shit'] = true, },
}```

```return{
    descriptions = {
        Enhanced = {
            shit_oozing = {
                name = "Oozing Card",
                text = {
                    "die",
                },
            },     
        },  
    },
}```
red flower
#

what's the enhancement code

brittle yacht
#

i dont have it yet

red flower
#

well

brittle yacht
#

is that why

red flower
#

yes

brittle yacht
#

ight mb 😭

tawny mica
tawny mica
#

im not good at art now i got to model the planet card 😭

silent sail
#

goodluck

#

got half of this stuff working nicely

rigid solar
tawny mica
#

im changing it

white zinc
#

if i have 2 different hand types, how can i compare them and see which one is a stronger rank (without taking into account leveling up hands)?

wispy falcon
#

bump

tawny mica
# red flower yes

can you tell me if theres a simpler way to do this

        local pair = parts._2[1]
        local suits = { "Spades", "Hearts", "Clubs", "Diamonds" }
        for _, suit in ipairs(suits) do
            if pair[1]:is_suit(suit, nil, true) and pair[2]:is_suit(suit, nil, true) then
                return { pair }
            end
        end
        return {}```
red flower
#

no, in fact you're making some assumptions that make it easier
you are only using the first pair and only checking vanilla suits (which i assume is because you checked the vanilla code instead of the patched dump, which is my fault)

tawny mica
tawny mica
#
            return { pair }
        end```
red flower
#

this doesnt acount for cards treated as multiple suits

tawny mica
#

right

red flower
#

i dont think you need to add it im just saying that not accounting for it makes it easier

tawny mica
red flower
#

i also dont account for it in some of my hands because just finding one is easier

tawny mica
#

a check if a card is a wild card?

red flower
tawny mica
red flower
#

the only problem is not accounting for modded suits

tawny mica
#

hm

red flower
#

check get_flush but in the lovely/dump

tawny mica
#

SMODS.Suit.obj_buffer

#

ahh

tawny mica
red flower
#

yeah

tawny mica
#

thanks lol

#

i didnt know checking the lovely dump would be that easier

#

next thing i need to figure out is making it level with the base pair and stuff

red flower
#

i think you need to hook SMODS.upgrade_poker_hand

tawny mica
slate turtle
#

question do crossmod joker atlases have to be in a separate atlas than the normal atlas

red flower
#

no

#

there's no "normal atlas" but im assuming you mean a different one from the ones youre using

knotty solstice
#

where are scored cards calculated example:
When a card is scored and gives +10 chips what function it comes from

#

wait I think It's SMODS.score_card

tawny mica
red flower
rare minnow
#

How would I be able to make something identical to Marble Joker but have it make a card that isn't stone?

rare minnow
red flower
rare minnow
red flower
#

instead of m_stone you put the key for the enhancement you want

rare minnow
#

and for no enhancement?

red flower
#

remove the enhancement from add_card

rare minnow
#

and how would I make it make a certian card (for example, a king of hearts)

red flower
rare minnow
#

thank you

slate turtle
#

long story short i want to make a joker that retriggers first played card for every card destroyed this ante

tawny mica
#

because flush jokers don't work with it

#

would i use the combine?

wispy falcon
#

bump

tawny mica
#

😭

#

you could do a whole flush pair run off of it

hidden notch
#

Is it just my Setup or do CanvasSprite 's eat up much more performance? ^^'
I'm putting my Canvas Sprite on a Playing-Card/Edition, and just 8 of them already of a noticeable Impact x'3
Also for completions sake, the Code for the Text:lua SMODS.CanvasSprite{ --ref_table = card.base, ref_value = 'suit', text = card.base.suit or localize('SEMBY_empty_memory'), text_offset = { x = 8.0, y = 07.5 }, text_h_align = 'left', text_colour = card.base.suit and G.C.SUITS[card.base.suit] or G.C.BLACK, text_height = 8.0, canvasScale = 2 },

shell timber
#

are you just drawing the suit? or are you going to do other things

#

if you are id probably just hardcode the sprites for vanilla suits

hidden notch
#

I'm technically also drawing other text (that actually changes) below it - I disabled it for the Screenshot x3

shell timber
#

ah okay

knotty solstice
#

I'm trying to optimize retriggers by instead doing tetration exponentiation and multiplication on the returned table depending on the value of the retriggers however I can't figure out how retriggers are done in SMODS(I already have the system of increasing values depending on retriggers and even made it work for SMODS.scale_card() ) I just need to figure out how retriggers are done in SMODS so I can make it work

#

what I currently have for testing:

#
SMODS.insert_repetitions = function(ret, eval, effect_card, _type)
 local effect = {}
for k,v in pairs(eval) do
    if k ~= 'extra' then effect[k] = v end
end
print("inserting repetition:",eval)
if eval.extra then
    print("repetition has extra:",eval.extra)
end
print("ret is:",ret)
print("effect is:",effect)
print(effect.card.chips)
table.insert(ret,{retriggers=effect})
local this_retriggers = 5-1
effect_card.bl_optimized_retriggers = this_retriggers

--effect.message = nil
--effect_card.bl_optimized_retriggers = 5
--for i = 1,5 do
    --table.insert(ret,{retriggers=effect}) -- This adds 5 repetitions to scored card!
--end

end
#
INFO - [G] calculating individual effect: chips
INFO - [G] amount: 4
INFO - [G] inserting repetition: Table:
repetitions: 2
message: Again!
card: Table:
  under_overlay: false
  click_offset: Table:
    y: 0
    x: 0

  facing: front
  children: Table:
    center: Table:
      click_offset: table: 0x40ef2900
      +36 more values.

    back: Table:
      click_offset: table: 0x41178fe8
      +35 more values.

    shadow: Table:
      velocity: table: 0x412c4458
      +29 more values.


  ambient_tilt: 0.2
  parent: Table:
    click_offset: Table:
      y: 0
      +1 more value.

    static_rotation: false
    shuffle_amt: 0
    T: Table:
      x: 4.7573170731707
      +5 more values.

    +30 more values.

  sticker_run: black
  +56 more values.

I noticed insert repetitions is being called only after chips from scored card has already been calculated though

red flower
#

basically it doesnt cache the text

hidden notch
#

Ay, that makes sense x'3

hidden notch
red flower
#

the problem is not with text specifically but with how smods renders text by default

hidden notch
#

-# + I'm gonna hide the Text in Deck-View

red flower
#

if you add custom canvassprites, either text or sprites it wouldn't have this issue if you cahce correctly

hidden notch
red flower
#

i did a lot of this by trial and error so i would ask Meta if you need better explanations lol

hidden notch
#

I'll Trail and Error my way aswell then CamotFab
-# Otherwise, I'll be back asking question owo

humble dagger
#

if i am having trouble with a mod i am working on would i put it here or in modding support?

#

cus i guess it counts as modding dev but idk

knotty solstice
#

the card repetitions should be set in calculate_repetitions

#

insert_repetitions just calculates which card is doing the repetition

#

confusing names

#

thats why I name my functions accordingly

#

like

#

local function debug_value_when_variable_should_debug_values_is_enabled

#

way easier to understand

humble dagger
#

alr then imma just paste it here instead:
i have made a little mod for me and my friends but it seems an issue happens where if my mod is ingame it bugs out how item caps work, like if you grab a negative joker and sell it your joker cap stays at 6 instead of going back to 5, same thing with the dice joker my friend bought it 5 times and sold it and still had all the probability from it even though he didnt have the joker anymore) and i am just wondering if anyone else who made a mod has had that same issue or not?
here is my mod incase anyone wants to test it or look at it cus i wanna fix it for my friends...........

viscid talon
#

Unusual error when it comes to Sephirot Booster Packs in the latest version

#

i am unsure how to fix this

red flower
#

have they tried without your mod enabled

humble dagger
#

yeah it is my mod

#

specifically the main lua in my mod

#

the seal one doesnt break anything but the main lua breaks the numbers idk why

red flower
#

oh yes i found it

#

this is wrong, you're overriding the vanilla function

humble dagger
tawny mica
red flower
rapid stag
#

what's the best way to check if a given card is a consumable?

red flower
#

card.ability.consumeable iirc

tawny mica
# red flower card.ability.consumeable iirc
SMODS.current_mod.calculate = function(self, context)
    if context.using_consumeable then
        local key = context.consumeable.config.center_key
        local hand_map = {
            c_mercury = 'mcjk_Pair Flush',
            c_venus = 'mcjk_Flush Three',
            c_earth = 'mcjk_Two Pair Flush',
            c_mars = 'mcjk_Flush Four',
        }
        if hand_map[key] then
            level_up_hand(context.consumeable, hand_map[key], false, 1)
        end
    end
end
#

does that seem fine i mean it works lol

red flower
#

not how i would do it but its fine

tawny mica
humble dagger
#

been trying to figure out why that wasnt working

#

and lowkey made me stop working on the mod entirely!!!!!!!11

red flower
#

i would recommend checking newer example mods because a lot of things seem outdated

#

i recently (just a couple of minutes ago) updated the smods examples that i see you were using

humble dagger
#

wait you are THE smod example maker??

red flower
keen totem
#

N' is basically john balatro modmaker himself

tawny mica
#

and if it would be to op

red flower
#

im the worst person to ask about game balance

#

i made the yugioh mod

keen totem
#

ah i see

#

"flush five" versions of other hand types

tawny mica
red flower
keen totem
#

if flush five triggers Droll Joker, probably make them trigger flushes too

tawny mica
#

what other flushes should i add

keen totem
#

if youre playing a flush with extra steps, it should trigger the stuff thats meant for easier to play flushes

rigid solar
red flower
#

a flush requires 5 cards so a pair flush is not a flush if we go by vanilla

keen totem
humble dagger
#

high card flush

#

YEAAHHH

tawny mica
keen totem
#

add a toggle for High Flush

#

just a name change

tawny mica
#

and stat change

humble dagger
#

ok how about it makes a high card flush ONLY IF it has that like one enhancement that makes it count as all suits??

rigid solar
#

omni flush and it's a flush full of wild 🔥

keen totem
tame ibex
keen totem
#

make it check the suits in a way that makes all "multi-suit" effects (so things like Smeared Joker too) trigger High Flush

red flower
tawny mica
#

idk how to add mod settings ngl

tame ibex
keen totem
#

i made a stupid toggle at some point

#

that i need to remove

tawny mica
keen totem
#

kinda

tawny mica
#

this also makes planet cards useful lmao

red flower
tawny mica
#

holy complicated

#

ill do that when im done with the mod

#

its funny how two pair flush can lwk solo a whole game

narrow prawn
#

is there a way i can check if a probability event is happening, and check if it fails?

#

like if i hit the wheel of fortune and it failed

#

then i could detect that

viscid talon
#

here's sephirot.lua for help

shell timber
sturdy compass
#

context.pseudorandom_result iirc

wispy falcon
#

bump

frosty dock
hidden notch
wispy falcon
tawny mica
#

should i be checking for m_wild or m_wildcard

tawny mica
#

thanks

tawny mica
red flower
#

what is the hand supposed to be

tawny mica
#

flush high lol

red flower
#

yeah but high card but the card is wild or highest wild card

tawny mica
#

its activating if the card is all suits basically

tawny mica
red flower
red flower
red flower
#

then that's wrong

tawny mica
#

what should i check then

red flower
#

_highest gives you the highest card in hand, you need to make your own check for highest wild card

tawny mica
#

ok

tawny mica
#

is it correct then?

red flower
#

yes

tawny mica
#

😭 bro my mod randomly deactivated thats why it wasnt working ghten

naive coral
#

how does SMODS.gradient work? i cant make sense of the documentation.

#

also how do i format it into a description

flint basalt
#

Can someone help? I'm not a programmer and I don't understand anything.

red flower
red flower
tawny mica
flint basalt
red flower
#

show your code pls

#

also it does seem like there are missing or broken files

tawny mica
#

verify your game files through steam

brittle yacht
red flower
tawny mica
flint basalt
brittle yacht
# brittle yacht
return{
    descriptions = {
        Enhanced = {
            shit_oozing = {
                name = "Oozing Card",
                text = {
                    "die",
                },
            },     
        },  
    },
}```

```SMODS.Joker {
    key = 'oscar',
    loc_txt = {
        name = 'Oscar',
        text = {
            'Adds one {C:attention}Oozing{} card to deck when {C:attention}Blind{} is selected',
        }
    },
    atlas = 'oscar',
    pos = { x = 0, y = 0 },
    rarity = 1,
    cost = 1,
    unlocked = true,
    discovered = true,
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = { key = 'shit_oozing', set = 'Enhanced'}
    end,
    pools = { ['shit'] = true, },
}```

```SMODS.Enhancement {
    key = 'oozing',
    pos = { x = 0, y = 0 },
    config = { bonus = 1.2 },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.h_x_mult } }
    end,
}```
#

mb 😭

red flower
# flint basalt

im on my phone sorry can you post the individual lua files, at least the main one and the edition

red flower
flint basalt
red flower
#

can you screenshot your file structure?

flint basalt
# flint basalt

Also I use Smod 771a because i'am too lazy to update every other mod

red flower
#

the only thing i can think of is all the stuff you are doing with SMODS.current_mod.path

#

you shouldn't be changing that value

#

if it's from jokerforge i would ask in their discord

brittle yacht
#
    key = 'oozing',
    path = 'oozing.png',
    px = 71,
    py = 95
}

SMODS.Enhancement {
    key = 'oozing',
    pos = { x = 0, y = 0 },
    config = { bonus = 1.2 },
    loc_txt = {
        name = 'Oozing Card',
            text = {
                '{X:mult,C:white}X1.2{} Mult{} when scored',
            }
    },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.x_mult } }
    end,
}```

wont show up?
#

ignore the ERROR

flint basalt
brittle yacht
#

talking about the sprite

red flower
brittle yacht
#

i am a very smart human

#

😄

keen totem
#

how would you make a joker discovered by default

brittle yacht
#

for example

#
    loc_txt = {
        name = 'Oscar',
        text = {
            'Adds one {C:attention}Oozing{} card to deck when {C:attention}Blind{} is selected',
        }
    },
    atlas = 'oscar',
    pos = { x = 0, y = 0 },
    rarity = 1,
    cost = 1,
    unlocked = true,
    discovered = true,
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = G.P_CENTERS.m_shit_oozing
    end,```
#

how would i make an enhancement allow another card to be played if in hand?

tawny mica
brittle yacht
#

ight

narrow prawn
#

is there a way to do an info queue for a joker?

#

info_queue[#"Info"_queue + 1] = G.P_CENTERS.J_Mations_Lightportal something like

red flower
#

yes

#

that

#

but j lowercase

narrow prawn
#

ah

#

ty

#

okay now its crashing when i hover over the joker 😭

#

oh well

red flower
#

i imagine the key is wrong

#

or is it crashing without log?

narrow prawn
#

no log

#

just immediate close

red flower
#

do you have two jokers referencing each other

narrow prawn
#

yeah 😭

#

ohhhhhhhhhhhhhh

#

thats why

red flower
#

add a if not card.fake_card check

narrow prawn
#

can i make a

#

custom version of the card

#

like i can make my own info

#

without having to reference something

red flower
tawny mica
red flower
#

why would you ask me 😭

tawny mica
#

you upload mods?

#

idk

red flower
#

i don't like bmm

tawny mica
#

why

red flower
#

i also did like a million years ago

red flower
narrow prawn
#

i cant lie i have some cool ideas

brittle yacht
#

is there a context for holding in hand

red flower
#

is it the enhancement

narrow prawn
#

i have an idea for like a new section in the shop where you can pay money to start something, then come back the next round to collect a card

#

the only problem is im not sure how to create new ui elements

brittle yacht
red flower
#

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

#

if you mean for a joker/another object to check for that it would be
context.individual and context.cardarea == G.hand

brittle yacht
#

so it increases hand size

#

when you have in in hand

red flower
#

there's an smods property for that

brittle yacht
#

there is?

red flower
#

config = { card_limit = 1 }

#

like negative

brittle yacht
red flower
#

yes

#

also just so you are aware negative playing cards are insanely broken lol

brittle yacht
#

yes i know lol

#

so i need

    ???
end```
and
```context.cardarea =~ G.hand = function(slef, card)
  ???
end```
red flower
#

no that doesn't make any sense

narrow prawn
#

does anyone have an example of a button that can be added to the shop

red flower
#

playing cards only increase hand size when they are in hand

brittle yacht
#

ight ill test that

red flower
naive coral
#

how can i check if i card is currently in the shop? i have a joker with a timer and dont want it going down in the shop

red flower
#

ui is hard to explain sadly

narrow prawn
#

something like the hot potato mod

slim ferry
#

😨

narrow prawn
#

how do i explain

#

what i want is

narrow prawn
#

theres a button you press to bring up a ui

naive coral
#

true...

narrow prawn
#

where you can pay money, then come back a round later and a card will be waiting for you

naive coral
#

didnt think about checking for the lack of being in the jokers area rather than check for shop

red flower
#

hot potatos shop was made by the ui wizard i cant help you there

narrow prawn
#

just a little button you can press in the shop

brittle yacht
#
    key = 'oozing',
    atlas = 'oozing',
    pos = { x = 0, y = 0 },
    loc_txt = {
        name = 'Oozing Card',
            text = {
                '{X:mult,C:white}X1.2{} Mult{}',
            }
    },
    config = { card_limit = 1 },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.size } }
    end,
}```
#

ignore how it still says x1.2 mult

narrow prawn
#

like a button here that you could press, and it'd bring up a menu

red flower
#

the function just below that one is the one that my button calls

#

(it's not in the shop tho)

red flower
#

you just need to add the card_limit to what you had

brittle yacht
#

oh wait

#

never mind

#

return { vars = { card.ability.extra.card_limit } }
so i need to replace ability with what

red flower
#

no i mean
you had config = { extra = {...} }

brittle yacht
#

yeah i fixed that

red flower
#

oh i see

red flower
brittle yacht
#

it does not do ANYTHING

#

i am so sorry gng 😭

brittle yacht
red flower
#

card_limit should be outside extra too

#

i thought you were keeping the xmult lol

narrow prawn
#

ui is hard...

#

eh i'll try tomorrow

red flower
#

gets easier once you learn the quirks

brittle yacht
slate turtle
#

question

#

is ts correct

#
--first played card is retriggered for every hand destroyed this ante
SMODS.Joker {
    -- How the code refers to the joker.
    key = 'laceration',
    atlas = 'JokersGrabBag',
    pos = { x = 0, y = 0 },
    rarity = "gb_boss",
    config = { extra = { repetitions = 1, repetitions_mod = 1}},
    cost = 7,
    blueprint_compat = false,
    perishable_compat = true,
    eternal_compat = true,
    demicoloncompat = true,
    discovered = true,
    unlocked = true,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.repetitions, card.ability.extra.repetitions_mod } }
    end,
    calculate = function(self, card, context)
        if context.remove_playing_cards and not context.blueprint then
            local destroyed_cards = 0
            for _, destroyed_cards in ipairs(context.removed) do
                destroyed_cards = destroyed_cards + 1 
            end
            if destroyed_cards > 0 then
                repetitions = repetitions_mod * destroyed_cards
            end
        end
        if context.repetition then
            return {
                repetitions = card.ability.extra.repetitions
            }
        end
        if context.ante_change then
            return{
                destroyed_cards = 1
            }
        end
    end,
}```
red flower
#

does it work

slate turtle
#

i dunno

#

havent even tested it yet

#

let me test it

#

brb

red flower
#

you should test before yes

slate turtle
#

oh and i should probably also give it a description beforehand

red flower
#

i can see that ante_change returns destroyed_cards tho and that's wrong

slate turtle
#

else it will just crash

slate turtle
red flower
#

a local variable will only exist for a single function call

#

you need to save the number to card.ability.extra.destroyed_cards

#

then reset that

slate turtle
#

so i just define destroyed_cards beforehand in the loc_vars?

red flower
#

yeah

#

in config

slate turtle
#
--first played card is retriggered for every hand destroyed this ante
SMODS.Joker {
    -- How the code refers to the joker.
    key = 'laceration',
    atlas = 'JokersGrabBag',
    pos = { x = 0, y = 0 },
    rarity = "gb_boss",
    config = { extra = { repetitions = 1, repetitions_mod = 1, destroyed_cards = 0}},
    cost = 7,
    blueprint_compat = false,
    perishable_compat = true,
    eternal_compat = true,
    demicoloncompat = true,
    discovered = true,
    unlocked = true,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.repetitions, card.ability.extra.repetitions_mod, card.ability.extra.destroyed_cards} }
    end,``` this better?
red flower
#

yes

slate turtle
#

wait do i need to define mod_path beforehand+

brittle yacht
slate turtle
#

fuuck

#

in case you need it heres the coed

rapid stag
#

i'm so flummoxed

#

do i just put it in an event and have it wait until G.pack_cards and G.pack_cards.cards and #G.pack_cards.cards > 0 before iterating over it

red flower
red flower
slate turtle
rapid stag
frosty rampart
#

yes, you don't need a loop at all
but the issue here that causes the crash is that you named one of the loop variables "destroyed_cards", which completely obliterated the counter that you also named "destroyed_cards". so it stopped being a counter and started referring to each card in context.removed

slate turtle
#

so i just change the variable

#

waiyt

#

am i just supposed to define another

frosty rampart
#
if context.remove_playing_cards and not context.blueprint then
  card.ability.extra.repetitions = card.ability.extra.repetitions_mod * #context.removed
end
...
#

#context.removed is the total number of elements in the table context.removed

#

so you don't need the loop at all

#

because lua will count it for you

slate turtle
#
if context.remove_playing_cards and not context.blueprint then
            local destroyed_cards = 0
            for _, destroyed_cards in ipairs(context.removed) do
                destroyed_cards = destroyed_cards + 1 
            end
            if context.remove_playing_cards and not context.blueprint then
                card.ability.extra.repetitions = card.ability.extra.repetitions_mod * #context.removed
                end
...
        end```
#

yeah no this is probably wrong

frosty rampart
#

you don't need the loop at all

slate turtle
#

if context.remove_playing_cards and not context.blueprint then
card.ability.extra.repetitions = card.ability.extra.repetitions_mod * #context.removed
end

#

?

#

also i noticed a couple of other problems

frosty rampart
slate turtle
#

yeah i figured that out

#

but now theres a couple of problems

#

1.- it retriggers every played card instead of just the first

#

2.- every time a card is destroyed it resets the amount of retrigger

#

but i think i can prob figure out how to solve 1.- on my own

#

yeah i think i solved 1.- on my own

#

yeah no i didnt solve 1.-

#
--first played card is retriggered for every hand destroyed this ante
SMODS.Joker {
    -- How the code refers to the joker.
    key = 'laceration',
    atlas = 'JokersGrabBag',
    pos = { x = 0, y = 0 },
    rarity = "gb_boss",
    config = { extra = { repetitions = 1, repetitions_mod = 1, destroyed_cards = 0}},
    loc_txt = {
        ['name'] = 'Laceration',
        ['text'] = {
            [1] = 'First played card gets retriggered #1# time(s)',
            [2] = 'Increases by 1 every card {C:red}destroyed{} this round.',
            [3] = 'Resets after each ante'
        },
        ['unlock'] = {
            [1] = 'Unlocked by default.'
        }
    },
    cost = 7,
    blueprint_compat = false,
    perishable_compat = true,
    eternal_compat = true,
    demicoloncompat = true,
    discovered = true,
    unlocked = true,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.repetitions, card.ability.extra.repetitions_mod, card.ability.extra.destroyed_cards} }
    end,
    calculate = function(self, card, context)
        if context.remove_playing_cards and not context.blueprint then
            card.ability.extra.repetitions = card.ability.extra.repetitions_mod * #context.removed
        end
        if context.repetition and context.cardarea == G.play and context.other_card == context.scoring_hand[1] then
            return {
                repetitions = card.ability.extra.repetitions
            }
        end
        if context.ante_change then
            return{
                destroyed_cards = 1
            }
        end
    end,
}```
fading rivet
rare minnow
#

Where can I find the code for the decks? Don't see it in vanilla remade or anything

red flower
#

they're called backs

rare minnow
#

thanks

normal crest
#

because they're the back of the cards get it

pastel dagger
#

asking this here because it might be the more appropiate channel, oops

rapid stag
#

anyone know a good way to get the count of all held jokers excluding negatives?

red flower
rapid stag
#

any that increase limits

red flower
rapid stag
#

isn't there a var that stores original initial limit - so do i do min between that and #G.jokers.cards

pastel dagger
red flower
rapid stag
#

right cirDerp

#

okay, maybe i'm approaching my problem wrong

red flower
#

hmm i think areas now have a real limit value

#

im trying to find it

#

G.jokers.config.card_limits.base?

#

or print card_limits and check which one it might be

rapid stag
#

base seems right

white zinc
#

codewise, what's the difference between a playing card's id and a playing card's value?

red flower
white zinc
#

gotcha. i want to do some rank addition for a joker idea i had, but i want all face cards to be worth 10 and aces to be 1. assuming rank treats the cards J-A as 11-14, i may have to use value and create a table/dictionary to assign a custom integer for each rank

#

but you're saying that there's no equivalent get_id() for values?

red flower
#

there isn't but you can use SMODS.has_no_rank and a bit of not caring about what wacky things other mods do to replicate it

#

but if you are only coding vanilla ranks i think ids and values are the same?

white zinc
#

doing get_id() on an ace would return 14, right?

red flower
#

yes

white zinc
#

ugh

#

unfortunate for me lol

red flower
#

card.base.nominal is closer since faces are 10s but aces are still 11

white zinc
#

i think i can work with that

#

thanks

pastel dagger
# red flower lovely patch that checks for the deck key

if i wanted to only enable the end of the round to restore hands but not discards, I'd have to replace the bit of code that refreshes discards on round end with a blank space and then patch G.GAME.current_round.discards_left = G.GAME.round_resets.discards into whatever part of the code increases the ante, do I have this right or am I using patches wrong here? (and would it have unintended side effects?) just want to make sure this will only affect the game while the deck is active. Apologies for the massive question, will wait a bit before sending this and no rush to reply

frosty rampart
#

(more specifically, card.base.nominal is how many chips that rank gives on its own)

red flower
#

wahh long ping

pastel dagger
#

im sorryy

red flower
pastel dagger
#

i think i can work from this, thanks for bothering to reply

dawn knoll
#

The crash logs say that at this specific line of code that there's an unexpected symbol at 'return'. Can someone help me with this?

#

also idk if im doing the info queue correctly or not

pastel dagger
#

what happens if two decks have the same order in game.lua? is there a way to make it so that my patch sets the deck to the highest order number + 1?

frosty rampart
#

order is automatically assigned by SMODS as the decks are created, it isn't manually set. there should never be two decks with the same order unless your patches are going in a very strange direction that you should probably re-evaluate

pastel dagger
#

ah, makes sense, so i wouldn't have to touch anything here right? just use SMODS.Back as usual

frosty rampart
#

correct

pastel dagger
#

uh how do i check which deck is currently active? im trying to ctrl f my way through finding which variable tracks that but i'm not finding anything somehow

#

ah, this?

frosty rampart
#

G.GAME.selected_back_key.key

pastel dagger
#

nifty, thanks

#

for clarification, do i replace both key with the deck key or just the one after the dot

red flower
#

G.GAME.selected_back_key.key == "b_modprefix_key"

pastel dagger
#

should have figured, thanks

red flower
pastel dagger
#

oooh useful!

#

will check tomorrow

white zinc
#

context.poker_hands doesn't return an integer or anything, right? if you wanted to check and see if a played poker hand was stronger than another poker hand, how would you go about that?

pastel dagger
#

im going to leave it here for tonight since i can feel my concentration reallly falling off, but this is my toml file and it currently does nothing, its on the lovely folder in my mod folder, unsure what i'm missing here but it might be obvious tomorrow? going to wait a bit to see if anyone notices some obvious stupid thing

daring fern
pastel dagger
#

to clarify, my intended effect is that the discards are not refreshed at end of round if my deck is currently active

white zinc
pastel dagger
white zinc
#

i'm probably missing something pretty obvious, but i can't get my joker to trigger when i test it. i'm probably missing something obvious but i've been troubleshooting for the past 20 minutes with no real progress. anybody able to take a look?

daring fern
white zinc
#

it's still not triggering

#

it seems that the poker hand var never changes

#

well part of that is cause i commented that out during troubleshooting

white zinc
#

actually lemme just send the file

#

oh wait wrong one

daring fern
# white zinc

card.ability.extra.poker_hand will never be High Card because context.scoring_name would have to be higher than Five of a Kind for card.ability.extra.poker_hand to change to it.

white zinc
#

do the higher poker hands have higher values or lower values?

#

i was assuming that five of a kind would have been the biggest number

daring fern
white zinc
#

ahhhh, well that was my error then

#

thank you

rare minnow
#

So my deck here won't work. Doesn't crash the game, just won't show up. What am I doing wrong?

whole lava
#

how can i make the vanilla deck unplayable?

narrow prawn
#

is there a way i can make a new popup menu

dim coyote
#

Hello, i've been working on all of this of deck skins, i've made some of them but i have no idea on how to turn them into a mod, could someone explain me if It isn't a Big deal? Thanks

gilded blaze
dim coyote
#

I dont understand It, but thanks

narrow prawn
#

been attempting to get ui to work and i keep getting this error message

#

neverind fixed it

frosty dock
#

you need to actually call the function

narrow prawn
#

is there a way i can apply the background effects of the arcana booster pack onto a ui object

dawn knoll
#

I'm trying to make a consumable that changes enhancements but in different lines of code it states there's and unexpected symbol near ',' or '}', specifically lines 85, 87, and 93. can someone help me with this?

#

code starts at line 54 btw

frosty dock
dawn knoll
frosty dock
#

further set_enhancement doesn't exist, it's set_ability and used different

dawn knoll
#

ohhhhhhh

#

well i have no idea how to use set_ability

frosty dock
#

you pass the center or just the key as a string (include the mod prefix!)

frosty dock
#

you should really install a lua extension so that it highlights errors for you

dawn knoll
keen totem
#

from what i know you just need the code to be public

fading rivet
narrow prawn
#

how can i cause music to play when you have a joker

naive coral
#

what is the sound for Xmult?

#

like its name

fading rivet
narrow prawn
#

yeah im trying it

#

but i cant figure out how

fading rivet
#

replace 100 with whatever priority you want

slate turtle
#
if next(SMODS.find_mod("GrabBag")) then
-- grab bag jokers go here
    NFS.load(mod_path .. "jokers/laceration.lua")()
    NFS.load(mod_path .. "jokers/sailboat.lua")() 
-- the line above is 167
end```
#

sailboat.lua exists.

#

why is it doing that.

#

it worked just fine for laceration.lua

mystic river
#

probably a syntax error in sailboat
also SMODS.load_file is preferred instead of NFS.load

slate turtle
mystic river
#
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.odds} }
    end,
    local new_numerator, new_denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.odds, 'j_wheeloffortune_sailboat') 
    return {vars = {card.ability.extra.destroyedcards, card.ability.extra.repetitions, new_numerator, new_denominator}}
    end,

yeah this would be it

slate turtle
#

thanks

narrow prawn
#

my booster pack isnt showing anything for the name

#

i may just be stupid though

whole lava
#

can i erase some vanilla deck?

tight hull
#

Hi, I want to change names of decks when I choose a certain texture with malverk, is it possible?
I have the function to change the name, but I dont know how to make it work with malverk

red flower
narrow prawn
#

ohhh

red flower
#

also you can delete the whole loc_vars in your case like it says in the other comment

slate turtle
#

question

#

how can i check if a card has a seal

fading rivet
#

this returns its ley

#

key

#

if you need the data do card.ability.seal

slate turtle
#

question is there a way to implement ^mult without talisman

narrow prawn
#

i hate tagss

knotty solstice
#

then copy

slate turtle
red flower