#💻・modding-dev

1 messages · Page 398 of 1

tall apex
#

oh, mine was gonna pseudorandom about 100 dif abilities and tie them to quotes asdkglasdjg

wind steppe
#

i dont watch markiplier so idk many markiplier quotes

tall apex
keen loom
#

tf, why does it display small text like that? i might put that part inside a background instead

snow vale
#

not working?

tall apex
red flower
tall apex
#

-10 mult, destroys joker to the right of him "Well, that's a problem. Not my fault I did everything I could. Also why are you still here?"

carmine burrow
keen loom
tall apex
#

i lLOVE RNG

snow vale
maiden phoenix
#

Why does using copy_card give the default back art?

wind steppe
snow vale
#

then how do i do it?

red flower
carmine burrow
snow vale
#

oh

tall apex
#

cryptid'nt

carmine burrow
#

you might want to check that it's calling calculate for played cards and not held cards but i dont remember the context for that

keen loom
wind steppe
#

gambling all day every day

tall apex
red flower
tall apex
maiden phoenix
wind steppe
wintry solar
#

Why do you need a util function to put a singular number in two functions?

red flower
maiden phoenix
#

Ah ok I'll update SMODS 👍

tall apex
#

i return.,,

wheat jewel
#

How can i make a joker halve the blind size?

tall apex
#

my card enhancement name might be to silly for server it got me myooted . w.

tall apex
red flower
faint yacht
# wheat jewel How can i make a joker halve the blind size?

I'd wrap such in an event, anyway.
-# Taken from DriveSpace.

G.E_MANAGER:add_event(Event({func = function()
    G.GAME.blind.chips = math.floor(G.GAME.blind.chips/2)
    G.GAME.blind.chip_text = number_format(G.GAME.blind.chips)
    G.FUNCS.blind_chip_UI_scale(G.hand_text_area.blind_chips)
    G.HUD_blind:recalculate()
    G.hand_text_area.blind_chips:juice_up()
return true end }))
keen loom
#

i was trying to add a bg color to part of the joker's name

    key = 'wokepv',
    rarity = "cr_awake",
    atlas = 'cookies1',
    pos = { x = 2, y = 1 },
    soul_pos = { x = 1, y = 2 },
    loc_vars = function(self, info_queue, card)
        return {
            vars = {
                colours = { HEX("#F4B844") }
            }
        }
    end,
    loc_txt = {
        name = '{B:1}Compassionate{} Pure Vanilla Cookie',
        text = {
        'Test',
        },
    },
}```
red flower
#

no #

keen loom
#

ok yeah, totally the guide's fault for mentioning it like that

red flower
#

yeah its fixed in a pr but it hasnt been merged

misty gorge
#

I GOT IT TO REMOVE MORE CARDS AGAIN :D

#

I don't know how that fixed the problem but it did!!!

#

I'm so glad rn

tall apex
#

hm,, ok so upgrading an edition to the next might be tricky

red flower
wind steppe
misty gorge
#

Huh, okay

#

Maybe I'll try the old method again but with start_dissolve

tall apex
#

the cryptid stuff is a lot more complicated though because the rework tag makes a new copy in the shop

wind steppe
tall apex
#

goodness i gotta make an index now

tawdry shale
#

does anyone know how to substract one dollar from the total each time a joker triggers?

spice wadi
#

any joker or your joker

#

forgot to reply properly, @tawdry shale

#

if its your joker, you can just add dollars = -1 to the return

faint yacht
spice wadi
#

i personally use a variable for the cost

wheat jewel
#

If i want jacks to be considered also kings and queens, do i do this?

tall apex
# wind steppe

this might be for another day this makin my head spin XwX;

wheat jewel
#

i'm referencing the maximum joker from the cryptid mod

faint yacht
#

...being considered as both is... way more difficult.

wheat jewel
#

ahhh i see

#

i guess making them considered as also just kings would make more sense

misty gorge
#

Now I know not to use that

spice wadi
#

1 card being multiple ranks is not currently supported by SMODS because of determining straights

wheat jewel
#

i see

#

Eh no biggie

#

just gonna make them considered kings

spice wadi
stiff quiver
#

whats wrong with this code? i want to retrigger a single random card a random amount of times but instead it retriggers a random amount of cards a random amount of times

    if not context.end_of_round and context.repetition then
      sel_card = 0
      for _, playing_card in ipairs(context.scoring_hand) do
        sel_card = sel_card+1
        end
      selected_card = pseudorandom("seed",1,sel_card)
      if context.other_card == context.scoring_hand[selected_card] then
        return {repetitions = pseudorandom("seed", 1, 10)}
         
      end
    end
  end ,
wheat jewel
daring fern
wheat jewel
#

ohhhh

#

i see

faint yacht
keen loom
#

can you add rarities to consumables?

zenith sage
#
calculate = function(self, card, context)
    if context.cardarea == G.jokers and not context.blueprint then
        local debuffed = {}
        for k, v in ipairs(context.full_hand) do
            if v:is_face() then
                debuffed[#debuffed+1] = v
                v:set_ability(G.P_CENTERS.m_gold, nil, true)
                G.E_MANAGER:add_event(Event({
                    func = function()
                        v:juice_up()
                        return true
                    end
                }))
            end
        end
        if #debuffed > 0 then
            return {
                message = localize('k_gold'),
                colour = G.C.MONEY,
                card = self
            }
        end
  end
#

its saying context.full_hand is a bad argument for ipairs() but thats exactly how its done in midas, any ideas?

red flower
#

you're missing a context check

#

context.cardarea == G.jokers and not context.blueprint is too general

spice wadi
#

midas mask is for scoring_hand and yeah what he said

#

i think you need main_eval or joker_main or smth i forgot what its caused

red flower
#

joker_main

spice wadi
#

i needa actually learn the difference

red flower
#

joker_main is the main joker timing
main_eval is just the equivalent to (not context.individual and not context.repetition)

spice wadi
#

interesting, thanks

zenith sage
#
if context.joker_main then
    if context.cardarea == G.jokers and not context.blueprint then

like so?

red flower
#

you dont need context.cardarea == G.jokers but yes that works

zenith sage
#

that makes sense, thank you

wheat jewel
#

How do set all jacks to be considered kings?

red flower
#

not very easily

#

do you want them to be considered both?

wheat jewel
#

I would want that but i''ve been told that ain't super easy to do

red flower
#

yeah its not

#

if you only want to change one for the other you need to hook get_id

daring fern
spice wadi
#

and do this outside the joker right

midnight coyote
#

whats the ingame function for adding small and big blinds

#

i need to override it so i can put in my own

daring fern
midnight coyote
zenith sage
#
  if v:is_face() then
      debuffed[#debuffed+1] = v
      v:set_ability(G.P_CENTERS.m_gold, nil, true)
      G.E_MANAGER:add_event(Event({
          func = function()
              v:juice_up()
              return true
          end
      }))
  end

im not sure why v:juice_up() is causing a crash here

midnight coyote
#

ah its a lovely patch

wheat jewel
#

or is there a solution but it's very convoluted to try and implement

daring fern
wheat jewel
#

Is there a way to interact with base game jokers through mod code?

zenith sage
#
        if context.joker_main and not context.blueprint then
            local debuffed = {}
            for k, v in ipairs(context.full_hand) do
                if v:is_face() then
                    debuffed[#debuffed+1] = v
                    v:set_ability(G.P_CENTERS.m_gold, nil, true)
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            v:juice_up()
                            return true
                        end
                    }))
                end
            end
            if #debuffed > 0 then
                return {
                    message = localize('k_gold'),
                    colour = G.C.MONEY,
                    card = self
                }
            end
      end
#

for k, v in ipairs(context.full_hand) do

daring fern
wheat jewel
daring fern
#

But you could also patch it.

wheat jewel
#

Don’t know what that means coding wise but i’ll try to search for answers

#

Ohhhh

tranquil gull
wheat jewel
#

Oh that is incredibly helpful for those beginning with balala mods

#

goated

placid star
#

can the loc file of a mod contain and if statement

placid star
#

im trying to change the desc of lucky cards depending on the presence of a joker, should i just take ownership instead?

daring fern
daring fern
# placid star why..?

Because if the joker is present you can redirect the localization to somewhere else.

warm flume
#

I'm trying to make an enhancement that, while held in hand, makes played scoring cards give x mult. It seems that calculate works differently on enhancements than it does on jokers, because I didn't get anywhere with my attempts.
It seems like calculate only runs when the enhanced card itself is evaluated? How would I work around that?

vale plinth
#

Does anyone know how to ajust the editions of shop jokers and jokers out of boosters?

daring fern
rough jolt
#

my cards are returning to hand like I want here but they flip over when returning, anyone know whats causing this? I've changed the stay_flipped and dir arguments but doesnt seem to do anything

warm flume
daring fern
rough jolt
#

yeah

#

general functionality seems to work but the cards flip over when returning

daring fern
sonic cedar
#

how do i run a check for if a joker has eternal

daring fern
bold sleet
#

yeah, that

sonic cedar
#

does that work in take_ownership

bold sleet
#

someome beat me to the race

#

explain

daring fern
hushed field
sonic cedar
daring fern
#

How does one change the base blind size?

hushed field
# sonic cedar

Ah, yeah. There's also SMODS.can_calculate() in case you wanna see if a card is destructible, which accounts for other mod features as well, but if you just wanna know whether it's eternal, this works!

sonic cedar
#

hooray!

red flower
hushed field
red flower
#

yeah it checks if it's debuffed or if it's getting_sliced

vale plinth
#

SMODS.Back{
name = "Showman",
key = "showman",
pos = {x = 1, y = 3},
loc_txt = {
name ="Showman",
text={
"Start with a",
"{C:dark_edition}Negative{} {C:attention}Showman{}",
},
},
apply = function(self)
G.E_MANAGER:add_event(Event({
func = function()
-- Create a Showman card with negative edition
if G.jokers then
local card = create_card("Joker", G.jokers, nil, nil, nil, nil, "j_showman")
card:set_edition({negative = true}, true)
card:add_to_deck()
card:start_materialize()
G.jokers:emplace(card)
end

            return true
        end
    }))
end

}

When running this code there are no crashes only the joker doesnt create, anyone know why?

red flower
#

j_showman doesnt exist :3

vale plinth
#

oh.

red flower
#

j_ring_master

daring fern
vale plinth
#

my intelligence is unmatched

#

thank you so much

vale plinth
daring fern
vale plinth
#

that does make more sense

#

ty

sonic cedar
#

is this right

vale plinth
daring fern
hexed heath
daring fern
# vale plinth

Try replacing all the add joker code with SMODS.add_card({key = "j_ring_master", edition = "e_negative"})?

vale plinth
#

this i made earlier and did work

sonic cedar
hexed heath
jolly prawn
#

How would I go about making a blind decrease the number of scored chips each second? I've tried looking at how cryptid does something similar with "The Clock" but I just don't understand any of it.

vale plinth
hexed heath
vale plinth
#

it only has an extra for loop but that shouldnt matter right?

#

or whatever its called

daring fern
shrewd cobalt
#

bump!

hexed heath
#

you can make an event with a delay to continuously decrease it

#

WIAT FUCK

sonic cedar
#

wrong one

hexed heath
#

thought you were someone else

#

hahaha

sonic cedar
hexed heath
#

for the eternal jimbo

sonic cedar
#

yes that one is me

zenith sage
#

it turns out the juice up crash was from another joker entirely, which also
crashes the game when its sold???

hexed heath
#

you could use SMODS.find_card to find all the jimbos

vale plinth
tranquil gull
#

thoughts?

zenith sage
#
SMODS.Joker{
    key = 'coup',
    loc_txt = {
        name = "Coup D'etat",
        text = {
            "Adds {C:attention}double{} the rank",
            "of {C:attention}highest{} ranked card",
            "held in hand to {C:red}Mult"
        }
    },
    unlocked = true,
    discovered = true,
    rarity = 2,
    cost = 5,
    atlas = 'Jokers',
    pos = { x = 2, y = 0 },
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = false,
    in_pool = function(self)
        if G and G.jokers and #G.jokers.cards >= 3 then
            return true
        end
        return false
    end,
    calculate = function(self, card, context)
        if context.individual then
            if context.cardarea == G.hand then
                local temp_Mult, temp_ID = 0, 0
                local raised_card = nil
                for i=1, #G.hand.cards do
                    if temp_ID <= G.hand.cards[i].base.id and G.hand.cards[i].ability.effect ~= 'Stone Card' then temp_Mult = G.hand.cards[i].base.nominal; temp_ID = G.hand.cards[i].base.id; raised_card = G.hand.cards[i] end
                end
                if raised_card == context.other_card then 
                    if context.other_card.debuff then
                        return {
                            message = localize('k_debuffed'),
                            colour = G.C.RED,
                            card = self,
                        }
                    else
                        return {
                            mult_mod = 2*temp_Mult,
                            message = localize { type = 'variable', key = 'a_mult', vars = { 2*temp_Mult } },
                            card = card,
                        }
                    end
                end
            end
        end
    end
}

thats the full joker code, does anyone know why calling juice_up() on this (or selling it) would crash the game?

tranquil gull
jolly prawn
sonic cedar
north swallow
#

can anyone tell me why this crashes when i try to apply the seal with the consumable?

hexed heath
daring fern
zenith sage
#

i just sold another joker (the one with the code above) and it sold the joker ive been working on

hexed heath
zenith sage
#

just straight up sold a second card

#

i have no idea anymore

hexed heath
north swallow
sonic cedar
#

your mod prefix
and the seal's key

daring fern
north swallow
#

no like

north swallow
#

nvm

#

i misread it

indigo mesa
#

i want to make this joker enhance played cards with a modded enhancement, is this code ok?

            G.play[i]:set_ability(G.P_CENTERS["idk_china"], nil, true)
    end```
indigo mesa
#

just G.play?

north swallow
daring fern
indigo mesa
daring fern
north swallow
#

oh oops

#

mb

sage crater
#

bump

hexed heath
#

wait

sonic cedar
#

hell y-

hexed heath
#

quotes around the j_joker

sonic cedar
#

oh phew

hexed heath
#

since it's a string key to put inside find_cards

sonic cedar
#

yeah i just forgot em

#

but the code itself is okay?

sonic cedar
vale plinth
#

i hate this

red flower
#

vars wont really work as far as i know

red flower
#

yes

sonic cedar
#

yeah

sage crater
#

neat. thanks!

red flower
#

it changes the description too

#

so you need to copy paste it

north swallow
#

ok so now it doesnt crash yet now the consumable literally doesnt do anything :(((

jolly prawn
sage crater
# red flower it changes the description too

ok I don't think I understand lol
would I write smthn like

{
    key = "test",
    loc_txt = {
        name = "title",
        text = {"description 1", "description 2"}
    }
}

and then return key = "test"? And how would I be able to edit the title with this?

jolly prawn
# hexed heath try blocking = false

right now the main problem is i know 2 loop types and they both wouldn't work in this scenario, i think i worded my last question wrong and it should've been more like: what type of loop should i use?

sonic cedar
sage crater
#

ah ok

zenith sage
#

how can i make a new flag for checking if a card has expired before, to achieve an effect like gros michel -> cavendish

#

for in_pool

sage crater
#

I would also like to know ^

sonic cedar
#

both vanillaremade and smods example mod have this actua- yeah that

red flower
#

the smods one is more explained

sage crater
tawdry shale
#

i forgot to say before but thank u bc that fixed my problem

zenith sage
#

question is

#

does setting the flag to true create it, or does it need to be defined / initialized elsewhere

#

like can i just slap G.GAME.pool_flags.vremade_gros_michel_extinct = true into the code and be done with it

red flower
#

does setting the flag to true create it
correct

zenith sage
#

cool

sage crater
vale plinth
#

how does one make a joker eternal?

keen totem
#

(yes, theres a dedicated function for it, idk why)

vale plinth
#

lmao thx

#

imma test it

#

works, tysm

keen totem
#

you can set any other sticker with an actual function for stickers in general

#

but eternal in specific is easier

sonic cedar
sage crater
#

thanks

vale plinth
#

i started with this today so im learning a lot

keen totem
#

maybe

#

i dont think it has one tho no

red flower
#

yeah all the vanilla ones do

keen totem
#

oh

vale plinth
#

oh they do

#

lol

#

but if i had a modded one how would i do it

red flower
#

well not pinned but that makes sense

vale plinth
#

yeah

keen totem
#

set_sticker is just for modded and if you want to use the vanilla ones with their actual names for some reason

vale plinth
#

set_sticker okay thanks

sonic cedar
sage crater
#

ah, ok cool

#

yeah, I think I found the right wiki page to look at on the smods github page

sonic cedar
#

cool

north swallow
#

ok so im tryna make a consumable that applies a seal and if i do the first one the consumable doesnt do anything, and if i do the second one, it just crashes the game what do i do??

sonic cedar
#

what's your mod prefix

snow vale
#

if i make a higher shop rate for a consumable type, will it appear less or more?

keen totem
#

if it doesnt show up every time, less

snow vale
#

nice iea

#

idea

sonic cedar
hexed heath
#

try it and see I guess

sonic cedar
#

aint that the truth

snow vale
keen totem
#

so higher then

snow vale
#

yeah

vale plinth
#

does anyone have an example deck that shows how to put a texture for ur deck

snow vale
#

will this make it rare? (ik it will)

vale plinth
keen totem
north swallow
keen totem
#

decks are just jokers with apply functions instead of a calculate

vale plinth
#

also with the 1x and 2x?

keen totem
#

yea?

#

thats just how atlases work

vale plinth
#

ok thx

keen totem
#

wild deck - all cards are wild cards

snow vale
#

i spent over 800 and didnt get a single quantum

#

it sure is hard

keen totem
#

just got onyx agate on this hit new deck

keen totem
vale plinth
#

shouldnt this work?

keen totem
#

not where you put name

#

goes in a loc_txt

#

but aside from that, sure

vale plinth
#

uhh ignore that its also in loc_txt

keen totem
#

ok

#

its not atlas_pos

#

just pos

vale plinth
#

ah okay

#

testing

placid star
#

is there a table with all card areas?

vale plinth
#

this? it isnt working

placid star
red flower
#

why

placid star
#

i want a joker that fills all card areas with random cards of that type

keen totem
placid star
#

this was my last special grade

keen totem
#

who is this for?

red flower
#

hmmm that seems like it would cause problems if you do all cardareas

keen totem
#

im curious now

red flower
#

like it would break my mod for one

placid star
placid star
keen totem
#

are they all based on jjk characters

placid star
keen totem
#

and if so, who is that one

placid star
#

this is gonna be suguru

vale plinth
red flower
placid star
vale plinth
#

oo cool

sonic cedar
placid star
#

@keen totem feel free to try out the mod wink wink

keen totem
#

do you have it posted in the modding channel?

placid star
placid star
red flower
#

SMODS.ConsumableTypes

#

no e

sonic cedar
#

unthunk ed

vale plinth
#

anyone know why this doesnt work?

#

i made it pos and not atlas pos

#

but still doesnt do anything

#

also no crashes or anything

sage crater
placid star
keen loom
#

i haven't decided on the name for my own mod yet

sonic cedar
keen loom
placid star
#

bala run?

vale plinth
#

I just used the textures

sage crater
spice wadi
#

does anyone know if theres an easy way to hook the functions used by jokers (eg calculate, add_to_deck)
like is there a different function that i can hook or do i have to loop through all the jokers and hook the functions that way

sonic cedar
placid star
red flower
spice wadi
#

ah so it is calculate_joker

#

and how easy from that point would it be to get the mod calling that

red flower
#

well if we assume that the card calling it belongs to the mod then easy

vale plinth
#

And in 1x and 2x moddedvanilla.png

#

The bigger one in 2x

sonic cedar
#

is it lowercase

vale plinth
#

No

#

Is that the problem

sonic cedar
#

no

spice wadi
#

sorry if these are stupid questions

sonic cedar
spice wadi
#

im considering adapting a feature im gonna write for my mod to instead be a library

vale plinth
zenith sage
#

does anyone know why the line self.T.r = -0.2 within:

G.E_MANAGER:add_event(Event({
  func = function()
      play_sound('tarot1')
      self.T.r = -0.2
      self:juice_up(0.3, 0.4)
      self.states.drag.is = true
      self.children.center.pinch.x = true
      G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.3, blockable = false,
          func = function()
                  G.jokers:start_dissolve(self)
                  self:remove()
                  self = nil
              return true; end}))
      return true
  end
}))

might be causing a crash

zenith sage
#

context is

if context.cardarea == G.jokers then
    if context.before and not context.blueprint then
sonic cedar
#

well what's the crash

zenith sage
#

let me get a log rq

keen totem
#

yea

#

self is some special thing that i dont think has any use

placid star
keen totem
#

(for you in a function atleast)

zenith sage
#
Oops! The game crashed:
[SMODS NYCTO "ddcjokers.lua"]:153: attempt to index field 'T' (a nil value)

Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~ALPHA-1129a-STEAMODDED
Love2D Version: 11.5.0
Lovely Version: 0.6.0
Steamodded Mods:
    1: Nyctophilia by Nycto, AnnaSH [ID: NYCTO]
    2: DDC Challenges by Nycto, AnnaSH [ID: DDCChallenges]
Lovely Mods:

Stack Traceback
===============
(3) Lua field 'func' at file 'ddcjokers.lua:153' (from mod with id NYCTO)
Local variables:
 (*temporary) = nil
 (*temporary) = number: -0.2
 (*temporary) = nil
 (*temporary) = nil
 (*temporary) = number: 11747
 (*temporary) = string: "attempt to index field 'T' (a nil value)"
(4) Lua method 'handle' at file 'engine/event.lua:99'
Local variables:
 self = table: 0x03549d88  {start_timer:true, timer:TOTAL, blockable:true, trigger:immediate, func:function: 0x03223e18 (more...)}
 _results = table: 0x02d458c0  {blocking:true, pause_skip:false, time_done:false, completed:false}
(5) Lua method 'update' at file 'engine/event.lua:182'
Local variables:
 self = table: 0x02d489d8  {queue_last_processed:185.98333333337, queues:table: 0x02d48a00, queue_dt:0.016666666666667 (more...)}
 dt = number: 0.0166642
 forced = nil
 (for generator) = C function: next
 (for state) = table: 0x02d48a00  {unlock:table: 0x02d48a28, other:table: 0x02d48ea0, tutorial:table: 0x02d48a78 (more...)}
 (for control) = number: nan
 k = string: "base"
 v = table: 0x02d48a50  {1:table: 0x02f55488, 2:table: 0x03549d88, 3:table: 0x02e46e40, 4:table: 0x03350d90 (more...)}
 blocked = boolean: false
 i = number: 2
 results = table: 0x02d458c0  {blocking:true, pause_skip:false, time_done:false, completed:false}
(6) Lua upvalue 'gameUpdateRef' at file 'game.lua:2537'
Local variables:
 self = table: 0x0276dc58  {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x032e32b8 (more...)}
 dt = number: 0.0166642
 http_resp = nil
(7) Lua method 'update' at Steamodded file 'core/ui.lua:81' 
Local variables:
 self = table: 0x0276dc58  {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x032e32b8 (more...)}
 dt = number: 0.0166642
(8) Lua field 'update' at file 'main.lua:965'
Local variables:
 dt = number: 0.0166642
(9) Lua function '?' at file 'main.lua:909' (best guess)
(10) global C function 'xpcall'
(11) Love2D function at file 'boot.lua:377' (best guess)
Local variables:
 func = Lua function '?' (defined at line 880 of chunk main.lua)
 inerror = boolean: true
 deferErrhand = Lua function '(Love2D Function)' (defined at line 348 of chunk [love "boot.lua"])
 earlyinit = Lua function '(Love2D Function)' (defined at line 355 of chunk [love "boot.lua"])

#

the crash

zenith sage
keen loom
sonic cedar
#

so apparently something's wrong with my ipairs? do i change the _ to k

spice wadi
# red flower self.config.center.mod.id

ty <3

actually i might be doing smth stupid so
the idea is to make some of the core functions of jokers and such be changed to run with a pcall
so if theres an error i can just put a dialog instead of crashing the game
is this a decent idea to put in a library?

#

also im getting this error

frosty rampart
#

vanilla cards/jokers don't have a "mod" defined in self.config.center, so you can't get mod.id
replace the plain print statement with this:

if self.config.center.mod then print(self.config.center.mod.id)
else print("vanilla") end
spice wadi
#

im so stupid thanks

#

i forgot that i was making this for vanilla cards too

spice wadi
#

i feel like it could be useful for playtesting purposes

sage crater
ivory coral
#

hello chat, im making a deck with a specific effect when defeating a boss blind, but checking for if context.end_of_round and G.GAME.blind.boss then makes it trigger like 7 or 8 times at once, what check can i add to make sure it only triggers once instead?

sonic cedar
#

you could hook into Blind:defeat instead maybe

keen loom
#

is there a way to set specific colors so that i can later use it for text anywhere? (instead of defining them again and again)

sonic cedar
sonic cedar
#

(that first line is just for initializing)

sonic cedar
vale plinth
#

it works tho thanks so much

sonic cedar
#

oml 😭

vale plinth
#

we dont talk ab that

#

im just of higher intelligence

sonic cedar
#

sure

north swallow
sonic cedar
#

i got nothing then 🥀

north swallow
#

yeah im kinda done-so

scarlet imp
#

is there a way I could increase the effects of other Jokers while a certain joker is held? Right now I have a bunch of statements like this in my calculate:

if not _joker.ability.mult == nil then
  _joker.ability.mult = _joker.ability.mult * card.ability.extra.multiplier
end

but it doesn't work
this is all being done during context.before btw

sonic cedar
sonic cedar
#

Nvm Im stupider what did I do wrong

sonic cedar
scarlet imp
#

I think you're right, I'll look into that

#

thanks

sonic cedar
#

np!

keen loom
#

how would i use the color of my modded rarity in text?

scarlet imp
#

{C:<your-color-code>} maybe, but I've never used a custom color before tbh

keen loom
#

oh, i just need to use the key for my rarity

paper zealot
paper zealot
sonic cedar
#

example: {C:IjiGray}

#

mod prefix isn’t required unless it was put in the earlier string

scarlet imp
#

is there a way to step-through the code while the game is running? would be really helpful

red flower
#

i wish

sonic cedar
#

god I wish

scarlet imp
#

damn

#

probably just printing out values then is the next best thing, right

red flower
#

yeah

final hornet
#

i'm trying to make a custom enhancement that has a chance to retrigger a played card when an adjacent card scores, but I'm struggling to get it to work. this is my best attempt at getting it to trigger (random chance not included), but I really have no idea what I'm doing which is evident by its lack of doing the thing

calculate = function(self, card, context)
    if context.cardarea == G.play and context.main_scoring then
        local my_pos = nil
        for i = 1, #context.scoring_hand[1] do
            if context.scoring_hand[i] == card then my_pos = i; break end
        end
        if my_pos and (context.scoring_hand[my_pos+1] or context.scoring_hand[my_pos-1]) then 
            card.ability.repetitions = card.ability.repetitions + card.ability.extra.retriggers
            return {
                message = "Hit!",
                card = card
            }
        end
    end
end

can anyone help me with what i'm doing wrong and how to fix?

sonic cedar
#

reading code on mobile is hell N’ you have my utmost respect

#

ok well you already had that but now you have it twice

scarlet imp
sonic cedar
#

yeah

placid star
scarlet imp
#

I tried and they don't seem to show up, I guess that's a red flag already lol

paper zealot
sonic cedar
#

OH RARITY

#

IM SO SORRY 😭

#

yes rarity needs the prefix

keen loom
#

it's giving the wrong total value

scarlet imp
#

surround the numbers in the description with ##

#

the hashtags correspond to the argument in loc_vars you want to access, so instead of +4 do +#1#

#

and so on

#

as for the wrong total

#

make sure you're resetting its total mult addition when a card is removed if it is a cookie

#

also don't do 2 * #G.jokers.cards, make sure you use the card's ability
card.ability.extra.bonus * #G.jokers.cards or something like that, and put "bonus" in the Joker's extra config

wintry swallow
#

why is this happening

sonic cedar
#

check ur atlas key

#

and your atlas sizes

keen loom
#

it's crashing

[SMODS CookieRun "jokers/commons.lua"]:25: attempt to perform arithmetic on field 'bonus' (a nil value)```
sonic cedar
#

because your bonus was returned as nil

#

what are you doing in the loc_vars

#

why are you multiplying by G.jokers or am I missing something

#

breeze is about to blow me out of the water

keen loom
sonic cedar
#

why not just do a for loop instead

paper zealot
# scarlet imp probably just printing out values then is the next best thing, right

DebugPlus can help a bit with this.
It provides an eval command for running code live, if you want to check the contents of a table or change a value, and you can even do eval dp.hovered to inspect the object currently hovered over with the mouse.
There's also watch lua, watch config_tab and watch center which allow you to make code changes to your files and see the results immediately (with some limitations)
https://github.com/WilsontheWolf/DebugPlus/blob/master/docs/dev.md

red flower
sonic cedar
#

Surely they started a new run

keen loom
red flower
#

you want it to be 14?

sonic cedar
wintry swallow
sonic cedar
gusty iron
#

so im making a mod with the partner mod, why is there <Jr ERROR>?

keen loom
gusty iron
#

wait

#

wrong image

sonic cedar
#

There are 5 gingerbraves

formal island
#

im kinda dumb when it comes to coding could u send a text file of the example in this ss

#

😭

keen loom
sonic cedar
#

?

#

Did you add the base mult into the addition

#

Right now it’s just the gainedmult

#

(2*5)

keen loom
#

ok, so like...
card.ability.extra.mult + card.ability.extra.bonus * (G.jokers and #G.jokers.cards or 0)

sonic cedar
#

try it lmk

#

you could definitely just do this with a for loop though

keen loom
sonic cedar
#

any joker period or any common

keen loom
#

those are definitely not common jokers

red flower
sonic cedar
keen loom
#
        extra = {
            mult = 4,
            bonus = 2,
        }
    },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.mult, (card.ability.extra.mult + card.ability.extra.bonus * (G.jokers and #G.jokers.cards  or 0)) } }
    end,
    calculate = function(self, card, context)
        if context.other_joker and (context.other_joker.config.center.rarity == "cr_common") then
            return {
                mult = card.ability.extra.mult + ( card.ability.extra.bonus * #G.jokers.cards )
            }
        end
    end,```
red flower
#

you're not counting commons you're counting jokers

rapid stag
#

okay, so when taking ownership of a vanilla joker, how do i properly overwrite the calculate functionality? because when i specify a calculate function, it seems to do both that and its original behaviour

lucid owl
#

does anyone have any clue why a card is randomly crashing when hovered, with an issue about "colour" being nil? it's a crossmod consumable with paperback and thus uses its badges, but for some reason people are experiencing crashes that i can't replicate myself

#

not my crash log

red flower
sonic cedar
#

does it use cal— yeah

red flower
#

:3

sonic cedar
#

ok but I’m just happy I knew that

#

Im LEARNING

red flower
#

I'm proud of you

sonic cedar
lucid owl
#

this crash makes zero sense lua SUCKS

red flower
#

which is it

rapid stag
#

it's 8 ball

red flower
#

weird

sonic cedar
#

What are you trying to do

rapid stag
#

i am optionally making 8 ball use 9s instead, provided both the config option and the malverk texture are active

sonic cedar
lucid owl
sonic cedar
#

is this a patch moment

lucid owl
#

i have zero clue 💔

sonic cedar
#

i meant cirno mb 😭

lucid owl
#

supposedly the crash still happened with only this mod and paperback installed

#

which makes it even more confusing

lucid owl
sonic cedar
#

sounds like something with paperback

sonic cedar
lucid owl
#

that part's confusing too because it's perfectly normal for me

wind steppe
#

how would i get the sell value of a joker?

lucid owl
#

but several people have reported this crash, only with this card

red flower
sonic cedar
#

DAMN

sonic cedar
lucid owl
#

nope

sonic cedar
rapid stag
#

wait, so calculate() isn't exclusive? cirLost

lucid owl
#

only dependencies are steamodded and lovely

#

this card just doesn't show up whatsoever if paperback isn;t installed

#

fuck the line is "pretty sure"

sonic cedar
#

i mean isnt that a good thing since it's a paperback collab

lucid owl
#

yeah that's intended

sonic cedar
#

oh ok

red flower
rapid stag
#

oh i see, if calculate() doesn't return anything, it just continues throughout the rest of calculate_joker()

hm

lucid owl
#

admittedly it's less of a collab and just adding functionality on our part lol

lucid owl
red flower
lucid owl
lucid owl
red flower
#

also does your mod require a certain smods version?

sonic cedar
lucid owl
#

card doesn't show up

rapid stag
#

wacky, but a simple fix for my issue

lucid owl
#

again intended

lucid owl
sonic cedar
#

what if you undid it to fix this issue rq

lucid owl
#

i think that was just an arbitrary version i picked

red flower
sonic cedar
lucid owl
red flower
#

sometimes you can get the mod disabled but not lovely patches that's why i asked

lucid owl
lucid owl
sonic cedar
#

darn
thought maybe a color was used in the desc

lucid owl
#

nope, originally i thought that too

sonic cedar
#

well the crash line is all about drawing the card (as in rendering, not as in picking up)

lucid owl
#

yeah, which is very weird because everyone has said it;s just from being hovered over

sonic cedar
#

the only time ive had that is when i fudged the description so i thought itd be that

#

maybe take out the attention color just to see?

#

or maybe it's the badge???????????

lucid owl
#

it's kinda hard to test for me unfortunately given i haven't ever experienced this crash

sonic cedar
#

oh right

vagrant grail
lucid owl
#

however my inability to replicate it has been corroborated

#

so i'm thinking it's not an issue on our part at all

keen loom
#

it's still counting itself and any joker regardless of rarity

        return { vars = { card.ability.extra.mult, card.ability.extra.mult + card.ability.extra.bonus * (G.jokers and #G.jokers.cards or 0) } }
    end,
    calculate = function(self, card, context)
        for i = 1, #G.jokers.cards do
            if context.other_joker and (context.other_joker.config.center.rarity == "cr_common") then
                return {
                    mult = card.ability.extra.mult + ( card.ability.extra.bonus * #G.jokers.cards )
                }
            end
        end
    end,```
sonic cedar
#

try adding your mod prefix to the rarity

#

In the context I mean

keen loom
sonic cedar
#

in your metadata file

final hornet
#

correct me if im wrong

red flower
final hornet
#

yeah that would mean for each common joker it would give 5 times the bonus instead of the normal amount (assuming you own 5 jokers)
so 5 common jokers give 25x bonus

sonic cedar
#

the problem is it isn’t just doing common

red flower
#

oh it's the outer loop i think

wintry basin
#

I am really waiting for balatro Kai to release

red flower
#

I'm really waiting for JoyousSpring version 0.8 to release

final hornet
#

am i allowed to bump or re-ask a question i asked earlier

#

i posted it at a bad time and it got lost in other messages

#

so no one responded

keen totem
#

look up "bump" in this channel

red flower
#

yes

keen totem
#

its been said 776 times (like the word bump), you can bump your questions that got lost

final hornet
keen totem
#

nah youre good

#

i was just curious and also wanted to have to see it as well

#

cause bump said been said alot

final hornet
#

this is what i'm currently trying to do

#
calculate = function(self, card, context)
    if context.cardarea == G.play and context.main_scoring then
        local my_pos = nil
        for i = 1, #context.scoring_hand[1] do
            if context.scoring_hand[i] == card then my_pos = i; break end
        end
        if my_pos and (context.scoring_hand[my_pos+1] or context.scoring_hand[my_pos-1]) then 
            card.ability.repetitions = card.ability.repetitions + card.ability.extra.retriggers
            return {
                message = "Hit!",
                card = card
            }
        end
    end
end
#

this is my (failed) attempt to just get it to retrigger at all

red flower
#

im not sure how calculations with enhancements work honestly

north swallow
#

How would i make a joker do a certain calculate function if a certain seal is played on a card

#

?

red flower
final hornet
#

just next to the cardarea or somewhere else?

red flower
umbral zodiac
#

i made the board larger because 5x5 is boring

final hornet
#

that's insane

umbral zodiac
#

:3c

red flower
umbral zodiac
#

i'm just being silly

sturdy compass
umbral zodiac
#

i put . i put minesweeper in a joker

#

i have no sprites atm but like i was really bored the past few days

sturdy compass
#

Some of y'all are insane istg

keen loom
#

is this error happening because of the extra tarot card i made?

red flower
rapid stag
final hornet
rapid stag
#

...well, what if i just try returning an empty table

red flower
final hornet
#
if context.repetition and context.cardarea == G.play then
    local my_pos = nil
    for i = 1, #context.scoring_hand[1] do
        if context.scoring_hand[i] == card then my_pos = i; break end
    end
    if context.other_card == context.scoring_hand[index-1] or context.other_card == context.scoring_hand[index+1] then
        return {
            repetitions = 1
        }
    end
end
red flower
#

replace index for my_pos then

final hornet
#

._. i dum

keen loom
tall jewel
#

aight so i wanna effectively have an alternative 5 of a kind and uh,, only the first card scores?

SMODS.PokerHand {
    key = "Polycule",
    -- above_hand = 'Flush Five',
    mult = 12,
    chips = 160,
    l_mult = 4,
    l_chips = 8,
    example = {
        { 'S_Q',                true, enhancement  = "m_hime_lesbian" },
        { 'D_Q',                true, enhancement  = "m_hime_lesbian" },
        { 'H_Q',                true, enhancement  = "m_hime_lesbian" },
        { 'C_Q',                 true, enhancement  = "m_hime_lesbian" },
        { 'H_Q',                true, enhancement  = "m_hime_lesbian" },
    },
    evaluate = function (parts, hand)
        if #hand < 5 then return {} end
        local scored_cards = {}
        for i = 1, #hand do
            local _card = hand[i]
            print(_card.ability.name)
            if _card.ability.name == "m_hime_lesbian" then
                scored_cards[#scored_cards+1] = _card
            end
        end
        if #scored_cards >= 5 then
            return scored_cards
        end
        return {}
    end,
}```
#

anyone know why that would be?

#

it properly recognizes the hand when 5 of them are played but

red flower
#

return { scored_cards }

tall jewel
#

am i stupid

red flower
#

it needs to be a list of lists

tall jewel
#

thats kinda stupid tbh

#

why not just a list

red flower
#

because its all combinations of the hand

placid silo
final hornet
# red flower replace index for my_pos then
if context.repetition and context.cardarea == G.play then
    local index = nil
    for i = 1, #context.scoring_hand[1] do
        if context.scoring_hand[i] == card then index = i; break end
    end
    if context.other_card == context.scoring_hand[index-1] or context.other_card == context.scoring_hand[index+1] then
        return {
            repetitions = 1
        }
    end
end
tall jewel
#

ahhhh

placid silo
#

❤️

red flower
#

in your case you can only have one but for smaller hands you can have more

tall jewel
#

isee

north swallow
#

SMODS.Joker{ key = 'doctor', loc_txt= { name = 'Doctor Whatsapp', text = {"Cada carta con un sello de whatsap", "Se activa {C:attention}una{} vez mas",} }, atlas = 'doctor', rarity = 1, cost = 4, pools = { ["sahur"] = true }, unlocked = true, discovered = true, blueprint_compat = true, eternal_compat = false, perishable_compat = false, pos = {x=0, y= 0}, calculate = function(self,card,context) if context.scoring_hand and card.seal == 'xmpl_whatsap' then return{ repetitions = 1 } end end, }
can someone tell me why this doesnt retrigger a card when it has a whatsap seal?

red flower
keen loom
#

is this error happening because of my custom extra tarot?

solid mesa
#

@red flower thx

red flower
north swallow
final hornet
red flower
rapid stag
#

is context.main_eval concurrent with context.retrigger_joker?

red flower
#

i think so

keen loom
final hornet
# red flower can you do a print in the return to see if it reaches there?
if context.repetition and context.cardarea == G.play then
    print("Context good")
    local index = nil
    for i = 1, #context.scoring_hand do
        print("Checking "..i)
        if context.scoring_hand[i] == card then
            print("Found index")
            index = i;
            break
        end
    end
    print("Before if")
    if context.other_card == context.scoring_hand[index-1] or context.other_card == context.scoring_hand[index+1] then
        print("Context good 2, electric boogaloo")
        return {
            repetitions = 1
        }
    end
end
#

reaches if statement, fails it

red flower
#

ok that's good it means the repetition works but the logic is wrong

sonic cedar
red flower
#

what this does is retrigger the two adjacent cards

final hornet
#

a

#

...

rapid stag
# rapid stag ...well, what if i just try returning an empty table

ok so returning an empty table fixes the red seal not retriggering

the problem now seems to be the fucking time machine thunk seems to have programmed into the game??? what is happening???????

why is what's programmed
blueprint copy of joker calculate -> again retrigger notice -> retriggered blueprint -> normal joker calculate -> again retrigger notice -> retriggered joker
yet what clearly happens here is
blueprint copy of joker calculate -> retriggered blueprint -> again retrigger notice -> normal joker calculate -> retriggered joker -> again retrigger notice
this doesn't make any sense??????????????????????????????

red flower
#

or wait is that what you want

#

i dont understand the wording on the card

red flower
quartz ravine
final hornet
red flower
#

oh ok that's a bit more complex logic

#

can you check if the other thing works? if it does i can write a mock up for that

final hornet
#

the code does not retrigger the other cards

final hornet
#

:(

sullen fern
wind steppe
#

why doesnt my message work

keen loom
# keen loom

btw, the crash is happening after i switched to the newer metadata system

wind steppe
#

it just says error

keen loom
#

so i rolled back to the old metadata system

sullen fern
rapid stag
wind steppe
#

why doesn't my message work?

                return {
                    message = localize({type = "variable", key = "para_money_minus", vars = {money_minus}}),
                    colour = G.C.RED
                }
keen loom
bleak crane
wind steppe
bleak crane
#
message = localize{type = "variable", key = "para_money_minus", vars = {money_minus}}
rapid stag
#

...how do i suppress the repetition message? cirThink

red flower
# final hornet if a card next to the nuclear card scores -> retrigger nuclear card twice

this works

if context.repetition and context.cardarea == G.play and context.other_card == card then
    local index = nil
    for i = 1, #context.full_hand do
        if context.full_hand[i] == card then
            index = i;
            break
        end
    end
    if (context.full_hand[index - 1] and SMODS.in_scoring(context.full_hand[index - 1], context.scoring_hand)) or
        (context.full_hand[index + 1] and SMODS.in_scoring(context.full_hand[index + 1], context.scoring_hand)) then
        return {
            repetitions = 2
        }
    end
end
final hornet
#

thank you so much!!!

#

is there a way to make it work multiple times though?

#

i was hoping that it could be triggered by red seals and other nuclear cards (with infinite loops causing the explosion)

red flower
#

you can't really make it act in two different timings without patches I don't think but you can add as many repetitions as you like

#

oh and yeah i dont think you can repeat repetitions

upper onyx
#

how do you get the number of chips and mult before they are multiplied together, and also modify those values?

wind steppe
#
                return {
                    message = localize{type = "variable", key = "para_money_minus", vars = {money_minus}},
                    colour = G.C.RED
                }

why doesn't this show a message? it just says ERROR

final hornet
keen loom
#

anyone please help on how i could fix this error?

wind steppe
bleak crane
#

i wanna make custom consumables (not spectral or tarot cards)

SMODS.ConsumableType {
    key = 'kk_plugins',
    collection_rows = { 0, 0 }, -- what does this mean?
    primary_colour = G.C.SET.White, -- where is this used?
    secondary_colour = G.C.SECONDARY_SET.Black -- where is this used?
}

does this look correct for defining the type & can i have my questions written in the code answered?

red flower
red flower
wind steppe
keen loom
wind steppe
#

ok i have no idea what the issue is then

#

wtf is your main file called though if not main.lua

keen loom
wind steppe
#
                return {
                    message = localize{type = "variable", key = "para_money_minus", vars = {money_minus}},
                    colour = G.C.RED
                }

why doesn't this show a message? it just says ERROR

keen loom
#

as i said before, it's happening as soon as i tried switching to the .json metadata system

wind steppe
rapid stag
#

...did you remove your steamodded header when implementing your json metadata

rapid stag
keen loom
# wind steppe can we see the metadata file compared to the header
    "id": "CRPack",
    "name": "Cookie Run Pack",
    "display_name": "Cookie Run Pack",
    "author": ["sooji gooji"],
    "description": "A Balatro expansion mod that adds new Cookie Run jokers and consumables.",
    "prefix": "CRPack",
    "main_file": "CookieRun.lua",
    "priority": 0,
    "badge_colour": "F9AA3C",
    "badge_text_colour": "FFFFFF",
    "display_name": "YM",
    "version": "0.1",
    "dependencies": [
        "Steamodded (>=1.0.0~BETA-0328a)",
        "Lovely (>=0.6)"
        ]
}```
solid mesa
wind steppe
solid mesa
#

oh, and money_minus is valid?

rapid stag
#

why not use SMODS.signed_dollars()

keen loom
#

should i just roll back to the old metadata system? this crash doesn't happen when it uses the old method, but then i can't use mod prefix

wind steppe
#

how do i do that

red flower
rapid stag
tall jewel
#

@placid silo has to suffer with the crime of using my mod :3

solid mesa
keen loom
#

oh, i found a fix to that crash, consumables need to have the same name and key, and i didn't added a name for it

red flower
rapid stag
#

oh right, that's a thing. where would i put that, in the same table that defines the repetition?

red flower
#

yes

rapid stag
#

is it G.C.FILTER or G.C.ATTENTION

red flower
#

filter

wind steppe
#

both work i think

rapid stag
#

...wait no, what cirLost

okay, my issue isn't just that one joker. it's global. for some reason, retriggers for me just broke globally. it does the retrigger and then the again message after.

red flower
#

uhh what smods version do you have

#

i think that broke at some point recently

rapid stag
#

506a

tall jewel
#

well balatro multiplayer crashes with my mod sometimes HuTao_Shrug

keen loom
#

ok, i finally found the root cause of the crashes, it probably has to do with my rarities

wintry basin
#

please help me

keen loom
scarlet imp
#

I have this code that applies a multiplier effect to most vanilla jokers that give Mult effects. As you can see I have a case to handle Jokers with specific effects, such as Shoot the Moon, which I've been testing with. All other Jokers, such as Jimbo, which I also test with, are handled by the general case. Jimbo works properly in that his Mult gets modified by the Joker and then applies the modified amount, and his description changes accordingly. Shoot the Moon's description changes, but no matter what each Queen only gives +13 Mult when held in hand. Any ideas on why that might be happening?

#

btw I'm going to copy the above code into the context.after block to undo the change after calculation, just need to get the code working first

#

even stranger, Baron works perfectly lol

wind steppe
#

where can i find the keys for vanilla jokers?

scarlet imp
#

game.lua in the game's source code, or the key field in VanillaRemade

formal island
#

or the localization files

#

i think

wintry basin
#

Someone please do a antonblast suit skin
hearts because of red
anton annie = king
Brawl Tall Maul Small Busters = Queen
satan = Joker

formal island
#

sounds like a cool idea but idk anything about antonblast

sage crater
#

just a little strong

wind steppe
#

it's perfect

bleak crane
#

why does this say error?

sage crater
#

how do you check if the player has a joker already?
I want to create hard synergies >:]

sonic cedar
#

is the base game joker atlas just Jokers

sage crater
scarlet imp
#

no atlas required for base game, just use pos as you would be for the Jokers.png base game file

sonic cedar
#

ok cool

#

is there a way to check if any joker was triggered? (not inside of a joker)

#

like could i use this to set a variable to true or does post_trigger always iterate regardless of possibility

solid mesa
sonic cedar
#

ok but this is for a true-false condition

solid mesa
#

uh im wrong

solid mesa
sonic cedar
#

"a joker was triggered? set the var to true, otherwise keep it false"

solid mesa
sonic cedar
#

i can do that easily within a joker, but i want to do it in the main file so it's universal

keen loom
#

got a couple problems. the joker is supposed to give +4 mult, and +2 mult for each common cookie, but

  • the total amount in description is wrong
  • the joker also counts itself again, giving +6 mult when alone
tall jewel
solid mesa
keen loom
sage crater
sage crater
sonic cedar
#

well unless youre not using a for loop actually

solid mesa
sage crater
#

yes

solid mesa
#

thx

keen loom
sonic cedar
#

can i see your for loop rq

keen loom
# sonic cedar can i see your for loop rq
        return { vars = { card.ability.extra.mult, card.ability.extra.mult + card.ability.extra.bonus * ((G.jokers and #G.jokers.cards or 0)) } }
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            return {
                mult = card.ability.extra.mult
            }
        end
        for i = 1, #G.jokers.cards do
            if context.other_joker and (context.other_joker.config.center.rarity == "CR_common") then
                    return {
                        mult = card.ability.extra.bonus
                    }
            end
        end
    end```
sonic cedar
#

if you dont want it to count itself

#

it doesnt but the mult was added to the bonus value before (i thought you wanted it to count itself since it's also a common)

keen loom
bleak crane
#

where and how do i define the name for my custom consumable type?

sonic cedar
bleak crane
sonic cedar
#

yeah try that

bleak crane
#

i did it did nothing

sonic cedar
#

wait this is consumabletype

bleak crane
#

ygeah

sage crater
#

how do I check if a condition is met only while a game is going on?
currently a joker is turning negative in my collection because another joker is also on the same page as that joker, which I guess means the game counts that as filling the condition, but I want it to only happen while a game is happening

#

current code

bleak crane
sonic cedar
# keen loom won't this just display the wrong total then?

sorry for delay
try these out
modify as needed to suit you ofc

loc_vars = function(self, info_queue, card)
    return{
    vars = {
      card.ability.extra.mult, 
      card.ability.extra.mult * (G.jokers and #G.jokers.cards or 0) 
    }}
end,

if context.joker_main then
    local count = 0
    for i = 1, #G.jokers.cards do
        if G.jokers.cards[i] ~= self and 
        G.jokers.cards[i].ability.set == 'Joker' then 
          count = count + 1 
        end
    end
    return {
        mult = card.ability.extra.mult * #G.jokers.cards
    }
end
wintry basin
#

Please help me!

rapid stag
#

i should try a bunch of normal jokers too

sonic cedar
#

armed and DANGEROUS

rapid stag
#

...wtf

now it's fine for everything except this specific custom joker

thorn furnace
#

How might one go about checking whether or not the played hand is the most played hand

rapid stag
#

i don't understand

sonic cedar
sage crater
#

how do

#

is it gonna be like if SMODS.find_card("id") in G.GAME.joker_area or smthn?

sonic cedar
#

probably maybe something

sage crater
#

so true

sturdy compass
#

As shrimple as that

sonic cedar
#

i think?

thorn furnace
#

okii

sonic cedar
#

this is pretty much just obelisk check but inversed

#

in which obelisk checks if it isnt the most played hand

thorn furnace
#

was just refactoring my code and the way i went about it was absurdly messy
Good to know theres an easier way dance

sonic cedar
#

lmk how it goes!

thorn furnace
#

yeee

rapid stag
#

WHY

#

that;s so random

sonic cedar
#

well context.before is prescoring

rapid stag
#

that's no reason it should be breaking retriggers

sonic cedar
#

but it's still in the scoring loop

sonic cedar
rapid stag
#

yes - the actual function of retriggers is fine. but it's putting the message after the retrigger specifically during context.before for whatever reason

sonic cedar
#

did you put it in an event

rapid stag
#

put what in an event

sonic cedar
#

the message

rapid stag
#

i'm not putting a message anywhere. it's return { repetitions = 1, card = self }. this is red seal functionality.

sonic cedar
#

wait this is red seal?

rapid stag
stiff quiver
#

how do put small text in a cards description?

sonic cedar
sonic cedar
stiff quiver
sage crater
#

so this joker has been crashing my game for a while now and I've kinda just been avoiding fixing it because I can't figure it out. Anyone got ideas?

It crashes when I enter a new blind, which leads me to assume its effect of adding a fish-enhanced playing card to your deck isn't working properly

tawdry shale
#

if i play a high card the mult goes up to x1.4 mult, but when the hand is scored it does x1.3 mult, is there any way to fix that?

stiff quiver
#

and how do i format color?

sage crater
keen loom
rapid stag
sonic cedar
sage crater
#

oh 🤦‍♂️

sturdy compass
# tawdry shale if i play a high card the mult goes up to x1.4 mult, but when the hand is scored...

You're setting the Xmult value inside of an event. Typically events should only be used for animations, as they tend to run when the Joker visually triggers (which is after the score calculation actually happens). Looking closer you realistically don't even need to be using events here outside of maybe the sounds, but that can be set in your return table instead which is honestly the better solution imo

sonic cedar
sonic cedar
rapid stag
#

can anyone else confirm if this is happening for them or is it just me because i can't imagine this is something i did cirBlech i don't recall touching anything that would specifically break retriggers in context.before

sage crater
rapid stag
# sonic cedar whats in ur locvars

for... what?
for the jokers in particular that i'm experiencing this on?

the only thing i can think of that is in common between these two that i've tested is that i return a .key value,

but i can't see how this has anything to do with the fact that the retrigger message is in the wrong order specifically from context.before

if you're talking about the seal, there isn't one. this isn't a custom seal or anything, this is via a calculate_seal hook

#

which right now, looks like this

sonic cedar
#

ohhhhhhhhhhhhhhhhhhhhhhhhh well no wonder im confused i had no idea this was a h-jesus christ

rapid stag
#

and i don't see anything in here that specifically reorders the message to AFTER the retrigger

#

for a specific context

sonic cedar
#

what's suppressRetriggerMessage

#

(gee i wonder)

rapid stag
#

something i implemented to return from a joker specifically to deal with this because i thought it was happening for a specific joker

#

until i realised this was just randomly happening based on the context

#

and now i'm completely lost as to why this is happening at all

#

because it shouldn't

strange wasp
#

Hi, I know I have been messaging a lot, but I need to know, if anyone uses VSC, how do you make it so iVSC recognizes the documentation for SMODS?

keen loom
rapid stag
#

can i make a card do something in context.before? i want to see if this is replicable across card red seals

this way i could more confidently rule anything that i've done out

sturdy compass
sonic cedar
sonic cedar
sturdy compass
#

the classic blunder

sonic cedar
#

been on a roll with knowing stuff today though you shouldve seen me earlier

sturdy compass
#

toma being john knowledge? trollshock

sonic cedar
strange wasp
#

This will be my first mod that I make.

sonic cedar
#

im late but here anyway

sturdy compass
#

I be faster

sonic cedar
#

in my defense i was gonna open obs and record it

sturdy compass
#

fair enough

#

Funny how we had very similar thoughts to just send some sort of media tho

sage crater
#

is checking how many of a certain playing card in your deck you have still using SMODS.find_card()?

and how do you look for a card with a specific enhancement?

sage crater
sonic cedar
sage crater
#

ah, neat

#

thanks

keen loom
rapid stag
keen loom
rapid stag
keen loom
#

ah

sage crater
sonic cedar
#

i forgot to give crucial info im fumbling

#

the ss i sent goes in locvars as well

sage crater
#

oic

#

fantastic

keen loom
# rapid stag as in, your actual implementation
        if context.joker_main then
            return {
                mult = card.ability.extra.mult
            }
        end
        for i = 1, #G.jokers.cards do
            if context.other_joker and (context.other_joker.config.center.rarity == "CR_common") then
                if G.jokers.cards[i] ~= card then
                    return {
                        mult = card.ability.extra.bonus
                    }
                end
            end
        end
    end```
sonic cedar
sage crater
#

wait, loc_vars?

#

what if I need it for mult

sage crater
rapid stag
sonic cedar
#

same code

sage crater
#

thanks for the clarification

sonic cedar
#

np

thorn furnace
#

If I just wanted to change the description thingy of a Joker do I just do card.loc_txt.text = { "so and so" }

sonic cedar
#

wdym change

thorn furnace
#

I have a Joker that has an interaction with another Joker and I wanted the description to change when that Joker is present

sonic cedar
#

generate_ui shenanigans. you'll also need two descs

thorn furnace
#

j_hpfx_trapezoid?

sonic cedar
#

it's one of my jokers

thorn furnace
#

o

sonic cedar
#

example of what i mean. the description will change once the card is added to my jokers

thorn furnace
#

do I just put this before the calculate function?

sonic cedar
#

yeah

thorn furnace
#

okii
thank u

sonic cedar
#

only do the add_to_deck thing if you want it to trigger how mine does

stiff quiver
#

how do i make it so something happens on discard? i use this but didnt work ```lua if context.pre_discard and context.cardarea == G.play then

sonic cedar
#

context.discard

stiff quiver
#

i also used that but it was triggering the effect once per discarded card

glass scaffold
keen loom
sonic cedar
#

how do you know it's not the four other gingerbraves dawg 😭

rapid stag
#

hm.

keen loom
sonic cedar
#

try taking out that second if statement

#

maybe it's cancelling out something