#💻・modding-dev

1 messages · Page 141 of 1

frosty dock
#

laughs in create_card, SMODS.create_card, SMODS.Booster.create_card

upper fern
#

'start of a new blind'? you mean starting the round?

merry raven
#

Yeah

frosty dock
#

2 is a wrapper for 1, and 3 funnels its return value into 2

wintry solar
#

All contexts are here minus a few end of round ones I missed

frosty dock
#

-# so they're the same thing really

#

oh i didn't see that haha

wild patrol
#

this as it'sown thing right

frosty dock
#

still that after hand drawn, and might be worth adding to context which cards were drawn?

wild patrol
#

just making sure

frosty dock
upper fern
#

chicot, madness, cartomancer trigger in
context.setting_blind and not self.getting_sliced

merry raven
#

What's getting_sliced?

wild patrol
upper fern
#

call me scooby because i haven't got a clue xD @merry raven

wild patrol
#

besides the error it works

frosty dock
wooden badge
merry raven
#

Ah I see

frosty dock
#

it indicates being destroyed at start of round by something like dagger or madness

wild patrol
#

@frosty dock thanks for putting up with myy BS lol

frosty dock
#

all good

wild patrol
#

I guess last question would be away to remove that error

frosty dock
#

this one?

wild patrol
frosty dock
#

it goes away if you remove your override of global create_card

frosty dock
#

lmao

foggy carbon
#

is there a way to detect Seltzer disappearing itself, from another card?

wild patrol
#

it's not a huge deal

frosty dock
#

remove the group_key

wild patrol
#

ahh ok

merry raven
#
if context.setting_blind and card.ability.extra.state == "primed" then
            print("ENHANCE CARDS")
            local normal_cards = {}
            for _, handCard in ipairs(G.hand.cards) do
                if handCard.ability.set ~= "Enhanced" then
                    table.insert(normal_cards, handCard)
                end
            end
 
            if #normal_cards >= 2 then
                local half = math.floor(#normal_cards / 2)
                for i = 1, half do
                    normal_cards[i].config.center = G.P_CENTERS.m_fm_radiant
                    card_eval_status_text(normal_cards[i], 'extra', nil, nil, nil, {
                        message = "Radiant!",
                        sound = "fm_well_of_radiance",
                        colour = G.C.ORANGE
                    })
                end
...

When I started the next blind/round, it doesn't seem like my cards are converting to my custom Enhancement, what am I missing? I reckon it's because that the if case is met before the first hand is actually dealt

frosty dock
#

use context.first_hand_drawn

wild patrol
#

this is greate now i can just focus on making the cards 😄

frosty dock
#

setting_blind happens right when you press select on the blind

wild patrol
#

the actual hard part is done

merry raven
#

I see I see

wild patrol
#

can u mix jokers and tarot cards together in a pack

#

or does it cause issues?

frosty dock
#

try it

foggy carbon
#

they're both cards, I don't see why not

frosty dock
#

i'm pretty sure it should work fine

wild patrol
#

well this is spaghetti code already

#

no telling what crossing the streams will do

foggy carbon
#

actually, maybe the better way to detect what I want is whether or not k_drank_ex is about to display? That way, it procs on any drink joker, even ones added by other mods?

frosty dock
merry raven
# frosty dock use context.first_hand_drawn

Hmmm even after using it it still didn't work, no cards converted to my Enhancement when the Blind started
What I did was to replace context.setting_blind with context.first_hand_drawn, didn't work, it also didn't work either when I included both

upper fern
#

are blueprint, perishable and eternal _compat all false by default?

wooden badge
#

if you don't define them

frosty dock
#

blueprint compat is false by default

crisp coral
#

bp false rest true i think

#

yay

wild patrol
frosty dock
wild patrol
#

yeah

#

wait

frosty dock
#

show

wild patrol
#

give me a second readding it because I think I understand how the dictionary works

frosty dock
#

no just show me a screenshot of it not being selectable

wild patrol
#

hold

#

discord on linux is ass so had to export this video in a weird way to get it to upload

#

only first few seconds really matter

frosty dock
#

... huh

#

and you only removed the group key?

wild patrol
#

yeah

#

I added it back gonna see if it works

frosty dock
#

i don't see how that's relevant

wild patrol
#

Well u see my code

#

it's spaghetti so

#

yup that was it

#

it's the group_key

#

oh cool and my dictionary worked to

#

the error is gone

#

😄

frosty dock
#

that doesn't make sense

#

group_key is literally only used in one localize call inside the booster

wild patrol
#

¯_(ツ)_/¯

frosty dock
#

so even if it's controller jank idk why that would be the case

wild patrol
#

wait it doesn't work if I add them through debug menu

#

is that possibly it?

frosty dock
#

that's within reason to be controller jank

wild patrol
#

if I add them with the debug menu

#

close the game and reopen it they work fine

#

now not working again lmao

upper fern
#

I've noticed that if you use the debug menu to add a joker to your 'inventory' then they can still show up in the shop again even without showman, so it might just be debug mode jank?

molten ice
long sun
#

oh ya i get that too

#

with the dupe jokers

wild patrol
#

let me start a new run

#

see if that works

long sun
#

i've actually got a run like that right now :D

#

double baron was invis joker's doing, btw

wild patrol
#

ok

#

so if i start a new run it works?

#

but i have to add the pack with debug

#

go to main menu and come back to the run for i to work

#

ok I did it once started a new run now it doesn't work lol

#

is there away I can just make the pack have a 100% chance to spawn?

tight thistle
#

(relevant effect)

wild patrol
#

I made the pack have a 999 spawn rate

#

and every time it worked fine

upper fern
#

nice lol

wild patrol
#

again thanks for putting up with my BS most modding communities usually just give the piss of figure it out on ur own attitude lol

upper fern
#

it's a collective struggle

foggy oriole
#

is there a way to figure out why cryptid mod crashes when i select pink stake on decks?

upper fern
#

joke answer; it's because you have cryptid installed

#

serious answer; im not sure what pink stake is, is that another mod or is that added by crypid?

foggy oriole
upper fern
#

do you mean purple stake?

foggy oriole
#

oh maybe let me double check

upper fern
#
Balatro Wiki

Balatro has 8 stakes, which add progressively ramping difficulty modifiers to each game. To unlock a stake for a deck, you must complete a run using the highest currently unlocked stake...

foggy oriole
upper fern
#

does it give you a crash log or does it just hard crash

foggy oriole
wild patrol
#

but yeah works

upper fern
# wild patrol

nice!
real quick question, i noticed the head of exodia has the 'mention other card effects' thing going on, how do you do that? I need to do it to reference gold and stone cards with one of my jokers

wild patrol
#

I have no fucking clue

#

Spaghetti code

#

¯_(ツ)_/¯

upper fern
wild patrol
#

Lua do be like that

upper fern
#

figured it out, it's by adding m_(card type) to the info_queue

#

loc_vars = function(self, info_queue, card)
info_queue[#1116390750314307698_queue+1] = G.P_CENTERS.m_gold
info_queue[#1116390750314307698_queue+1] = G.P_CENTERS.m_stone
return { vars = { card.ability.extra.chips, card.ability.extra.mult } }
end,

the return value here is for the variables on the joker description itself

long sun
#

that ability seems very weak — it's harder to hit than Walkie Talkie, and gives less of a reward too

upper fern
#

I had it at +7 +7 but was told that was too strong :)

long sun
#

that is Not True™️

#

i mean even then, that's still a bit weak

#

(for a Common, anyway)

wild patrol
#

anyopne got suggestion for yugiuoh cards to throw into this mess of code lol

upper fern
#

yeah I got it a few messages later, thanks 😄

cerulean rose
#

this doesn't work?

return { dollars = card.ability.dollars, sound = "doot" }
faint yacht
#

calc_dollar_bonus? And what of the mod prefix to the sound string?

cerulean rose
#

just fixed the mod prefix

#

and no, this is in calculate

#

like business card

faint yacht
#

Right.

cerulean rose
#

but in context.before

#

got this as a hacky workaround for now

G.E_MANAGER:add_event(Event({
    func = function()
        play_sound("pencil_doot")
        return true
    end
}))
return { dollars = card.ability.dollars }
wintry solar
#

Te sound only plays alongside a message

zealous glen
#

But why 🤔

nocturne garnet
#

hey yall
do yall know why text input ui is so weird
its just so weird for some reason

dreamy thunder
#

how do i correctly set up "requires" for vouchers? currently it isnt working

hardy viper
nocturne garnet
#

its funky

#

or its my code thats funky

grand violet
#

Greetings Balapals™️®️!

I'm gonna be out for two weeks in Japan for... a thing, so I can't be around for your pinning needs.
Feel free to message any non-Playstack moderator to do the pinning during this time.
Yes, it will count toward Value Up.
No, they definitely don't mind.
No, I don't watch anime. I'll still be going to Akihabara though. I hear the arcades are great and I have an e-amusement pass to use.

Keep ^^^^ing.
~ Egg

frosty dock
dreamy thunder
#

oh i forgot to add {}

frosty dock
#

Make sure you have the v_ and if needed, your mod prefix

dreamy thunder
#

thanks

cedar stream
#

how would one run a check for the number of played cards in new calc?

hardy viper
cedar stream
#

so #context.played_hand == 1?

hardy viper
#

ya

long sun
#

new ability idea! what do you think?
Modern Art (Common): Gains $2 of sell value per High Card played

#

it allows more sell value to be generated, but at the expense of your Hands

dreamy thunder
#

how to check for the number of cards in current deck?

long sun
#

#G.playing_cards

dreamy thunder
#

thanks

foggy carbon
#

if I want to increase the number of cards players can use from Booster Packs, what's the part of the booster pack that I should be looking at? card.abiility.extra seems to be the number of cards in the pack itself.

ionic verge
#

how would i make this message appear on the joker its tied to, like how wee joker does it?

foggy carbon
#

card = self?

ionic verge
#

game crashed trying to call juice_up when i tried that

#

lemme recreate that rq

foggy carbon
#

okay, no, looking at my own code, card = card is correct. Is the message not appearing, or is it appearing on the wrong card?

ionic verge
#

its appearing on the card its going off of, i.e the face cards its triggering off of

foggy carbon
#

hmm

tepid crow
ionic verge
#

do i need to add that or change the card=card thing to that

tepid crow
#

change

ionic verge
#

got it

#

oh hey it worked would you look at that

tepid crow
#

yeah better_calc is really confusing about that

frosty dock
#

it's always scoring_hand or full_hand (depending on what you need)

ionic verge
#

ok one last thing, why is this adding the mult up twice
i only triggered this guy with three face cards why did he get 18 mult instead of 9

ionic verge
#

does it need context.individual too?

frosty dock
#

yes

ionic verge
#

ok thanks

frosty dock
#

else it also triggers on context.repetition

ionic verge
#

i see

#

will it still work with red seals and such?

#

oh yeah and this gets 'not context.blueprint'

#

cus its the part that scales the mult

frosty dock
ionic verge
#

got it

#

what would i set repetitions equal to to give just one repetition?

#

just 1? or is it more involved than that

#

also yeah set up more context

#

turns out, 1 is fine

wintry solar
#

I think it’s worth the strange notation in this scenario to make standard messages just automatically know where to be though

foggy carbon
#

Not getting any errors, but this isn't doing anything?

tight thistle
#

how do i make a joker check if there are no cards of a certain rank, and react accordingly?

foggy carbon
#
local avoid = false
for i,v in pairs(G.playing_cards)
  if v:get_id() == >rank< then
    avoid = true
  end
end
if not avoid then
  >do thing<
end```
tight thistle
#

oh woops

#

i meant no cards in full deck

#

sorry!

foggy carbon
#

code updated

night pagoda
#

oh my god I was using some leftover commentary from steamodded as a place for patch and now it's gone 😭😭😭

tepid crow
#

lmao

night pagoda
#

I don't even know where it was

mellow prism
#

does anyone have an idea of how to change a card's suit? i've been looking around for examples of people doing it but me and my friend haven't been able to do much without running into errors. trying to have it happen when scoring the card and we have the context down but not the function itself

cedar stream
#

are you doing it via a consumable or joker?

mellow prism
#

via joker, on scoring

#

hold on

#

this is the code my friend whipped up, and the errors being thrown because of it

cedar stream
#

old or new calc?

mellow prism
#

what do you mean

#

have there been changes to steammodded

cedar stream
#

version of steamodded

#

what version are you on

mellow prism
#

his current is 1.0.0

#

mine is 1.0.1 but i've not tested on my end yet

cedar stream
#

this is for a consumable but, it does check for a suit and if it cant find the suit then it does something else

#

what is your version

#

the important stuff i highlighted

mellow prism
#

mm

#

1312

cedar stream
#

thats new calc

#

that screenshot is my code, and it does work on both new and old calc

mellow prism
#

i'll try this out

hardy quail
#

hey so how do you make card skins/resource packs? I already unzipped the .exe of balatro but what do i do now?

candid epoch
#

thinking how it looks

#

also the suprise of 3 people actually following my texturepack 😭

modest dove
#

Is there a card skin template people use to make custom card skins?

candid epoch
#

just the default card skin?

#

yeah, you can extract it but i can post it for you

modest dove
#

Ah

candid epoch
modest dove
#

Thank you!

weak depot
#

made a pallete consisting of the main colors the spritework of the game uses, if anyone else wants to use it here you go

lethal mural
#

why does this crash the game with an "attempt to compare string to number" error? is there something i'm missing?

weak depot
lethal mural
#

the crash log mentioned chips being the problem but ill try that i guess

#

nope that didnt work

cedar stream
#

new or old calc?

lethal mural
#

i.. dont know what that means
i apologize im really new to modding

cedar stream
#

what version of steamodded are you running

lethal mural
#

the latest

cedar stream
#

1304a is old calc

lethal mural
#

1318c

cedar stream
#

new calc

#

let me look

#

What did you use as a reference if any

lethal mural
#

bowling ball from morefluff

cedar stream
#

Crash is on start?

lethal mural
#

it crashes upon playing a jack

cedar stream
#

Ok well then that means that it is seeing the jack

lethal mural
#

it has a hangup with chips for whatever reason

#

i dont understand why though

tender gale
#

How does Hiker work in the base game? Would it be possible to have a consumable that applies an effect like Hiker but with an increasing number of chips each time its triggered, and only have it apply to cards of a specific rank?

cedar stream
outer dagger
#

I have my lua script in the mods folder but for some reason it's not finding it (using Steammodded and lovely both work and I can see the mod window, other mods, but not mine)

Ahh okay i think i got it 🙂

tender gale
#

What that exactly is is a consumable that when first used gives +5 chips to all twos

wintry brook
tender gale
#

but each time you use another one of the same consumable the amount of chips it gives increases

cedar stream
tender gale
#

I mean, another thing I was thinking of is have it tied to a variable that goes up by one when the consumable is used

lethal mural
#

oh huh

#

i found the problem

#

my dumbass didnt realize you cant load a save while testing

#

ok so i think what caused the issue in the first place is that BalaUI puts "" around the values in the extra config
after removing them it still crashed because i was trying to load a previous save to test in which you cant do oops

leaden wren
#

okay we're getting somewhere
joker_main isn't the right context but that's for after i get this even ingame at all
so: how do I get this to appear as an actual joker in the list I can cheat in and test?

#

I'm guessing it doesn't appear since I'm not giving it an atlas?

vagrant cedar
quick patrol
#

Can you do lovely patches into other mod files, specifically into SMODS? I have it targeted but it doesn't actually patch

vagrant cedar
outer dagger
vagrant cedar
#

what is -1

#

*-=

outer dagger
#

a_mult_minus + the card.ability.extra.mult into a string type

worthy stirrup
#

How could I calculate how many Enhanced Cards are in the full deck

outer dagger
#

This is my second day Balatro modding but I program in C a lot sorry cute

upper fern
#
      if G.STAGE == G.STAGES.RUN then                      
        if self.ability.name == "Driver's License" then 
            self.ability.driver_tally = 0
            for k, v in pairs(G.playing_cards) do
                if v.config.center ~= G.P_CENTERS.c_base then self.ability.driver_tally = self.ability.driver_tally+1 end
            end
        end    
      end

basically to start with you need an update function to tally up the amount of cards its looking for, for the description

#

then in the calculate function you do whatever you do based on that code

#

in my case the function gets the number of 7-rank cards in the deck, divides that by 7, and then multiplies by 100 to get chips

outer dagger
worthy stirrup
#

So, something like this for the update?

  update = function(self, card, dt)
    if G.STAGE == G.STAGES.RUN then
        card.ability.extra.EnhancedAmount = 0
        for k, v in pairs(G.playing_cards) do
            if SMODS.has_enhancement(v) then
              card.ability.extra.EnhancedAmount = card.ability.extra.EnhancedAmount+1
            end
        end
    end
end
tight thistle
#

is there a way to add text boxes and sounds when a joker is triggered like cardsauce does it or is that only a cardsauce thing?

hardy viper
tight thistle
#

new calc?

cedar stream
#

why this break in the newest commit of steamodded?

worthy stirrup
#

Im getting a crash when the joker is loaded

 update = function(self, card, dt)
    if G.STAGE == G.STAGES.RUN then
      self.ability.extra.XMult = 0
        for k, v in pairs(G.playing_cards) do
            if v.config.center ~= G.P_CENTERS.c_base then self.ability.extra.XMult = self.ability.extra.XMult+1 end
      end
    end
end,
  calculate = function(self, card, context)
    if context.joker_main then
      return {
        message = localize{type='variable',key='a_xmult',vars={self.ability.extra}},
                                    Xmult_mod = self.ability.extra
      }
    end
  end
}
#

crash log ^

hardy viper
cedar stream
#

i fixed my problem

leaden wren
#
SMODS.Atlas {
  -- Key for code to find it with
  key = "FOM1",
  -- The name of the file, for the code to pull the atlas from
  path = "FOM1.png",
  -- Width of each sprite in 1x size
  px = 71,
  -- Height of each sprite in 1x size
  py = 95
}

SMODS.Joker = {
    key="Jill",
    loc_txt = {
        name="Jill Stingray",
        text={"Gain 1 random Consumable of any type and lose $#1# at end of round"},
    },
    config = {
        extra = {
            money = -1
        }
    },
    atlas='FOM1',
    pos= {x=0,y=0},
    rarity=1,
    cost=2,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.money } }
    end,
    
    calculate = function(self, card, context)
        if context.end_of_round then
          return {
            calc_dollar_bonus = function(self, card)
              local bonus = card.ability.extra.money
              return bonus
            end,
            SMODS.add_card(set=='Consumeables',soulable==true)
          }
        end
      end
}```
#

can't figure out why this basic joker isn't loading

#

just doesn't pop up in the joker panel at all

#

any chance it's not loading since it's getting mad at some loose json files?

violet void
#

Guys is there a way for me to add a info_queue to a card whenever I want?
Its not a specific edition or enhancement

upper fern
worthy stirrup
#

I’ll try it out later, I’m taking a break from coding, thanks though

sudden pine
#

got an odd problem with my custom card textures, they seem to have some sort of odd outline to them. any ideas as to what would cause that?

mystic river
sudden pine
#

you sure? because when compared to the default cards, they aint got that

mystic river
#

just to be clear, what part of the card are you referring to when you talk about an "outline"?

rocky heron
#

i physically cant see the outline

#

they are identical to me

sudden pine
mystic river
#

the edge of the card is identical

rocky heron
#

i want to compare it

sudden pine
mystic river
#

i see what could be described as an outline around the colored sections
is this the outline you refer to?

sudden pine
#

yes

mystic river
#

okay

#

can you also send the 2x version of your png

sudden pine
#

should i also send the high contrast versions

mystic river
#

do the hc versions also have this outline?

rocky heron
sudden pine
#

yeah it has it too

mystic river
#

huh
i have no idea why this would look weird

#

everything i can think of is turning up negative

sudden pine
#

part of me feels like it might be an issue with gimp discarding unused RGB info but idk why it would do that

night pagoda
#

It can be fixed by adding a 0-alpha outline of a color of neighboring pixels around the sprites, but it's a lot of manual labor

#

I have a script that is able to fix this automatically

#

I can share it if you want

sudden pine
#

i feel like that'll be my best bet since gimp is saying "nah, we dont need those outlines"

night pagoda
#

it's not a gimp problem, nothing does that automatically

#

from the art software I mean

#

aseprite doesn't even recognize 0-alpha colors as colors

night pagoda
# sudden pine i feel like that'll be my best bet since gimp is saying "nah, we dont need those...

It requires python and pillow to run, and also edit the file and change the path (YOUR_USERNAME_HERE and YOUR_MODNAME_HERE)

To use it either just launch as-is and it will process all the sprites in the mod folder (if the path is correct), or alternatively, it can process individual sprites from the mod's 1x folder if you drag & drop them into the script file (doesn't work on images outside of the mod folder)

viscid bough
#

Anyone think i should make the chance lower for this?

hushed briar
#

is there an alternative to SMODS.eval_this if i want a joker to show an upgrade message outside the normal calculation steps because the console keeps telling me the function is depreciated

violet void
violet void
#

or 1 in 7

sudden pine
mystic river
#

is the alternative to eval_this

night pagoda
#

why not use card_eval_status_text()?

violet void
#

or would that require an edition

wintry solar
#

Just do a check before you append the info queue

violet void
#

I dont know how to append info_queue outside of loc_vars

#

Which I do like this

wintry solar
#

Oh right I misunderstood, you just need to patch into generate card ui iirc

#

Wherever it handles info queue

hushed briar
violet void
night pagoda
hushed briar
#

ah sorry, assumed it was an smods function, ill look for that one

long sun
#

vague idea, what do you think?
Emotional Damage (Rare): Gains X0.25 Mult per discarded Flush (Currently X1 Mult)

#

name is subject to change, it looks like this and i don't know what emotion it conveys

wintry brook
ionic verge
#

is there a way to set chips/mult to something?
not add not multiply, set

#

for context, the joker i want to make

wintry brook
#

debugPlus does it with the add mult/chips button i think

ionic verge
#

the idea being i take the current chips/mult, take the log base two of them, math.ceiling the result, and then make 2^[thatnumber] the chips/mult

ionic verge
wintry brook
#

thats probably your best bet

mellow prism
# cedar stream

i finally got around to doing this and it crashes specifically when i have ortalab on and does nothing when i have it disabled. im wondering if i have the contexts wrong or something

#

it otherwise does nothing on its own

#

im glad i can look through the documentation but im having a lot of trouble finding what i need

long sun
#

hi, i'm using variable colours for one of my jokers, and they're not working — is the bug in this line?
colours = { ({ G.C.Tarot, G.C.Planet })[card.ability.extra.chosen_type + 1], ({ G.C.Planet, G.C.Tarot })[card.ability.extra.chosen_type + 1] } } }

frosty dock
foggy carbon
#

is there a context for when a hand is being drawn? Like, I want to look at the cards and perform actions on them before the player draws them.

frosty dock
long sun
#

ah gotcha, thanks!!

#

ah this looks cool!! :D

foggy carbon
#

ooo

long sun
#

okay it's a wee bit scuffed, i need to nerf it :>

#

it's at X2.5 at ante 2, uhm.

foggy carbon
#

checkered deck?

long sun
#

yellow deck :>

#

the setup

valid trench
#

can rarity drop rate be changed with a voucher or naah

#

I'd assume I'd have to repool the rarities right

#

well I assume custom rarities can but idk about the vanilla ones, because I can't seem to find what the name I'd use for them is

long sun
#

ooh hello!!

leaden wren
#

it's pretty simple so i don't know what'd be causing it

#

wait.

#

okay no it wasn't a missing comma

#

i'm kinda stumped

worthy stirrup
cerulean rose
#

your header is invalid

leaden wren
#

oh?

#

wdym

cerulean rose
#

wait what's your mod name

#

i see in the log that you have some invalid json errors

leaden wren
#

friendsofmuuyo

cerulean rose
#

does your mod show up in the mods list

leaden wren
leaden wren
#

the joker itself just doesn't appear

cerulean rose
#

oh i see

upper fern
leaden wren
#

it also seemed to be loading the code fine?

cerulean rose
#

remove the = after SMODS.Joker

leaden wren
#

aha!

#

wish VScode picked that up, but hey

cerulean rose
#

it probably didn't because the statement you have is valid lua

#

just doesn't do what you want

leaden wren
#

wheyy!

#

gonna have to fix the loc section

#

but it at least appears

#

thank you kindly

cerulean rose
worthy stirrup
#

okay, now my joker crashes when trying to score

#
  update = function(self, card, dt)
    if G.STAGE == G.STAGES.RUN then
      card.ability.extra.XMult = 1
        for k, v in pairs(G.playing_cards) do
            if v.config.center ~= G.P_CENTERS.c_base then card.ability.extra.XMult = card.ability.extra.XMult+1 end
      end
    end
end,
  calculate = function(self, card, context)
    if context.joker_main then
      return {
        message = localize{type='variable',key='a_xmult',vars={card.ability.extra}},
        Xmult_mod = card.ability.extra
      }
    end
  end
}
#

and heres the crash log

upper fern
#

Xmult_mod = card.ability.extra
there should probably be .XMult at the end of that

worthy stirrup
#

damn, it really do be the simple oversights

#

i dont think it should be trying to add a table as a mult

ionic verge
#

i believe those are built in debug options

upper fern
#

did you replace the vars= one as well to have the .XMult

worthy stirrup
#

let me double check

#

yea

#

oh wait the one with {}?

cerulean rose
ionic verge
wintry brook
#

you could also check how plasma deck does it, i just remembered that

cerulean rose
ionic verge
#

where would decks be in here?

gilded narwhal
#

back

ionic verge
cerulean rose
#

i think it is

ionic verge
leaden wren
#

anyone use debugplus watch lua?
it'd be nice to have live updates, but it seems you need to "take ownership" and such, but i can't find documentation

ionic verge
#

math library is saying theres only logs for base e and base 10

#

im needing base 2

#

also does anyone know the specific version of lua does this game use?

#

i know its not 5.3

#

but im also assuming its 5. something

wintry brook
#

you can just use a log transformation right

ionic verge
#

probably

#

how'd i do that exactly?

#

i might have learned that in calc but i dont remember if i did

wintry brook
#

iirc from calculus its log10(X) / log10(B) = logB(X)

ionic verge
#

riiight i do remember that now

#

that was a precal thing iirc

solar tide
#

Hello, anyone know if its possible to create a new color for joker description, like i want to create a color like the holo one who switch but with differents colors

ionic verge
#

noted

#

tbh little peeved abt that because ive snooped around a lil in 5.3 documentation and it seems it has some nice things

wintry brook
solar tide
#

but if i want the color change

#

i looking at that one but the color will not change

cerulean rose
#

what?

#

what are you trying to do?

leaden wren
#

i'm trying to use DebugPlus's function "watch lua (etc).lua"
to reload my main file every time i modify it
but it prints that I need to use take_ownership

hidden timber
#

Current state and quick look around of the Balatro Mod Manager (don't mind the steamodded versioning, it's still wip)

leaden wren
#

which I'm attempting to do, but it's printing a cryptic error

#

(and there's no documentation of take_ownership, just discord message searching...)

viscid bough
#

anyone know how can i get the current maximum consumable slots? and also how i can get the current amount of consumables

ionic verge
#

two things
first, both args.chips/mult and chips/mult return nil values
second, my game crashes before it enters the joker scoring stage
any thoughts?

foggy carbon
#

how do I get the color for a variable suit name (like the Ancient Joker)

dreamy thunder
#

how do i check how many rounds have passed after buying the joker? like a perishable sticker. I need it to start working after 3 rounds have passed

ionic verge
#

start with checking invis joker maybe?

viscid bough
lucid owl
#

i've never made a mod for this game before but have coding experience and lua is obviously pretty easy. i'm currently debating whether i should start small with a set of jokers or jump to "the big one" and try a mod inspired by lethal company lol (blind amounts are lower, shop is larger but you have to keep money until the end of an ante and pass a quota to survive) (obviously needs some work but the concept hooked me LMAO)

ionic verge
ionic verge
#

at least get a few basic mods set up before you dive deeper

lucid owl
vocal verge
#

best to know how the game ticks before trying to make it tick differently

long sun
#

one more idea for tonight :D
Inception (Common): +4 Mult per played hand this Blind

dreamy thunder
ionic verge
# dreamy thunder i did but im a bit confused

another idea
make a counter variable in the config, then have it count up at end of round and make it so that the joker only does its actual stuff when that counter is greater than x value

worthy stirrup
#

How can i force every joker in the shop into a negative

vocal verge
ionic verge
#

noted

vocal verge
foggy carbon
#

if I want the Nth Joker, I use G.Jokers[N], correct?

wintry brook
ionic verge
#

then yes do [N] at the end

devout pewter
#

Hi, would someone be interested in helping me figure out how to mod the game? Sit down, go through examples, how a mod is set up, make a small example mod with me? I have zero knowledge in lua but I'm confident I can patch together some stuff to make a mod happen :)

ionic verge
#

tis what i used

autumn geode
#

^^^^^

#

same got me started nicely

devout pewter
#

I'll watch it, thanks

ionic verge
#

and a willingness to delve into SMODS documentation

autumn geode
#

if you want to recreate a feature that is already in the game / closesly matches what already exists dig through the games code to see how it was done

foggy carbon
#

excellent. The text works. Now to get everything else working (already got the cards properly flipping, it's just the other two parts)

ionic verge
foggy carbon
#

args is usually the name of a generic variable passed into a function.

#

so it'd be defined at function creation

ionic verge
#

well here
but like
this isnt really helping me

#

cus i want to know where it gets args.chips/mult from

wintry brook
#

Probably in state_events or common_events

ionic verge
#

in back.lua?

#

or elsewhere

wintry brook
#

State_events.lua or common_events.lua

ionic verge
#

ok

#

...
is it really that simple

#

actually

#

no

#

thats total chips

#

might be those though

dreamy thunder
#

yup got the timer thing workng

foggy carbon
#

This code did work back when I had it only flipping Hearts cards, but now that it's a variable it's not working?

ionic verge
#

actual picture of stats because i didnt realize i only hovered over it for like half a second

leaden wren
#

huh.
this is spawning 13 cards. for some reason?

frosty dock
#

do you use latest smods or old calc?

leaden wren
#

me or them?

frosty dock
#

you

leaden wren
#

let me run a quick git pull on smods, but it should be the latest ver

ionic verge
#

how do i do that then

frosty dock
wintry brook
#

update_hand_text({mult = newMult, chips = newChips})

#

something like that

cerulean rose
#

any idea why the cards won't spread out here?

SMODS.current_mod.config_tab = function()
    local area = CardArea(nil, nil, 4 * G.CARD_W, G.CARD_H,
        { highlight_limit = 0, type = "title" }
    )
    G.playing_cards = {}
    for k, v in ipairs(SMODS.Mods.SuitOrder.config.suit_order) do
        local card = Card(nil, nil, G.CARD_W, G.CARD_H, G.P_CARDS[v.card_key .. "_A"], G.P_CENTERS.c_base)
        area:emplace(card)
    end
    G.playing_cards = nil
    area:align_cards()
    return {
        n = G.UIT.ROOT,
        config = {align = "cm", r = 0.1, colour = G.C.BLACK, emboss = 0.05},
        nodes = {
            {
                n = G.UIT.O,
                config = { object = area }
            }
        }
    }
end
frosty dock
#

update_hand_text({delay = 0}, {chips = hand_chips, mult = mult})

leaden wren
cerulean rose
#

no, context.main_eval specifically blocks retriggers

ionic verge
frosty dock
#

I've just forgotten to fix it

cerulean rose
frosty dock
#

alright it's been fixed

leaden wren
#

noted, the wiki for this is just a bit hard to understand
thank you kindly popukonod
found the page with all the contexts, the github wiki search is a bit temperamental so it seems i have to use the repo search

frosty dock
#

it was always supposed to just refer to contexts that trigger on a joker without any secondary card involved

leaden wren
#

okay
one joker done
onto however many more
(each being super weird effects...)

frosty dock
#

e.g. end_of_round gets a main context on jokers as well as context.individual and context.repetition

cerulean rose
#

gotcha

frosty dock
#

someone may decide to add their own effects though, which is why we don't want to encourage negative context checks

ionic verge
#

how would i get that sound to trigger same time as the joker activating
(actual sound pending just using plasma sound bc ability is similar)

frosty dock
#

i.e. context.end_of_round and context.main_eval instead of context.end_of_round and not context.individual and not context.repetition

frosty dock
#

ooh it's multiple sounds

frosty dock
#

if that's the case put it in a func in the return table

ionic verge
#

like this?

#

or

#

like that probably

frosty dock
ionic verge
#

outside the func? like it is currently?

foggy carbon
#

is there a way, without context (I'm in Blind:stay_flipped, not a calculate), to tell if a blind is active or in the shop?

frosty dock
ionic verge
#

ok so dont change it

#

oph

#

wait a minute

foggy carbon
#

thank you lol

ionic verge
#

i saved it and rebooted and everything

frosty dock
#

right, status texts use another set of events

#

so you also need to put the sounds in an event 🥴

ionic verge
frosty dock
#

no

ionic verge
#

damn my reckless copy pasting failed me

frosty dock
#
func = function()
  G.E_MANAGER:add_event(Event({
    func = function()
      -- play_sound(...)
      return true
    end }))
end,
ionic verge
#

i
see

ionic verge
#

@frosty dock ...?

cerulean rose
#

you forgot to return true

ionic verge
#

what should be returned true

cerulean rose
#

the event manager function

#

also remove the play_sounds above

ionic verge
#

oh ok i see

ionic verge
#

thanks

#

the sound isnt really in sync and its bugging me

cerulean rose
#

@frosty dock i know this has been asked a million times but how to patch smods with lovely

#

what mod id

#

seems it's just _

sick sparrow
#

how to get top card in cardarea?

cerulean rose
#

use the cards table

sick sparrow
cerulean rose
#

for the leftmost one yeah

wintry swallow
#

having a weird problem with high contrast stuff in deckskinslite
everything seems fine with the code and textures, but why are the textures swapped in-game?

#

it works perfectly fine as a standalone mod tho

#

oh wait i think i found out

#

nope, still the same, tought it was a missing comma in highContrastTexture

#

(i know it could be fixed by just changing the name but damn i wanna know what did i do wrong)

leaden wren
#

there's no context for the "money gained" phase, yes? i'd like to have my joker spawn stuff specifically then but it isn't a priority

#

there's none on the context page so i assume not

#

aaaanyway
now to figure out how to make the consumable type random...

#

since as far as i can tell add_card needs you to specify the type?

lucid owl
#

is there a way one could discard an amount of random cards from someone's hand after they play? like, the same way that the hook boss does it

leaden wren
#

should be able to grab the source from the game, look at that blind, see what it does, then feed it a local that's pseudorandom

cerulean rose
leaden wren
#

okay so
when i specify area, i get a crash

#

when i DON'T specify area...

sick sparrow
sick sparrow
leaden wren
#

ough, i might have tried G.consumeables

#

nope

sick sparrow
leaden wren
#

ah!
okay
i see what you mean

#

learning lua seems to be a process of endurance

#

mmm still getting a crash

sick sparrow
#

i learn't roblox lua

#

maybe G.consumeables (case sensitive)

sick sparrow
leaden wren
twilit kelp
#

is there a guide on how to create mods?

cerulean rose
spare holly
#

i'm trying to make some custom Tarot skins/Textures(?) but i'm not seeing a clear way to do that with steammodded unless im just looking in the wrong places, is it similar to deck skins and can i do this with DeckSkinsLite or do i need something else?

summer shard
#

Is it better to just downgrade before better calc? it seems to be the cause of a ton of crashes, I can't even get ceres to run by itself without a crash

summer shard
tight thistle
#

still looking for help!

cerulean rose
#

full deck is in G.playing_cards

sick sparrow
#

and i made the dreams true

wooden nexus
#

why are you pinging me

#

please don't

cerulean rose
spare holly
cerulean rose
#

i swear we need to pin that here

#

get this so much lol

lavish mesa
tight thistle
lavish mesa
#

Had to rewrite how the deck works a bit, but it was fun

cerulean rose
tight thistle
#

what?

cerulean rose
#

compile a table of all cards of the desired rank, choose a random one, and destroy

tight thistle
#

im not looking to destroy them from the full deck, just the scored hand

cerulean rose
#

then use context.scored_hand

leaden wren
#

lua is gonna make me go mad

#

genuinely cannot comprehend how this is nil

lavish mesa
# tight thistle im not looking to destroy them from the full deck, just the scored hand

It's better to do it after all joker calculations, before putting cards to discard:

functions/state_events.lua

G.E_MANAGER:add_event(Event({
        trigger = 'immediate',
        func = (function()     
            if G.GAME.modifiers.debuff_played_cards then

Before this part you can insert your logic

delay(0.3)
    if G.GAME.selected_back.name == 'Random Deck' then
        for i=1, #scoring_hand do
            local card = scoring_hand[i]
            logic to destroy 
        end
     end
#

Don't forget to handle Glass Cards properly

#

otherwise destroying them will not add mult to Glass Joker for example

#

And in order for jokers that do sth when card is destroyed
after doing your destroy calculation you will need to call calculate_joker once more

leaden wren
#

okay i searched on github and found code that does what i need the murderous urges are gone

#

nevermind i'm going insane

#

Alas,,,

lavish mesa
#

@tight thistle if your destroy logic is simple enough you can put it here:

functions/state_events.lua
in this loop, func: G.FUNCS.evaluate_play

local cards_destroyed = {}
        for i=1, #scoring_hand do
            local destroyed = nil
            --un-highlight all cards
            highlight_card(scoring_hand[i],(i-0.999)/(#scoring_hand-0.998),'down')
#

like that

#

then you will not need to recalculate card destroy joker effects

#

because they are handled at the end of this loop

cerulean rose
#

no, use calculate

#

and put remove = true in your return table

lavish mesa
#

That's if joker removing card

#

if the removing effect is caused by sth else

#

it's the way to do it

wintry brook
#

unfortunately true

#

doing patches for such a simple effect =(

lavish mesa
#

For example if you are doing a Back that will remove random cards

#

calculate_joker is not a place to do it

tight thistle
#

it is a joker destroying the cards

lavish mesa
tight thistle
#

okay, thank you

cerulean rose
tight thistle
#

uhh

cerulean rose
#

in your joker's center put a calculate method

wintry brook
#

see but how would i go about destroying multiple cards as a result of an enhancements ability

lavish mesa
ionic verge
#

its more in sync than it was before but its notably not at the right point and its bugging me

#

(code)

wintry brook
#

maybe give the event a delay like with other events

cerulean rose
#

its already too late though

wintry brook
#

is this not how you use the destroy card context

cedar stream
#

I dont think it requires a boolean value in (Hearts)

wintry brook
#

that part works fine, the boolean is to ignore debuffs

cedar stream
#

Ah

#

I have only been at this coding stuff for 2 weeks

wintry brook
#

its not destroying any cards as is, earlier it was destroying itself (wrong), and when i can get it to destroy cards its only destroying cards that are scoring

ionic verge
#

is there a way to reload the game without closing and restarting?

cedar stream
#

Wdym?

ionic verge
#

to test my code

#

test it faster

cedar stream
#

Not reat

#

Really*

#

you can alt f4 out

wintry brook
#

i set up a task in vscode that boots the game with a hotkey

ionic verge
cedar stream
#

I play on a drawing monitor so i can assign a key to launch an app

wintry brook
ionic verge
#

fixed it!

cedar stream
#

^^

#

oh?

ionic verge
#

added delay=0 to the return

#

lines everything up nicely, if not making it a little fast

#

tried it bc i saw this in the code i copied

cerulean rose
#

hold M to restart

ionic verge
#

gonna try having both delays-
oh

ionic verge
#

hopefully its still aligned

ionic verge
#

neat

ionic verge
wintry brook
cedar stream
tight thistle
cerulean rose
#

in your joker definition

leaden wren
#

OKAY I CHANGED NOTHING BUT IT WORKS NOW
HERE'S THE CODE TO GENERATE A COMPLETELY RANDOM CONSUMABLE
AUGH

    calculate = function(self, card, context)
      if context.end_of_round and context.main_eval then

          SMODS.add_card {
            set = 'Consumeables',
            area = G.consumeables,
            soulable = true,
          }

          play_sound('myo_opencan')
          return {
            dollars = card.ability.extra.cost*-1
          }
      end
    end
#

hmm
now i think i just need to verify that the consumable area won't fill up

#

which is easy

ionic verge
#

does anyone know what per means here perchance?

tight thistle
leaden wren
#

i was looking at the documentation

#

it seemed as such

ionic verge
#

mhm

cerulean rose
#

percent

cerulean rose
leaden wren
#

order only matters for loc_txt innit

cerulean rose
#

well the keys are integers

#

if you specify in list format integer keys are used

tight thistle
ionic verge
#

i wish i could get it so that i could send the message and play the sound with a different delay

#

cus if its delay = 1 the sound is out of sync

#

but if its 0 the message dissapears too fast

cerulean rose
tight thistle
#

i dont know what you mean then

#

sorry

lucid owl
#

i have a function that is supposed to discard 2 random cards in your hand at the start of a new round/start of scoring, but it's only discarding after the hand is scored. i essentially copied the boss blind "the hook"'s event code verbatim but i'm unsure what makes it discard afterwards instead of before

#

i put an immediate function trigger but it didn't change anything lol

hardy quail
#

hey is there like a template of the cards but with the art removed? i wanna make custom face cards but i dont wanna go through the tedious process of deleteing all the art but not the borders

cerulean rose
#

u could prob just recreate the borders

wintry brook
#

i have this one i use as a base

hardy quail
#

alr thx

tight thistle
foggy carbon
#

is there a way I can make a definition window pop up? Like, when you hover over Deja Vu it tells you what a Red Seal does?

ionic verge
#

put this in local vars, replacing the GPCENTERS stuff with the key of the thing you want to put in

#

anyone know how to put a message in add_event function?

lucid owl
#

where do you find the code for tarot cards? i might just be blind but not sure where it is

leaden wren
#

line 1373 is that bit

ionic verge
#

is there a way to put a message in an add_event function?

#

preferably like the normal ones for joker cards but ill take anything text based at this point

lucid owl
leaden wren
#

hmmm
anyone know of any mods that fuck with the deck card order?

#

i wanna make all the topdeck hearts

#

draw all of them first

cerulean rose
#

modify G.deck.cards

cerulean rose
#

what's shown there is the fields that you can access through context

runic thicket
#

Anyone know where do i find or how to edit the "Oops all 6's" probability from 2 \ 3 to 5 out of 8? or else?

cerulean rose
#

oops doubles other probabilities

#

it doesn't have one inherently

tight thistle
ionic verge
cerulean rose
cerulean rose
ionic verge
#

set that to equal a message and put it in the add_event function?

cerulean rose
#

no, thats a function

ionic verge
#

oh

cerulean rose
#

or use SMODS.calculate_effect with a return table

tight thistle
spare holly
#

crashing, not sure what the cause is, making a texture pack through Malverk and this crash keeps happening when i open the game

ionic verge
wild patrol
#

I need a better way to balance out the Yu-Gi-Oh cards

foggy carbon
wild patrol
#

So far only one I got is pot for +2 draws

foggy carbon
#

I want a joker I made to have a definition slide, like how Deja Vu defines red seals

#

I was told to put info_queue into local_vars but I don't have a local_vars

cerulean rose
#

in your loc_vars function, add to the info_queue table

ionic verge
#

one sec

cerulean rose
#

the image above goes in the table passed to SMODS.Joker

ionic verge
#

loc_vars goes pretty much anywhere

wild patrol
#

@cerulean rose is there a way to program a joker card to add like a counter to it when a specific card type is used and if 3 are used I can make it force a +2 draw?

#

Just curious if there is functions for this

ionic verge
#

all you need for it is the loc_vars line, the table.insert line, and the end line right after it

foggy carbon
#

ahh, I think I'm still using the old syntax

cerulean rose
#

oh god what is that

ionic verge
#

what do each of these args mean?

cerulean rose
#

yeah ok use SMODS.calculate_effect i have no goddamn clue

ionic verge
#

ok how does that work?

#

or where's its documentation

leaden wren
#

i'm green to lua

cerulean rose
cerulean rose
wild patrol
#

So reading the wiki what's the best card type for putting a card in ur deck?

cerulean rose
#

?

wild patrol
#

You know packs u open with special versions of cards u add to ur deck

#

Like steel stone ect

cerulean rose
#

standard pack?

#

oh thats a different context

wild patrol
#

How do I say get the pot of greed card to go into the deck

#

So if u draw it can be used as a consumable for a +2

cerulean rose
leaden wren
cerulean rose
#

yeah, not doing much here tho

#

it's a list of cards

wild patrol
leaden wren
#

no i know, the depth isn't working so i'm just a bit confused

wild patrol
#

Not a deal breaker to just make it like a consumable tarot card but it be funnier to make it like an actual card lol

ionic verge
#

im gonna fuckin
putting the message in the calculate_effect provides the exact same fuckin issue

#

this looks right, right?

cerulean rose
leaden wren
#

as an argument to inspect?
hmmmm

cerulean rose
cerulean rose
cerulean rose
ionic verge
#

certainly -

#

mhm?

cerulean rose
#

it needs to be inside func

ionic verge
#

mhm

cerulean rose
#

the inner one

lucid owl
#

how could i make this discard only one card, instead of two?

leaden wren
#

i think that tried to load so much text the game crashed
now to keep testing

cerulean rose
ionic verge
foggy carbon
#

Okay, I turned one of my jokers into a modern style - and got the definition window working - but now she lacks a sprite. is Atlas the sprite?

ionic verge
cerulean rose
ionic verge
#

code looks like thus

cerulean rose
#

oh god what the hell

#

@frosty dock help

leaden wren
ionic verge
cerulean rose
#

truly

cerulean rose
leaden wren
#

oh

cerulean rose
#

also you'd need to copy everything back

leaden wren
#

well then the same idea but in reverse

#

yep

cerulean rose
#

yeah

cerulean rose
#

try changing bounds of for loop

lucid owl
#

any way i could make a variable of the rank of the removed card? like, if a 7 was removed, set a variable to 7. i'm unsure if this could work perfectly as this uses "the hook"'s code, which removes a card rather than discarding it

cerulean rose
#

selected_card.base.value

foggy carbon
#

So, this used to work, when I was using the old syntax to define the joker. How do I detect the joker now?

cerulean rose
#

needs to be j_modprefix_key

foggy carbon
#

ahh

cerulean rose
#

but also you should use SMODS.find_card

lucid owl
# cerulean rose `selected_card.base.value`

every time i try to do an operation on it (specifically card.ability.extra.mult = card.ability.extra.mult + (card.ability.extra.mult_gain * num)) it gives me an error about trying to perform arithmetic on a nil value, do you know what the issue could be?

foggy carbon
#

is num defined?
is card.ability.extra.mult_gain defined?

cerulean rose
#

also if you want the chips value it would be selected_card:get_chip_bonus()

lucid owl
cerulean rose
#

can we see the config definition

cerulean rose
#

also is there a reason the upgrade happens way after the discard?

lucid owl
lucid owl
#

i'm pretty new to lua so apologies for any incompetence lmao

cerulean rose
#

so jacks should be 11?

#

if so then u want selected_card.base.id

lucid owl
cerulean rose
#

oh then i think selected_card.base.nominal?

#

check raised fist

runic pecan
#

What should I do if I want to have two messages appear on different places (namely one on a joker and the other on a playing card) at the same event/timing?

wild patrol
#

What do you think would fit the theme of this card 4 random jokers cards or 4 random hand cards?

faint yacht
#

Playing cards.

wild patrol
#

If I was actually good at coding I would unironically code a graveyard into this game

lucid owl
#

i may just have to adapt raised fist which does this

#
                    if self.ability.name == 'Raised Fist' then
                        local temp_Mult, temp_ID = 15, 15
                        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 {
                                    h_mult = 2*temp_Mult,
                                    card = self,
                                }
                            end
                        end
                    end
stiff locust
#

it's not shown on screen though

wild patrol
#

Wait cards are actually stored somewhere?

#

I figured the game would just store the last used card

stiff locust
#

i'm pretty sure it stores every discarded/played card somewhere

faint yacht
#

G.discard.cards?

wild patrol
#

Fucking Christ

#

I wonder if I could actually get this to work lmao

#

I could literally add graveyard return card effects

stiff locust
#

i should notify you that there's

#

two different yugioh mods going on rn

wild patrol
#

Who's the other guy

#

If wants he could just have whatever I make if he wants to add it

#

I highly doubt my spaghetti code would compare to his

storm kraken
#
 update = function(self, card, dt)
        if not G.SETTINGS.paused and G.jokers then
        G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function()
        card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips_gain
        return true end }))
        end
        end,

how would i go about making this event trigger every second and only every second? (joker that gains +1 chip every second)

wild patrol
#

Hmm his mod looks to just be multi cards

#

My plan is to actually incorporate card effects

#

Like for example pencils exodia win condition

sick sparrow
#

hitotsu

#

futari

stiff locust
#

(at least for the second one, idk about the concepting one)

wild patrol
#

Well it's a meme mod

#

Not meant to really be balanced lol

#

Meant to just be a what if thing

stiff locust
#

😴

wild patrol
#

Not really expecting monster reborn to do a x100 multi

#

I'd expect to restore a joker card or something

wild patrol
#

a

wild patrol
#

But maybe do something where u can loop back to the beginning of that function when it ends

storm kraken
#

you see the problem here is the function will finish instantly and itll just keep doing that forever and ever and no other game calculations will happen

#

i think its something to do with update but idk how to make that wait a second

storm kraken
wild patrol
#

I wish you could log the game with debugging even if it doesn't crash or be nice if you could see errors

#

It would make trouble shooting easier lol

#

Kinda like how GMOD does it where it'll spam the console

wintry brook
#

sendTraceMessage is how to send messages to the console

wild patrol
#

in the debug the mod?

faint yacht
#

DebugPlus can show that in-game, but it's primarily for output to the CLI console that appears.

runic pecan
#

Copied this if condition from Dragonite.
Is the highlighted part necessary?
Like, what problem would it cause in the future if I remove that part?

storm kraken
#

game speed 🔥

faint yacht
#

Hm... how would a SMODS-rebuilt Observatory-like Voucher be implemented...

storm kraken
#

so i may be struggling a little bit

#
card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips_gain

tried to do this but upon realising that this doesnt work as i wanted i tried other solutions and i cant figure out how to make it the way i want

violet void
storm kraken
#

the spectral part is making me want it to be rare but it should be fine i think

violet void
#

its .8 for tarot and .2 for spectral

storm kraken
#

oh thats fine then

violet void
#

ty for the feedback

frosty dock
#

the answer is wait for lovely 0.7.0, it's currently borked

faint yacht
#

...on my groove again - if I wanted an Observatory-like scoring of consumables to be done (w/o being on a Joker, instead being tied to whether you have redeemed a voucher or not), do I need to hook into calculate_joker or something else? @frosty dock 🖐️

frosty dock
#

we have context.other_consumeable

storm kraken
faint yacht
frosty dock
#

oh I misread 🥴

#

unless we add calculation to vouchers, you'd just have to hook calculate_joker

faint yacht
#

Though, because of Card: being in front, that's a part of the hooking too, correct?

#
local calcjoker_ref = Card:calculate_joker

function Card:calculate_joker(context)
  ...
  Card:calcjoker_ref(context)
end
frosty dock
#

return calcjoker_ref(self, context)

#

though something like that won't actually stack with observatory

#

so maybe I do just make voucher calculation thonk

faint yacht
#

That'd be the easier route, tbh.

#

...would this mean I am at least partially responsible for score_card and this now? 😛

storm kraken
#
update = function(self, card, dt)
        if not G.SETTINGS.paused and G.jokers then
        G.E_MANAGER:add_event(Event({trigger = 'after',  blocking = false, delay = card.ability.extra.seconds * G.SETTINGS.GAMESPEED, func = function()
        card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips_gain
        return true end }))
        end
        end,

im sorry this is like the third time im posting this same code but slightly different but it seems like something is happening with either update function or the card.ability stuff thats making it add up so much (for context i only want the joker to get 1 chip every second but its reaching like 700 chips in 2)

faint yacht
#

From what I notice, G.TIMERS.REAL could be used. You'd just need to set the "current" value of G.TIMERS.REAL to a custom value in the Joker and then set chips based on G.TIMERS.REAL minus the initial value to get the time that had passed since the initial addition of the Joker to hand.

#

math.floor(G.TIMERS.REAL) % 60 will give you the current timer in seconds since launch of game, though.

wintry solar
#

We’d need to fix how vouchers are saved too, iirc when they redeem it just toggles a boolean value

faint yacht
#

Yeah, that's what currently done.

storm kraken
#

oh lord seems like i managed to set the entire games timer to a different value

storm kraken
#

funny thing is i can just make this based off of time since launch and have the chip amount on later runs be something dumb like 1000

random sleet
#

thoughts?

wintry solar
#

I love the right one

zealous glen
#

Same

storm kraken
# random sleet

it may just be me but the left one is a little bit basic imo
the right is the tier 2 of the left right?

violet void
#

I'd say so, it has the line in the middle of the name

wild patrol
#

just not sure how to use it other than press 3 to spawn cards

zealous glen
random sleet
#

yeah left one is wheel of wheel of fortune and the right one is idk yet lol
gonna be like 1 in 4 to spawn a wheel of fortune on blind select or something stupid

violet void
#

add negative chance perchance

random sleet
#

what do you think the right voucher is for

violet void
#

I don't know

random sleet
#

it's for warding off predators

random sleet
violet void
#

Does anyone know

random sleet
#

you have to enable the optional feature now

violet void
#

what 😭

random sleet
#

yeah i thought it was a weird move too but like im not in charge of anything so

#

hee hee hoo hoo and so forth

violet void
#

Im hoping they announced that somewhere

zealous glen
#

I suggested it

#

When aure added calculation contexts for the deck and discards

#

Although I had also suggested to allow it to be controlled per context

random sleet
#

its just going to make it so people wind up making code that breaks with other mods loaded tbh