#💻・modding-dev

1 messages · Page 610 of 1

unkempt bronze
#

Do I put this in a box or it is good by itself?

daring fern
#

No, it's not, that's the name.

native bone
#

You are right, the key is sunplanet

solid salmon
#

hey

#

can i use this to modify other cards of various types

red flower
solid salmon
#

example

#

if i made it so it would change the mult and money of lucky cards

red flower
#

no

#

thats for modifying pools, no relation to that

#

you would use take ownership or patching

solid salmon
#

damn

solid salmon
#

(also while im at it how do i give lucky cards more variables and change its text)

copper perch
#

<@&1133519078540185692>

#

thank ya :)

#

-# sorry for the double ping, was gonna bump something and then that happened

#

Bump, because I'm still stuck. Sorry I keep doing this, I'm just lost

rapid stag
#

how do i create additional cardareas?

vale grove
#

how do i make a voucher that decreases boosterpack price?

native bone
vale grove
#

iam aware

#

but i do not know how to make something that changes the price of booster packs

#

and mayhaps someone here does

normal crest
#

you don't seem to have bird_active or bird_inactive anywhere in your localization file

daring fern
vale grove
#

thanks

copper perch
normal crest
copper perch
#

I'm just gonna try copying it again to see what I did wrong

normal crest
copper perch
normal crest
#

in your localization file, under misc and v_dictionary

native bone
#

I've been trying to get this to work, but it just doesnt for some reason. I dont know why. It should give me a Sol, but it has never triggered.

copper perch
#

Just blank for now so I know I have the right idea

normal crest
#

Yep, that's correct

copper perch
#

okay, and what would I specify the bird_active and bird_inactive so it would have the description like Loyalty Card?

normal crest
#

do you want the message to be the same as loyalty card

copper perch
#

Pretty much, yes

normal crest
#

cus if so, don't make a new one, just use the loyalty_active and loyalty_inactive keys

copper perch
#

Oh, and it should work with the variable used before?

normal crest
#

it will work just like loyalty card

copper perch
#

Nevermind, works! Thanks :)

split cairn
native bone
#

It is still not triggering

daring fern
native bone
#

Oh, that's what you meant

#

mb

daring fern
native bone
split cairn
daring fern
native bone
#

Yeah, I dunno why it should

daring fern
native bone
#

That would help

#

It did, thank you

daring fern
#

Is it possible for hands, discards, dollars, chips and mult to be treated as the same value?

native bone
#

My code works, just a little too well. I can still use a Sol card and get triggers from that.

normal crest
#

and I'd move the using_consumeable outside the parenthesis

native bone
#

Ah, that makes more sense now

#

It works, thanks

#

Also, I see that the Vanilla Remade wiki has something called quantum enhancements. What is that? Does that mean it is in some superposistion?

wind steppe
#

take lucky 7 from extra credit

native bone
#

I see now

wind steppe
#

itll roll the lucky card chances for each card and scale lucky cat if it triggerss

native bone
#

got it, makes sense

#

How do I check if a card has an specific enhancement? I tested the methods on the Vanilla Remade Wiki and for some reason it didnt work.

daring fern
mystic river
#

difficulty understanders, does this looks like a non-ridiculous alternate stake path?

  1. White Stake
  2. Scarlet Stake: Lose $0.5 per Ante past 2 when entering shop
  3. Irrigo Stake: Level down third hand played each round
  4. Void Stake: Jokers can have Counterfeit sticker (sell value locked to $0)
  5. Sky Stake: Showdown Blinds appear twice as frequently
  6. Mint Stake: -1 Chip and -1 Mult per ante for each card scored
  7. Tungsten Stake: Selection limit 1 for first hand or discard each round
  8. #CA7CA7 Stake: +1 Win Ante
  9. Rose Gold Stake: Applies both #CA7CA7 Stake and Gold Stake
#

-# oh ffs discord, let me zero index my lists.

wind steppe
#

mint stake feels like that for five card hands

#

two pair on top 🔥

jade scarab
#

i wouldn't mind that as much but then mint stake says fuck you to every build other than pair and high card

wind steppe
#

also is there any benefit to extra selection limit on hands beyond scoring an additional card

mystic river
#

ThinkRingo on the one hand i do want to balance vanilla's tendency toward spamming small hands
on the other, i'd prefer to do this by rewarding large hands

frosty rampart
#

counterfeit sticker is cool
i feel like sky stake's been done before but it's not really a bad thing
tungsten stake feels like it'd be better as a boss blind

jade scarab
#

i think tungsten sets the limit to 1

wind steppe
#

oh yeah right im stupid

mystic river
#

sky stake has definitely been done, it's a common suggestion for a rework of blue

wind steppe
#

tungsten does feel very boss blind like then

#

maybe 2 instead of 1

jade scarab
#

i think -1 mult and chips per unscored card would be a better idea

wind steppe
frosty rampart
#

tbh mint stake feels boss blind-esque too

wind steppe
#

unless you have phanta ig

jade scarab
#

tbh yeah

#

at most it'd make it so pair builds can't access blue seals as often

wind steppe
frosty rampart
umbral zodiac
wind steppe
#

tungsten feels fine if it was 2 cards

heady flume
wind steppe
#

mint is not great though

wind steppe
mystic river
#

tungsten is meant to amount to "lose a hand or a discard but you get to decide which"
maybe a bit much, nobody likes blue stake after all

wind steppe
#

also Rose Gold is hell because irrigo + blue

#

and tungsten

frosty rampart
# wind steppe tungsten feels fine if it was 2 cards

balance sure, but i don't think it feels like a stake
stakes have very passive effects in vanilla, making something directly affect scoring like mint or only apply for the first something for a round isn't that

jade scarab
#

does rose gold apply all of the default stakes

mystic river
#

rose gold is probably gonna be hell regardless
16 stakes worth of stake

mystic river
frosty rampart
wind steppe
jade scarab
#

that sounds horrible on every deck other than yellow

mystic river
#

🥩

wind steppe
#

i think theyre not necessarily meant to be vanilla feeling stakes

#

if they are id suggest a couple reworks though

frosty rampart
#

yea fair

#

<@&1133519078540185692>

karmic creek
#

hello

frosty rampart
#

thanks mods 💖

native bone
#

I cant seem to get the Light cards to retrigger, they are the Cryptid Light cards. I dont know why this is happening, especially since I have made other retriggering Jokers that do the same thing.

heady flume
#

Im using chat gpt to help a bit, and im wondering if
"if context.joker_main then
return {
xmult = card.ability.extra.xmult * stickercheck() + 1,
}
end"
has to be changed in Revo's mod? Its saying that the call may of changed names or is handled differently.

wind steppe
#

pinned message

daring fern
frosty rampart
#

even the pinned message aside, chatgpt is not helpful

wind steppe
#

i dont think we can convince them of that

native bone
#

I tried that, you can preempt it with a question if it knows that it exists, which it actually does, then you ask it to code in Lua + the steammodded keys, and that is actually how I got a Joker to work.

#

TLDR: Yes, yes you can

heady flume
#

ok besides the fact i have no experience or help. can i get some help?

wind steppe
#

how much time did you waste over doing it normally

frosty rampart
wind steppe
#

standard procedure for when a mod that's not yours crashes

frosty rampart
wind steppe
#

yeah you're lucky i was around when your game crashed

heady flume
#

wow hostile environment. i just want to play my game. i reported it to Revo, and i just wanted some pointer if i could get it to work on my own.

wind steppe
#

then Don't Use AI

heady flume
#

i didnt know

mystic river
wind steppe
#

in this case the crash the line of code and wherever stickercheck is defined

#

or if it isnt say that

copper perch
#

Pinned things are always important, check those in every server and channel on Discord. Theres normally something is all I can say

#

How would I spawn in a vanilla joker with a modded joker? 1. I'm unsure how to spawn a joker from another, and 2. I know you can use j_prefix_key for modded, but vanilla I'm unsure

native bone
copper perch
#

Got it, thank you

mystic river
#

best way to find a vanilla joker's key is to search en-us.lua in the vanilla source

copper perch
#

Got it, and then how would I spawn a Joker into the Jokers lineup?

native bone
#

This is not working for some reason, I cant get it to retrigger the Cryptid Light Cards. Im going to look like I just had chemo from the amount of hair pulling that is happening

daring fern
daring fern
vernal seal
#

bump because i want to know,
what is the value that handle the if it's the fist most used joker,second most used joker,third most used joker and ecc...

native bone
daring fern
native bone
#

Oh, okay, I get it now. I'll try that

#

It works, thank you

split acorn
#

hello, really simple question

#

when a joker is triggered in balatro, like when you have the heart joker and play a hear card, the joker does a little animation

#

how can i add that animation to my jokers?

frosty rampart
#

when a joker returns something in a calculate function, and that something has a message (either by default or by adding a message to the return manually), then it will have the animation
if you need the animation to happen outside of a return (e.g. you need it to animate multiple times), you can call SMODS.calculate_effect(card, {...}) where the curly braces are the same as what you'd return in a calculate function

split acorn
#

what message do i add to get the default shaking animation?

frosty rampart
#

doesn't matter, smods applies it

rigid pebble
#

for good reason

#

I despise ai with a burning passion

frosty rampart
split acorn
#

you're being really helpful but i'm not sure i understand ;-;

frosty rampart
#

what is your goal

rigid pebble
split acorn
#

when a joker is trigged, i want to play the standard animation for jokers getting trigger (eg lusty joker when you play a heart card)

frosty rampart
#

you don't need to worry about it

#

just code your joker and forget about the animation

split acorn
#

i did

frosty rampart
#

it'll either happen naturally, or you just have to add message = "something" to the return table

#

("something" being the text that will display when it triggers)

split acorn
#

it's not happening naturally, can i add an empty message to get the animation?

#

cuz like the joker is currently staying still when its triggered, and i rly like the animation

daring fern
frosty rampart
split acorn
#

ohhh

#

cool

#

thanks :3

heady flume
rigid pebble
#

seu pai ahh

split saddle
#

how do you check for played unscored cards?

daring fern
split saddle
#

thanks

#

i'm still confused as to why i can't add reactions to anything :(

daring fern
split saddle
#

where?

vernal seal
daring fern
split saddle
#

thanks

daring fern
copper perch
#

So I found how to create a Joker, but it just spawns it in on the screen...doesn't add it to my Jokers.

if math.random() < 1/15 then
        create_card("Joker", G.jokers, nil, nil, nil, nil, "j_cavendish")
else
        create_card("Joker", G.jokers, nil, nil, nil, nil, "j_gros_michel")
end
copper perch
#

oh, thanks

vernal seal
copper perch
daring fern
copper perch
#

alrighty, thank you

split saddle
#

i guess if you were to check urself, it would be full hand - scoring hand

split saddle
daring fern
split saddle
#

yeah that's what i thought

#

thanks 👍

vernal seal
daring fern
vernal seal
vernal seal
vernal seal
tepid crow
#

I'm not helping if the code is formatted like that man

#

also it looks weirdly like python? 🤔

split saddle
#

ik i'm doing something wrong but idk what is it

#

(this snippet doesn't run)

frosty rampart
#

i don't think context.before has unscored as a cardarea

tepid crow
#

^ that'd be my guess too but you'll want to confirm that by printing

frosty rampart
#

i mean yea they have a print already

split saddle
#

print(context.before)?

vernal seal
tepid crow
daring fern
#

You need to iterate over context.full_hand like I said.

tepid crow
vernal seal
#

@tepid crow this why i done that

tepid crow
#

Ah

#

you should start with an empty table all_most_used_jokers = {}, then insert into it, then sort

#

like the example Something gave, though you'll probably need to insert every joker since you're looking for the 5th biggest 🤔

split saddle
#

i missed a negation but yeah

tepid crow
#

First insert, then sort. You're sorting, and not inserting

#

(the used_cards[#used_cards + 1] = ... in something's code is the insertion part)

daring fern
tepid crow
#

Insert in the for loop. Otherwise k and v don't mean anything

#

instead of the temp_count, that's not gonna help you here unfortunately

vernal seal
tepid crow
#

with the insertion

vernal seal
tepid crow
#

No, within the if statement

vernal seal
vernal seal
tepid crow
vernal seal
tepid crow
#

But change it to +1 instead of +5 (we're simply appending/adding to the end of the table, +5 wouldn't really mean anything)

#

And move to sorting so that it's below the for loop insertion

#

And remove the v.count > all_most_used_jokers comparison since that doesn't mean anything

tepid crow
#

Sort after the entire for loop. Don't sort in the for loop. It would technically work, but you're wasting a lot of compute

jade scarab
#

is it common to set parameters like blueprint compatibility and sticker compatibility if they're going to be default anyways

tepid crow
jade scarab
#

ic

tepid crow
#

yeah that's pretty good

#

but you're returning the whole (sorted) table now, you wanted a specific one right

vernal seal
tepid crow
#

you know how to get that one?

vernal seal
tepid crow
#

👍

#

now what do you want with the 5th most used joker? give money for the amount of times it's been used? how much the 5th used joker costs?

vernal seal
tepid crow
#

okay

tepid crow
#

so how do you return the amount of times it's been used?

vernal seal
vernal seal
tepid crow
#

I understand. I'm asking you if you know how to get it from the table entry

vernal seal
tepid crow
#

you don't know how to index a table in lua?

jade scarab
#

oh i see what happened

vernal seal
tepid crow
tepid crow
#

Nice job on the dollars =. But you're still just returning the entry of the 5th most used joker, not the amount of times the joker has been used

#

Do you understand what I mean when I say "entry"?

vernal seal
tepid crow
#

But do you know what that entry actually looks like in code?

jade scarab
#

this is what i get for being too lazy to fully read documentation

tepid crow
#

Close! More like {count = 12, key = "j_why_do_i_exist"}

#

so do you know how to get the count out of the table?

vernal seal
tepid crow
jade scarab
tepid crow
#

it should 👍

vernal seal
tepid crow
#

I did not

vernal seal
charred widget
#

Hi friends. I've managed to get an xmult joker working by myself, but the xmult value in the description just says Xnil. Can someone take a peek in my code and try and help me find what I missed?

#

Also it might look like spaghetticode but hey

daring fern
charred widget
#

oh duh

#

thank you as always, somethingcom515.

copper perch
#

Making a Joker that calculates the number of Gros Michels and Cavendishes being held in hand and some math seems to be going wrong. Any pointers what I could do?

if context.joker_main then
  card.ability.xmult = card.ability.xmult + ( #SMODS.find_card("j_gros_michel") + #SMODS.find_card("j_cavendish") ) * card.ability.xmult_gain
jade scarab
#

check baseball card's code in vanillaremade's repo

copper perch
#

When I had only 3 Michels it was at x2.5 I believe, my xmult_gain was 0.25x

red flower
#

and you want it to give 1.75?

copper perch
#

correct

#

I think I figured out it was possibly because the variables were not marked as extra

vale zinc
#

Where and how in Balatro's code is G.PROFILES[G.SETTINGS.profile].career_stats.c_single_hand_round_streak incremented?

red flower
vale zinc
#

I ran a recursive file-searcher program and it said it only appeared in game.lua, functions/common_events.lua and functions/state_events.lua. But nothing in those files told me how it went down.

red flower
#

what do you need to know that's not there

vale zinc
red flower
#

that's the inc_career_stat part

#

it literally checks if there's only 1 hand played

vale zinc
#

Understood.

unkempt bronze
#

Hmm. Anyone know where a list of G.FUNCS. is?

copper perch
cerulean rose
copper perch
#

I feel my card is a bit unorganized...also trying to figure out why the xmult isn't working properly (does not update live or calculate properly), where the place to return my xmult is, and how to have the messages for when a joker is added pop up sooner (normally wouldn't send everything, but this time its all important)

#
config = {
    extra = {
        xmult_gain = 0.5,
        xmult = 1,
        every = 1,
        cooking_process = 1
    }
},
loc_vars = function(self, info_queue, card)
         return {
                vars = {
                       card.ability.extra.xmult_gain,
               card.ability.extra.xmult,
                       card.ability.extra.every + 1,
                       localize { type = 'variable', key = (card.ability.extra.cooking_process == 0 and 'loyalty_active' or 'loyalty_inactive'), vars = { card.ability.extra.cooking_process } }
            }
        }
    end,
        calculate = function(self, card, context)
        if context.joker_main then
            card.ability.extra.xmult = card.ability.extra.xmult + ( #SMODS.find_card("j_gros_michel") + #SMODS.find_card("j_cavendish") * card.ability.extra.xmult_gain )
            card.ability.extra.cooking_process = (card.ability.extra.every - 1 - (G.GAME.hands_played - card.ability.hands_played_at_create)) %
                (card.ability.extra.every + 1)
            
            if not context.blueprint then
                if card.ability.extra.cooking_process == 0 then
                    local eval = function(card) return card.ability.extra.cooking_process == 0 and not G.RESET_JIGGLES end
                    juice_card_until(card, eval, true)
                end
            end
            if card.ability.extra.cooking_process == card.ability.extra.every and #G.jokers.cards <= G.jokers.config.card_limit and not context.blueprint then
                if math.random() < 1/15 then
                    SMODS.add_card ( {key = "j_cavendish" } )
                    return {
                        message = 'Potassium.', colour = G.C.YELLOW
                    }
                else
                    SMODS.add_card ( {key = "j_gros_michel" } )
                    return {
                        message = 'Order up!', colour = G.C.YELLOW
                    }
cerulean rose
#

doesnt't look like your calculate ever returns anything

final goblet
#

hiiiiii gang...

#

anyone know how to do the hyperop thing

#

i need it for my mod (fallout)

#

also gimme 1s

copper perch
cerulean rose
copper perch
#

All good :)

final goblet
#

i KNOW lol

#

thats what im using!!!

copper perch
#

So something I'm confused about...how 2 version of my code word work. 1 works correctly and 1 doesn't, and I do not understand why.

-- Works (goes up by 0.1 per card destroyed)
if context.remove_playing_cards and not context.blueprint then
      if destroyed_cards > 0 then
            card.ability.extra.xmult = card.ability.extra.xmult + destroyed_cards * card.ability.extra.xmult_gain

-- Doesn't Work (goes up by 1 per Cavendish/Gros Michel when wanted 0.5 and triggers consistantly, always going up even when one doesn't spawn)
if context.joker_main then
      card.ability.extra.xmult = card.ability.extra.xmult + ( #SMODS.find_card("j_gros_michel") + #SMODS.find_card("j_cavendish") * card.ability.extra.xmult_gain )
woeful basin
#

Something weird just broke, I'm getting a love2d traceback instead of the balatro traceback and despite saying it's disabling my mods restarting doesn't fix it.

#

I'm not sure what caused it but disabling all my mods, starting the game then restarting it with all my mods reenabled fixed it

mystic river
queen crescent
#

multiplication will always go before addition

#

×, ÷, +, - is the order

copper perch
#

when I had xmult_gain outside the parenthesis it still didn't function correctly

queen crescent
#

you may want to add a bracket

copper perch
#

Okay, so I got it to work, goes up as it needs to. My issue now is that it just continuously goes up by 0.5 when theres a Michel/Cavendish when I want it to only once per

slim ferry
# final goblet i KNOW lol

for the return values its
eemult/eechips = ^^
eeemult/eeechips = ^^^
hypermult/hyperchips = returned as a table of two values where {x, y} represents {x}y

queen crescent
maiden phoenix
plain apex
#

would it be possible to get whenever the music changes?

lavish elm
#

how to choose a random card in deck

daring fern
violet void
#

does smods have is_rank yet?

wintry solar
#

No

solid salmon
#

hi eremel

long sun
#

is G.C.ORANGE used for {C:attention}?

solid salmon
#

G.C.FILTER

long sun
#

grand, thanks

#

unsure why JokerDisplay is using it then

#

strange

violet void
# wintry solar No

another question, if I have a new enhancement that can shatter like glass does, is there a simple way to implement it other than lovely patching every instance where 'Glass Card' is checked?

wintry solar
red flower
#

i also use different colors from the descriptions for other things

long sun
#

ah i see :3

lavish elm
#

why does this happen

#
for i=#cardtable, 1, -1 do
local card = cardtable[i]
if card:get_id() ~= random_rank or not card:is_suit(random_suit) then
    card:remove()
else
for i = 0, 5 do
    local copied_card = copy_card(card, nil, nil, nil,nil)
    copied_card:start_materialize()
    copied_card:add_to_deck()
    G.deck:emplace(copied_card)
end
quick scarab
#

Question, how do I make this option toggled on by default?

#
FNAF = SMODS.current_mod
FNAF.save_config = function(self)
    SMODS.save_mod_config(self)
end

local config = SMODS.current_mod.config
SMODS.current_mod.config_tab = function()

    local voice_toggle = create_toggle({
        label = localize('fnaf_va'),
        ref_table = FNAF.config,
        ref_value = 'voices', -- what var does this button match
        callback = function()
            FNAF:save_config()
        end
    })

    return {
        n = G.UIT.ROOT, 
        config = {
            r = 0.15 , 
            minw = 8 , 
            minh = 6 , 
            align = "cm", 
            padding = 0.1 , 
            colour = G.C.BLACK  -- this will define the background of the menu
        }, 
        nodes = {
            voice_toggle, -- the option itself
        }
    }

end


#
return {
    voices = true,
}
#

also while I'm at it, how do I use this config on the mod itself, I have voicelines that play if a card is triggred but I dont know how I disable them

#

like what kind of var or function that I call to check if this setting is on or off?

red flower
quick scarab
red flower
#

it would be if FNAF.config.voices then

quick scarab
#

also damn you need to at least link the stuff about the UI Guide on the SMODS section on the VanillaRemade Wiki so people at the very least have a ideia how where to start, while you still make a tutorial about a config page

lavish elm
red flower
charred widget
#

Hi friends! I've come to you with a bit of an ambitious idea today

#

So you know how Oops! All 6s doubles listed probabilities

#

Well I want a joker that doubles listed chip / mult values

#

which I don't know how to do

elder rune
shell timber
elder rune
#

lemme find that

shell timber
#

doubling chips and mult will be much harder

charred widget
#

thats what i expect

ionic cobalt
#

atleast listed chips and mult because you would somehow have to differentiate them from regular values

#

just doubling the effects would be easier

elder rune
#

This is what I did (mult only rn)

shell timber
#

That's horrible

elder rune
#

ik

ionic cobalt
#

its ok i will name my variables horribly so it breaks

#

card.ability.extra.markiplier

elder rune
#

Doesn't work for a lot of vanilla jokers but idk how else to do that back then

slim ferry
charred widget
#

mods

#

immolate his balls

elder rune
#

mods

#

twist his head

#

thanks mods

charred widget
#

thank you mods :3

slim ferry
# charred widget i can go for that
manipulate_ret = function(table, mod) -- multiplies values in a table by `mod`. plug context.other_ret.jokers into `table` in context.post_trigger
    for k, v in pairs(table) do
        if type(table[k]) == "number" and (k == "mult" or k == "chips" or k == "chip_mod" or k == "mult_mod" or k == "h_chips" or k == "h_mult") then --this is only +mult/chips, but you can expand this to allow other calculation keys
            table[k] = table[k] * mod
        elseif type(v) == "table" and not v.area and not v.config then
            manipulate_ret(v, mod)
        end
    end
end
``` modified function from my own mod, this should work
daring fern
slim ferry
#

ah right

charred widget
#

something i forgot to mention

#

the joker increasing chips and the joker increasing mult are seperate

charred widget
#

Because they're part of a pair

#

it's Groudon and Kyogre

elder rune
charred widget
#

AGAIN?

elder rune
#

twist his balls

red flower
#

<@&1133519078540185692>

charred widget
#

mods

slim ferry
charred widget
#

thank you mods

tepid crow
#

mods would it be interesting to automatically check the URLs of the images posted?

slim ferry
#

theyre just webp attachments as seen at the top of the messages

tepid crow
#

No they're a URL

slim ferry
#

so probably not very

#

oh ok

#

but its image1.webp, image2.webp etc

#

that doesnt sound extremely interesting

elder rune
#

fire names

#

wheres image.png

tepid crow
#

well they're not linked to discord.com/images/image1.webp, but rather discord.com/images/dkfajsladfjasklfjd134.webp or whatever

#

again, I have no idea if that's something the mods can even check

#

but if it's possible then it would be very helpful

slim ferry
#

i mean the best you could do is report whatever website they link to in some places

elder rune
#

automod specifically for those images

tepid crow
slim ferry
#

theres more than 1 set

charred widget
slim ferry
#

they always have some slightly different images

tepid crow
#

oh really? from every quick glance I've had at them they've always looked exactly the same

slim ferry
# charred widget alright, can you break down exactly what this function is doing?

it loops over all of the values in a table (in this use case context.other_ret.jokers which is the calculation result of the context.post_trigger joker). if it encounters a number, it checks if it has one of the keys that should be modifies it, and does so if true (table[k] is used instead of v because v is not tied to the value in the table directly). if it encounters a table, e.g. the extra table that can be returned in jokers, it'll check if the table is not a card (this prevents infinite loops and unintended effects), and if it isnt, calls the function itself again on that table, allowing it to recursively go through any number of subtables

charred widget
slim ferry
#

yeah the mod value determines what to multiply by

#

so you would put in 1.5 as the second argument to multiply by 1.5

charred widget
#

and would this function apply to all mult values?

#

or do I need to put in more calculation keys?

elder rune
#

talisman adds more calculation keys right

slim ferry
#

the one i gave applies to all +chips and +mult, but you can modify what values get modified by changing the long string of k == "mult" or k == "chips" or ... to check other values. image has all of the calculation keys that can be used so use that as a reference

elder rune
#

so it'd also be the emult, eemult etc. if you want this to be compatible with as much as possible

slim ferry
#

i mean talisman adds like 16 new keys

#

which is. a lot

elder rune
#

or also just check for mult or chips like Eris said

slim ferry
#

you could also check string.find(k, "mult") as a more automated approach, which will just affect anything with a key containing mult

charred widget
#

that seems more efficient

#

because i'm looking to modify flat mult and xmult values

elder rune
#

yeah it is but some stuff can slip by but there aint much you could do about that

charred widget
#

true i suppose

slim ferry
#

i mean i cant think of any mod that adds calculation keys containing mult that dont affect mult

elder rune
#

I will addd a calculation key that contains mult that doesnt affect mult so there exists one

slim ferry
#

well its like 6 because hypermult and hypermult_mod are tables ig

#

actually hold on

#

ill make a bit better version of the function because it forgets one thing currently

#

which was really funny when i accidentally did it

plain apex
slim ferry
# slim ferry ill make a bit better version of the function because it forgets one thing curre...
manipulate_ret = function(table, mod) -- multiplies values in a table by `mod`. plug context.other_ret.jokers into `table` in context.post_trigger
    for k, v in pairs(table) do
        if type(table[k]) == "number" and type(k) == "string" and k ~= 1 and string.find(k, "mult") then --can be changed to `chip` for chips
            table[k] = table[k] * mod
        elseif type(v) == "table" and not v.area and not v.config and k ~= "colour" then
            manipulate_ret(v, mod)
        end
    end
end
elder rune
#

what has 1 done bro

slim ferry
#

hypermult and hyperchips hyperoperators are at index

#

1

#

wait

charred widget
#

1 is in the Crime Box for their transgressions

elder rune
#

someone bailed out 1 just for them to get captured and put into another jail

plain apex
slim ferry
elder rune
plain apex
#

idk i haven't played hot potato

elder rune
slim ferry
plain apex
charred widget
#

well as long as it's not breaking anything I won't remove it

#

well i'll see how it goes and i'll report back with my findings

#

not working

elder rune
#

show code

charred widget
elder rune
#

is it an error or just doesnt work

charred widget
#

no error

slim ferry
#

you need to create the function outside the joker

charred widget
#

o

slim ferry
#

to use in calculate

charred widget
#

so where would i put it?

#

sorry im a little confused

slim ferry
#

since its just a utility function you could probably just put it in the main file

#

its relatively simple

clever wasp
#

how can i get the cryplib instaled on my pc?

clever wasp
#

can i just download this, extract and put on my mod files?

slim ferry
#

yes

plain apex
charred widget
#

ok

#

problem

#

so we have Groudon modifying mult values by 1.5x

#

I also have Primal Groudon in my mod

#

and you can transform groudon mid run

#

and I want it to do the same to a larger degree

#

like 2 or 3x

#

how would I differentiate the functions for them to use?

slim ferry
#

well you can just use the same function but put in a different number than 1.5

charred widget
#

but there will be multiple of the same function in main.lua

#

how will we differentiate them?

slim ferry
#

no like

elder rune
#

the mod

slim ferry
#

the joker uses the function and puts in a number to multiply by

#

so you can just put in another value

charred widget
#

oh

#

so i've implemented the manipulate_ret function into main.lua

#

how can i get Groudon to retrieve this information?

slim ferry
#
if context.post_trigger and not context.blueprint then
    local other_ret = context.other_ret.jokers or {}
    manipulate_ret(other_ret, 1.5)
end
``` this should work on any joker
#

you also might want to rename the function to something else since it only affects mult

#

and youre going to have one affecting chips too presumably

charred widget
#

yes indeedy

slim ferry
charred widget
#

so I can change manipulate_ret to something like "maniupulate_mult"?

slim ferry
#

yeah

#

just be sure to also change it at the part where the function calls itself

slim ferry
#

so theres less chance of interfering with other stuff

charred widget
#

something like manipulate_mult_esz

slim ferry
#

yeah

charred widget
#

to distinguish it

#

and now in order to recall this information using groudon, i just use a calculate = function, right?

slim ferry
#

yeah

charred widget
#

brilliant

slim ferry
charred widget
#

yeah i got that

#

i'll see how it goes

slim ferry
#

also actually i probably shouldve said this earlier but context.post_trigger does not calculate for playing cards as of now, so stuff like mult cards will be unaffected

wintry solar
#

"as of now"

#

implying it ever will

slim ferry
#

well idk if it will

#

and it would be pretty nice to have that because of the small use case of manipulating return values

charred widget
#

ok

#

not working

#

no error

#

just non functional

slim ferry
#

what are you testing with

charred widget
#

abstract joker

#

just flat mult

slim ferry
#

i know some jokers have their messages hardcoded to always say the same value

elder rune
#

are you sure its flat mult

charred widget
#

that's what it advertises

slim ferry
#

im pretty sure scholar does properly display the mult changes

charred widget
#

ok so i only have abstract and groudon

#

but it's only giving me +6 mult

#

when it should be giving me +9 mult

slim ferry
#

is the mult counter also only going up by 6

charred widget
#

abstract joker gains mult based on the jokers you own

slim ferry
#

yeah

#

but like

#

on the left of the screen

frosty rampart
#

watch the actual mult UI on the left of the screen and not just the message that abstract joker gives you

slim ferry
#

does playing a high card end up with 7 mult or 10 mult

charred widget
#

7 mult

slim ferry
#

hm...........................

#

try replacing string.find(k, "mult") in the function with string.find(k:lower(), mult) and see if that changes anything

#

idk if it will but maybe

#

or maybe just try some other jokers because maybe abstract is just wierd

#

i know stone joker either doesnt work or doesnt display properly with this either

plain apex
charred widget
#

also tried it with droll joker

#

still not working

slim ferry
#

actually wait

#

check your main file

#

is post_trigger enabled

charred widget
#

there is only one mention of post_trigger in the entire main file

#

so i dont believe so

slim ferry
#

you should have an SMODS.current_mod.optional_features somewhere in the main file

#

if its enabled

charred widget
#

ok ill brb

wild berry
#

how can i check if a card that is being scored is debuffed

daring fern
wild berry
#

oh

wintry solar
#

you can make them score if you need to

wild berry
#

i dont need to

#

how can i check if a card is scored in G.play.cards

wintry solar
#

where are you trying to do this?

wild berry
#

through a joker

#

context.joker_main

wintry solar
#

do SMODS.in_scoring(G.play.cards[X], context.scoring_hand)

wild berry
#

kthanks

wintry solar
#

though you can also just look at the cards in context.scoring_hand

wild berry
#

do debuffed cards also appear therte

#

there*

umbral spire
#

how do you use the default game sprites/atlases

#

say for a blind

hardy viper
wild berry
#

next update we will have SMODS.generate_mod()

charred widget
slim ferry
#

anywhere

#

it works as long as it runs

shell timber
umbral spire
slim ferry
#

SMODS.pinkprint_effect when

hardy viper
#

seu pai wannabes

wintry solar
#

8 month old function btw 🙃

charred widget
#

still not functioning

slim ferry
#

what does the code look like

#

for optional features

charred widget
slim ferry
#

alr

#

you should probably remove all the things other than post_trigger but other than that it seems to be correct

charred widget
#

true

slim ferry
#

what does the code for groudon look like

charred widget
slim ferry
#

hm

slim ferry
slim ferry
#

iirc

red flower
#

if you want to use the default atlas for the same type of object you're making then you can just omit an atlas

charred widget
slim ferry
#

no like the manipulate function

charred widget
#

oh

slim ferry
#

mult should be a string

charred widget
#

ah

slim ferry
#

that should solve it at least though

charred widget
#

ok its actually working now

wintry solar
#

you should probably change the mult in that function to be a value you pass into the function so you can reuse it for chips rather than creating an almost identical one

slim ferry
#

thats a good point

charred widget
#

yeah that was what i was worried about

slim ferry
#

just add like a third argument and put that into string.find in place of "mult"

charred widget
#

i didnt want to have to make a bunch of different manip functions

#

then again it would only be two different functions, one for chips and one for mult

#

the math is just different between base and primal forms

#

and they do that by themselves

violet void
slim ferry
#

use context.main_scoring instead of before

quick scarab
#

Ok so the backgound is black for some reason

#
G.C.BGCOLOUR1 = G.C.YELLOW
G.C.BGCOLOUR2 = G.C.PINK

local game_main_menu_ref = Game.main_menu
function Game:main_menu(change_context)
    local ret = game_main_menu_ref(self, change_context)

    G.SPLASH_BACK:define_draw_steps({
        shader = "splash",
        send = {
            {name = 'time', ref_table = G.TIMERS, ref_value = 'REAL'},
            {name = 'vort_speed', val = 0.4},
            {name = 'colour_1', ref_table = G.C, ref_value = 'BGCOLOUR1'},
            {name = 'colour_2', ref_table = G.C, ref_value = 'BGCOLOUR2'},
        },
    })

    return ret
end
slim ferry
#

G.C.PINK does not exist

#

unless you defined it

quick scarab
#

oh yeah I forgot

charred widget
#

Hi folks, back again

#

So the Fool creates the last used Tarot/planet yeah

#

How would I go about creating the last used consumable

civic solstice
#

i assume this setup for my joker here would allow the promt to work right

copper perch
#

Making a joker that calculates the number of Gros Michels/Cavendishes. At the moment, when one banana is there it adds my xmult_gain as mult every hand scored. I'd want the number to update in real time (like Swashbuckler for example), and need it to detect when one is sold or goes extinct.

calculate = function(self, card, context)
        if context.joker_main then
            card.ability.extra.xmult = card.ability.extra.xmult + ( #SMODS.find_card("j_gros_michel") + #SMODS.find_card("j_cavendish") ) * card.ability.extra.xmult_gain
            if card.ability.extra.xmult > 1  then
                return {
                    xmult = card.ability.extra.xmult
                }
            end
jolly shadow
#

then it wont scale, will just update to the amt of banana

red flower
copper perch
red flower
#

what same thing

copper perch
#

It seems to count a joker again and again every time a hand is scored

red flower
#

you don't need to update card.ability.extra.xmult

#

if you need the number for the description recalculate it in loc_vars

#

check how vanillaremade jokers do it

copper perch
#

Got it, the card does have a few other issues though

#

But thats 1 of 3 at least

#

Those issues being below.
Issue 1 is when 1 banana spawns it stops making them all together, even when only 2 Joker slots are taken up (1 by the original Joker). 'Issue' 2 is that I want the messages to appear sooner, so when the banana spawns it says the message and not when scoring

            if card.ability.extra.cooking_process == card.ability.extra.every and #G.jokers.cards < G.jokers.config.card_limit and not context.blueprint then
                if math.random() < 1/15 then
                    SMODS.add_card ( {key = "j_cavendish" } )
                    return {
                        message = 'Potassium.', colour = G.C.YELLOW
                    }
                else
                    SMODS.add_card ( {key = "j_gros_michel" } )
                    return {
                        message = 'Order up!', colour = G.C.YELLOW
                    }
red flower
copper perch
red flower
#

oh also I just noticed. don't use math.random()

#

use SMODS.pseudorandom_probability

civic solstice
copper perch
# red flower sorry I don't get it

Forgot the every wasn't shown...so here's just the whole calculate as it is now. Also meant when cooking_process is 0 so thats my bad

    calculate = function(self, card, context)
        if context.joker_main then
            card.ability.extra.cooking_process = (card.ability.extra.every - 1 - (G.GAME.hands_played - card.ability.hands_played_at_create)) % (card.ability.extra.every + 1)
            card.ability.extra.xmult = 1 + ( #SMODS.find_card("j_gros_michel") + #SMODS.find_card("j_cavendish") ) * card.ability.extra.xmult_gain
            if card.ability.extra.xmult > 1  then
                return {
                    xmult = card.ability.extra.xmult
                }
            end
            if not context.blueprint then
                if card.ability.extra.cooking_process == 0 then
                    local eval = function(card) return card.ability.extra.cooking_process == 0 and not G.RESET_JIGGLES end
                    juice_card_until(card, eval, true)
                end
            end
            if card.ability.extra.cooking_process == card.ability.extra.every and #G.jokers.cards < G.jokers.config.card_limit and not context.blueprint then
                if SMODS.pseudorandom_probability < 1/15 then
                    SMODS.add_card ( {key = "j_cavendish" } )
                    return {
                        message = 'Potassium.', colour = G.C.YELLOW
                    }
                else
                    SMODS.add_card ( {key = "j_gros_michel" } )
                    return {
                        message = 'Order up!', colour = G.C.YELLOW
                    }
                end
            end
        end
    end
red flower
copper perch
# red flower use SMODS.pseudorandom_probability

Also, updated. Just dont know what I'd put in place of the "Dina"s I have (thats my card's key)

            if card.ability.extra.cooking_process == card.ability.extra.every and #G.jokers.cards < G.jokers.config.card_limit and not context.blueprint then
                if SMODS.pseudorandom_probability(card, "Dina", 1, card.ability.odds, "Dina") then
                    SMODS.add_card ( {key = "j_cavendish" } )
                    return {
                        message = 'Potassium.', colour = G.C.YELLOW
                    }
                else
                    SMODS.add_card ( {key = "j_gros_michel" } )
                    return {
                        message = 'Order up!', colour = G.C.YELLOW
                    }
red flower
long sun
#

my Joker is triggering on repetitions and at the end of the round, when it shouldn't be. what have i done wrong, and how can i fix it?

#

do i just add context.individual?

red flower
#

yes

#

and not context.end_of_round

long sun
#

awesome ^u^ thanks!

slim ferry
#

also needs a context.individual so it doesnt trigger in repetition checks

copper perch
vale zinc
#

context.full_hand returns all the cards in played hand. How do I get the cards in hand that have merely scored?

long sun
#

does JokerDisplay currently support retriggering unscored cards?

#

or, unscored cards in general?

#

okay i can detect unscored cards pretty easily, but evaluating retriggers is the problem right now

red flower
long sun
#

ah, i see

#

so, would i create a retrigger_function on The Apparition, and return depending on if the playing card is present in the scoring hand?

red flower
#

yes

long sun
#

grand ^^ thanks

#

wait problem

#

looking at the code for Sock and Buskin's definition, it doesn't check if playing_card scores, meaning one of two things

#

either Sock and Buskin is assumed to retrigger all played cards, regardless of scoring

#

or retrigger functions only get asked how many times they retrigger scored or held in hand cards

#

both are a wee bit problematic ^^;

#

or maybe this is a false dichotomy and everything's fine

long sun
#

ah ^^;

#

das ist ein problem

#

but, one that isn't mine :}

red flower
#

i can change it probably

long sun
#

i'd be grateful :D

#

tytyty

red flower
#

done

long sun
#

yay! thanks :D will pull that now

native bone
#

How do I add a sticker to a Joker? Like Eternal, for instance?

red flower
#

joker:add_sticker("eternal", true)

native bone
#

Oops, what I meant to ask was how do I add a sticker to a playing card?

red flower
#

the same way but you will have to implement the functionality yourself afaik

long sun
#

looks good ^^

native bone
#

Alrighty then

long sun
#

hoho! got it working :D

native bone
#

I figured out a method to give playing cards Eternal, at least

#

Yoinked from Entropy

daring fern
sharp arch
#
    key = 'fisherman',
  atlas = 'thehoooo',
  pos = {x = 0, y = 0},
  rarity = 'jabong_Max',
  blueprint_compat = true,
  cost = 10,
  discovered = true,
  loc_txt = {
    name = "Fisherman",
    text = {
        "{C:attention}On blind Selection:{}",
        "Go fish. {C:deactivated}({}{C:green}#1# in #1#{}{C:deactivated} chance of a catch{})"
    },
  },
  config = { extra = { odds = 2, creates = 1}, },
  loc_vars = function(self, info_queue, card)
    local numerator, denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.odds, 'jabong_fisherman')
    return { vars = { numerator, denominator, card.ability.extra.creates } }
  end,
  calculate = function(self, card, context)
    if context.setting_blind and SMODS.pseudorandom_probability(card, 'jabong_fisherman', 1, card.ability.extra.odds) then
    SMODS.add_card {
              set = "jabong_fish",
               edition = 'e_negative' 
         }
        return {
                message = "caught!",
                colour = G.C.BLUE,
            }
    else
        return{
            play_sound('jabong_womp'),
            message = "Nope!",
            colour = G.C.TAROT,
        }
        
    end
  end
}``` do yall have any idea why this is acting passivley (infinitley looping every tick) in the blind select screen
daring fern
sharp arch
native bone
#

The calculate function retriggers cards but not Jokers, which is what I want it to do. And yes, the setting is enabled. I checked the wiki, and it should be context.retrigger_joker_check, so I dunno

turbid solstice
#

are the steamodded example mods up to date and able to be referenced without issues?

vale zinc
#

Is there a context.<???> specifier for when the player's Joker lineup changes?

slim ferry
red flower
vale zinc
red flower
#

nope

slim ferry
#

no

unkempt bronze
#

Found button code, will this work?

  UIBox_button({
  minw = 3.85,
  button = "steamodded_github",
  label = {localize('b_github_project')} })}```
red flower
unreal lion
#

any help

native bone
wind steppe
#

modding chat is the right place

native bone
#

You mean modding dev?

sharp arch
#

butr no

turbid solstice
native bone
#

Although that could work for Jokers

vale zinc
red flower
#

no

vale zinc
#

What would?

#

And how could I make Node:stop_drag() work only with Jokers?

native bone
#

Isnt there a Pinned sticker in Cryptid that prevents dragging?

slim ferry
daring fern
slim ferry
#

you cant really make it not do that

slim ferry
#

the decision from cryptid is probably better to look at

#

since that prevents moving while still allowing free will

native bone
#

Arent pinned jokers impossible to obtain without playing a challenge run, right?

slim ferry
#

yeah

#

correct

red flower
slim ferry
#

but it is still from vanilla

native bone
#

Okay

vale zinc
slim ferry
#

i see

red flower
#

i would just do that in update lol

slim ferry
#

perhaps entropy would have some code worth looking at since it has a blind which debuffs the leftmost joker(s)

#

or update works too

native bone
#

How do I retrigger jokers?

vale zinc
red flower
# vale zinc What does that entail, "`update`"?

i dont think blinds have an update function but you can hook Game:update, check if you are in your blind and then check for the rightmost joker and debuff it and undebuff all other jokers with the same source

red flower
native bone
#

Now that I have a clear head, thank you

native bone
#

I cannot get this thing to retrigger Jokers. I've been trying, but I cant seem to get it to work. I dont know what context I should put the repetition = true bit in.

slim ferry
#

you need to return repetitions = <amount>

vale grove
#

ive been reading up on vanilla remade wiki

#

but i cant seem to figure out how to reduce the price of booster packs

vale zinc
#

What is set_ability() used for within a Boss Blind's code?

native bone
faint yacht
#

-# ...did you enable Joker triggers optional feature?

native bone
#

Yes, I am making a mod that depends on Cryptid, which does enable retriggering Jokers

crystal perch
#

it doesn't matter if the mod you're depending on has the feature enabled, you must have it enabled in your mod too

native bone
#

Okay, so how can I do that? Is it in your moddata.json file?

crystal perch
#

just place the SMODS.current_mod.optional_features in your main.lua

native bone
#

Okay

#

I did that, but it still didnt work.

vale zinc
civic solstice
#

hey guys what did i fuck up lol

#

the card im tryna code

#

this is the wrong code screenshot

#

1 sec

#

this is the right one

civic solstice
fallow breach
#

i wanna work on some jokers that have to do with positioning.
first i want a joker that checks if any jokers have been moved (it will be a scaling joker that resets when any joker gets moved)
next i want a joker that is pinned to the position it gets bought in (can't use pinned as a reference because it's hardcoded in a file i can't find)

#

any ideas on where to start with these?

civic solstice
civic solstice
#

oooooooooooooooooohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

#

thatll do it

#

didnt fix it

#

lol

civic solstice
#

where can i find the full list for all the contexts ingame

#

contexts and variables and everything

vale zinc
#

Just for kicks, I set one of my custom Boss Blind's boss_colour to G.C.DARK_EDITION -- the swirling shade used by Edition text -- but when I selected the Blind in question, the color does not change from one of its initial states, #C78E8E. Why is this so?

#

Update: when I play/discard, it'll occasionally jump to purple from gold.

rapid stag
#

does anyone have a good resource on creating additional cardareas

cerulean rose
#

how do i make a joker sticker calculate even when debuffed

civic solstice
frosty rampart
#

why are you defining a whole second calculate function inside the return statement of the first calculate function

#

that's not how that works

civic solstice
frosty rampart
#

yea there's a lot weird going on here, and my recommendation is to throw this whole thing out and start fresh

#

but i'll help you!

civic solstice
#

bet

frosty rampart
#

first, you want to use context.discard, not context.pre_discard. that way it'll calculate once on each individual discarded card, instead of having to manually dig through the discarded hand

cerulean rose
#

also will make the timing consistent with jokers like mail-in rebate

frosty rampart
#

or castle, yea

#

next, inside context.discard, you don't need whatever that if function() end == true then junk is
what you should do is check if context.other_card is an 8 of hearts, and if it is, you should increase the joker's variable where it has its current mult stored

cerulean rose
#

use SMODS.scale_card for this

frosty rampart
#

true (it's documented in the smods 0827 changelog)

cerulean rose
#

it also changes behavior of existing jokers balatrojoker

frosty rampart
#

that was fixed actually

cerulean rose
#

oh?

civic solstice
frosty rampart
#

i should know, i was part of that issue thread balatrojoker

frosty rampart
# civic solstice what does this do

it allows you to opt into crossmod content that would change how fast cards can scale (e.g. someone else's joker that makes scaling jokers scale twice as fast would make yours gain +10 mult for every discarded 8 of hearts, but that only works if you use the scale_card function)

#

anyway, get started on what i wrote out and let me know when you're done. it won't be finished yet, we still need a second part to the calculate function, but i wanna get this working first

civic solstice
#

im confused wdym by crossmod content

frosty rampart
#

like
other mods that add something that affects card scaling

#

using the scale_card function would mean that your joker is automatically compatible with anything like that

civic solstice
#

ohhh okay

cerulean rose
#
calculate = function(self, card, context)
    if context.cardarea == G.play and context.individual and not context.blueprint then
        if context.other_card:is_suit("Clubs") then
            return SMODS.scale_card(card,
                {
                    ref_table = card.ability,
                    ref_value = "mult",
                    scalar_value = "gain",
                    message_colour = G.C.MULT,
                    message_key = "a_mult",
                })
        end
        if context.other_card:is_suit("Hearts") and card.ability.mult ~= 0 then
            return SMODS.scale_card(card,
                {
                    ref_table = card.ability,
                    ref_value = "mult",
                    scalar_value = "loss",
                    operation = "-",
                    message_colour = G.C.RED,
                    message_key = "a_mult_minus",
                })
        end
    elseif context.joker_main then
        return { mult = card.ability.mult }
    end
end
frosty rampart
#

yea but like
it's not really fixable in the function itself
it differs from vanilla behavior because vanilla behavior keeps the message and the scaling separate, whereas scale_card bundles it all together at once

cerulean rose
#

how would you rewrite this to work properly?

frosty rampart
#

if i had to, i'd make the function return a table that can be returned in a calculate function. that would be where the message goes, instead of having a calculate_effect call in the scale_card function
but i don't think it's broken or bad as it is necessarily, it's just different

civic solstice
frosty rampart
#

nnnno

#

is_rank isn't a thing (yet), and you're using scale_card wrong

#

real quick can you show me the rest of the joker definition?

cerulean rose
frosty rampart
#

also i highly recommend referencing vanillaremade if you aren't already. in particular, castle's effect is very similar to what you're trying to do
it doesn't use scale_card but tbh don't worry about scale_card rn, i think it just complicates things more than necessary for beginners

civic solstice
frosty rampart
civic solstice
#

o

#

just this config stuff

cerulean rose
frosty rampart
cerulean rose
#

weird jank but ok

frosty rampart
#

"how do i make it behave like vanilla"
how it behaves in vanilla
"weird jank but ok"

frosty rampart
civic solstice
#

i will tmr im tired lmao

#

ty for tryna help out i appreciate it

frosty rampart
#

yea no worries
transitioning from jokerforge to lua is really rough in general because jokerforge-generated code tends to be really weird and not good for reference

civic solstice
#

fair

#

i just used it as a starting point and try to fix it up with what little i know about lua

#

i mean i got it to not crash upon opening the game by myself if thats anything LOL

river grail
#

I'm trying to make another suits-based mod. It's meant to be the 6 of Nones, but I think I did something wrong.

#
SMODS.Suit{ -- Temp
    key = 'Nones',
    card_key = 'NONES',
    hidden = false,

    lc_atlas = 'cmerge_cards',
    hc_atlas = 'cmerge_cards',

    lc_ui_atlas = 'cmerge_suits',
    hc_ui_atlas = 'cmerge_suits',

    pos = { x = 0, y = 0 },
    ui_pos = { x = 0, y = 0 },

    lc_colour = HEX('374649'),
    hc_colour = HEX('374649'),

    in_pool = function(self, args)
        if args and args.initial_deck then
            return true
        end
    end
}```
frosty rampart
#

you haven't localized anything

civic solstice
#

okay im gonna go to bed now gn chat

river grail
civic solstice
#

o/

river grail
#

Forgot about all of that

mossy minnow
#

what is the card area for the discard pile?

frosty rampart
#

G.discard i think

true jasper
#

is like it possiable to make an undiscovered sprite have a custom display size
putting this display_size = { w = 65, h = 79 }, doesnt work in the SMODS.UndiscoveredSprite

umbral zodiac
#

those dimensions seem familiar

vale zinc
#

Even when I set odds to 1, this Boss Blind's code does not destroy cards after they are played, and I copied the code from the Vanilla Remade code for Glass Cards. What do I do?

calculate = function(self, blind, context)
    if not blind.disabled then
        if context.destroy_card and context.cardarea == G.play and context.destroy_card == card and SMODS.pseudorandom_probability(card, 'test', 1, card.ability.extra.odds) then
            SMODS.destroy_cards(card)
        end
    end
end
vale zinc
vale zinc
#

And how would I make sure that it happens after all scoring is finished, like with Glass cards?

daring fern
# vale zinc What would?
if context.destroy_card and context.cardarea == G.play and SMODS.pseudorandom_probability(blind, 'seed', 1, blind.effect.extra.odds) then
    return {remove = true}
end
plain apex
#

still confused on this

#

like do i have to do something more for it to properly use the right text?

daring fern
plain apex
#

yes that works!

#

they really should have specified that better tho

obsidian spear
#

How do I look for a unique Identifier of a card thats in G.jokers.cards

#

I needa check for a specific joker in a loop so that the loop ends

glass scaffold
#

How do I apply random enhancements from a specific mod onto cards in a deck?

red flower
obsidian spear
#

thats gonna activate from the first joker of same joker

#

what if i have two

#

they should work seperately

mystic river
#

i believe there's a unique identifier somewhere, yes
use debugplus to dig it up, i guess

maiden phoenix
#

break the loop if you find the first valid joker?

obsidian spear
#

i did find a unique one

mystic river
#

literally called something to the effect of unique id

obsidian spear
#

the description means to be to the left of itself

#

not that first one

#

from inspect()

#

where is it though

mystic river
#

... there? in that table you are looking at?

glass scaffold
obsidian spear
maiden phoenix
obsidian spear
#

yea that

maiden phoenix
#

Also pretty sure G.playing_cards is an ipairs loop

mystic river
obsidian spear
#

i thought it'd be inside somethign else

#

is the card in the function card or self

glass scaffold
obsidian spear
#

card i assume?

#

nvm nvm

red flower
obsidian spear
#

if i have two of the same joker, they'll both stop at the first joker

#

i want them independent

mystic river
#

is there a reason you need the unique value instead of just comparing the card directly, e.g. G.jokers.cards[i] == card?

red flower
obsidian spear
#

different things

red flower
#

i know

obsidian spear
#

thats not what i want

red flower
#

but the jokers are always sorted

#

so it's going to be the same one

obsidian spear
#

wait what?

#

wdym

#

oh

#

wait what

red flower
#

G.jokers.cards is in the order theyre sorted in the joker slots, and they can't be reordered fast enough during calculation

#

so unless this effect takes place at two different timings it will always be the first in the order

obsidian spear
#

wait so does this mean that this is how to player places them or how the game for some reason sorts them

red flower
#

former

obsidian spear
#

so its fine

#

this conversation was useless?

red flower
#

this is why understanding the xy problem is important lol

obsidian spear
#

huuh?

red flower
obsidian spear
#

true i think

mystic river
#

terrible name for it though

obsidian spear
#

-# i agree

maiden phoenix
mystic river
#

the real xy problem is when you save in lumiose city and get softlocked

red flower
#

so true

elder rune
#

How do you check in an enhancement when it gets added and removed from a card

next timber
#

oh wait hang on maybe not that for editions

elder rune
#

alr

next timber
#

lemme check if it works for enhancements one sec

#

ok uhh i was wrong no it doesnt my bad

#

is there like a better way of setting an edition's card limit change that i dont know about? rn im doing config = { card_limit = -1 } and it seems to be causing a whole lot of jank when applied to every playing card in the deck

elder rune
wintry solar
next timber
#

this is what happened when i was just playing hands with 12 hand size and a full deck of cards with -1 card_size from the big edition

#

drew a ghost card, then it disappeared and i drew a face down card that couldnt be selected, then two more ghost cards

#

should probably be noted the first hand of the round was entirely normal

wintry solar
#

No that’s the latest release, the latest dev version is 1031a

next timber
#

oh, so just download from code?

wintry solar
#

Though I do think it is better for this effect to use extra_slots_used = 1 so this effect

#

But yeah, download from main code for the current latest dev build (prone to being buggy though)

next timber
#

ok ive not yet run into the previous issues but after discarding ive somehow ended up with. 16 cards. in a hand size of 12. when i should be holding 6 because they all take 2 hand space.

#

ok no thats not quite accurate i wasnt reading the hand size text right

#

but when i discard i draw twice as many cards as i should

#

but only if im not already over the amount i should have

wintry solar
#

hmmm, will do some investigating

next timber
#

also strangely, im at 14 hand size from having 12 base and having a doubled juggler, and ive just entered the manacle and i still drew 7 cards when i shouldnt have had enough hand space to do that? the count says im at an effective 14/13 now

pseudo furnace
#

How would I juice a card until a hand is played?

red flower
pseudo furnace
#

I did

red flower
#

this will always be true

wintry solar
pseudo furnace
slim ferry
#

that will always be false

red flower
#

you need to move the local out of the function

slim ferry
# slim ferry that will always be false

you went from checking G.GAME.current_round.hands_played == G.GAME.current_round.hands_played to checking G.GAME.current_round.hands_played == G.GAME.current_round.hands_played+1

#

effectively

pseudo furnace
#

Thanks for that

next timber
#

thanks for the quick patch 👍

vale grove
#

how do you change the price of booster packs?

#

i tried reading up on alot of things but i just cannot seem to find the thing that changes the price of boosters

vale grove
#

because how does that affect only boosters?

daring fern
vale grove
#

thats why i wanna know how to do that

#

if i made a voucher that reduced all card price, i would just be making clearance sale again