#đŸ’»ăƒ»modding-dev

1 messages · Page 94 of 1

frosty dock
#

yeah

faint yacht
#

Okay, so it was just the .wav files being too old apparently to understand... but having them in a subfolder works with spaces too.

stiff locust
#

okay small problem

#

every info queue is appearing on the same side

#

and because of the spacing, size of each box and how many there are, they're nigh unreadable in the collection

#

at least half of them are

#

oh god I have to add info queues for negative and eternal too

#

and the stake sticker 😭 that's 11

wintry solar
#

do you actually need that many?

stiff locust
#

yes

#

I don't wanna make an almanac-level joker description

#

i want it to be like chocolate die in cryptid

#

there are 8 different effects here and negative and eternal are involved

#

as well as splash but honestly if you have my mod downloaded do you really need the info queue for it

#

i could probably cut negative and eternal, most people know what those are

#

but the other 8 I do need all of them yes

#

maybe i just need more line breaks

rough furnace
#

see what happens

frosty dock
#

ight merged this and a buncha other PRs, surely nothing will break

strong plume
#

How big are joker sprites?

zealous glen
strong plume
#

I see, ty!

crystal willow
#

Hopefully someone here is smart enough to help 😭

Trying to do custom challenges and I have this template, how would I go about implementing this into a mod?

wooden nexus
rough furnace
#

https://youtu.be/CuWfgiwI73Q the fiest 22 minutes of this video are probably helpful for people. Not sure exactly if it's that helpful for someone with no previous programming knowledge

Ok, so maybe not exactly 1000 seconds, but Fireship doesn't stick to exactly 100 seconds either!!

I mentioned my course from boot dev, which you can check out here: https://boot.dev/teej

All notes are here: https://github.com/tjdevries/advent-of-nvim/blob/master/03 - Lua Crash Course/03 - Lua Crash Course.md

Useful for Neovim,...

▶ Play video
rough furnace
wooden nexus
#

well... it still crashes

cerulean rose
#

the classic blunder

wooden nexus
cerulean rose
#

the blue one after text

rough furnace
#

Oh yeah true

#

I probably just fixed a future crash then

wooden nexus
#

It just got cropped out by accident

cerulean rose
#

oh ok

rough furnace
#

Let me get to my PC to read the error

cerulean rose
#

maybe ability needs to be config?

rough furnace
#

which line is 562

#

it looks like the center for a tag doesn't have an ability

wooden nexus
#

That's 562

rough furnace
#

it looks like the center for a tag doesn't have an ability

wooden nexus
#

It's not a tag though

#

oh wait

#

i misread it

wooden nexus
rough furnace
#

well self is probably a tag not a center

wooden nexus
#

oh

#

wait i see possibly the problem

#

may have copied the wrong tag

#

I had tag_skip instead of tag_orbital

#

and it still crashes

rough furnace
#

it looks like the center for a tag doesn't have an ability

wooden nexus
#

but it does. it's literally part of the code of orbital tag

rough furnace
#

thats a tag not a center

wooden nexus
#

The code is just trying to load said Tag's variable

#

G.P_TAGS['tag_orbital']

rough furnace
#

thats not a tag object

crystal willow
#

I mightve missed it, but in case its actually there:
Is there a section in the steammodded wiki on how to create custom challenges? Is there a way to learn how in general?

hardy viper
#

it's not documented but you can look at others' code

crystal willow
#

bummer

#

Its really messing me up atm lmao

rough furnace
#

I think cryptid makes some challenges

crystal willow
#

this is so complicated for me â˜č
Okie

royal seal
#

I would also recommend looking at the base game's challenges.lua file to see how the base challenges work too

crystal willow
#

It’s not really creating them thats the problem, it’s more just actually implementing them and actually being able to play them thats giving me trouble

wooden nexus
#

This

#

I just want the variable from the orbital tag to use in the description

#

This was said outcome at the time

rough furnace
#

well the orbital tag doesn't store the hand it has in it's config

#

cause its random

wooden nexus
#

then what do I do then?

rough furnace
#

what are you trying to do>

wooden nexus
#

Okay so you know Orbital Tag's description

#

Trying to put that on the card because I really don't want to just put "Creates X Tag"

rough furnace
#

okay so just pass the '['..localize('k_poker_hand')..']' as the variable

wooden nexus
#

So remove the first part?

rough furnace
#

well you're never going to know the hand as it doesn't exist so you don't need to check it

hardy viper
#

you can know the hand if you want

rough furnace
#

well theres no tag to get it from

hardy viper
#

there's a reason the rng functions support prediction

wooden nexus
#

Should i just put Poker Hand for this one because y'know... it's a card

rough furnace
#

thats only if you spawn it immediatly

hardy viper
#

ah

rough furnace
#

you could store the poker hand and then do sometibg to force the tag to keep it when you spawn it but thats a bit more work

wooden nexus
#

I'm thinking of just replacing it to [Poker Hand] Like when it's null

hardy viper
hardy viper
#

didn't want to make it predictable

wooden nexus
#

same

#

but I'm gonna do actual playing cards in the future

#

Good enough

#

good nuff

orchid thunder
#

Sill causing me issues I still can't get a working version

#

Especially working with multiple

placid frigate
#

hey when I tried running my mod I got an error and don't know where it's from

#

May someone help me figure it out

rough furnace
#

you have a syntax error in P5HeroJoker.lua

#

somewhere likely around line 61

placid frigate
#

I see

#

never mind, I don't see aren't you supposed to put a } at the end to close SMODS.Joker?

rough furnace
#

All {'s need to have a matching }

placid frigate
rough furnace
#

the { for SMODS.Joker isn't closed

#

also calcualte doesnt' have an end

placid frigate
#

is the end at line 59 not the end of the calculation

rough furnace
#

no thats the end for the if statment

placid frigate
#

so put a second end after that?

rough furnace
#

yes

placid frigate
#

wouldn't I also need and 'end' after if context.after

rough furnace
#

that one has one

placid frigate
#

ok so just 1 end and the final } for SMODS.Joker?

rough furnace
#

probably

placid frigate
#

alright I'm going to try it I'll probably write back if i still have a problem

rough furnace
#

whats on line 47

placid frigate
#

if context.joker_main and card.ability.extra.xmult >= 1 then

#

should it be >= 0

rough furnace
#

the xmult isn't defined

placid frigate
#

isn't it defined in line 23-26 config = { extra = { Xmult = 1, Xmult_gain = 1 } }, loc_vars = function(self, info_queue, card) return { vars = { card.ability.extra.Xmult, card.ability.extra.Xmult_gain } } end,

rough furnace
#

it's case sensitive

placid frigate
#

so it need to be capital?

#

or lowercase?

frosty dock
nocturne garnet
#

yall is my mod haunted

#

i swear i didnt do anything with this

#

i cant replicate it

#

i dont know why it happens

tepid sky
#

lol ghost's

#

we got jimbo > jimbo sans > ghost jimbo

elder vapor
#

could be a lovely patch?

#

@nocturne garnet

nocturne garnet
elder vapor
#

hmm

#

is your github repo up-to-date?

nocturne garnet
#

i mean its different for me since i added a few jokers

#

so no not really

#

but i didnt change anything about pokerhands or neon prism or selling cards

#

and i dont think i ever changed anything about pokerhands anyways

rough furnace
#

Get the user to send their mod list. Could be another mod or a conflict of some sort

cunning zenith
#

Trying to run the pokermon mod but it keeps giving me this crash, can someone help me please?

gritty valley
#

Is the mod nested?

cunning zenith
#

Meaning? sorry I'm pretty new to this

gritty valley
#

The mod folder, when you open it is it just another folder. If it is, drag the folder inside that one into your mods

cunning zenith
#

oh no no, I unzipped the folder

#

when I open the folder it has a bunch of stuff

rough furnace
#

Do you have steamodded?

cunning zenith
rough furnace
#

Is steamodded nested?

cunning zenith
#

I "injected" steamodded

gritty valley
#

Old version

cunning zenith
#

oh, that's probably it

#

well I did the other way since I had a backup with it already but now the game starts and crashes as soon as I clicked play in new run lol

#

found out what the new problem was. It was conflicting with another mod I had installed

gritty valley
hardy viper
#

known issue

#

occurs with tmj if you scroll hard enough

#

im not watching the whole 1 minute video so i don't know if you figured out that entering a run fixes the issue

gritty valley
tepid sky
#

i mean, who's spamming the next button and complaining for lagg? ._.

hardy viper
#

ill look into it if i get bored

gritty valley
hardy viper
#

i disagree

gritty valley
wintry solar
#

“Doing this random thing that no one normal would ever do could cause issues on lower end machines”

#

Don’t do it then

gritty valley
#

How do you know this extreme of the issue isn't affecting the game in other parts

rough furnace
#

I mean it's likely just a galdur issue

gritty valley
#

This is only showing it off obviously, it probably is causing atleast some perceptable lag on lower end machines with big decks

rough furnace
#

Also if it is affecting other parts of the game we would notice cause we do have people on low end machines who would report if their fps dropped significantly

gritty valley
wintry solar
#

I’m also pretty sure that I patched out the galdur memory leak but I could be mistaken

nocturne garnet
#

incredibly stupid idea ik

gritty valley
#

Like maybe it's low priority but ignoring the issue I think is counter-productive

#

But if it's not percieved by others then it's fine

rough furnace
hardy viper
#

as i said this happens with tmj

#

it's not a vanilla bug though

#

if i coincidentally made the same mistake as eremel and we both just have the same memory leak then oh well but i think it's just a main menu thing

tepid sky
#

what if i wanted to change the base game joker vars? do i just use card.? orrr

hardy viper
#

but it's inconsequential either way

rough furnace
#

Intresrint

wintry solar
#

I think it's a vanilla issue though with how it handles removing items right?

tepid sky
#

how exactly do i change the config (i figured i didn't need the loc_vars)

zealous glen
#

Indeed you can just pass the new config

#

The last boolean can be either true or false

#

Depending on whether you want it to display a badge or not

#

IIRC

tepid sky
#

so if true it would just display the new config on the joker?

zealous glen
#

Either way it would replace the config

#

It’s just if it displays a badge or not I believe

tepid sky
#

hmm aight

tepid crow
#

iirc some list of game objects only keeps increasing

#

(aka some game objects arent getting cleaned properly)

tepid sky
zealous glen
#

Also see if another mod also doesn’t touch it

#

Although there is a badge. Is that your mod’s?

tepid sky
#

you mean prefix?

#

rocket's code does in fact use loc_vars

rough furnace
#

did you load a save from before you changed it?

tepid sky
#

oh lol, smth happend

#

hmm, interesting

zealous glen
tepid sky
#

hmm

#

sad i cannot take ownership while in run

#

:I

#

welp, thats too bad, i do now know how to take ownership of a joker, so wasn't for nothin :D

hot drift
tepid sky
cerulean rose
#

just updated steammodded and now my json header isn't recognized?

mystic river
#

[SMODS _ "loader/loader.lua"]:420: [SMODS MintysSillyMod "MintysSillyMod.lua"]:163: '}' expected (to close '{' at line 162) near '='
... but why? am i stupid?

    calculate = function(self, card, context)
        if context.joker_main and context.scoring_hand and card.ability.extra.status == 'Active' then
            local faces = 0
            for i = 1, #context.scoring_hand do
                if context.scoring_hand[i]:is_face() then
                    faces = 1
                end
            end

            if faces == 1 then
                return { --Line 162
                    card.ability.extra.status = 'Inactive', --Why is a } expected here?
                    message = 'Stopped!',
                    colour = G.C.MONEY,
                    card = card,
                } --Why is this bracket not good enough?
            end
        end
rough furnace
#

check logs

rough furnace
mystic river
#

do you mean that 'status' is a reserved word and i should rename my variable, or do you mean something else

rough furnace
#

no I'm saying card.ability.extra.status doesn't work as key

#

or well it might work but you would need to wrap it in [""]

#

Probably uou don't want it in the table at all

mystic river
#

oh, the return table
took me a moment to connect that dot
can you tell i'm running on three hours of sleep

mystic river
#

now it's doing some really incomprehensible stuff

  • intended behavior: at end of round, create a random spectral card if no face cards were played that round (must have room)
  • observed behavior: at end of round, create a random spectral card if no face cards were played that round (must have room), then also create a random spectral card if any consumable card is possessed regardless of whether face cards were played (must have room), then if no consumables are possessed crash with 'for' limit must be a number
    i copied this code right out of seance, i have no idea where this extra behavior is coming from
        if context.end_of_round and not context.blueprint then
            if card.ability.extra.status == 'Active' then
                if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
                    G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
                    G.E_MANAGER:add_event(Event({
                        trigger = 'before',
                        delay = 0.0,
                        func = (function()
                                local card = create_card('Spectral',G.consumeables, nil, nil, nil, nil, nil, 'sea')
                                card:add_to_deck()
                                G.consumeables:emplace(card)
                                G.GAME.consumeable_buffer = 0
                            return true
                        end)}))
                    return {
                        message = localize('k_plus_spectral'),
                        colour = G.C.SECONDARY_SET.Spectral,
                        card = card
                    }
                end
            else 
                card.ability.extra.status = 'Active'
                return {
                    message = localize('k_reset'),
                    card = card
                }
            end
        end        
placid frigate
#

I'm using 1.0.0 Alpha is there a newer version then that one?

mystic river
#

1.0.0~ALPHA-0812d is indeed not the newest version

frosty dock
#

it's in the name, alpha versions are in-development and usually get frequent updates

#

but definitely nowhere close to no updates in 4 months

frosty dock
proven lava
#

is there anything i can do to have pre_discard return this table? the ability works part works fine just the return doesn't seem to return, the return works with context.before

hardy viper
#

card_eval_status_text

placid frigate
frosty dock
#

👆 or SMODS.eval_this

frosty dock
wintry solar
#

it'll give you ghost cards in the deck though if you call it carelessly

proven lava
#

thank you both

frosty dock
#

we do love the inconsistencies of the code tower that is the calculate function

#

pre_discard has exactly one vanilla use, so i guess there was no reason to have return values do anything

placid frigate
# frosty dock that does indeed destroy a card when it's called

so would my code look like

          ---check for hearts suit, card2 is the value in the current loop
          if card2:is_suit("Hearts") then
            ---destroy the card
            Card:start_dissolve(card2)
            ---increment xmult value by adding increase to the xmult value
            card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.increase
           end```
wintry solar
#

just use the context that destroys cards

#

and it'll do it cleanly for you

frosty dock
#

if you don't know what you're doing, maybe just check for appropriate vanilla examples

placid frigate
#

I don't but I want to learn, also I don't think a vanilla card does this

#

where would I find the jokers like this in the original code

frosty dock
#

that part of the code is a mess and it's hard to find things if you don't know what to search for

#

i don't know exactly what you're trying to achieve still, but sixth sense should be close enough (and uses the destroying_card context eremel mentioned)

#

card.lua:2603

placid frigate
#

what do you mean by "context"

#

I will also look at the card.lua

frosty dock
#

uh

#

just read this

#

destroying_card is step 11

placid frigate
#

ok thank you

karmic kelp
#

Is there a good example of documentation for learning how to get started with adding stuff, like a checklist of sorts? I'm just getting started with modding, currently only have my metadata .json file

tepid crow
#

Checking out other mods is usually a good start

karmic kelp
#

Is there a good set of base cards I'm allowed to use as placeholder then?

proven lava
#

if you have set up steamodded there is a folder where you can find many example mods adding different mechanics

#

the one i've referenced the most is examplejokers

#

goes through a bunch of different jokers and how they work

karmic kelp
#

That's news to me. That sounds like a wonderful repository of information. Thanks!

proven lava
#

no problem

karmic kelp
#

Does it have anything on lovely patches? I anticipate I'm going to eventually hit the need to do one of those...

orchid thunder
#

can somone hlep me

#

why am i getting error

proven lava
#

i'm quite new to this myself

orchid thunder
placid frigate
orchid thunder
#

example mods

placid frigate
#

ok yep just looked in the wrong place

orchid thunder
#

is this not correct???

elder vapor
#

what values should i warp with to_big() so i can have compatability with talisman?

cyan cargo
#

Anyone know how to call the function to open a booster pack? I'm having trouble finding a mod to use as an example.

wooden nexus
#

Okay so whenever my consumable spawns an orbital tag, the tag has [Poker Hand]

#

idk how to fix it

mystic river
#

how do you get the current round number

rough furnace
#

G.GAME.round?

karmic kelp
#

how do you cheat in a consumable?

faint yacht
#

DebugPlus.

mystic river
#

i cannot believe it took me friggin. two hours to think of "save the last round activated and make sure it's different when trying to activate again"
i still don't know why context.end_of_round is called like six times but it no longer matters, it's only activating once

hybrid iris
#

why is mod compatability so hard,,,,

karmic kelp
#

is there a list of color tags for the text rendering?

hardy viper
#

G.C

#

oh wait

#

yeah it's just G.C

#

run eval print(inspect(G.C)) in debugplus if you want a full list

#

including those defined by mods

#

if you want to define your own then you can do something like
G.C.mycolor = HEX("FF00FF") and "{C:mycolor}text{}"

karmic kelp
#

I don't get what part of this isn't right... the loc_txt is being defined inside the Consumable and I have no loc files, if that's the solution

cyan cargo
#

Got my mod working, albeit poorly 😁 . The booster pack spawning is kinda janky and spawns in the middle of the "money counting" animation after you beat a boss blind and interrupts it, but it seems to be functional.

placid frigate
rough furnace
#

whats at P5HeroJoker.lua line 40

crisp coral
crisp coral
placid frigate
rough furnace
#

I don't think thats how start_dissolve works

crisp coral
#

card2:start_dissolve()

rough furnace
#

yeah the first option is the colour

crisp coral
#

assuming card2 is an actual Card

placid frigate
#

card2: is_suit("Hearts")

#

so should card2 just be hearts?

placid frigate
#

for destroying_card = scoring_hand[i] full_hand = G.play.cards do I replace i with what I want to destory?

cerulean rose
cerulean rose
# rough furnace check logs
Found invalid metadata JSON file at C:\Users\ninji\AppData\Roaming\Balatro\Mods/yart/yart.json, ignoring: [SMODS _ "loader/loader.lua"]:124: attempt to call method 'gsub' (a nil value)

logs are not helping

hybrid iris
#

a mod is messing with the code and i dont know what it is sdfkjdhskjh

#

something here is messing with the card:calculate thing but jsdfkghskdfjhkjfhs

#

ugh hhhh h hh

cerulean rose
shell tangle
# cerulean rose

Dependencies/conflicts have been changed, it should now be "conflics": [modid(>=modversion)].

crisp coral
#

this is the json file so that looks correct

shell tangle
hybrid iris
#

okay so

#

im testing for compatibility between my mod and that of others

#

ive already had it on its own and it definitely works

#

,,,just that when i put it in a modpack, it breaks

#

something is modifying how the calculate thing for steamodded works and i cannot tell where it is

shell tangle
#

You can do it one by one, or you can do it in halves by deleting half of the modpack and see when it's still working to narrow it down, maybe?

hybrid iris
#

yeahhh thats what im doing now

cerulean rose
shell tangle
#

Can you throw incantation's header/json here real quick?

cerulean rose
#
--- STEAMODDED HEADER

--- MOD_NAME: Incantation
--- MOD_ID: incantation
--- MOD_AUTHOR: [jenwalter666, MathIsFun_]
--- MOD_DESCRIPTION: Enables the ability to stack identical consumables.
--- PRIORITY: 89999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
--- BADGE_COLOR: 000000
--- PREFIX: inc
--- VERSION: 0.5.4
--- LOADER_VERSION_GEQ: 1.0.0
#

sidenote the use of long strings of 9s to set priorities really pisses me off

shell tangle
#

Does it work when you specify the exact version, out of curiosity?

cerulean rose
#

nope

#

tried both == and =, neither works

shell tangle
#

Also, maybe try updating SMODS again just in case? Dependency change was earlier today/yesterday depending on your timezone, but there's something about conflicts that was updated 10 hours ago.

cerulean rose
#

just did; no change

shell tangle
#

Yeah, throw it there and see if they can figure out why the conflicts aren't being detected, then.

#

Bunch of things got merged into SMODS, bugs are expected.

cerulean rose
#

the whole json wasn't being detected
so it was showing up as a lovely mod

shell tangle
#

Can you post your json again?

shell tangle
cerulean rose
#

at this point the mods loads but the conflict is not recongnized
changing brackets and stuff does nothing

shell tangle
cerulean rose
#

this works, did not think you had to put the = inside the parens

shell tangle
#

No worries, completely fair mistake to make.

stiff locust
#

trying to make a thing that gives $2 at end of round for each splash (or ripple from jokerevolution) owned and it's simply not paying out the bonus?
i made sure other end round bonuses work (golden joker i just checked is working)
...extra.greenmoney is 2, this should work, right?
calc dollar bonus isn't inside another function

tidal edge
#

Cryptid/Items/M.lua

stiff locust
tidal edge
stiff locust
#

why is it sometimes .cards and sometimes not

crisp coral
#

qhar

stiff locust
#

qhar indeed

nocturne garnet
stiff locust
#

what's the difference

nocturne garnet
#

G.jokers is the cardarea

#

not the cards

stiff locust
#

oooooooooooooooooooooooooooooooooooooooooooooooooohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

#

i opened fuckin yomi hustle instead of balatro

crisp coral
#

she yomi on my hustle til i

stiff locust
#

oh shit

#

i crashed eslewhere

#

okay uhh

#

how do I make an if statement to check if a card is being viewed in the collection

#

also how do i make a joker eternal

nocturne garnet
wintry solar
#

The better way is using the sticker api but I don’t have the function on hand

stiff locust
#

OBS just bluescreened my computer but

#

yeah g.jokers.cards didn't work

hardy viper
stiff locust
#

thanks

hardy viper
#

meow

stiff locust
#

homeowner has meow in it

hardy viper
#

true ....

stiff locust
#

skeletor leaving.gif

hardy viper
#

lmao

frosty dock
#

meow

stiff locust
nocturne garnet
#

or does it not have eternal compat

#

actually

#

just do (card).ability.eternal = true

crisp coral
#

meow

stiff locust
#

halfway there, 4/8

#

okay how do I check if a card is negative

hardy viper
#

card.ability.negative iirc?

stiff locust
#

it didn't work

nocturne garnet
#

i think

stiff locust
#

alright now I need to figure out how to mr,bones

#

mr bones' code in card.lua doesn't indicate the method where it actually saves you from death? where is that done

#

is it just returning saved = true?

faint yacht
#
if self.ability.name == 'Mr. Bones' and context.game_over and 
                G.GAME.chips/G.GAME.blind.chips >= 0.25 then
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            G.hand_text_area.blind_chips:juice_up()
                            G.hand_text_area.game_chips:juice_up()
                            play_sound('tarot1')
                            self:start_dissolve()
                            return true
                        end
                    })) 
                    return {
                        message = localize('k_saved_ex'),
                        saved = true,
                        colour = G.C.RED
                    }
                end

Appears to be the case.

stiff locust
#

alriight

tidal edge
#

like everything for a joker is in one big block in smods; in vanilla, its spread across 2 files

faint yacht
#

...don't ask me, I literally started last month. 😂

tidal edge
#

oh sorry, i didnt mean to frame it as a question to you

#

i kind of mean to say it, in general

#

because i was reminded of it from that message

faint yacht
#

Fair.

hardy viper
#

idk why thunk did it like he did

tidal edge
#

one guy cant code perfectly

hardy viper
#

and i don't expect him to

tidal edge
#

im just glad modding doesn't work like vanilla when it comes to coding

#

imagine doing the shit that thunk did when coding jokers

shell timber
#

giant if statements are surprisingly common

faint yacht
#

...or modding the executable directly. God, early Minecraft modding days...

teal estuary
#

question, how would i go about making a joker give an extra joker slot to the player?

#

just, if player has that joker, they gain an extra slot

#

-# im gonna presume theres an example somewhere, on some mod, but i dont know of it 😭

maiden phoenix
teal estuary
#

sure

#

ty

tepid crow
#

(cryptid also has negative joker iirc)

tidal edge
#

also the pipe joker from that one mod

cyan cargo
haughty wraith
teal estuary
stiff locust
#

graaagh

tidal edge
tepid crow
teal estuary
#

i wasnt even worrying about it, i just had an idea and was curious

pearl bane
#

Hey! I just learnt Lua, where can I get started?

rough furnace
gritty valley
cerulean rose
cyan cargo
zealous glen
#

With Steamodded

#

Look at vanilla code and other mod codes for references

#

There’s also the Steamodded wiki on GitHub and some example mods inside Steamodded

nocturne garnet
zealous glen
#

Imagine this turns into a creepypasta as the placeholder images get creepier and creepier

nocturne garnet
#

Derek.EXE

zealous glen
#

Xxjimbobrine420xX

nocturne garnet
#
"Hi i'm derek".
I've never been able to play a video game to this day. He's haunting me..."```
gritty valley
#

Does smods have compat for eternal playing cards by default?

pearl bane
zealous glen
hardy viper
#

along with all the other stickers

frosty dock
#

whatever vanilla injection is

frosty dock
elder vapor
#

cryptid adds eternal/perishable/rental playing cards

pearl bane
gritty valley
elder vapor
#

this shouldn't calculate for other jokers right?

hardy viper
#

self is for the center

#

also idk what u mean by that question

elder vapor
#

its a sticker so the values aren't gonna be changing

elder vapor
#

someone testing my mod reported an issue where the sticker retriggers other jokers

#

the intended effect is 1 in 2 chance for this Joker to retrigger 1 time

wintry solar
#

I don’t believe it should interact with other cards, no

elder vapor
#

hmm

rough furnace
hardy viper
#

like, the loc_vars will return a properly randomized value but the calculation always outputs 3

#

love when discord does this

proven lava
#

what would be the best way for a joker to have two joker_main effects? (example: joker adds +mult THEN adds +chips and then moves onto next joker)

#

basically return two effects after each other

wintry solar
#

use SMODS.eval_this

proven lava
#

thank you

karmic kelp
#

Is there a function or table that turns a rank into the string the game displays them as?

hardy viper
karmic kelp
#

is there a way to figure out why a file isn't loading? the extent of the error I can see is this line is trying to run nil...
SMODS.load_file("atomic/consumable.lua")()

faint yacht
#

Assuming the mod folder is root, is the atomic folder present within and the consumable.lua inside it?

karmic kelp
#

what's strange is it was working yesterday too...

tepid crow
#

try this instead:

    file, exception = SMODS.load_file("path")
    if exception then
        error(exception)
    end
    file()
karmic kelp
#

ah, there we go, a nice error, thanks!

#

...because I declared variables using var instead of local... dang it.

tepid crow
#

actually, why doesn't load_file error out better* đŸ€”

karmic kelp
#

also is there some way to do hot-reloading of the game or do I need to crash or relaunch every time

tepid crow
#

Relaunch. Try holding M?

karmic kelp
#

did not know that bind exists, thanks

karmic kelp
#

how would I go about getting a card's base chips and extra chips?

rough furnace
cerulean rose
#

having trouble injecting into malverk texture packs for cross-mod support
so i want to add a custom sprite for one of my new items to an existing texture pack
i've got the following code so far

if (SMODS.Mods["sun_is_sus"] or {}).can_load then
    AltTexture({
        key = "rsus",
        set = "Tarot",
        path = "rsus.png",
        keys = {
            "c_yart_rsun"
        },
        localization = {
            "c_yart_rsun"
        }
    })
    table.insert(TexturePacks.texpack_sus_sus.textures, "yart_rsus")
end
GitHub

When the impostor is Sun (Malverk Version). Contribute to DigitalDetective47/sun_is_sus development by creating an account on GitHub.

wintry solar
#

what are you trying to do?

cerulean rose
#

add to another mod's texture pack

#

so that it retextures an item from my mod

wintry solar
#

I'm not on my dev machine, but try setting the key to alttex_yart_rsus in your table.insert line

cerulean rose
#

nope

#

actually setting the key to anything other than yart_rsus crashes when i hover over the texture pack

wintry solar
#

what didnt work before?

cerulean rose
#

texture was not replaced

cerulean rose
#

aight got it working now

#

silly mistake with localization + wasn't enabled in the texturepack config

wintry swallow
#

If I want to change the available jokers with a deck, does that need a Patch?

weak brook
#

i'm brain farting right now does anyone know what I can put an if statement for a joker to only trigger code if the player is in the middle of a round

#

i.e. not in shop or blind select or results etc.

crisp coral
#

G.STATE == G.STATES.PLAYING_HAND iirc?

wintry swallow
#

Lol just trying to figure out the same thing

#

maybe G.STATE == G.STATES.SELECTING_HAND or G.STATE == G.STATES.HAND_PLAYED or G.STATE == G.STATES.DRAW_TO_HAND ?

#

Hmm nope

#

AH it might be

#

Except PLAY_TAROT is its own state so I don't know how to figure out if a tarot card is played during a round O_o

#

Ah I guess you could check #G.hand.cards > 0

crystal willow
#

does anyone know how to make jokers rental in a custom challenge? I tried
{rental = true} but that didnt work lol

#

would it be under a different name?

elder vapor
#

you have to patch in rental support for challenges

#

afaik

crystal willow
#

â˜č

#

Id be able to spawn a rental joker in though, yeah?

elder vapor
#

if you patch it in

#

not difficult to do

weak brook
#

can only sell during this state when in a round afaik

karmic kelp
#

what's the difference between the 1x and 2x sprites? Is one just an upscaled version of the other?

cerulean rose
#

yes

#

the 2x versions are used for the pixel art smoothing option

cerulean rose
#

how would i go about removing a suit tally from the deck view

tepid crow
cerulean rose
#

doesn't seem to work

#
SMODS.Suit({
    key = "nothings",
    card_key = "NOTHING",
    hc_atlas = "cards_high_contrast",
    lc_atlas = "cards",
    hc_ui_atlas = "ui",
    lc_ui_atlas = "ui_high_contrast",
    pos = { y = 0 },
    ui_pos = { x = 0, y = 0 },
    hc_colour = HEX("1A1A1A"),
    lc_colour = HEX("404040"),
    hidden = true,
})
tepid crow
stiff locust
#

how do I refer to a specific spot in g.jokers

wintry solar
#

G.jokers.cards[x] where x is your position

stiff locust
#

is for index,value in ipairs(G.jokers.cards) not working for anyone else or is that just me

#

every time i try to use this loop the game skips over it

wintry solar
#

Got a full code example?

stiff locust
#
local G_FUNCS_skip_blind_ref=G.FUNCS.skip_blind
    G.FUNCS.skip_blind=function(e)
        if G.jokers then
            for index, value in ipairs(G.jokers.cards) do
                print("step")
                if value.key == "j_fuseforce_PowerPop" then
                    add_tag(Tag('tag_double'))
                end
            end
        end
        return G_FUNCS_skip_blind_ref(e)
    end
#

step doesn't print here ever

maiden phoenix
#

Cant you get the value though SMODS.find_card

wintry solar
#

Yeah just use find card here

stiff locust
#

but i want it to run more than once if there's more than one

#

it should create a double tag for each of that joker

maiden phoenix
#

The function gives you the amount of card

stiff locust
maiden phoenix
#

Just check the function

stiff locust
#

find card also hasn't been working well

crisp coral
#

SMODS.find_card returns a table with all instances of that card

stiff locust
#

for the jolly joker splash fusion find_card would always flag after the card was there at least once so the effect persisted after it was sold

#

i know this one isn't a me problem because math had the same thing

wintry solar
#

Flag for what? The fusion or the original jokers?

stiff locust
wintry solar
#

There’s no reason that would happen

tepid crow
#

it uses multiple localization entries to format its own description

#

you'll need to look at j_loyalty_card, loyalty_active, and loyalty_inactive

royal mica
#

this was one of my last roadblocks

#

jokers are now basically done, so I'm getting close to finishing the whole Finnish localization file

royal mica
tepid crow
#

👍

#

good luck

royal mica
#

also, the github page doesn't exist anymore

#

so I just guessed I'd remake it

royal mica
tepid crow
#

wow that guy completely disappeared lmao

royal mica
#

so unemployed me decided "eh sure why not"

tepid crow
#

fair enough haha

stiff locust
tepid crow
# cerulean rose yeah

Yeah I dont think thats supported unfortunately. The base assumption is that the player should always be able to see the suit counter once they have at least 1 of it

cerulean rose
#

is it possible to have lovely patches target lua files from other mods?

gritty valley
#

Does smods have a collection for custom suits?

frosty dock
gritty valley
frosty dock
#

duh, I made that

#

I thought you meant an in-game collection

#

like for jokers

gritty valley
#

Oh I was asking for an object collection lol

zealous glen
#

A table

gritty valley
#

Should probably make a suit collection in game tho

gritty valley
frosty dock
#

I have never stopped procrastinating on whatever type of usable/scalable playing card UI

zealous glen
#

Or a “category” đŸ€”

frosty dock
#

internally steamodded calls it an "object table"

gritty valley
#

Those are all forms of collection, I was just using the most general word possible (but in the process forgor that the game has an in-game area called "collection" 5head)

zealous glen
#

I thought everything was a set axiomatically

#

Well, I heard in Lua everything is a table, but I’m sure Lua is a set too balatrojoker

gritty valley
#

Yeah lua is a hellscape where everything is table

frosty dock
#

is the set of all sets that are valid lua programs a valid lua program? 💀

#

me when flawed set theory

zealous glen
#

I feel like a set of programs isn’t a program

#

So no

frosty dock
gritty valley
frosty dock
wintry solar
#

Ah right yeah, I might have some time coming up to do some more UI stuff like that

zealous glen
#

Hence a set of all Lua programs sans structure isn’t a program

frosty dock
#

sets inherently don't have structure

gritty valley
#

I had an idea for an esolang like that once. Every func is just a mini-program where the args are passed in as pre-defined variables (so no mutability by default).

zealous glen
#

Hence why I don’t think a set would be a Lua program

gritty valley
#

I think it would just depend on whether you're allowing translation or not

zealous glen
#

They should make a programming language where you can take the limit balatrojoker

frosty dock
#

surely you can find a representation of lua programs as sets

gritty valley
#

Cus then if you pre-define certain numbers to represent tokens in lua then there you go

zealous glen
#

Like representing numbers as sets

#

Or tuples as sets

frosty dock
#

okay whatever

gritty valley
#

real

zealous glen
#

đŸ€”

frosty dock
#

okay maybe there isn't a "set of all sets" type paradox to be had here

#

fine

zealous glen
#

I don’t think so because it’s a collection of finite sets

frosty dock
#

either way, set theory is weird

zealous glen
#

Each Lua program is finite

#

So the set of all Lua programs is at most a countable union of finite sets

#

Well I guess it could be uncountable

gritty valley
frosty dock
zealous glen
#

Maybe not—the set of each Lua program with n characters is finite

frosty dock
tepid crow
zealous glen
#

So it’s countable union of finite

frosty dock
#

countable union of at most countable sets is at most countable

zealous glen
gritty valley
gritty valley
tepid crow
zealous glen
frosty dock
#

me when I metatable my classes

zealous glen
#

The nonmethod

frosty dock
#

which is just the empty set

dawn vigil
#

is there any documentation available regarding the game's RNG mechanics, like how cards are determined according to the seed?

#

I tried looking at the source code but I'm unfamiliar with lua

bleak cave
#

afaik, there's no docs for anything (nvm, see below)

#

so unfortunately reading the source is as good as it gets

gritty valley
#

Did the latest steamodded patch change the dependancy syntax?

bleak cave
gritty valley
mellow sable
# dawn vigil is there any documentation available regarding the game's RNG mechanics, like ho...

I made this once? Should be up to date https://docs.google.com/document/d/1GvyAtXB-ptrkRXhIxVQAWV9vhgumvx9YyVfjH5hFXb0/edit
you should also look at something like Immolate

These are moreso about the theory behind it, though, not which functions do what

lethal vigil
#

What programming language does balatro modding use?

karmic kelp
#

lua

lethal vigil
#

Dang, I know nothing about lua, guess it's time to start learning my third programming language

gritty valley
clever steppe
#

it'll give you a start in terms of reading the code for the game so you can find the code for the seeds

#

basically if im looking for something to reference in the code, i just ctrl-f what i think it might be called and look through all the game files that way until i find what im looking for

gritty valley
#

It also helps to use vscode's right click shortcuts

mellow sable
#

This is not at all what the game uses lmao

#

the core function is pseudorandom in misc_functions.lua

#

I would look at how other things use is it already

clever steppe
hardy viper
#

@fathom raven paperback has a malformed version and crashes with new steamodded

fathom raven
#

Oh no! I haven’t heard from Opposite in a while. I’ll see if he knows anything about it though, since I can’t program for the life of me

hardy viper
#

all that needs to be done is removing the "alpha" from the version part of the header

fathom raven
#

Got it. Thank you!

hardy viper
#

np

frosty dock
nocturne garnet
#

awesome

mystic river
#

(of course i can't be sure cause i've never seen this in action, lol)

teal estuary
tepid sky
faint yacht
#

Can a specific Spectral card be made to play a sound when its' booster pack is opened?

nocturne garnet
#

ex. steel card gives X1.5 mult

teal estuary
#

ooooooooh

#

thats sick

tepid sky
#

And man locked it behind 1 joker instead of a deck scholar

teal estuary
#

how can you effect other joker’s numbers with another joker?

#

(so if a jokers amount is 2, it’d add 2+ to every other jokers amounts/mult/chips/etc)

zealous glen
#

You could, but it's not a good idea

#

If you still want to do it, I suggest looking at Cryptid

teal estuary
#

i’ve got an idea on how to balance it

#

-# im not sure how possible it is

zealous glen
#

It's not about balance

#

It's just that you can't tell what the numbers mean

teal estuary
#

ooooh

#

makes sense honestly

zealous glen
#

So I don't think it's a good idea, but Cryptid does it, so

teal estuary
#

thats fair enough, i just like the idea 😭

raw hollow
#

how are yall getting cryptid to work it keeps crashing on me

zealous glen
#

I don't use Cryptid

raw hollow
#

ah

zealous glen
#

did you install Steamodded and lovely correctly

raw hollow
#

yeah

zealous glen
#

newest versions, correct folders?

raw hollow
#

yep

zealous glen
#

what about Cryptid version

raw hollow
#

i believe so

#

Oops! The game crashed:
main.lua:1821: [SMODS Cryptid "Cryptid.lua"]:602: attempt to index local 'card' (a nil value)

Failed to get additional context :/

Stack Traceback

(3) global C function 'error'
(4) Lua field 'update' at file 'main.lua:1821'
Local variables:
dt = number: 0.00851363
success = boolean: false
msg = string: "[SMODS Cryptid "Cryptid.lua"]:602: attempt to index local 'card' (a nil value)"
(5) Lua function '?' at file 'main.lua:912' (best guess)
(6) global C function 'xpcall'
(7) Love2D function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '?' (defined at line 883 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"])

#

this is the error i keep getting

#

im using the negative deck

zealous glen
#

@mellow sable

mellow sable
mellow sable
#

the last time I've seen this happen is with a mod incompat thing
But if you replace card.will_shatter with card and card.will_shatter (line 602) then you should be good @raw hollow

raw hollow
mellow sable
#

I fixed it up for you

zealous glen
#

from

if card.will_shatter then

to

if card and card.will_shatter then
raw hollow
mellow sable
#

yw :)

raw hollow
mellow sable
raw hollow
mellow sable
#

if this one doesn't work then I might need another error screenshot
however I also think it might just be a bug with that run that won't happen on the next run

raw hollow
#

okay, ill try this and start a new run then thanks

raw hollow
mellow sable
#

delete the other copies of Cryptid.lua you have

raw hollow
#

I did

raw hollow
mellow sable
#

what

#

is "Cryptid (2).lua" then

#

any Cryptid (1), Cryptid (2).luas should be deleted

raw hollow
#

alright

raw hollow
mellow sable
#

i don't know of any by name, but this does look like a mod compat issue

#

'card' is usually never a nil value

raw hollow
#

i have cryptid, dreadjokers, and talisman

#

im going to assume its dreadjokers then

#

Im going to turn it off and see if it works

raw hollow
proven lava
#

how would i create a specific consumeable?

elder vapor
#

its one of the args in create_card(), second to last iirc?

proven lava
#

what would i put there? plus where can i find out what the arguments are for that? have no idea what the 5 of them are

zealous glen
#

you can read the code that defines the function

proven lava
#

ah found it thank you

gritty valley
#

There a list of what all the vanilla joker contexts are?

zealous glen
#

there is a list of all scoring steps

#

I'm not sure if there's a public list of all contexts per se

gritty valley
#

I mean like whereever the vanilla game uses eval_card, the keywords it uses for each joker

hardy viper
#

saerch context in the modding channel

zealous glen
#

but the scoring steps go through most of the scoring steps

#

it's in the modding channel but also the Steamodded wiki

gritty valley
#

Calc context guide has what i need, thx

faint yacht
#

card.lua also lists a bunch of contexts.

gritty valley
#

Huh, there's an unused joker context for buying_card when a joker is first bought

#

Actually it's for any card my bad, tho a joker can call it when it itself is bought

#

Fucked in the head if you ask me

#

Weird thunk didn't seperate it out like they did with selling_self and selling_card

faint yacht
#

Can I force skip a booster pack if a consumable is used?

hardy viper
#

call G.FUNCS.skip_booster

#

button callback but the button isnt used

#

alternatively call G.FUNCS.end_consumeable, if you want to skip all joker calculations for skipping packs (e.g. red card)

cerulean rose
#

for some reason my booster pack displays with the default atlas even though i have the atlas set

hushed ivy
#

How to fix that?

cerulean rose
#

probably couldn't find an image

#

check ur filenames

#

trying to stop a consumable from disappearing after it's used but am not having any luck
got this so far

[[patches]]
[patches.pattern]
target = "functions/button_callbacks.lua"
pattern = "local dont_dissolve = nil"
position = "after"
payload = '''
for k, v in ipairs(G.jokers.cards) do
  if v.ability.name == "j_pencil_pencil" then
    dont_dissolve = true
    break
  end
end
'''
match_indent = true

some print debugging shows that dont_dissolve is being set, but the card is still destroyed anyway

wintry solar
maiden phoenix
#

Yea consumables in SMODS has a way implemented already to prevent being deleted

nocturne garnet
sweet nimbus
#

I was messing with en-us.lua in a mod, so i know which mod is causing the crash, but i dont know what i changed specifically that is causing it

crisp coral
#

you're missing a } in your loc file

sweet nimbus
#

turns out it was a missing , but I got it fixed either way

tepid sky
wooden nexus
nocturne garnet
#

oh is that like

#

a stake that disables vanilla jokers

wooden nexus
#

Yup

#

Well vanilla everything except their defaults

#

So if you load an arcana pack with no mods, you get strength i believe

rancid otter
#

First time making a mod. Just copied another Tarot card mod and made my own from it, but it crashes the game. Tarots are 116x186 rather than 126x186 - do I need to add something to make this work?

#

Just tried with another pack at normal card size, seems my lua is probably wrong

hardy viper
#

@rough furnace seems that most debug keybinds dont work w jens (or at least jens with his modpack)

tepid sky
#

conflicting keybinds?

#

(idk, just guessing)

hardy viper
#

cant be that

#

not unless the implementation is really bad?

#

i doubt it

gritty valley
hardy viper
#

is that reversible? seems really inconvenient

gritty valley
#

You’d have to ask Wilson why they did it

frosty dock
hardy viper
#

ah

#

gotcha

languid mirage
#

I think it was changed to avoid conflicts and accidental keypress

pearl bane
#

is there any way to call a function after a hand is played and calculated, ONLY ONCE?

lament fjord
#

One per hand? Round? Ante? Joker? Game? User profile?

hardy viper
pearl bane
pearl bane
hardy viper
pearl bane
#

right?

hardy viper
#

id call it a hook

#

?

pearl bane
#

nvm

hardy viper
#

i mean if you want to be sure you can do

local oldevplay = G.FUNCS.evaluate_play
function G.FUNCS.evaluate_play(...)
    oldevplay(...)
    myfunction()
end
#

but there shouldnt ever be more than that one argument

pearl bane
#

thx!

gritty valley
bleak cave
# pearl bane ~~overriding~~ detouring evaluate_play it is

I always find it funny how there are seemingly three terms for this. 'Hook' is most popular and widely accepted, 'detour' is exactly the same but used rarer, and 'advice' seems to be a relic of the past when hooks were deliberate/intended places to run external functions within a function.

tepid crow
#

I like calling it "wrapping" a function

pearl bane
#

I've never heard "advice" before

#

'Hijack' is evil >:)

bleak cave
tepid crow
#

wrapping my tortillas 😋

bleak cave
bleak cave
bleak cave
gritty valley
bleak cave
#

Funny how language evolves

nocturne garnet
#

how do you get the name of the stake you're on....

gritty valley
hardy viper
#

G.GAME.stake

rough furnace
nocturne garnet
hardy viper
#

G.P_CENTER_POOLS.Stake[G.GAME.stake] i would assume

#

nvm

#

that wouldnt be in order

#

G.P_STAKES[G.GAME.stake]

#

oh wait

#

those are strings

#

hm

#
function getStake(num)
  local t = {}
  for i, v in pairs(G.P_STAKES) do
   t[v.order] = v
  end
  return t[num]
end

ig

gritty valley
#

Should be an smods function probably

hardy viper
#

you dont even need to do that actually idk what i was thinking

rough furnace
# hardy viper <@517371142508380170> seems that most debug keybinds dont work w jens (or at lea...

Yeah 1.0 made keybinds need Ctrl to run by default, with a keybimd to toggle it. Was mostly made so I'm not taking up half the keyboard from other mods and so people don't accidentally trigger other Keybinds (especially distructive ones). I tried to make it clear you had to hold Ctrl and its togglable in the config in everywhere you would see keybinds and put a warning in the changelog. I'm not sure if there would be somewhere better for people to see it or if this is just a case of you just updated the mod willy nilly and then they keybinds you are used to stoped working so you were confused.

civic pebble
#

Hey all, completely new to modding

I was wondering if there was a way to show money gained after a blind (like the Golden Joker) but for a deck? I want to give the player money after a boss blind but have it show up in the UI. It already does give the player money but it just kinda pops up instead of showing it visually

tepid crow
civic pebble
# bleak cave Have you tried `ease_dollars(n)`?

I haven't, it's currently just using G.GAME.dollars = G.GAME.dollars + 10 after it checks for the boss blind in particular. I'm honestly not that great with code so just mostly referencing from others haha

bleak cave
#

Instead of that, just do ease_dollars(10)

#

It will animate and add dollars to the player

civic pebble
#

Ahhh okay, thank you so much

hardy viper
#

SMODS.stake_from_index

#

@nocturne garnet use this instead

nocturne garnet
#

dang

#

yippee

nocturne garnet
#

meant to be two sets of jokers not two joker slots

karmic kelp
#

do jokers in one set of jokers prevent them from appearing in the other set? (assuming no Showman at least)

hallow forge
nocturne garnet
cobalt citrus
#

does anyone have working code for a joker that increases its sell value at end of round (like egg)
keep trying to get it to work but can't, joker does nothing

elder vapor
#

check source code for egg

cobalt citrus
#

did, copy pasted, doesn't work
setting loc_vars to self.ability.extra crashes the game so i have to set it to card.ability.extra, but then it does nothing

faint yacht
#

The calculate part of should have the context.end_of_round condition check and then you can apply the change to card.sell_cost.

cobalt citrus
#

still doesn't work
i must be doing something wrong because something like this

config = { extra = 1 },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra } }
end,
calculate = function(self, card, context)
if context.end_of_round and not context.blueprint then
card.sell_cost = card.sell_cost + card.ability.extra
card:set_cost()
return {
card = card,
message = localize('k_val_up'),
colour = G.C.MONEY
}
end
end,

doesn't work

worldly moss
#

possible issue

#

unless that just runs the update loop for the sell cost, since you do set the sell cost above it

#

i haven't looked too deep into the games source yet, but its pretty small compared to some others so I could probably go find it

faint yacht
#

Oddly enough, I didn't use that when setting the sell value of the two "joke" Jokers to 0.

cerulean rose
#

set card.ability.extra_value to increase the sell value of a joker

#

card:set_cost() updates the cost based on things like edition, extra value, etc.

cobalt citrus
#

config = { extra = 1 },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra } }
end,
calculate = function(self, card, context)
if context.end_of_round and not context.blueprint then
card.ability.extra_value = card.sell_cost + card.ability.extra
card.set_cost()
return {
message = localize('k_val_up'),
colour = G.C.MONEY
}
end

yea i can't figure this one out because this also doesn't work

elder vapor
#

extra_value is used in the Card:set_cost() calculation so thats why you wanna increase that value

cobalt citrus
#

ok question
if you have a game with a custom joker and you edit the joker's code, does that apply to the current game or do you have to restart
(i know that if a joker has a probability you have to restart for the new probability to take effect)
because it still did nothing when i updated with that code so i restarted thinking i had to find it again and now i can't find the joker in any game

hardy viper
#

but yes it applies to current games

cerulean rose
#

you have to restart the game, but not the run

hardy viper
#

^

cobalt citrus
#

ah ok thanks
well anyway i got lucky and randomly found the joker but the code still doesn't work unfortunately
so yeah i'm completely stuck now, nothing is working
just to clarify not only does the sell value not go up but the message also doesn't appear, does nothing
can't believe it's this hard to make a joker that does the same thing as egg lol

#

it gets worse
this joker has a second calculate function that does something different under the sell value one and it works as intended, but when i removed that code and just left the sell value part (because maybe the second function was what was causing the sell value to not work), the game crashes at the end of the round and gives the error "'for' limit must be a number"

cobalt citrus
#

ok so i managed to make it work
but now for whatever reason the sell value increasing triggers 7 times instead of just one???
it might have to do with the fact that the joker cost is 6 and the listed increase in value is 1, 6 + 1 = 7, no idea why it triggers that many times though

crisp coral
#

are you using context.end_of_round

cobalt citrus
#

yes

crisp coral
#

if context.end_of_round and not context.repetition and not context.individual then

cobalt citrus
#

thanks, this worked
finally i have a working increase sell value joker :3 after so long lol

nocturne garnet
zealous glen
cerulean rose
#

any way to juice up another card while retriggering with a joker?

#

i'm trying to make a joker with an effect of “retrigger each played 4 once for each 7 held in hand” and want the 7 to animate when retriggering the 4

wintry solar
#

How are you identifying the 7?

cerulean rose
#

iterate over G.hand.cards

#

v.base.id == 7

crisp coral
#

can you not do v:juice_up() during that

cerulean rose
#

the only return smods gives has a single repetition

#

i'm unsure how to manually trigger the 4

hardy viper
#

wait no

#

that's vanilla

#

card:get_id or soemthing

#

im not entirely sure

teal estuary
#

how would you go about changing a cards rank when its in a played hand? im gonna presume theres a modded joker to base it off of, but i have no idea 😭

the joker idea is that if you play a king, it will turn into a queen and vice versa

nocturne garnet
teal estuary
vivid glade
#

oh god 😭
i have to see that mod when it's over

teal estuary
teal estuary
#

..good idea actually

#

didnt even think of using debugplus

nocturne garnet
#

oh wait

#

i think i see

#

shiiiit

#

some mod is overriding it

nocturne garnet
nocturne garnet
#

bro is NOT okay

proven lava
#

i'm trying to have a joker behave similarly to invisible joker but for whatever reason when i try to increment the rounds by 1 it goes up by 7? the part of code posted is the only part that edits this value

wintry solar
#

if context.end_of_round and not context.repetition and not context.individual then

crisp coral
#

can we just pin this line

wintry solar
#

in fact, I don't think individual is EVER called in end_of_round

crisp coral
#

local eval = G.jokers.cards[k]:calculate_joker({cardarea = G.hand, other_card = G.hand.cards[i], individual = true, end_of_round = true})

#

?

hardy viper
#

yup

nocturne garnet
#

||ignore the sprite its a placeholder||

nocturne garnet
tepid sky
nocturne garnet
#

yeah but everytime i gotta go through my code and copy and paste if context.end_of_round and not context.repetition and not context.individual then

nocturne garnet
#

why couldnt it have just been if context.end_of_round

wintry solar
#

it's added by retrigger api and I forgot to check the toml file

crisp coral
#

no?? i sent the vanilla code

#

😭

wintry solar
#

oh what

#

why didnt my search pull it up

crisp coral
#

l183 state_events.lua

wintry solar
#

oh it did, I'm just blind

#

smh

crisp coral
#

small blind or big blind

wintry solar
#

boss blind

crisp coral
#

might wanna also document the joker retrigger stuff?

wintry solar
#

effort

brittle stump
#

Btw is there any guides how to make mods? I want to try to make deck myself

mystic river
brittle stump
#

Okay to clean up what happened
version of mod had nothing to do with glitch, i first installed them on 0.9.8, and then on 1.0.0, it just turns out i didn't cleaned some file stuff and it kinda conflicted

#

And when i deleted and reinstalled everything, it worked like clockwork

zealous glen
#

I can extend it to Jokers

#

If you used the code I sent you for reference we are basically already collabing anyways :P

wooden nexus
#

Lemme play around rq

crisp coral
#

_tag argument needs to be a Tag object

#

so you need to create a tag with Tag() first

wooden nexus
#

but now the problem is different

#
            add_tag(Tag('tag_orbital'))
            local _poker_hands = {}
            for k, v in pairs(G.GAME.hands) do
                if v.visible then _poker_hands[#_poker_hands+1] = k end
            end
            G.P_TAGS['tag_orbital'].ability.orbital_hand = pseudorandom_element(_poker_hands, pseudoseed('orbital'))  
        end,
      }```
#

Eremel helped get it to work

zealous glen
nocturne garnet
#

cool unlock

wooden nexus
#

All that needs to be done for now are the booster packs and then release the ShinkuLib Update

#

Then those can be used to make more tag cards and potentially later actual cards

undone sapphire
#

Hi, quick question, steammodded 1.0 is good or steammodded 0.9.8 is still used by the majority of the mods ? Bc the pokemon mod isnt working for me

teal estuary
#

1.0.0 is used by essentially all mods

undone sapphire
#

Bc i kindaaaa made the game crash on all mods by updating (haahhh why its not working with nexus.....)

teal estuary
#

yeah any mod that was working on 0.9.8 will either not be on 1.0.0, or you’ll need to get the 1.0.0/most recent version

zealous glen
#

I meant an API for displaying these values

#

So other effects could grant them to cards and Jokers

#

But I can probably work from that

zealous glen
civic pebble
#

How do I make it so the joker spawns as just an eternal card? I've tried "eternal" but that doesn't work, and I don't want it to be negative

add_joker("j_lusty_joker", "negative", true, true)

#

(It's supposed to spawn at the start of the game as part of a deck)

languid mirage
#

go into balatro source code and check definition for add_joker function

#

then you can probably do it with a hook

#

but I think steamodded might have override for this function?

civic pebble
#

There is this which is for a challenge I assume?