#💻・modding-dev

1 messages · Page 568 of 1

slim ferry
#

this is force highlighting a booster pack in the shop

jolly shadow
#

dont know what card area to use either

daring fern
#

Yes, because forced_selection only works with G.hand, also card is the joker, also G.shop_booster is the boosters in the shop.

jolly shadow
#

couldnt find it

#

so thats prob why lmao

slim ferry
#

youre looking for G.pack_cards probably

jolly shadow
#

how would i go abt keeping the selection forced then

daring fern
vocal helm
#

Is there an event/easing thing I could do to make it so that my joker rotates 180 degrees when triggering?

tall wharf
#

can someone tell me why this does not work

primal robin
#

What exactly is not working

tall wharf
#

it does not do anything to cards held in hand

primal robin
#

idk

red flower
tall wharf
red flower
#

yeah i dont see the problem either sorry

wintry solar
#

does it work for played cards?

tall wharf
#

it does

primal robin
#

How your filter function works

tall wharf
#

the filter works

#

i know it works

red flower
#

does it

tall wharf
#

it does

primal robin
#

It shouldn't

wintry solar
#

and when you print cards_matching it has the hand cards in?

red flower
#

because that seems like it might cause gaps

primal robin
#

You treat table as object, not array

#

You need to check key type and if it's a number, insert it, else set

tall wharf
#

hmmm

#

i think i get what n is saying

#

ill try something

primal robin
#

So my solution was not clear enough

tall wharf
#

no i get what you meant too

#

it should work tho

#

as in i understand the problem

red flower
#

you can probably also just use pairs on cards_matching

primal robin
#

also works

tall wharf
#

yea that's one of the solutions

errant arrow
red flower
#

i think your rarity is wrong if youre using a custom one, or one of your pools if youre using that

rotund sable
errant arrow
#

im stupid. i put ' around 4

#

im still strugging on implimenting custom rarities, so im just using the vanilla legendary rarity

#

welp. that's that done, just gotta make the art for this section

vast night
#

oakey doakey

vast night
#

stupid question generator output: how do i set the cost of a joker? i've searched around docs and file, i've tried card.cost and card:set_cost. What do I do?

vocal helm
vocal helm
vast night
red flower
#

card:set_cost is going to reset the cost

#

you should use card.ability.extra_value if you can else i would recommend hooking set_cost

vast night
#

also ty 4 the hook idea

vast night
vast night
daring fern
#

jolly shadow
slim ferry
#

But applying one previous stake also applies all other stakes before that though

#

So its just visual

gilded goblet
#

why is this like this?

SMODS.Stake {
  atlas = "stakes",
  key = "supernova",
  pos = {x = 2, y = 0},
  applied_stakes = {"gold"},
  prefix_config = {applied_stakes = {mod = false}, unlocked_stake = {mod = false}, above_stake = {mod = false}},
  sticker_pos = {x = 3, y = 1},
  modifiers = function()
    G.GAME.modifiers.enable_supernova_in_shops = true
  end,
  colour = HEX "d8beed",
  shiny = true,
}
jolly shadow
shut latch
#

nvm found how to hook showman
but
do i replace card_key with anything?

jolly shadow
#

so having it say "appleis gold stake" rather than "applies all previous" is good cuz who knows the stake order

gilded goblet
#

hold on i have an idea

#

nvm it wont work

gilded goblet
#

ok nvm im still lost

vocal helm
red flower
high verge
#

if next(SMODS.find_mod("CardSleeves")) then I'm trying to use this code in my ui but it's returning a "unexpected symbol near if" error. Any clue?

#

I want a ui option in my config to only show if the CardSleeves mod is present

jolly shadow
#

whats above it

high verge
#

Just more nodes of the config.``` {
n = G.UIT.R,
config = { align = 'cl', tooltip = {text = {localize('helluvacustomlogo_tooltip')}},},
nodes = {
{
n = G.UIT.C,
-- config = { align = 'cm'},
nodes = {
create_toggle {
label = localize('helluvacustomlogo'),
ref_table = helluva_config,
ref_value = 'helluvalogo'
},
},
},
},
},

                    -- Custom Sleeves
                    if next(SMODS.find_mod("CardSleeves")) then
                    {
                        n = G.UIT.R,
                        config = { tooltip = {text = {localize('helluvacustomsleeves_tooltip')}},},
                        nodes = {
                            {
                                n = G.UIT.C,
                                nodes = {
                                  create_toggle {
                                    label = localize('helluvacustomsleeves'),
                                    ref_table = helluva_config,
                                    ref_value = 'helluvacustomsleeves'
                                    },
                                },
                            },
                        }
                    },
                    end```
jolly shadow
#

you didnt close a thing

#

or actually

#

cant have an if inside of a table

high verge
#

Oh, pain

jolly shadow
#

make a table {} and set it to the actual ui if cardsleeves is present, then append that to ur ui

#

i think

lament agate
#

how do you check if a joker has a specific stickers

jolly shadow
#

itd be under card.ability i think
unless its a vanilla sticker i think u can just use :is_eternal etc

frosty rampart
#

^ card.ability.[sticker key] will be truthy (either true or some other value) if it has a sticker, but there's definitely a function for is_eternal (which also accounts for other cards that would like to act eternal without the sticker) and probably ones for perishable and rental

clear ocean
fleet isle
#

Does anyone have any idea why the first hook works completely fine but in the set_ability one the calculate_context (when its uncommented) crashes the game immediately ?

fallow urchin
#

How would I go about taking over blue seal functionality so that the first two blue seal triggers create negative planets? I've got code that converts planets to negative as they are created but despite increasing the cap of allowed planets it stops after two seals

feral tree
#

is there a context for a custom tab in SMODS.current_mod.extra_tabs?

lament agate
frosty rampart
#

not their config, their ability table. but yea you can just check for it

feral tree
#

detect when you have that tab open or not

red flower
#

not as a context no

feral tree
#

does that mean i can otherwise?

red flower
#

you can just set a global variable in the function that makes that tab

frosty rampart
#

trying to figure out how to make my custom stickers only appear on jokers from shop or boosters, to match behavior with the vanilla stickers

#

tried checking for the current state in should_apply but that bypasses the rate and needs_enable_flag config settings in the sticker definition

gilded goblet
#

meanwhile imover here fucking wondering why sticker_atlas doesnt work

frosty rampart
#

whatever i'll just code the rate and enable flag into should_apply

#

for once cryptid reference was useful (and also looking closer at vanilla code lol)

winter flower
#

why does this not work

#

it shows text if unbalanced mode is on but not when it's off

feral tree
loud summit
#

how do you get the number of jokers your mod adds

red flower
#

check function modsCollectionTally

loud summit
#

pool?

hearty crane
lyric maple
#

is there a way to check for jokers from a specific mod?
e.g. i'm trying to make a joker that gives xmult when a joker from my mod is sold

jolly shadow
#

next(SMODS.find_card("j_prefix_key"))

#

i think !

frosty rampart
#

that's how to find a specific joker
given a joker, to see if it's from a specific mod, you would check [card].config.center.original_mod == SMODS.Mods["mod ID"] i'm pretty sure

jolly shadow
#

fair nuf

lyric maple
#

does this look right?

... and context.card.config.center.original_mod == SMODS.Mods["kls"] ...
sturdy compass
#

Is “kls” the mod id?

daring fern
#

lyric maple
sturdy compass
#

Then it should work

lyric maple
real crown
#

config = { extra = { mult = 0, mult_mod = 5, previous_hands = {}} },
Why is previous_hands considered nil here? Isn't it an empty array?
The error I'm getting is that I was attempting to get the length of previous_hands, which yes, I was, expecting a 0

daring fern
real crown
#

That was the issue, thank you
There were like 12 places I used it, and I forgot to add the card.ability.extra part in one of them

thorn basin
#

okay so I just discovered why my boss blind doesn't debuff a random rank each hand.
Because somehow it debuffs all the jokers in the joker slots
How can I fix this??

daring fern
thorn basin
#

wait, it's G.playing_cards?

daring fern
daring fern
thorn basin
daring fern
thorn basin
#

Aight

thorn basin
#

or if the boss blind actually debuffs

thorn basin
slim ferry
#

i dont think the game recalculates debuffs after each hand

#

gotta do that manually

daring fern
slim ferry
#

yes

#

that too

#

but it wont update the debuffs properly after the hand currently

thorn basin
#

yeah

lament agate
#

hey something, can you help me rq

thorn basin
#

in the return?

daring fern
daring fern
lament agate
# daring fern Yes.

What do i write if i want to check if Jokers in the player's slot has a custom sticker

lament agate
lament agate
daring fern
# thorn basin
for k, v in pairs(G.playing_cards) do
    blind:debuff_card(v, true)
end
thorn basin
real crown
#

Is there a tool/editor worth using, or is notepad++ just as good as any other editor?
I've just been using that, and I do wish there were suggestions on what context I have if I type context. , but I don't know if any editor has that ability, as everything's in different folders and I don't know if there's any linkage

slim ferry
#

vscode is really good

#

its actually made for coding shit

real crown
#

Thank you!
I only have visual studio, I'll get vscode too then

lament agate
#

does the game store what boss blinds has been disabled in the game or do i need to make a local function for it

slim ferry
#

why would it store what boss blinds have been disabled in the run...

lament agate
#

i thought they have it because

#

i THINK so

lament agate
slim ferry
#

hook Blind:disable()

lament agate
#

thanks

#

does this look right

slim ferry
#

why

#

are you putting the original function in a global table

#

you can literally just make it a local function

#

also this will crash since G.GAME doesnt exist during load

lament agate
#

hold on

still cedar
#

Why does this error appear if I closed }

slim ferry
#

because

#

thats not a valid return

#

you shouldnt return there in the first place

real crown
#

Based on a previous conversation in this chat I tried debuffing all cards lower than Queen this way:
if context.debuff_card and context.debuff_card:get_id() < 12 then return { debuff = true } end
But it crashes when I try to open the deck or on round start, saying in this line I'm trying to compare nil with number
Isn't get_id supposed to be a number for all cards?

slim ferry
#

context.debuff_card gets called for EVERY card, not just playing cards

#

so get_id returns nil for jokers n such

cursive gazelle
slim ferry
#

add a context.debuff_card.area == G.deck check before the rank check

real crown
#

Ohhh, that makes sense, thank you!

cursive gazelle
winter flower
slim ferry
#

do anything

#

not show text

winter flower
#

oh

#

it just disables seraph from going above level 100 (which works)

still cedar
still cedar
cyan lagoon
#

heya, anyone knows what happened here?

#

i played against UnseenExplosion with my mod, but it seems to softlock every now and then for him

#

i don't have anything to do with discards or redeeming vouchers which happened later

daring fern
cyan lagoon
#

yeah, but how though?

#

again, i dont have anything to do with discards or drawing hands

#

and i like i never had this issue before

#

wait, no

#

i had that issue but it was because of a specific joker

#

i supposedly fixed that and that joker actually had an event call

#

here. just nothing seem to lead to what's the issue

daring fern
cyan lagoon
#

here's the first part

#

flowey was copying 8-ball, which too has nothing with discards

daring fern
cyan lagoon
#

i figured

#

here's the next softlock

#

completely different jokers, completely different game state

#

completely different everything

#

and a third one

#

again, everything's completely different

real crown
#
        name = "The Prisoner",
        text = {
                    "Earn {C:money}$#1#{} at",
                    "end of round",
                    "{C:inactive} Activates in #2# rounds",
              },
    },```
Is there a way to make the text change  based on a variable? E.g.: before the required rounds elapse, the money part is inactive and the "Activates in ... rounds" is visible, and once the rounds go by, the top part becomes no longer inactive, and the bottom part just disappears
I tried doing an if for the text part, but I couldn't get it to work, maybe I'm missing something
daring fern
real crown
#

Thank you!

loud summit
#

hi how do you make a joker generate a value on spawning?

#

i tried using init = function(self, card) but it crashed and claimed card was null

daring fern
loud summit
#

what are the arguments

daring fern
loud summit
#

thx

still crescent
still cedar
#

How can I make the description show xmult scale like this?

loud summit
#
        local scale = 0
        for card in G.P_CENTER_POOLS.Joker do
            if string.find(card.config.center.original_mod, "flame") then print(card.config.center.original_mod) end``` errors with "attempt to call a table value" on the for line
loud summit
daring fern
loud summit
#

and then just ignore v?

daring fern
loud summit
#

shoot

#

so ignore k?

#

also whats the diff between ipairs and pairs

daring fern
rocky plaza
still crescent
rocky plaza
still cedar
#

How can i make calculation with xmult reset like this?

loud summit
#

just havw a prob check in the calculate function and set the ability var to x1

round lion
#

is there any variable that keeps track of blinds that were on-fire'd

jaunty sigil
#

chat a quick question. What does this mean?

if context.setting_blind  then
                play_sound("modprefix_")
    SMODS.calculate_effect({message = "YOU ARE AN IDIOT!"}, card)
tight hull
#

Hi, whats the code required to change the texture of decks? (not the playable cards, decks)

jaunty sigil
#

like, what sound should i put i mean

#

like, idk how to put my sound

daring fern
tight hull
jaunty sigil
daring fern
jaunty sigil
#

srry, i dont understand nothing 😭

daring fern
jaunty sigil
cursive gazelle
jaunty sigil
cursive gazelle
#

when you define a sound you use a key

#

it's something you name to an object so you can call it later

tight hull
# tight hull thnx

is there a list of game objects, like tarrot cards, spectral cards ect? (not in malverk but in smods)

jaunty sigil
#

so like, at the start of the script, I should put like:

Key = 'Path'

?

cursive gazelle
#

mod prefix you can find in yout .json file

jaunty sigil
#

and then in the "playsound()" put the Key?

jaunty sigil
cursive gazelle
daring fern
cursive gazelle
jaunty sigil
jaunty sigil
cursive gazelle
#

somethingcom said it lol

jaunty sigil
#

oh wait I think I understood 😭

jaunty sigil
cursive gazelle
#

mod prefix is your mod prefix

jaunty sigil
#

so xmpl in my case?

cursive gazelle
#

you can find it in your json file

jaunty sigil
cursive gazelle
#

yes

jaunty sigil
#

okay thanks :D

cursive gazelle
#

you need to define an SMODS.Sound

#

first

#

give it a path to your sound and a key

#

like stated in the docs

#

and your sound files should be under assets/sounds

cursive gazelle
#

there's

jaunty sigil
#

guys. it kinda work, but when I select a blind it says "idiot_sound.ogg doesn't exist!" but in the main.lua file it says .wav??

jaunty sigil
cursive gazelle
#

idk if love2d supports wav files ogg is the format i see everyone uses

jaunty sigil
#

it has to be ogg?? 😭

cursive gazelle
daring fern
jaunty sigil
cursive gazelle
#

can i see your code ?

jaunty sigil
#
--- STEAMODDED HEADER
--- MOD_NAME: YOU ARE AN IDIOT mod
--- MOD_ID: YOUAREANIDIOT
--- MOD_AUTHOR: [some cool guy]
--- MOD_DESCRIPTION: Adds the "You Are An Idiot" joker (inspired by the virus "you are an idiot").
--- PREFIX: xmpl
----------------------------------------------
------------MOD CODE -------------------------
IdiotSound = 'idiot_sound.wav',

SMODS.Atlas{
    key = 'jokers', -- atlas key
    path = 'jokers.png', -- atlas' path
    px = 71, -- width of one card
    py = 95 -- height of one card
}
SMODS.Joker{ --You Are An Idiot!
    key = "youareanidiot",
    config = {
        extra = {
            totaljokerslots = 0,
            eternal = 0,
            respect = 0
        }
    },
    loc_txt = {
        ['name'] = 'You Are An Idiot!',
        ['text'] = {
            [1] = 'Creates a {C:purple}Negative {}copy of its self.',
            [2] = '{X:red,C:white}+10 Mult{}',
            [3] = '{s:1.9}YOU ARE AN IDIOT!{}'
        },
        ['unlock'] = {
            [1] = 'Unlocked by default.'
        }
    },
    pos = {
        x = 0,
        y = 0
    },
    display_size = {
        w = 71 * 1, 
        h = 95 * 1
    },
    cost = 6,
    rarity = 1,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,
    unlocked = true,
    discovered = true,
    atlas = 'jokers',
    pools = { ["modprefix_mycustom_jokers"] = true },

    calculate = function(self, card, context)
        if context.cardarea == G.jokers and context.joker_main  then
                return {
                    mult = G.jokers and G.jokers.config.card_limit or 0
                }
        end
        if context.setting_blind  then
                play_sound("xmpl_IdiotSound")
    SMODS.calculate_effect({message = "YOU ARE AN IDIOT!"}, card)
                return {
                    func = function()
                local available_jokers = {}
                for i, joker in ipairs(G.jokers.cards) do
                    table.insert(available_jokers, joker)
                end
                local target_joker = #available_jokers > 0 and pseudorandom_element(available_jokers, pseudoseed('copy_joker')) or nil
                
                if target_joker then
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            local copied_joker = copy_card(target_joker, nil, nil, nil, target_joker.edition and target_joker.edition.negative)
                        copied_joker:set_edition("e_negative", true)
                            copied_joker:add_sticker('eternal', true)
                            copied_joker:add_to_deck()
                            G.jokers:emplace(copied_joker)
                            return true
                        end
                    }))
                    card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil, {message = localize('k_duplicated_ex'), colour = G.C.GREEN})
                end
                    return true
                end
                }
        end
    end
}
cursive gazelle
#

where's the SMODS.Sound

jaunty sigil
#

huh-

cursive gazelle
#

you don't define the sound in a variable

#

you define it in SMODS.Sound

jaunty sigil
#

at the
if context.setting_blind then
play_sound("xmpl_IdiotSound")

jaunty sigil
cursive gazelle
#

give it a key and path

cursive gazelle
jaunty sigil
#

but in the docs' examples it puts them in vars?? 😭

cursive gazelle
#

do path="yoursound.wav"

jaunty sigil
#

what abt the key?

#

but uh sure :D

cursive gazelle
#

just wait

#

i'll give you the code

jaunty sigil
#

done

wheat jewel
#

If I want to go in chronological order for ranks, how do I edit this method to do so

jaunty sigil
#

s u there? 😭

#

time to wait ig :D

#

oh he back :D

daring fern
cursive gazelle
#
SMODS.Sound{
    key="soundkey",
    path="sound.wav"
}```
#

internet issue

#

my bad

#

i didn't even format it in lua

jaunty sigil
#

ooh dw

tight hull
jaunty sigil
#

btw tysm!! imma give you credits on the mod if thats okay with you :D:D

cursive gazelle
tight hull
jaunty sigil
#

imma try to understand that :D

cursive gazelle
jaunty sigil
#

and I cant understand that :D

cursive gazelle
#

negative texture pack

jaunty sigil
tight hull
jaunty sigil
#

ah

cursive gazelle
#

post code

daring fern
wheat jewel
jaunty sigil
cursive gazelle
#

put the sound in assets/sounds bro

tight hull
jaunty sigil
cursive gazelle
jaunty sigil
#

wait, the folder has to be named as "sounds" 😭

cursive gazelle
#

make a folder in assets name it sounds and place your sounds inside

jaunty sigil
#

imma check if it works

cursive gazelle
tight hull
jaunty sigil
#

same crash again :c

daring fern
robust marsh
#
        local tag_key
        local _tag = e.UIBox:get_UIE_by_ID('tag_container')
        if _tag and _tag.config and _tag.config.ref_table and _tag.config.ref_table.key then
            tag_key = _tag.config.ref_table.key
        end

        local ret = G.FUNCS.select_blind(e)
        if tag_key then
            G.E_MANAGER:add_event(Event({
                trigger = 'after',
                func = function()
                    local new_tag = Tag(tag_key,false,'Small')
                    if new_tag then
                        add_tag(new_tag)
                    end
                    return true
                end
            }))
        end
        return ret
    end
    return skip_blind_ref(e)
end

The acquired tag is different from the one that's shown on the blind droidcry

cursive gazelle
jaunty sigil
#

oh wait sorry i forgor to put sounds in assets </3

#

i forget things

#

sorry :C

robust marsh
#

The issue is orbital tags

cursive gazelle
daring fern
robust marsh
#

assume*

daring fern
robust marsh
#

Alright, thank you

gilded goblet
#

can someone please tell me why the actual sticker sprite is being applied here instead of the win one?

cursive gazelle
#

can you set_ability to nil ?

#

😭

wheat jewel
#

Cold this work to make a joker cycle through ranks in chronological order

#

obv i gotta edit it to reset to rank 2 or smthn

#

but should i instantiate the card outside the method to make sure it doesn't always set itself to aces every time?

cursive gazelle
#

your key is set to stakes not stake_stickers

jaunty sigil
#

should I put here the name or key of joker?

cursive gazelle
#

key

gilded goblet
jaunty sigil
#

oksay thanks :D

cursive gazelle
#

stakes if the default key

#

for vanilla

#

use another key

gilded goblet
#

hrmmm, okay

#

that didnt fix it unfortunately

tight hull
# tight hull oh, okok thnx

I looked thru it, found decks, but still no idea what they are considered as (it says decks but if I put that in the key it doesnt work), but I found a mod (Fancy decks by js303) that does what I want to do. Is there a way to write this better?


   local fancy_mod = SMODS.findModByID("FancyDecks")
   local sprite_enhancer = SMODS.Sprite:new("centers", fancy_mod.path, "FancyDecks.png", 71, 95, "asset_atli")

   sprite_enhancer:register()
   
end
cursive gazelle
#

can i see the code

tight hull
#

umm

#

renew it?

#

renovate it?

#

sorry I dont know the word

daring fern
tight hull
#

ah

#

kinda sad

wheat jewel
#

this is returning an error at when i'm trying to change the rank of a card but make it go in chronological order instead of being chosen at random

normal crest
#

what is the error

wheat jewel
normal crest
# tight hull ah

if Malverk is able to replace sprites then you should look how it does it

robust marsh
#

@daring fern btw it worked, just wanted to say thank you :)

wheat jewel
#

the logic isn't done, obviously i wanna find a way to not make it start as aces everytime the function is called

normal crest
gilded goblet
# cursive gazelle can i see the code

if i do this, and disable the Atlas in stickers.lua (the file where i apply the actual stickers), it works (but then i lose the actual sticker sprites):

SMODS.Atlas {
  key = "stakes",
  path = "stakes.png",
  px = 29,
  py = 29
}

SMODS.Atlas {
  key = "stickers",
  path = "stake_stickers.png",
  px = 71,
  py = 95
}

SMODS.Stake {
  atlas = "chips",
  key = "tax",
  pos = {x = 0, y = 0},
  applied_stakes = {"orange"},
  unlocked_stake = "gold",
  prefix_config = {applied_stakes = {mod = false}, unlocked_stake = {mod = false}, above_stake = {mod = false}},
  above_stake = "orange",
  sticker_atlas = "stickers",
  sticker_pos = {x = 0, y = 0},
  modifiers = function()
    G.GAME.modifiers.enable_tax_in_shops = true
  end,
  colour = HEX "cc4846",
  shiny = false,
}
tight hull
wheat jewel
normal crest
tight hull
#
-- ['b_Tag'] = 'Tags',
-- ['b_Back'] = 'Decks',
-- ['b_Seal'] = 'Seals',```
if I understand it correctly the key for decks should be "Back"?
#

"Back" doesnt work

half aspen
#

hello everyone, i’m currently prototyping ideas for jokers, just wondering if a joker is debuffed, do the stickers on that joker still take effect or are they disabled too? thanks!

half aspen
slim ferry
#

im pretty sure eternal DOES still take effect though

#

because you still cant sell debuffed eternals normally

jaunty sigil
#

btw chat, how do I make a high-pixel thing joker texture? cause I normally used that, but it only loads the normal one. so, when I select the one I used the most, it shows small :C

robust marsh
#

can i use G.GAME.banned_keys to ban suits or would i just have to make the deck automatically convert any picked up spades/hearts into clubs/diamonds

daring fern
daring fern
robust marsh
#

mkay, ty

slim ferry
#

i assume thats what you mean

jaunty sigil
slim ferry
#

well that depends on what program you use

red flower
jaunty sigil
slim ferry
#

no clue, never used it

jaunty sigil
jaunty sigil
slim ferry
#

just go looking around for some option to resize the image somewhere ig

jaunty sigil
slim ferry
#

because you uploaded a 10 minute video 😭

jaunty sigil
#

oh nvm it loaded :D

slim ferry
#

how did discord even let you upload something that large wtf

jaunty sigil
slim ferry
#

that seems big even for nitro

jaunty sigil
#

niteo*

#

niteoer*

slim ferry
#

true

jaunty sigil
#

nah not doing ts for the 100th time</3

#

how do i talk? 🤓

slim ferry
#

its okay at least you tried

jaunty sigil
#

uyay :D

#

yay*

glacial terrace
#

hey, does anyone know how to queue the visual change from modify_rank with the message animation? right now it works functionally but the card sprite changes before scoring and when retriggers happen it just jumps straight to the final rank

    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play 
        and context.other_card == context.scoring_hand[1] then
            assert(SMODS.modify_rank(context.other_card, 1))
            return {
                message = "Rank Up!",
                colour = G.C.ORANGE
            }
        end
    end
robust marsh
red flower
#

yes

robust marsh
#

gotcha

red flower
#

its kinda broken rn but it should work for suits correctly

slim ferry
#
G.E_MANAGER:add_event(Event({
  func = function()
    --rank change code
  end
}))
daring fern
runic pecan
#

Is all the highlighted part necessary, or do I only need the SMODS.find_card one?

robust marsh
#

took me 5 minutes to realize i dunno how to use SMODS.add_to_pool gemmytroll

gilded goblet
glossy comet
#

i am having issues with creating a specific consumable and adding it to G.consumeables, such that when the card is created, instead of going into the consumables area, it just floats there and doesn't do anything
this is my code, is there anything i am doing wrong here?

daring fern
glossy comet
#

oh
i see

slim ferry
#

always at least use SMODS.create_card, and if youre immediately emplacing it into an area just use SMODS.add_card

tight hull
# tight hull "Back" doesnt work

Part of game code:
{name = "centers", path = "resources/textures/"..self.SETTINGS.GRAPHICS.texture_scaling.."x/Enhancers.png",px=71,py=95},
"centers" also doesnt work and I have no idea what will 😔
[update: "centers" works, I forgot to add .png to the name of my atlas]

robust marsh
red flower
still cedar
#

Can anyone explain how can i make calculation with xmult reset like this? (And can you please give more details, I really don't understand)

frosty rampart
#

break it down into smaller parts
"after blind is selected": find a context that fits that timing. (hint: it definitely exists, consider referencing marble joker from vanillaremade)
"1 in 6 chance": you'll need to use the probability api. if SMODS.pseudorandom_probability(card, 'seed', numerator, denominator, 'identifier') then should do what you're looking for (remember to replace numerator and denominator with the actual odds, as well as probably seed and identifier with unique strings related to this joker)
"resets to X1 Mult": this is literally just resetting a variable to 1

next timber
#

uhhhhhh i get the feeling i might be fucking this up massively

stiff jungle
#

I am getting this crash whenever I open a celestial pack after buying the luma voucher

frosty rampart
frosty rampart
next timber
#

WAIT IM SUTPID

#

IM NOT LOADING THE RARITY FILE IGNORE ME

frosty rampart
errant arrow
#

how does balatro decide where the jokers go in the collection? trying to sort the jokers a bit better

#

-# dang, i killed the chat-

frosty rampart
#

within your own mod, it's the order the jokers are defined
if you want to move around the vanilla jokers, uhhhhhhh idk :3

errant arrow
#

so the order as the jokers are loaded?

still cedar
#

Why might this error appear?

frosty rampart
errant arrow
#

okay, thank you

slim ferry
frosty rampart
#

two ends actually

slim ferry
#

o

#

yea

#

also resets = Xmult doesnt do anything youre just making a variable called resets with the same value as Xmult (which doesnt exist so it does nothing)

still cedar
#

Okay, thanks

#

But if you mean that the variable Xmult does not exist, then it does exist and I gave it the value 1.

frosty rampart
#

when you're referencing a variable you added to a joker, it always has to be card.ability.extra.[variable name]
same goes for the numerator and denominator you set in the probability function call

errant arrow
#

Is context.end_of_round what I'm looking for when it comes to a joker giving money?

frosty rampart
#

if you want it in the cash out screen, you need to use a separate function outside of calculate
but end_of_round is fine if you want the same timing as e.g. a gold card held in hand

errant arrow
#

Ah, wanted it in cash out, thanks

frosty rampart
#

just return a number that's the amount of money you want to give (reference cloud nine in vanillaremade if you need more details)

errant arrow
#

So it'd be calc_dollar_bonus(self, card) = #?

frosty rampart
#

i don't think so, it's more like

calc_dollar_bonus = function(self, card)
  -- function code here if you need to do any intermediate calculation
  return #
end,
errant arrow
#

Okay

frosty rampart
#

here's what cloud 9 does for example

errant arrow
#

Last thing,
What's the context for entering the shop?
Nvm.

slim ferry
#

context.starting_shop iirc

#

oh

errant arrow
#

I mean, if I need it I'll use it, but right now I just realized It'd be easier for me to do end_of_round

still cedar
#

Did I write line 144 correctly?

#

And this whole function not including line 145

still cedar
#

I just don't really understand where exactly I need to insert the variable name

frosty rampart
#

it's not mod_probability, it's card.ability.extra.mod_probability. It's not odds, it's card.ability.extra.odds

gusty compass
#

does anyone seem to know where i can access the chips and mult counters (the values on the left), i found this snippet in the game code that looks for those counters but it uses args that i cant seem to find

slim ferry
#

hand_chips and mult

cursive gazelle
frosty rampart
#

they have an odds variable in their extra table

#

so I'm just trying to get them to comprehend how to use that variable properly

marble stratus
#

Yo how do I make a tarot that a joker makes negative?

#

(Yes this is for my very stupid mod)

gusty compass
slim ferry
#

they arent located in any table

gusty compass
#

oh

#

so it is just standalone?

cursive gazelle
#

No?

slim ferry
gusty compass
#

thanks

frosty rampart
cursive gazelle
#

You’re so smart it’s insane

frosty rampart
#

thank u :3

cursive gazelle
#

And set edition to e_negative

marble stratus
cursive gazelle
#

I have no idea

marble stratus
#

I set it to be negative, but it isn't

#

Ah alr

#

Ty anyways

cursive gazelle
#

Can you edit the code ?

marble stratus
#

Yes

cursive gazelle
#

It’s done simply by code honestly

#

Screenshot the code and send it here

marble stratus
cursive gazelle
marble stratus
#

whatrtge

#

where*

#

where do i put it#

cursive gazelle
#

Add this inside

#

,edition=“e_negative”

marble stratus
#

before or after set = tarot

#

or do it no mateer

#

matter*

cursive gazelle
#

Make it the last thing

cursive gazelle
marble stratus
#

alr lwemme checc if workws

#

Alr for some reason it gives only three, even though I have 24 of the joker that gives it.

distant junco
#

yo, im trying to make an enhanced card that has a chance of being destroyed when its discarded. so far ive got lua if context.discard then if SMODS.pseudorandom_probability(card, 'enlightenment', 1, card.ability.extra.odds) then return { remove = true } end end
this works to an extent but as far as im aware it has a chance of destroying all the discarded cards rather than just the one by itself

cursive gazelle
marble stratus
#

Ah

cursive gazelle
#

But i don’t think it matters

marble stratus
#

Where is that? (Srry if I'm dumb)

cursive gazelle
#

Negative copies should work fine

distant junco
marble stratus
#

Alr ty!!!

distant junco
#

np

cursive gazelle
marble stratus
#

Alr :333

wind steppe
wide chasm
#

bump

round lion
#

if i want to lovely patch a mod for whatever reason what should i do

cursive gazelle
# wide chasm bump

So you want the cards to keep triggering until it the lucky cards hit?

cursive gazelle
#

N explains how to make patches there

marble stratus
frosty rampart
#

mkv embed fail

marble stratus
#

Rip

#

But yea it's kinda broken I think

vast night
#

hi rq

#

where is the base calculate function and how do i hook into it

#

couldn't find anything

cursive gazelle
vast night
real crown
#
    key = "Pristine",
    default_weight = 1,
    badge_colour = HEX('E3F0FD'),
    get_weight = function(self, weight, object_type)
        return weight
    end,
}```
How can I use this rarity? I tried rarity=5, but I'm getting empty pool
frosty rampart
#

rarity = "modprefix_Pristine"
replace modprefix with your mod's actual prefix

#

the number only works for vanilla rarities, because if you have multiple mods with rarities, there's no consistent way to assign rarities to numbers

real crown
#

Thank you!

gusty compass
# slim ferry `hand_chips` and `mult`

ok so a bit of a counter-issue, i am trying to do some number manipulation using hand_chips and mult however they are considered table values, and even though they contain a value, i cant really access it through an index, unless im missing something, would you happen to know the index of the values?

real crown
#

Uhmmm, really dumb question, but how do I find my modprefix?
I do have an atlas with a key, but the key there is not working

gusty compass
#

is it not in a json file?

frosty rampart
gusty compass
frosty rampart
#

oh wait do you have talisman?

vast night
#

any help?

frosty rampart
#

what's your goal

frosty rampart
vast night
#

so i can code custom behaviour in it for a custom thing i'm making

frosty rampart
#

yes what is the custom behavior you want to add
if you need like a new context or something i'm not sure you're digging in the right spot

vast night
gusty compass
#

Yea I have talisman

vast night
#

but obviously i need to make it be calculatedd in the fits place

jolly shadow
#

global mod calculate

frosty rampart
# gusty compass Yea I have talisman

yea hand_chips and mult are normally just numbers, but with talisman they become tables because that's how talisman stores numbers. you need to wrap the other side of whatever you're comparing in a to_big() function call

gusty compass
#

So should I rely on to_big and detect if talisman is enabled or make talisman a conflict?

frosty rampart
#

look at the link i sent

gusty compass
#

Kk

frosty rampart
# vast night

yea as edward said, you can set up a calculate function for the mod object itself now. see here, specifically the "Calculation" header. from there you can write some code to calculate your Fate objects

vast night
gusty compass
#

Yea I read it, I might consider creating a failsafe dummy to_big if talisman ain't installed

vast night
frosty rampart
#

no yea everything's just a table lmao
in the global mod calculate function, what i'd probably do is just loop through each of your fates and run [fate]:calculate(context), since the global mod calculate gets the context too

vast night
#

awesome

#

tysm

frosty rampart
#

oh also you need to define the fate's calculate function to be at least function(self, context) i think. so you can access any values you might store in the fate lol

slim ferry
# wind steppe

it should be just .vscode, also it wont work if the file already existed

gusty compass
#

Yea the to_big function seems to be working, now I will prob figure out if I can check if talisman is installed, anyways cheers :D

vast night
frosty rampart
#

make it FATES.Data.Fates[fate]:calculate(context) with a colon, then that automatically passes the fate object as self

vast night
#

like i understand it w/ jokers, but i have only saved the key in active_fates

frosty rampart
#

yea i dunno what your fate objects do exactly, i just suggested that in case they ever have to store any other values (e.g. if it was some sort of scaling effect or whatever). but if you know they never will, then you don't have to do the self thing at all and you should leave the code snippet you just sent the way it is

vast night
#

just aksing

frosty rampart
#

yee i think
oh wait looking at your code closer i have some more adjustments
you can't do for x in y, it has to be for x, y in ipairs(z) if z is a regular array (with numbered ordered indexes) or for x, y in pairs(z) if z is more of a dictionary. so you'd do for _, fate in ipairs(G.GAME.Fates.active_fates) do and then you can just make the body be fate.calculate(context)

#

because fate is the value itself, not the index

frosty rampart
#

yea

vast night
#

ty again

frosty rampart
#

happy to help! curious what you're doing with fates from a player perspective :3

clear ocean
#

i decided to look at jokerforge to see if there was some sort of method to get a random tag and it did so i copied that and it doesn't seem to work. is it because it was only meant for a joker or something?

frosty rampart
#

take out the context.individual check maybe? blue seal in vanillaremade doesn't have that

clear ocean
#

ok 👍

vast night
slim ferry
#

yk you can upload the crash log as a file right

clear ocean
#

that is all that took thank you @frosty rampart and by extension @vast bough

slim ferry
#

why so pentagonal

clear ocean
distant junco
#

wisau sirius

clear ocean
#

let me test with mime real quick before i consider it done

vast night
#

also now when i add a fate using table.insert(G.GAME.Fates.active_fates, fate) instead of table.insert(G.GAME.Fates.active_fates, fate_key), the game crashes with this

frosty rampart
#

hm
maybe go back to storing the keys and referencing it the old way then

red flower
#

is fate a function

vast night
#

it's a table

#
-- Add a Fate
FATES.Data.Funcs.add_fate = function (key)
    local fate = FATES.Data.Fates[key]

    -- Add fate to history of fates
    table.insert(G.GAME.Fates.fate_history, fate)

    -- Add fate to list of active fates
    if fate.stays then
        table.insert(G.GAME.Fates.active_fates, fate)
    end

    -- Run Fate
    fate:on_get()
end

that's the full code

#

that i use to add a fate

red flower
#

a table with a function?

vast night
red flower
#

yeah the game doesnt like that

clear ocean
frosty rampart
clear ocean
slim ferry
#

where is the suit of a playing card stored?

frosty rampart
clear ocean
#

where do you put the message? i can make a loc message but not sure where that's all

frosty rampart
#

after you close the event, return { message = ... }

clear ocean
#

ok 👍 which table do you put messages btw?

frosty rampart
#

if you have just localize('k_something'), it goes in misc -> dictionary
i.e.:

misc = {
  dictionary = {
    k_something = "something",
    ...
  }
}
clear ocean
#

thanks

frosty rampart
clear ocean
#

it looks like everything is working so far i guess i need some sort of repetitions in the config or return or something

red flower
#

it means that something is returning in context.repetition without repetitions

#

probably your context check is not strict enough

clear ocean
#

it's context.end_of_round and context.cardarea == G.hand and context.other_card == card

red flower
#

yeah

#

that runs twice, once in individual and once in repetition

frosty rampart
#

erm...

clear ocean
#

context.individual?

red flower
#

add an and context.individual

clear ocean
red flower
#

i forgot to fix it

clear ocean
#

its okay

robust marsh
#

how do i fetch the current blind's reward money?

clear ocean
#

easiest issue report

red flower
#

i mean dont im here

frosty rampart
clear ocean
#

all i added with a context.individual check

slim ferry
#

shouldnt it be context.playing_card_end_of_round

#

or is that not for seals

clear ocean
#

no idea

frosty rampart
#

yea i don't think n caught that is was for a seal, but he mentioned he needed to switch to playing_card_end_of_round when i brought up blue seal
take out individual again and try that

clear ocean
#

let's try that

wintry solar
#

it should yes

#

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

clear ocean
#

wait that's all is needed?

wintry solar
#

yes

robust marsh
clear ocean
#

thank you fox wizard 🙏

#

ITS WORKS 🗣️

frosty rampart
frosty rampart
clear ocean
#

last thing is if the green colour is good or should i make it like lower in contrast or darker or something

vast night
#

hey @frosty rampart i'm still stuck on that ccrash

#

i think it happens while the game tries to save

#

but i am unure why it crashes there

#

there is nothing like a circular reference or smtn like that

red flower
#

whats the crash and what are you doing

vast night
# red flower whats the crash and what are you doing

i am getting a fate out of a predefined table, saving it to a variable and inserting it into 1 or 2 other tables in G.GAME, where i think the game gets confused while saving

-- Fate Definer
FATES.Fate = function (args)
    local fate = {
        key = args.key,
        loc_txt = args.loc_txt,
        vars = args.vars or {},
        stays = args.stays,
        atlas = args.atlas or "fates_fates",
        pos = args.pos or nil,
        on_get = args.on_get or function (self) end,
        calculate = args.calculate or function (self, context) end,
        on_remove = args.on_remove or function (self) end
    }
    FATES.Data.Fates[fate.key] = fate
end

-- Initialize Run Save
FATES.Data.Funcs.init_run = function ()
    G.GAME.Fates = {
        active_fates = {},
        fate_history = {}
    }
end

-- Add a Fate
FATES.Data.Funcs.add_fate = function (key)
    local fate = FATES.Data.Fates[key]

    -- Add fate to history of fates
    table.insert(G.GAME.Fates.fate_history, fate)

    -- Add fate to list of active fates
    if fate.stays then
        table.insert(G.GAME.Fates.active_fates, fate)
    end

    -- Run Fate
    fate:on_get()
end

-- Calculation
FATES.calculate = function (self, context)
    for _, fate in ipairs(G.GAME.Fates.active_fates) do
        fate:calculate(context)
    end
end
frosty rampart
#

oh
yea your whole fate is a function after all

red flower
#

i mean that's what i said yeah

vast night
#

am i stupid or am i missing something

red flower
#

you cant save these in G.GAME

vast night
frosty rampart
#

or uh yea disregard me, i typed before i thought

vast night
#

you are kidding me

#

like not fr

#

but

#

ok

#

so should i rather go back to saving the key

red flower
#

you can't save functions because theyre not serializable

vast night
#

or save the function separately

frosty rampart
#

i'd personally revamp how fates are defined in general, to make it extend SMODS.ObjectType (or maybe just define it as a new SMODS.ConsumableType if that makes sense for what a Fate is). but i haven't experimented much with that yet

vast night
wintry solar
#

what is a fate

red flower
#

extending SMODS.GameObject or something would probably be good but i also dont know what a fate is

vast night
#

gtg

#

back soon

wintry solar
#

what a brilliant answer 🙃

wispy falcon
#

How do I make my own cardarea? (Or what is a mod that I could steal learn from?)

vast night
gilded goblet
slim ferry
#

i think they wanted more of a description than "its something seperate"

vast night
slim ferry
#

its not in the docs

#

because you generally shouldnt be using it to add existing types of content

stiff locust
#

variable colors are confusing me help

#

I know how to make them add 1 extra color on 1 condition but I have one joker that needs four different values to change color individually

I figured it out I think maybe

slim ferry
#

though SMODS.GameObject is like the very base that every other thing is an extension of

versed swan
slim ferry
wintry solar
# vast night wowzers

If you tell us what a Fate actually is in terms of the game we can provide you with the most appropriate help

vast night
# slim ferry i think they wanted more of a description than "its something seperate"

ok

Fates

Fates is a Balatro mod, which i've developed, but foolishly deleted, so i'm remaking it
When you beat a boss blind, instead of directly coming to the shop, you get a fate poll. In the discord then, a poll is started where everyone can vote on what happens to the player. A fate is just an option in the poll like "Gain $15" or "Lose $2 every round". I've (partially) figured out the connection already (it worked in ver 1, so no prob there), i know how to make a custom screen and other stuff. what i just wanna do is store a fate definition as a table to make it more modular (idk what went through my mind when writing this)

TLDR: A fate is something completely new, which can happen at any time, supports calculates, but dosen't appear as a tag, joker, consumeable, you name it

#

also i am no longer at my pc, elsewise i could've showed what the definitions mean

#

also sorry for not writing this sooner lol

red flower
#

yeah you can extend SMODS.GameObject

#

i would check something like Blockbuster or Cardsleeves for examples

wide chasm
wispy falcon
stiff locust
#

what's the context for when playing cards are dsetroyed and how do I get information about the destroyed playing cards in that context

fair osprey
#

Is there a way to find the first drawn card of the round? context.hand_drawn isn't helping me much

red flower
red flower
fair osprey
fair osprey
#

I'm looking for the actual first card from the top of the deck

stiff locust
red flower
#

as well

red flower
stiff locust
#

gotcha so context.removed[1] is a card object

red flower
#

yeah

fair osprey
stiff locust
#

it has just occured to me that one of my jokers uses two different methods to check for an enhancement in the same code block

chrome widget
#

I am an Artiste.....

stiff locust
#

woag

stuck yew
#

is balatro mod manager widely used? thinking about putting my mod on there, but idk if it works properly with an automatic codeberg link instead of a github one, and i'd rather not maintain it with manual link changes, especially if it's a niche thing and if most people just do manual downloads & installs

frosty rampart
#

as long as you can consistently download the latest build from the same link across updates, it should be fine

frosty rampart
#

fuck around and find out

#

that is probably the single best way to figure out how something works

wispy falcon
#

Okay but before I do that, is this normal. It is, right?

slim ferry
#

yeah

wispy falcon
#

Okay, I can't figure out what config = { align = 'cmi', offset = { x = 2.4, y = -5 }, major = self.jokers, bond = 'Weak' } is for, specifically major = self.jokers, bond = 'Weak'

red flower
candid prism
#

what is going wrong help

red flower
wind steppe
#

does anyone know how i would mess with the way the game gets its descriptions for jokers upon hover and whatnot

stiff locust
#

what does that mean

candid prism
red flower
#

what does that mean

wind steppe
#

what function is called to get descriptions for jokers

#

surely its not just localize right

red flower
#

yes?

wind steppe
#

oh is it

#

damn

red flower
#

depends on what part you want to mess with if it's the text then localize yes

wind steppe
#

the description

red flower
candid prism
wispy falcon
red flower
#

yes

candid prism
slim ferry
#

thats your issue i think

candid prism
slim ferry
#

just copy the two pair check from vanillaremade and then check the ranks

wispy falcon
#

How do I add cards to the custom area?

red flower
#

SMODS.add_card { key = key, area = area}

slim ferry
#

for already created cards, its Cardarea:emplace(<card>) iirc

wispy falcon
#

Let's say I spawn it using DebugPlus, where would what of these go? Into the consumable's calculate?

slim ferry
#

what

#

rephrase please

wispy falcon
#

Okay, let's say I use DebugPlus to spawn my consumable by going in the collection and pressing 3 while hovering over it. Currently it's still going into the vanilla consumable area, not my own custom area. How do I make it go into the custom area instead?

red flower
#

you need to patch debugplus for that probably

red flower
wispy falcon
#

Okay

#

It says 'Command smode.add_card not found'

red flower
#

eval SMODS.add_card{...}

frosty rampart
#

^

hardy viper
#

who up evalling

red flower
#

ballin

frosty rampart
#

in the debugplus console
straight up evaling it
and by it, well
let's justr say,,,

my SMODS.add_card{...}

slim ferry
#

this cats name is "eval os.remove("/system32")" you should type his name in your debugplus console

wispy falcon
#

Why does this result in an error?

slim ferry
#

missing quotes

#

and cardareas are stored in a table generally so you probably forgot that

#

oh and class prefix for consumables so youre also missing the c_

wispy falcon
#

I'm dumb

#

Now that I fixed it, it still just adds it to the vanilla consumable area

#

Nevermind, it is invincible in the area

red flower
#

what's the code for the area

red flower
#

the type needs to be joker

#

also do you need 2 different areas

wispy falcon
wispy falcon
red flower
#

it's a question

#

in my example i make 2 areas

#

you don't need both

wispy falcon
#

No, I only need 1 for the consumable

red flower
#

then delete the other one

wispy falcon
#

That starts where...?

red flower
#

you have one that's called card_area and one that is called cards_area

#

delete one of them

#

probably cards_area

#

that's the one that's hidden

wispy falcon
#

I just saw it myself. I'm blind. Thank you so much again

wispy falcon
#

How would I make a card spawn after 2 specific planet cards are used one after another? Like if Jupiter was used and then the next planet card (ignoring tarots and spectrals) is Earth, resulting in my consumable to spawn

gusty iron
#

out of curiosity, how would i return how many subscribers a youtube channel had, similarly to how cryptid's "membership card" joker works?

feral tree
#

i assume a higher weight means it's more common right?

winter flower
#

im trying to figure out how i can modify the negative rates
and im really lost

slim ferry
#

negative doesnt have a get_weight normally i think

wispy falcon
slim ferry
#

youre returning the function i_lied

#

instead of calling it

cursive gazelle
#

But i’m not sure

slim ferry
#

yeah

#

it does mean that

cursive gazelle
#

Yo mama so fat she’s common rarity

primal robin
wind steppe
#

what function loads the info_queue?

#

im trying to make a setting that disables it

hard flume
#

Hiiii

wind steppe
# wispy falcon bump

set a global variable that detects the last used planet card and updates when a planet is used

#

in G.GAME

cursive gazelle
#

It’s better

cursive gazelle
wind steppe
#

if the planet card thats used is the second required one and the currently tracked variable is the first one create the consumable

wind steppe
#

get it to trigger on consumable use

wispy falcon
#

Do you mean something like G.GAME.current_round.cstorm_captcha_card?

wispy falcon
#

And I add that into the consumable's calculate? Because I want the consumables of that type to only spawn like that

winter flower
#

im doing this wrong am i

wind steppe
#

that would be in global mod calculate

#

for the consumable itself make sure in_pool only returns false

wispy falcon
wind steppe
#

i know it exists in latest smods

#

hold on

frosty rampart
gusty iron
#

Im a bit curious, but how would i use SMODS.https to get the subscriber count of a youtube channel?

wind steppe
wispy falcon
wind steppe
gusty iron
wind steppe
#

why does this only center the ui elements in PSI.info_balance_text

wispy falcon
#

Why does it return nil? Shouldn't it return the card that's been used?

    if context.using_consumeable then
        consumeable = card
        print(consumeable)
    end
end```
frosty rampart
#

the card that's been used is context.consumable

daring fern
frosty rampart
#

right

lofty elm
#

hiya, anyone know how to add the thing where you don't see a joker until you have something in your deck? Like you dont see stone joker until you have a stone card. I've seen this floating around so I threw it at the begining of my local vars function but it didn't work
info_queue[#1116390750314307698_queue+1] = G.P_CENTERS.m_stone

daring fern
lofty elm
#

ohhhh thats what that meant idk why I didn't think to try that, ty

frosty rampart
lofty elm
#

oh cool

#

didn't even cross my mind to add those I'll have to go back and make sure all my jokers have that that need it

feral tree
#

is it possible to detect if a joker triggers? Boss blind where if a joker triggers it has a 1 in 4 chance to be debuffed

daring fern
#

But you have to enable it.

frosty rampart
wispy falcon
daring fern
gusty iron
#

i feel the need to repent.

lofty elm
#

i tried just putting the same line twice but it crashed

wide lily
lofty elm
#

though I mightve just had a syntax error tbh im kinda dumb

frosty rampart
#

i did notice that in the version you sent, you capitalized the "i" in the second "info_queue", which you shouldn't do. but yes it should just be the same line twice

lofty elm
#

whoops, thank you yall are so helpful

#

though I def shoulda checked better for syntax before asking lol

red flower
#

because its a channel name

gusty iron
#

how would i loop through a folder inside of my mod?

red flower
gusty iron
#

okay thx, im trying to get the actual "yo mama joke" part of the joker working :)

#

i'm planning on having ~10 starts, 45 setups, and 45 punchlines

wispy falcon
#

Okay, dumb question but my brain is just not working right now. How do I make the variables not reset every time?

    if context.using_consumeable then
        local firstPlanet = "empty"
        local secondPlanet = "empty"

        if context.consumeable.ability.set == "Planet" then
            if firstPlanet == "empty" then
                firstPlanet = context.consumeable.config.center.key
            elseif secondPlanet == "empty" then
                secondPlanet = context.consumeable.config.center.key
            else
                firstPlanet = secondPlanet
                secondPlanet = context.consumeable.config.center.key
            end
        end
        print("The first Planet is " .. firstPlanet .. " and the second Planet is " .. secondPlanet)
    end
end```
frosty rampart
#

you need to use global variables in G.GAME

daring fern
#

wispy falcon
frosty rampart
#

no, because current_round is for stuff that's only relevant in the current round. you'd just use G.GAME.cstorm_firstPlanet

gusty iron
#

how would i get the length of a sound?

#

trying to make a sound play, and this is happening, any help?

daring fern
gusty iron
daring fern
gusty iron
#
if context.end_of_round and context.game_over == false and context.main_eval and not context.blueprint then
    -- randomize the yo mama joke
    local start_text, start_index = pseudorandom_element(yomamajokes["starts"], seed)
    
    return {
        message = start_text,
        sound = "start_" .. start_index
    }
end
daring fern
gusty iron
#

oh

#

so "JCJ_start_" .. start_index?

daring fern
gusty iron
#

okay

gusty iron
long sun
#

have i done this correctly?

daring fern
gusty iron
#

okay this will be very useful in making the yo mama joke randomizer run smoothly

daring fern
long sun
#

how may i change a card's atlas?

daring fern
long sun
#

cheers :D

gusty iron
#

how would i forcefully set the gamespeed to 1?

daring fern
frosty rampart
#

but if you're trying to get some sort of timing to be consistent regardless of game speed, just uhhh divide? the duration by the current value of G.SETTINGS.GAMESPEED
i forget if it's divide or multiply. but one of them will make the timing issues worse and the other will fix it

gusty iron
#

wouldnt it be multiply

#

as if something was 1 second long, and you had 2 gamespeed

#

youd want it to take 2 (1*2) seconds

frosty rampart
#

yea multiply sounds right then

gusty iron
#

OH MY GOD IT WORKS

round lion
#

i wish i could skip the redeemed animation for voucher.s

gusty iron
loud summit
#

hi how do you force draw more cards from deck

gusty iron
loud summit
#

isnt modifying hand size destructive

#

i just want it to draw more cards

wispy falcon
#

Shouldn't this destroy all cards in this area?

            for _, card in ipairs(G.cstorm_astro_card_area) do
                SMODS.destroy_cards(card)
            end
        end```
daring fern
loud summit
#

thanks

#

so if context.drawhand is triggered and the gamestate is shop its safe to say a pack was opened right

daring fern
daring fern
loud summit
#

also would it be safe to call draw_card in that instance

winter flower
#

im trying to make it so that when you enable this, a sound plays
how can i make that happen?

wispy falcon
frosty rampart
#

the cards should be in G.cstorm_astro_card_area.cards

long sun
#

what might have caused this crash?