#đŸ’»ăƒ»modding-dev

1 messages · Page 253 of 1

zealous glen
#

you need to pass an option for Editions to not draw the card underneath

thin anchor
#

no

next timber
#

no its just for debug watch shader, ive got it disabled on the actual edition

strong jacinth
zealous glen
#

some mod might've forgotten a local

sullen fern
#

okay, i found the issue.

#

it's only affecting jokers with a custom rarity

#

(my toki pona and doilus stage jokers)

#

so there's something wrong there

thin anchor
strong jacinth
sullen fern
strong jacinth
#

Lovely/dump/game_object.lua:364

sullen fern
sullen fern
#

gradient.

strong jacinth
thin anchor
#

sorry

strong jacinth
#

Go into:

Mods/lovely/dump/game_object.lua:364
sullen fern
# sullen fern YOU.

do i have to change this into something else now that gradient is deprecated?

open aspen
#

how can i add a description for my enhancement?

sullen fern
#

because i beleive that it's what's causing the crash

daring fern
#

I got it working but how do I make it make a sound when calculating?

strong jacinth
daring fern
strong jacinth
fresh swallow
#

Ok I am trying to find something to use for the top right of my game board. Any ideas?
Right now I am thinking of just having Jimbo’s face and the game name.

strong jacinth
next timber
fresh swallow
next timber
#

oh ok

thin anchor
fresh swallow
#

Ye it’s all good

#

Just looking for something static

daring fern
fresh swallow
#

Decorations or something

open aspen
#

is there anywhere i can see all ways to format text

#

for a description for card?

daring fern
strong jacinth
#

-# I think you use event manager

#

-# But I'm not really sure

strong jacinth
thin anchor
#

this is so confusing i hate this

open aspen
#

i dont understand this

sullen fern
#

how do i make a tooltip for a vanilla thing appear (vanilla enhancements, editons, stickers, etc)

red flower
zealous glen
tall wharf
#

hey n

thin anchor
tall apex
red flower
sullen fern
tall apex
#

Also is that hit reference triple Baka reference

open aspen
#

bro

#

get this guy outta here wtf

thin anchor
tall apex
#

<@&1133519078540185692>

minor furnace
open aspen
#

hes gone

tall apex
#

I’d imagine

open aspen
sullen fern
unkempt thicket
open aspen
#

this is my localization have i done something wrong

#

im getting errors and the game wont load

#

i double checked the mod prefix and the key for the enhancement as well

sullen fern
#

time to work on this guy

#

which should be easy

#

all it really does is apply a seal to selected cards

#

i really could just steal basegame talisman code

dense adder
#

this is pretty much how mail in rebate detects equal rank but it is not triggering for my joker
if context.other_card:get_id() == G.GAME.current_round.LuckyNum_card.id
anyone have insights to checking rank on scored cards

        if context.cardarea == G.play and context.scoring_hand and context.individual then
          if context.other_card:get_id() == G.GAME.current_round.LuckyNum_card.id then
            return{
              message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.xMult } },
              Xmult_mod = card.ability.extra.xMult
            }
          end
        end
      --calc end
    end```
open aspen
sullen fern
#

where's the talisman code located

dense adder
sullen fern
#

there we go

#

so do i just take this and add it to my code

open aspen
#

this is an enhancement, how do I make it show up in a separate window? like the other enhancements

sullen fern
#

like this?

open aspen
#

ur right

modern kindle
#

is there a particularly easy way i can store all visible hands at the start of a run to compare with available hands that couldcome later on in a run?

i have a joker that gives +1 slot per hidden hand revealed but i need to make it retroactively grant slots if a player revealed hands before they got the joker itself

open aspen
#

that also works with modded hands i assume

#

is what ur asking

modern kindle
#

well there are base game hidden hands such as 5oak, 5 flush, etc
but yea i have modded hands that are hidden as well

open aspen
#

eg if more hand types were added

modern kindle
#

but its just meant for when hands become visible in your run info

open aspen
sullen fern
modern kindle
#

hardcoding it in doesnt allow for dynamic changes, im not the only mod out there with hidden hands or lackthereof

sullen fern
#

i probably will have to change set_seal to use my modded seal

rancid bridge
#

trying to make a joker that adds +25 chips for every ace held in hand
yeah how do i do that

open aspen
#

but what im saying is

#

if theres no mods that add hands visible by default

#

you can just hard code it

#

ofc

#

its ideal to be able to just pick it up at the beginning

#

in case a mod DOES add those

#

as long as its only hidden hands added you can make the joker retroactively do it and reference the amount of regular normal non hidden hands in vanilla

#

eg theres 9 regular hand types in vanilla

#

so do "currently visible amount of hand types" - 9

modern kindle
#

thats probably enough of a workaround yea, itd be ideal to just pull it from g.game.hands at run start but i cant seem to make it do that yet

#

at least, not outside of a card

open aspen
#

yea

#

like for now u can do that

#

and if u figure it out after u can update it

sullen fern
#

okay, alabell works.

#

let's go.

#

but it only applies to one card and not two

remote sequoia
#

Hm. Is it impossible to give a SMODS joker a default cost of $0? I have cost = 0 but it's still charging a dollar.
I wouldn't mind the price but the joker in question gives money when it's added, and the -$1 popup always overwrites the +$ one (adding delay just makes both take a bit unfortunately).

sullen fern
#

how do i make it apply to two cards and not one

#

i changed G.hand.highlighted to 2 but i dont think that worked

#

how would i do that

quartz ravine
#

Is there a hook for the unscored cards in a hand? I want to...do things to them

remote sequoia
quartz ravine
#

I know I have this

context.full_hand[] as an array

remote sequoia
# remote sequoia looks like strength surrounds the G.E_Manager code in a `for i=1, #G.hand.highli...

like so:

 for i=1, #G.hand.highlighted do
                G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.1,func = function()
                    local card = G.hand.highlighted[i]
                    local suit_prefix = string.sub(card.base.suit, 1, 1)..'_'
                    local rank_suffix = card.base.id == 14 and 2 or math.min(card.base.id+1, 14)
                    if rank_suffix < 10 then rank_suffix = tostring(rank_suffix)
                    elseif rank_suffix == 10 then rank_suffix = 'T'
                    elseif rank_suffix == 11 then rank_suffix = 'J'
                    elseif rank_suffix == 12 then rank_suffix = 'Q'
                    elseif rank_suffix == 13 then rank_suffix = 'K'
                    elseif rank_suffix == 14 then rank_suffix = 'A'
                    end
                    card:set_base(G.P_CARDS[suit_prefix..rank_suffix])
                return true end }))
            end  ```
sullen fern
#

kinda like this

remote sequoia
sullen fern
remote sequoia
#

looks good to me. Keep in mind you'd wanna start a new seed when testing to make absolutely sure it's using the updated code.

sullen fern
#

no it's working

#

working as intended

dense adder
#

This does not want to trigger for some reason, anyone have any clue
if context.other_card:get_id() == G.GAME.current_round.LuckyNum_card.id then

#

Full Code Block

    calculate = function (self, card, context)
        if context.cardarea == G.play and context.scoring_hand and context.individual then
          if context.other_card:get_id() == G.GAME.current_round.LuckyNum_card.id then
            return{
              message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.xMult } },
              Xmult_mod = card.ability.extra.xMult
            }
          end
        end
      --calc end
    end
}
remote sequoia
mint island
#

If you guys know of any cool deck mods send them my way 🙂

frosty dock
# sullen fern

I'd move the unhighlight_all event outside the for loop

tall wharf
#

hello aure how are you doing

#

it's 5:23am

#

i had slept in the evening and drank some tea a few hours before

frosty dock
tall wharf
#

I'll try to sleep

frosty dock
#

damn aiko fix your sleep schedule 😭

tall wharf
#

😭

#

my sleep schedule is beyond fucked

open aspen
#

yall what are all the variables in G

#

like what is G.play.cards returning

frosty dock
#

there's... a lot of stuff in G

#

G.play is an instance of the CardArea class, specifically the one that holds played cards during scoring

#

for any CardArea, its cards is a table containing the cards it holds in order

sullen fern
#

my jokers can now appear in boosters, but they appear very infrequently

#

probably because most of them are rare and uncommon

#

and they don't even appear in the shop

sullen fern
#

it's a doom keycard.

open aspen
#

ye

sullen fern
#

there's no kanji in it at all.

open aspen
#

LOL

#

how did u know thats what i thought

sullen fern
#

you must be seeing things

open aspen
#

i just thought you sneakily included the joker text

sullen fern
#

no i didnt

open aspen
#

u could tho

#

if u wanted

sullen fern
#

but did you see his face?

open aspen
#

i did see

#

that was arguably cooler

#

hes a sneaky jimbo

sullen fern
#

well, there's dream and friends

#

there's joker.vbs

open aspen
open aspen
sullen fern
#

jonklerphone...

sullen fern
#

so yeah, my jokers can appear in the shop.

#

i just don't have any common jokers, so they are relatively rare

storm root
#

im trying to create my own tarot card, can anyone help me figure out what this error means?

open aspen
#

theres no variable called other

#

and ur trying to access it

#

but it dont exist

sullen fern
rapid stag
#

is this process any different if the thing i am trying to do this with is a vanilla joker and thus i need to take ownership?

formal parrot
zealous glen
#

Haven’t tried to say

storm root
#

How do I access the card(s) currently selected via the code?

sullen fern
plush cove
sullen fern
# sullen fern

i know all of you guys are curious about the blank card

storm root
plush cove
#

search for "G.hand.highlighted" in the balatro source code

sullen fern
#

all you really need to do is keep blank card to ante 8

#

speaking of keeping a card to ante 8


#

how would that work in terms of coding

dense adder
#

G.GAME.current_round.LuckyNum_card.id is there something wrong with the .id as everything else is working in the code but when context.other_card:get_id() == G.GAME.current_round.LuckyNum_card.id it never says the values are simular even though this is how mail in rebate works in card.lua

sullen fern
#

there’s also


glacial bloom
#

Brand new to coding. Why am I getting this error?

plush cove
#

Loc_txt should not be uppercase

#

it should be loc_txt

sullen fern
rancid bridge
rancid bridge
gleaming zealot
#

GlobalThunk

fallen osprey
#

I added a consumable type and a card, but now its crashing for some reason along with saying stuff about a previous joker for some reason

glacial bloom
simple mural
lethal ridge
#

hi

#

G is like a global value right

turbid maple
#

G is the global.... game as a whole thingy yes

lethal ridge
#

so theres this thing

turbid maple
#

its the John Balatro himself

lethal ridge
#

G.C. then something

#

where can i find the other colors in here

turbid maple
#

globals.lua

#

or something called like that

lethal ridge
#

inside of balatro source code"?

turbid maple
#

yed

lethal ridge
#

thanks so much

faint plank
frosty dock
#

its set needs to be equal to the key of the consumable type

lethal ridge
#

this should work right?

#

(it isnt)

fallen osprey
#

thanks

wintry solar
lethal ridge
#

when i tested in the game

wintry solar
#

It should do

#

Does the tooltip display correctly?

lethal ridge
#

if so yes

dense adder
#

if its a multiplier shouldn't it return Xmult_mod?

wintry solar
#

No

#

x_mult is fine

#

This should work fully

maiden phoenix
wintry solar
#

Colour doesn’t matter here

#

It won’t do anything

manic rune
#

i thought you put the "unlocked" and "discovered" outside config?

wintry solar
#

You do

manic rune
#

mhm

#

doesn't seem to be related to your issue though

lethal ridge
#

so all of this isnt inside of the bracket right?

manic rune
#

can you try printing card.ability.extra.x_mult outside return?

lethal ridge
#

okay

wintry solar
#

It should be 10 if the tooltip is working

lethal ridge
#

wait it works now

#

finally

#

i dont know how it works now but it does

manic rune
#

damn

#

well thats good ❀

lethal ridge
#

for x_mult when you return from the calculate function

#

does it have to be x_mult specifcally

manic rune
#

x_mult, xmult

lethal ridge
#

okay thanks

manic rune
#

theres probably more but i think thats the two you should know

dense adder
#

can anyone see an issue here
for some reason G.GAME.current_round.LuckyNum_card.id is not returning the rank id

wintry solar
faint plank
wintry solar
#

These are the valid options

lethal ridge
#

i will sav e this

minor furnace
#

what units are card.T.r measured in?

lethal ridge
#

whats that

minor furnace
#

I think it's the rotation

lethal ridge
#

units of rotations?

#

isnt it like radians or degrees then

minor furnace
#

it appears to not be degrees

#

so maybe radians

lethal ridge
#

most likely

vast lily
#

should be easy to test if ur sure its the rotation

lethal ridge
#

does anyone know how the class prefix works?

#

is it like

j_modprefix_jokername

#

or

modprefix_j_jokername

sullen fern
crisp elbow
#

I'm trying to use a function similar to this for doing this but if you own a specific Joker. Do I need to do anything else but this in my toml file?

[patches.pattern]
target = "card.lua"
pattern = "level_up_hand(used_tarot, self.ability.consumeable.hand_type)"
position = "after"
payload = '''
if self.ability.name == 'j_stub_steal_the_moon' then
    level_up_hand(used_tarot, self.ability.consumeable.hand_type)
end
'''
match_indent = true
manic rune
#

its the same for other object keys too

lethal ridge
#

okay thanks

#

so if i want to reference to a joker i need to always add j_ right?

crisp elbow
#

correct

vast lily
#

anyone know how to use SMODS.Back to make a deck that starts with multiple vouchers unlocked?

SMODS.Back({
    atlas = "clueless_deck",
    config = {
        voucher = "v_tarot_tycoon",
        clueless = true,
    },
-- truncated for brevity just assume theres another } down here eventually

this config assignment allows it to start with tarot tycoon unlocked, but i wanna start with tarot merchant also

soft echo
#

what's a good resource to learn how to mod the game?

lethal ridge
#

like this
voucher = "v_tarot_tycoon", "v_tarot_merchant",

vast lily
lethal ridge
vast lily
soft echo
lethal ridge
glacial bloom
#

The badge color won't change. In game, it is still the default color

lethal ridge
#

{
voucher,
voucher2
}

vast lily
#

ooo maybe

#

love me a good set of nested arrays

sonic cedar
#

so how would i return the actual score? i cant use stone_tally because it's considered a global...

fallen osprey
vast lily
#

looks like balatro doesnt share my passion for nested arrays

lethal ridge
#

rip

frosty dock
vast lily
#

u are the goat

#

thanks

fallen osprey
#

nevermind it appeared

faint plank
lethal ridge
#

wait whatt

#

SMODS.load_file()

#

u can load extra lua files?

frosty dock
#

yep

sonic cedar
#

omg its john smods,,,

glacial bloom
#

Does anybody know why the badge color doesnt change in the game? It is still the default color

sullen fern
minor furnace
#

as best as I can understand, card.T.r controls card rotation? I've tried changing its value in set_sprites but it doesn't appear to do anything

thin anchor
#

no idea what this means i did not touch anything related to the atlas
please help me

crisp elbow
#

My poor doise


minor furnace
#

anyone know the proper way to do sprite rotation?

red flower
sullen fern
sonic cedar
#

unless you mean i need to also put it somewhere in the calculate function?

lethal ridge
#

i think i should put my mod onto github

red flower
sonic cedar
#

ohhh ok

#

ill do that rq

sullen fern
red flower
# sonic cedar ?

yes but it's not card.ability.extra.stone_tally, just stone_tally

sonic cedar
#

ok thanks

#

didnt catch thanks

#

i said thanks twice

#

but yeah ill see if it works

#

it works! thanks!

thin anchor
# sullen fern

make it so the dead doise summons peddito and crashes your game blueprint

fallen osprey
#

consumable didnt have a texture so I added atlas and its crashing, please help

open aspen
#

if using a a calculate function within a card, can I get the index of the card im calculating from? I want to do an effect that depends on the card to the right of the playing card with my enhancement

#

like eg in played hand, can i get the index of my card

#

and do something to index + 1?

sullen fern
thin anchor
#

oh

gentle rain
# sullen fern

isnt that like the mother 3 placeholder asset or am i mistaken

#

that looks SO familiar

open aspen
#

it might be the pokemon missingno texture

#

not the well known one

#

obviously

gentle rain
#

ye

open aspen
sullen fern
#

its decamark

open aspen
#

its decamark!!!

#
Bulbapedia

For other uses of question marks in the Pokémon games, see Question marks.
?????????? redirects here. For the numerous identically named glitch Pokémon in the fifth generation, see List of Pokémon by index number in Generation V#Glitch Pokémon.

??????????, also known as ten question marks or its fan-given nickname, Decamark, is a glitch Pokémon...

sullen fern
#

my beloved

sullen fern
#

i need to exclude specific cards from the soul pool

#

like the antimatter card

#

and the dead doise

lethal ridge
#

to make a rarity

#

change the weight of the rarity right?

#

how would i make a rarity between rare and legendary? what weight should i set it to?

sullen fern
open aspen
#

something like this?

#

im not sure how it works tho exactly

sullen fern
#

hm

#

if i’m able to control the specific pools cards can appear in

lethal ridge
#

how does this work?

open aspen
#

the thing is

#

i think legendaries automatically go to the soul pool

#

or something

open aspen
#

is there any way to check if a card is equal to another

#

eg if i have an array of cards (my played hand) and my card with an enhancement, is there a way I could loop over all played cards in the array until there is a card equal to my card (e.g a really long winded way to find the index my card is at)

sullen fern
minor furnace
#

how do I render the sprite of a custom consumable upside down?

open aspen
#

but i assume u wouldnt ask if it wasnt both

#

even then idk if its possible but you could have a separate sprite and change the pos value when it needs to be flipped

#

to be the separate flipped one

sullen fern
#

so that way, they’re not included in the soul pool, but they’re still classified as legendary in some way

minor furnace
#

so if they have modded card skins, it shows them flipped upside down

lethal ridge
#

what is the default weight of a rare?

#

i want to make a rarity between rare and legendary and i dont know what to set the weight to

open aspen
#

ohhh

sullen fern
#

what's the color code of the legendary badge

open aspen
minor furnace
#

so it's less of a functionality thing and more of a cosmetic/qol thing

sullen fern
open aspen
#

one of these?

sullen fern
#

oh

open aspen
#

its not labeled for some reason

sullen fern
#

i'm assuming it's the last one

open aspen
#

just rename balatro.exe to balatro.zip and extract

#

sorry

#

i lied

#

just get like 7-zip and literally extract the exe itself

sullen fern
#

why not check the lovely dumps?

tepid crow
#

not every file gets modified and therefore dumped

fallen osprey
#

if i wanted to have a consumable create a planet card, tarot card, or spectral, what should I use to say to make one of those, like is it just 'Planet' or something else

minor furnace
sullen fern
minor furnace
sullen fern
#

completely indistiguishable ingame

fallen osprey
#

oh skyward tardis sorry i didn't mean to be taken seriously i've got no clue either sorry again

sullen fern
open aspen
#

oh god

open aspen
#

we need an are you sure joker

open aspen
#

over having two jokers that are technically the same joker

sullen fern
#

yes but they both have different effects

open aspen
#

you can make a variable to track whether its dead or alive

#

based on that do a specific effect

lethal ridge
#

is it a good idea to make a lua file for each joker or make one huge lua file with all jokers?

open aspen
#

not sure when it becomes dead or alive though

sullen fern
lethal ridge
#

okay thanks

#

ill do that too

sullen fern
fallen osprey
dense adder
#

I cannot figure out why G.GAME.current_round.luckyNum_card.id returns nil
i've been trying to figure out the return for Rank from the hook, that shows up correctly on the joker. but G.GAME.current_round.luckyNum_card.id does not output as anything

    config = {extra = {rank_mod = 14, xMult = 1.25}},
    loc_vars = function(self, info_queue, card)
      return { vars = { localize(G.GAME.current_round.luckyNum_card.rank, 'ranks'), card.ability.extra.xMult} }
    end,
    
    calculate = function (self, card, context)
        if context.cardarea == G.play and context.scoring_hand and context.individual then
          if context.other_card:get_id() == G.GAME.current_round.luckyNum_card.id then
            return{
              message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.xMult } },
              Xmult_mod = card.ability.extra.xMult
            }
          end
        end
      --calc end
    end
}


---hook [Used by Lucky Number/]
local igo = Game.init_game_object
function Game:init_game_object()
  local ret = igo(self)
  ret.current_round.luckyNum_card = { rank = 'Ace' }
  return ret
end

function SMODS.current_mod.reset_game_globals(run_start)
    -- The rank changes every round taken from example
    G.GAME.current_round.luckyNum_card = { rank = 'Ace' }
    local valid_luckyNum_cards = {}
    for _, v in ipairs(G.playing_cards) do
        if not SMODS.has_no_rank(v) then -- Abstracted enhancement check for jokers being able to give cards additional enhancements
          valid_luckyNum_cards[#valid_luckyNum_cards + 1] = v
        end
    end
    if valid_luckyNum_cards[1] then
        local luckyNum_card = pseudorandom_element(valid_luckyNum_cards, pseudoseed('LuckyNum' .. G.GAME.round_resets.ante))
        G.GAME.current_round.luckyNum_card.rank = luckyNum_card.base.value
        end
end

open aspen
open aspen
fallen osprey
open aspen
fallen osprey
#

ok im done goodnight fellas

open aspen
#

if dead display the texture of dead etc

#

and if dead do the specific effect

sullen fern
open aspen
#

then ig on blind select you can have it die by changing the variable

#

or come alive

sullen fern
#

and have the description dynamically change

open aspen
#

yea

open aspen
sullen fern
#

eg. “x whatever for y thing (the doise is currently alive!)”

open aspen
#

like even if theres just a way to check if cards are equal my problem is solved

#

i can go from there

lethal ridge
#

how do i reference to my folders in my mod

#

i want my main lua file to run everysingle lua file in a folder

old bane
#

will trying to spawn a joker with a rarity that has default_weight = 0 prevent it from spawning anything but a Jimbo? because idk what's wrong with my rarity esp because the only other rarity i have works fine when trying to spawn it from another card/tag

sullen fern
open aspen
lethal ridge
open aspen
#

and i made a definitions file with this code

lethal ridge
#

but what is UTM in this case

sullen fern
#

i assume i can do the same thing with blank card turning into antimatter card

open aspen
#

where each entry is the name of the enhancement (in this case i have a tagger.lua file so i wrote "tagger")

sullen fern
#

though antimatter card is legendary and blank card is rare

open aspen
slender mango
open aspen
#

you can name it whatever

lethal ridge
#

ok thanks so much

open aspen
#

i named it UTM cause my mod is called Untitled Tag Mod

#

and then u load file the definitions file and util file u made with that code

#

then u can just call UTM.load_cards(UTM.cardtype, "path to the folder with all ur cards of that type")

open aspen
lethal ridge
#

okay thanks goat

sullen fern
#

so i'm probably gonna have to remove the loc_txt section from my joker and do it inside the localization file

open aspen
#

so i have a table for enhancements, once i add jokers ill make a table for jokers the same way

sullen fern
#

if i want it to dynamically switch

sullen fern
#

let me do that real quick

open aspen
#

idk for sure but i do know i saw something like that

open aspen
slender mango
sullen fern
#

i saw this while looking at the balatro mod wiki

#

i'll have to investigate for myself

open aspen
#

like cause these arent just numbers

#

they are tables representing card objects i believe

slender mango
#

i feel like it should

old bane
#

how do i make a joker rarity not available in shop but available to be spawned in by cards like Soul?

open aspen
#

same

old bane
#

yeah but like

#

i don't want it from soul specifically

#

i want it from my modded soul which spawns specifically that rarity

old bane
#

i'm doing that and im just getting jimbo whenever i try to spawn one in

lethal ridge
#

so something like this right?

narrow maple
open aspen
#

alright look here

open aspen
lethal ridge
#

okay

open aspen
#

the only thing in main_util is this function (it uses UTM in it because eventually I load it to my main.lua file and that is where UTM is defined)

#

in card defs i have tables created for each card type (atm i have only 1 card which is an enhancement)

lethal ridge
#

ohh

open aspen
#

and the entries correspond exactly to the name of my lua files

sullen fern
lethal ridge
#

UTM is a variable defined in the main.lua right?

open aspen
#

now in main i have this

sullen fern
#

but im glancing at this...

open aspen
#

u can see UTM = {} at the top

#

then we load file on the main_util and cardDefs in our main.lua

lethal ridge
#

the function inside the util will also be available in the main file?

open aspen
#

Yes because we did it as UTM.load_cards in our util file

sullen fern
open aspen
#

imagine load_file as literally taking the code from the other file and putting it in main.lua

#

then it makes more sense on why it works

lethal ridge
#

thank you goat

sullen fern
#

this'll probably solve the whole "changing the description dynamically" thing

open aspen
#

im not sure if thats 100% accurte on how it works but đŸ€·â€â™‚ïž

#

yea and then u can see at the bottom i load all cards in the UTM.enhancements table i made in defs

#

and also thats where i put the actual path to where the card defs are

manic rune
#

anyone used blind calculation before?

minor furnace
#

well, I've still got nothing for rotating sprites

open aspen
manic rune
open aspen
manic rune
#

is there anything wrong with this

sullen fern
minor furnace
sullen fern
#

i want it to change the soul sprite as well

manic rune
#

calculation in blinds exists mow

#

now

#

so im trying to get it working

open aspen
#

what does calculation in blinds mean

#

like literally a blind

#

like a boss blind u made

manic rune
#

yes

minor furnace
#

I don't see a calculate function on the wiki

manic rune
#

before calculate function didnt exist

sullen fern
manic rune
#

so you would have to do some wonky stuff to get some otherwise basic functions going

#

...i dont really know what the contexts are though

open aspen
#

is the api docs even updated

manic rune
#

nop

open aspen
#

ok i cant help cause im big stupid without docs

#

well maybe i can

#

if i check the repo

manic rune
#

SMODS.Blind didnt even have the calculate added yet :3

open aspen
#

WHAT

#

ugh

maiden river
#

we need a version of the "read the fucking docs" gif but with a big red X over it

open aspen
#

ok i really cant help then

maiden river
#

to represent stuff that's not documented

open aspen
#

yall

#

please

red flower
#

I LOVE UNDOCUMENTED FUNCTIONS

manic rune
#

WE ALL LOVE UNDOCUMENTED FUNCTIONS đŸ—Łïž

open aspen
#

is there an easy way to get the index of the enhancement I made in the played hand

#

can i literally just loop over the cards and say self == played_hand[i]

red flower
#

i haven't used them yet but calculate in blinds should be exactly the same as any other object

open aspen
#

or something

manic rune
#

...im just gonna print out the entire context table

#

and see how to get it working

vast lily
open aspen
#

oh thank you sir

manic rune
#

it doesn't

maiden river
manic rune
#

💔

red flower
#

its not called blind_main

manic rune
#

fair point, what context would i use for the same timing though

red flower
#

let me see the code

manic rune
#

much thanks 🙏

open aspen
#

why is scoring_hand = scoring_hand

#

like wait if i want to use this context how do I as a developer access the scoring hand now

manic rune
#

context.scoring_hand

open aspen
#

ty 🙏

red flower
manic rune
#

mmm

#

oke i will try that, thanks :D

sullen fern
dense adder
#

is there anything else i could use past G.GAME.current_round.luckyNum_card.id to get a changing rank per rounds id this for some reason will return nil from me

manic rune
#

:3 what the fuck

open aspen
#

bro typed xmult=.5 and the game died

manic rune
#

it seems to be the same for other contexts

open aspen
#

(can i check/set the edition/enhancement/seal of cards easily)

manic rune
#

what the hell

open aspen
#

i cannot find the docs

sullen fern
# sullen fern

this is what i'm gonna make doise do
swap between having it do mult when scored and chips when scored

manic rune
sullen fern
#

and debuffing specific rank cards

open aspen
#

how does one do that

#

sorry for the dumb questions 💀

manic rune
#

card.edition.key will return you the key of the edition

#

edition can be nil though, so i suggest checking that

open aspen
#

would setting that change the edition?

manic rune
#

nop

#

thats just for getting the key

#

you use card:set_edition() for that one

open aspen
#

ok tbh its probably easier if i explain what the functionality im doing is: i want to swap the enhancements of two cards

#

oh okay

keen tiger
#

Sorry if this is a stupid question. I have a project idea that would require a mod but I'm unsure where to start. Is there a wiki/guide to modding available somewhere?

open aspen
#

i assume there would be :set_enhancement(), and that card.enhancement.key would be nil as well if it has none right?

manic rune
#

nop

#

that would be set_ability

open aspen
#

cool

minor furnace
#

I will be back in 45 minutes to continue attempting to figure out consumable sprite rotation

open aspen
#

would card.ability.key give me the key then?

manic rune
#

card:set_ability(G.P_CENTERS["enhancement_key"], nil, true)

manic rune
open aspen
twilit cargo
#

might be card.config.center_key

sullen fern
#

time to spend millions of hours trying to get the doise to work

twilit cargo
#

oh wait for the enhancement?

open aspen
#

why is there no docs on SMODS.center

#

😭

manic rune
#

mhm

keen tiger
#

Another stupid question: Are balatro mods limited to specifically just card/mechanic additions or can you literally just do whatever as long as it doesnt crash

sullen fern
#

cryptid

open aspen
#

ive seen mods that literally force u to play boss blinds consecutively

keen tiger
#

I don't know if there are or where modding resources are so I'm presumably going to be asking a lot of stupid questions here

open aspen
#

so

#

probably not

hardy viper
manic rune
#

i am so

#

confused

#

is this wrong??
-# its the calculate function of a blind

rancid lily
#

hi, someone knows why is this? I donÂŽt understand

open aspen
#

wait is it possible to have two enhancements on a card

keen tiger
#

Is there any starter guide for modding?

open aspen
#

that would let me get around this issue because i would like that to be the behaviour of the card anyways

rancid bridge
keen tiger
twilit cargo
open aspen
rancid bridge
keen tiger
#

ill get out of your hair now

twilit cargo
sullen fern
#

so all i really need the doise card to do is
swap to being dead on odd numbered rounds and alive on even numbered rounds

open aspen
#

can someone explain quantum enhancements to me?

sullen fern
#

and swap between mult and chips

#

well, xmult

#

actually, nop

#

just mult

dense adder
open aspen
#

ok nvm i guess quantum enhancments suck

#

can i just have two enhancements on a card?

sullen fern
#

now how do i do the whole "swapping between dead and alive" thing

open aspen
keen tiger
open aspen
#

outside seals editions and enhancements

keen tiger
#

awesome 🙂

sullen fern
open aspen
#

probably is

#

but i wouldnt know how

sullen fern
#

maybe i could do the swap per round

#

so like

modern kindle
#

could just make it swap on context.end_of_round

sullen fern
#

when the round ends the doise dies

#

so like, will "pos_override" and "soul_pos_override" do anything

open aspen
sullen fern
#

"pos_override" is in the cassette block code already so i believe that'll work

#

i just don't know about "soul_pos_override"

modern kindle
#

you can return the enhancements of more than 1 for a single card

#

so you can have gold and steel or whatever

open aspen
#

or like how does that work

#

ive heard about them but dont know how to use them

thin anchor
#

all of these commands in DebugPlus dont work. can anyone tell me why?

sullen fern
#

it'll swap every time the round ends.

modern kindle
sullen fern
#

so the "dead" variable needs to be set to true when the round ends

#

if the doise is dead, then it needs to show the dead description and texture

#

basically.
on the end of the round, set "dead" to true

#

if "dead" is true, use the alternate description and texture

#

repeat for becoming alive again

modern kindle
thin anchor
#

i just installed it not too long ago

open aspen
#

now to figure out how they wor

#
if context.check_enhancement and context.other_card.config.center.key == 'm_gold' then
  return { m_steel = true }
end

this is code i found

#

i assume i can just do if context.check_enhancement then return {m_tagger = true}

#

im not sure if i can though

#

wait tbh idk how this works

sullen fern
modern kindle
open aspen
#

cause like i just want my enhancement to not be overwritten by others, or overwrite others thats all

sullen fern
#

this means i need to change the description when "dead" is true

open aspen
#

its not a joker that makes enhancements compatible

#

fml bro

sullen fern
#

it sounds simple but

#

it's probably sorta complex

manic rune
#

hi dillyyyyy

open aspen
#

why is this wrong

#

this whole code might be wrong honestly, its supposed to swap the enhancements of two cards

minor furnace
#

all right, time to lock tf in and figure out how to rotate a sprite

sullen fern
#

i need to lock in myself

#

i need doise DONE

open aspen
#

LOCK IN

rancid bridge
#

i'm trying to make a joker that gives +25 chips for every ace in your hand...
i very much need help

sullen fern
#

if only i could figure out how to do the whole "swapping between two different descriptions

open aspen
#

GET IT TWISTED

minor furnace
#

your actions influence nothing

open aspen
minor furnace
#

your fate is predetermined, the only thing you can change is your reaction to it

#

GET IT TWISTED

open aspen
sullen fern
#

actually i should just get the whole "swapping between dead and alive" thing done

open aspen
#

yall how do i print

sullen fern
#

before i do any texture and text swapping shenanigans

open aspen
#

like

#

if i do print("") where can i see it

minor furnace
#

I remember him back from the Isaac days

sullen fern
#

please sort your salad before proceeding

open aspen
#

u have recommendations for northernlion

#

i just got into watching him

native zinc
#

is there a way to detect if something is retriggered

open aspen
minor furnace
sullen fern
#

i know its like

#

end of round context related

open aspen
#

how do print statements work

minor furnace
sullen fern
#

that's what i'm doing

#

which is the "dead" variable

minor furnace
open aspen
#

yes

#

where does said print go

#

like does it straight up show up in game

sullen fern
#

basically, when the doise is dead, it uses chips instead of mult

minor furnace
open aspen
#

cool thx

sullen fern
#

so i want to set chips to a specific amound and mult to 0 when the doise dies

#

and return them to normal when hes alive again

minor furnace
minor furnace
sullen fern
#

cassete block does this for it's alternate description

#

well first i'd want to do the whole "even cards scpre mult and odd cards are debuffed" thing

#

should i do the swapping first or this first

minor furnace
#

if you want to update the description you could probably do something checking variables in your loc_vars() and returning different values accordingly

sullen fern
#

put "dead" in loc vars instead

twilit cargo
mellow widget
#

when using the G.C. stuff for color, how would i do yellow?

minor furnace
sullen fern
minor furnace
sullen fern
#

actually no thats not how you do it

minor furnace
# sullen fern \
    return {vars = {"alive"}}
else
    return {vars = {"dead"}}
end```
sullen fern
#

yeah, this is happening.

open aspen
#

whats the correct way to get the enhancement of a card

#

cause this is not it

red flower
minor furnace
open aspen
#

^

rancid bridge
sullen fern
red flower
open aspen
#

i think you can just return {"alive"}

sullen fern
rancid bridge
limber blaze
sullen fern
#

should i, yknow, code the actual effect of the joker?

red flower
rancid bridge
#

the joker itself

sullen fern
#

and then doing the opposite when dead

rapid stag
#

...where does _generate_main_end(card) belong? cirLost nvm, forgot a comma

sullen fern
#

chips for odd rank cards but debuffing even rank cards

red flower
# rancid bridge the joker itself

then you need to use context.joker_main and iterate through G.hand.cards to get all the aces then return { chips = card.ability.extra.your_chips_amount * ace_count }

open aspen
red flower
minor furnace
#

I'd been using card.config.center.key to get the enhancement 💀

open aspen
#

this is the full code

rancid bridge
red flower
open aspen
#

what if i have it off

#

omg i hate this so much

#

give me good documentation PLEASE

minor furnace
red flower
minor furnace
#

because I do this:

  G.hand.highlighted[i]:set_ability(rightmost.config.center.key)```
open aspen
sullen fern
#

that being even rank

open aspen
#

im sure it would work if i did card.config.center.key

red flower
open aspen
#

but context.scoring_hand[index + 1].config.center.key dont work

modern kindle
rancid bridge
open aspen
#

ok well card.config.center.key just gives enhanced anyways

#

which isnt helpful

#

rn

sullen fern
#

time to put stuff in the calculate section

rose dragon
#

is there a general overall calculate function for blinds (similar to the joker calc function)

modern kindle
#

yea there is blind calc in latest smods, im not sure if the wiki is updated for it

mellow widget
#

how would i check for every joker with a specific badge i made?

minor furnace
red flower
rose dragon
open aspen
#

your thing makes more sense anyways

minor furnace
modern kindle
#

calculate*

open aspen
#

yes

rancid bridge
native zinc
# open aspen

tbf i want to do something like "+20 chips when something is retriggered"

#

i don't necessarily understand how this context does that

sullen fern
#

now, time to do the calculating thing.

open aspen
#

i only have docs to help ppl with

minor furnace
#

ok time to lock in and figure out card rotation for real now

open aspen
#

SMODS.get_enhancements(context.scoring_hand[index + 1])

also printing this gives an empty table, while printing SMODS.get_enhancements(card) prints my enhancement

slow crater
#

what, in balatro you can't make gif or webm jokers? only png?

open aspen
#

so that makes me think context.scoring_hand[index + 1] is not a playing card the same way that "card" is a playing card

minor furnace
minor furnace
#

oh nvm then

sullen fern
slow crater
#

Well, I set everything up, but the game breaks.

open aspen
#

it should at least print like, base, or something

#

right?

#

i just played 3 sixes

#

one was enhanced with my custom enhancement

#

and it was the first card

red flower
#

what's index

minor furnace
open aspen
#

i am doing that

native zinc
slow crater
native zinc
#

i want to detect retriggers

slow crater
#

(

open aspen
sullen fern
#

never did one before

native zinc
open aspen
#

i might be missing something

native zinc
#

not retriggers on the joker

open aspen
slow crater
# sullen fern sorry, i don't

do you know what kind of animated jokers there are in balatro, that i took an example from them. it's just that they are all static there

minor furnace
# open aspen

also generally if I'm indexing I do
for i=1, #contxt.scoring_hand do

open aspen
#

or something idk exactly what each context does

open aspen
#

i believe

#

unless i have a large fundamental misunderstanding somewhere (entirely possible)

native zinc
#

so i can forloop it

slow crater
native zinc
#

"+20 chips when card is retriggered"

sullen fern
native zinc
#

like via red seal or whatever

open aspen
open aspen
#

right?

sullen fern
#

it has an animated joker called jimball

native zinc
#

yes and i dont want to hardcode

open aspen
#

thats when u want to use context

native zinc
#

context.retrigger_joker just retriggers the joker

open aspen
#

thats not what that does

slow crater
#

thanks

#

i will check

open aspen
#

i think

#

i mean it definitely doesnt retrigger it

native zinc
#

. it is searching if the joker is being retriggered

#

it doesnt no

#

if the joker is retriggered then its it's in that context

#

that's still not what i what

open aspen
#

yea

#

u need for playing cards

slow crater
#

1 or 2?

modern kindle
#

then just do context.repetition

open aspen
#

1

red flower
open aspen
#

but

#

yea

#

it seems ton be only jokers by the text

open aspen
red flower
#

no idea

sullen fern
#

okay, time to actually code the joker......

#

and the effect of the joker....

#

which is debuffing odd rank cards and giving mult for even rank ones

open aspen
# red flower no idea

see even if i print the enhancement of "otherCard" it gives me the tagger enhancement, so why does just getting the card at the next index not fuggin work

native zinc
#

i'm still doing this in joker.main

modern kindle
#

yea it is, i had misunderstood what you wanted

open aspen
#

ok i think i understood it better

open aspen
native zinc
sullen fern
#

which is only for even rank cards

red flower
native zinc
#

i'm detecting card retriggers

red flower
#

oh i read jokers

native zinc
#

oh its maybe card.ability.extra.retriggers

sullen fern
native zinc
#

i'm just reading source code atp

gusty iron
#

how do i spawn a joker using debugplus?

sullen fern
#

3

native zinc
red flower
native zinc
#

press 3

gusty iron
#

and if i dont have it in my collection?

sullen fern
#

2 to unlock it

sonic cedar
#

-# you can hold Tab to see the command list

red flower
manic rune
#

gkfnfnf

#

i give up

modern kindle
#

bepisss

gusty iron
manic rune
#

blind calculate is confusing

#

💔

modern kindle
#

make it un confusing

rapid stag
#

~~i'm just getting attempting to call nil value errors

switching between self and card doesn't change anything, nor does doing [1] for either.

commenting out the four function calls i do before the return reveals that it's not the cause.

have no idea why this is happening or what i'm doing wrong here cirLost

...actually, what am i doing, why don't i just store my desired text to set as a variable~~
oh my god i mispelled my function name

manic rune
manic rune
modern kindle
#

whatre you tryna do

slow crater
#

in general, when installing the crypted mod, it asked to also install the talisman mod, like it doesn't work without it, but after installation the game breaks, it goes to the menu, and then you press any button and an error

manic rune
#

after playing a hand

#

X0.5 Mult

red flower
#

evil

open aspen
#

great so this mod somehow is breaking cryptid?

#

how

#

tf

manic rune
#

-# there's x0.5 chips too but i gotta get the mult working first

slow crater
red flower
#

you need to update it

manic rune
#

update your smods

worthy gull
#

Heya anyone have any links to a quick guide for modding balatro?

red flower
#

bepis!!!

manic rune
#

:3

minor furnace
#

for rotating cards, I'm wondering if I might need to hook into CardArea:align_cards()

open aspen
red flower
#

just coded the hardest thing i ever had to do

open aspen
#

after adding this code its killing cryptid somehow

gusty iron
#

could someone send me a repository of how to do alot of things with jokers? or is it just trial and error

sullen fern
#

the description works, at least

open aspen
#

gives + nil mult

#

loc vars be damned

#

guys is there anything wrong with how i do this

#

cause this is crashing the game entirely

rancid bridge
#

damn it
what does it mean...

sullen fern
#

becaus elike

rancid bridge
open aspen
#

this is my card

modern kindle
open aspen
#

you see that #1#

#

i believe that refers to the first thing in the table you return in loc vars

sonic cedar
open aspen
#

in my case

sullen fern
rancid bridge
stray warren
open aspen
open aspen
sonic cedar
native zinc
open aspen
open aspen